[cmake-commits] martink committed cmDocumentation.cxx 1.52 1.53 cmDocumentationFormatterHTML.cxx 1.2 1.3 cmDocumentationFormatterMan.cxx 1.2 1.3 cmDocumentationFormatterText.cxx 1.1 1.2 cmDocumentationFormatterUsage.cxx 1.1 1.2 cmDumpDocumentation.cxx 1.16 1.17 cmPropertyDefinition.cxx 1.6 1.7 cmPropertyDefinitionMap.cxx 1.1 1.2 cmStandardIncludes.h 1.67 1.68 cmake.cxx 1.320 1.321 cmake.h 1.88 1.89 cmakemain.cxx 1.67 1.68 ctest.cxx 1.96 1.97

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Oct 9 09:55:44 EDT 2007


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv24030/Source

Modified Files:
	cmDocumentation.cxx cmDocumentationFormatterHTML.cxx 
	cmDocumentationFormatterMan.cxx 
	cmDocumentationFormatterText.cxx 
	cmDocumentationFormatterUsage.cxx cmDumpDocumentation.cxx 
	cmPropertyDefinition.cxx cmPropertyDefinitionMap.cxx 
	cmStandardIncludes.h cmake.cxx cmake.h cmakemain.cxx ctest.cxx 
Log Message:
ENH: make documentation entries actually store their data


Index: cmPropertyDefinition.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmPropertyDefinition.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- cmPropertyDefinition.cxx	11 Jul 2007 19:53:58 -0000	1.6
+++ cmPropertyDefinition.cxx	9 Oct 2007 13:55:42 -0000	1.7
@@ -22,8 +22,8 @@
   cmDocumentationEntry e;
   e.name = this->Name.c_str();
   e.brief = 
-    this->ShortDescription.size() ? this->ShortDescription.c_str() : 0;
-  e.full = this->FullDescription.size() ? this->FullDescription.c_str() : 0;
+    this->ShortDescription.size() ? this->ShortDescription.c_str() : "";
+  e.full = this->FullDescription.size() ? this->FullDescription.c_str() : "";
   return e;
 }
 

Index: cmDocumentationFormatterHTML.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDocumentationFormatterHTML.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- cmDocumentationFormatterHTML.cxx	19 Sep 2007 14:46:37 -0000	1.2
+++ cmDocumentationFormatterHTML.cxx	9 Oct 2007 13:55:42 -0000	1.3
@@ -33,13 +33,13 @@
   // Use an escape sequence if necessary.
   static cmDocumentationEntry escapes[] =
   {
-    {"<", "&lt;", 0},
-    {">", "&gt;", 0},
-    {"&", "&amp;", 0},
-    {"\n", "<br>", 0},
-    {0,0,0}
+    {"<", "&lt;", ""},
+    {">", "&gt;", ""},
+    {"&", "&amp;", ""},
+    {"\n", "<br>", ""},
+    {"","",""}
   };
-  for(const cmDocumentationEntry* op = escapes; op->name; ++op)
+  for(const cmDocumentationEntry* op = escapes; op->name.size(); ++op)
     {
     if(op->name[0] == c)
       {
@@ -97,25 +97,25 @@
     os << "<h2>" << name << "</h2>\n";
     }
   if(!section) { return; }
-  for(const cmDocumentationEntry* op = section; op->brief;)
+  for(const cmDocumentationEntry* op = section; op->brief.size();)
     {
-    if(op->name)
+    if(op->name.size())
       {
       os << "<ul>\n";
-      for(;op->name;++op)
+      for(;op->name.size();++op)
         {
         os << "  <li>\n";
         if(op->name[0])
           {
           os << "    <b><code>";
-          this->PrintHTMLEscapes(os, op->name);
+          this->PrintHTMLEscapes(os, op->name.c_str());
           os << "</code></b>: ";
           }
-        this->PrintHTMLEscapes(os, op->brief);
-        if(op->full)
+        this->PrintHTMLEscapes(os, op->brief.c_str());
+        if(op->full.size())
           {
           os << "<br>\n    ";
-          this->PrintFormatted(os, op->full);
+          this->PrintFormatted(os, op->full.c_str());
           }
         os << "\n";
         os << "  </li>\n";
@@ -124,7 +124,7 @@
       }
     else
       {
-      this->PrintFormatted(os, op->brief);
+      this->PrintFormatted(os, op->brief.c_str());
       os << "\n";
       ++op;
       }

Index: cmDocumentation.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDocumentation.cxx,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- cmDocumentation.cxx	20 Sep 2007 12:33:07 -0000	1.52
+++ cmDocumentation.cxx	9 Oct 2007 13:55:41 -0000	1.53
@@ -21,7 +21,7 @@
 #include <cmsys/Directory.hxx>
 
 
-const cmDocumentationEntry cmDocumentation::cmSection::EmptySection ={0,0,0};
+const cmDocumentationEntry cmDocumentation::cmSection::EmptySection ={"","",""};
 
 //----------------------------------------------------------------------------
 static const cmDocumentationEntry cmDocumentationStandardOptions[] =
@@ -43,165 +43,165 @@
    "If a file is specified, the help is written into it."},
   {"--version [file]", "Show program name/version banner and exit.",
    "If a file is specified, the version is written into it."},
-  {0,0,0}
+  {"","",""}
 };
 
 //----------------------------------------------------------------------------
 static const cmDocumentationEntry cmModulesDocumentationDescription[] =
 {
-  {0,
+  {"",
   "  CMake Modules - Modules coming with CMake, the Cross-Platform Makefile "
-  "Generator.", 0},
+  "Generator.", ""},
 //  CMAKE_DOCUMENTATION_OVERVIEW,
-  {0,
+  {"",
   "This is the documentation for the modules and scripts coming with CMake. "
   "Using these modules you can check the computer system for "
   "installed software packages, features of the compiler and the "
-  "existance of headers to name just a few.", 0},
-  {0,0,0}
+  "existance of headers to name just a few.", ""},
+  {"","",""}
 };
 
 //----------------------------------------------------------------------------
 static const cmDocumentationEntry cmCustomModulesDocumentationDescription[] =
 {
-  {0,
-  "  Custom CMake Modules - Additional Modules for CMake.", 0},
+  {"",
+  "  Custom CMake Modules - Additional Modules for CMake.", ""},
 //  CMAKE_DOCUMENTATION_OVERVIEW,
-  {0,
+  {"",
   "This is the documentation for additional modules and scripts for CMake. "
   "Using these modules you can check the computer system for "
   "installed software packages, features of the compiler and the "
-  "existance of headers to name just a few.", 0},
-  {0,0,0}
+  "existance of headers to name just a few.", ""},
+  {"","",""}
 };
 
 //----------------------------------------------------------------------------
 static const cmDocumentationEntry cmPropertiesDocumentationDescription[] =
 {
-  {0,
+  {"",
    "  CMake Properties - Properties supported by CMake, "
-   "the Cross-Platform Makefile Generator.", 0},
+   "the Cross-Platform Makefile Generator.", ""},
 //  CMAKE_DOCUMENTATION_OVERVIEW,
-  {0,
+  {"",
    "This is the documentation for the properties supported by CMake. "
    "Properties can have different scopes. They can either be assigned to a "
    "source file, a directory, a target or globally to CMake. By modifying the "
    "values of properties the behaviour of the buildsystem can be customized.",
-   0},
-  {0,0,0}
+   ""},
+  {"","",""}
 };
 
 //----------------------------------------------------------------------------
 static const cmDocumentationEntry cmCompatCommandsDocumentationDescription[] =
 {
-  {0,
+  {"",
    "  CMake Compatibility Listfile Commands - "
-   "Obsolete commands supported by CMake for compatibility.", 0},
+   "Obsolete commands supported by CMake for compatibility.", ""},
 //  CMAKE_DOCUMENTATION_OVERVIEW,
-  {0,
+  {"",
   "This is the documentation for now obsolete listfile commands from previous "
   "CMake versions, which are still supported for compatibility reasons. You "
-  "should instead use the newer, faster and shinier new commands. ;-)", 0},
-  {0,0,0}
+  "should instead use the newer, faster and shinier new commands. ;-)", ""},
+  {"","",""}
 };
 
 //----------------------------------------------------------------------------
 static const cmDocumentationEntry cmDocumentationCommandsHeader[] =
 {
-  {0,
-   "The following commands are available in CMakeLists.txt code:", 0},
-  {0,0,0}
+  {"",
+   "The following commands are available in CMakeLists.txt code:", ""},
+  {"","",""}
 };
 
 //----------------------------------------------------------------------------
 static const cmDocumentationEntry cmDocumentationGlobalPropertiesHeader[] =
 {
-  {0,
-   "The following global properties are available in CMakeLists.txt code:", 0},
-  {0,0,0}
+  {"",
+   "The following global properties are available in CMakeLists.txt code:", ""},
+  {"","",""}
 };
 
 //----------------------------------------------------------------------------
 static const cmDocumentationEntry cmDocumentationDirectoryPropertiesHeader[] =
 {
-  {0
+  {""
    ,"The following directory properties are available in CMakeLists.txt code:"
-   ,0},
-  {0,0,0}
+   ,""},
+  {"","",""}
 };
 
 //----------------------------------------------------------------------------
 static const cmDocumentationEntry cmDocumentationTargetPropertiesHeader[] =
 {
-  {0,
-   "The following target properties are available in CMakeLists.txt code:", 0},
-  {0,0,0}
+  {"",
+   "The following target properties are available in CMakeLists.txt code:", ""},
+  {"","",""}
 };
 
 //----------------------------------------------------------------------------
 static const cmDocumentationEntry cmDocumentationTestPropertiesHeader[] =
 {
-  {0
+  {""
    ,"The following properties for tests are available in CMakeLists.txt code:"
-   ,0},
-  {0,0,0}
+   ,""},
+  {"","",""}
 };
 
 //----------------------------------------------------------------------------
 static const cmDocumentationEntry cmDocumentationSourceFilePropertiesHeader[] =
 {
-  {0
+  {""
   ,"The following source file properties are available in CMakeLists.txt code:"
-  , 0},
-  {0,0,0}
+  , ""},
+  {"","",""}
 };
 
 //----------------------------------------------------------------------------
 static const cmDocumentationEntry cmDocumentationVariablePropertiesHeader[] =
 {
-  {0, "The following variables are available in CMakeLists.txt code:", 0},
-  {0,0,0}
+  {"", "The following variables are available in CMakeLists.txt code:", ""},
+  {"","",""}
 };
 
 //----------------------------------------------------------------------------
 static const cmDocumentationEntry 
                              cmDocumentationCachedVariablePropertiesHeader[] =
 {
-  {0,"The following cache variables are available in CMakeLists.txt code:", 0},
-  {0,0,0}
+  {"","The following cache variables are available in CMakeLists.txt code:", ""},
+  {"","",""}
 };
 
 //----------------------------------------------------------------------------
 static const cmDocumentationEntry cmDocumentationModulesHeader[] =
 {
-  {0,
+  {"",
    "The following modules are provided with CMake. "
-   "They can be used with INCLUDE(ModuleName).", 0},
-  {0,0,0}
+   "They can be used with INCLUDE(ModuleName).", ""},
+  {"","",""}
 };
 
 //----------------------------------------------------------------------------
 static const cmDocumentationEntry cmDocumentationCustomModulesHeader[] =
 {
-  {0,
+  {"",
    "The following modules are also available for CMake. "
-   "They can be used with INCLUDE(ModuleName).", 0},
-  {0,0,0}
+   "They can be used with INCLUDE(ModuleName).", ""},
+  {"","",""}
 };
 
 //----------------------------------------------------------------------------
 static const cmDocumentationEntry cmDocumentationGeneratorsHeader[] =
 {
-  {0,
-   "The following generators are available on this platform:", 0},
-  {0,0,0}
+  {"",
+   "The following generators are available on this platform:", ""},
+  {"","",""}
 };
 
 //----------------------------------------------------------------------------
 static const cmDocumentationEntry cmDocumentationStandardSeeAlso[] =
 {
-  {0,
-   "The following resources are available to get help using CMake:", 0},
+  {"",
+   "The following resources are available to get help using CMake:", ""},
   {"Home Page",
    "http://www.cmake.org",
    "The primary starting point for learning about CMake."},
@@ -218,51 +218,51 @@
    "The list is member-post-only but one may sign up on the CMake web page. "
    "Please first read the full documentation at "
    "http://www.cmake.org before posting questions to the list."},
-  {0,
+  {"",
    "Summary of helpful links:\n"
    "  Home: http://www.cmake.org\n"
    "  Docs: http://www.cmake.org/HTML/Documentation.html\n"
    "  Mail: http://www.cmake.org/HTML/MailingLists.html\n"
    "  FAQ:  http://www.cmake.org/Wiki/CMake_FAQ\n"
-   , 0},
-  {0,0,0}
+   , ""},
+  {"","",""}
 };
 
 //----------------------------------------------------------------------------
 const cmDocumentationEntry cmDocumentationAuthor[] =
 {
-  {0,
-   "This manual page was generated by the \"--help-man\" option.", 0},
-  {0,0,0}
+  {"",
+   "This manual page was generated by the \"--help-man\" option.", ""},
+  {"","",""}
 };
 
 //----------------------------------------------------------------------------
 const cmDocumentationEntry cmDocumentationCopyright[] =
 {
-  {0,
+  {"",
    "Copyright (c) 2002 Kitware, Inc., Insight Consortium.  "
-   "All rights reserved.", 0},
-  {0,
+   "All rights reserved.", ""},
+  {"",
    "Redistribution and use in source and binary forms, with or without "
    "modification, are permitted provided that the following conditions are "
-   "met:", 0},
+   "met:", ""},
   {"",
    "Redistributions of source code must retain the above copyright notice, "
-   "this list of conditions and the following disclaimer.", 0},
+   "this list of conditions and the following disclaimer.", ""},
   {"",
    "Redistributions in binary form must reproduce the above copyright "
    "notice, this list of conditions and the following disclaimer in the "
    "documentation and/or other materials provided with the distribution.",
-   0},
+   ""},
   {"",
    "The names of Kitware, Inc., the Insight Consortium, or the names of "
    "any consortium members, or of any contributors, may not be used to "
    "endorse or promote products derived from this software without "
-   "specific prior written permission.", 0},
+   "specific prior written permission.", ""},
   {"",
    "Modified source versions must be plainly marked as such, and must "
-   "not be misrepresented as being the original software.", 0},
-  {0,
+   "not be misrepresented as being the original software.", ""},
+  {"",
    "THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "
    "``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT "
    "LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR "
@@ -273,8 +273,8 @@
    "PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF "
    "LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING "
    "NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS "
-   "SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.", 0},
-  {0, 0, 0}
+   "SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.", ""},
+  {"", "", ""}
 };
 
 //----------------------------------------------------------------------------
@@ -332,18 +332,18 @@
 bool cmDocumentation::PrintCopyright(std::ostream& os)
 {
   for(const cmDocumentationEntry* op = cmDocumentationCopyright;
-      op->brief; ++op)
+      op->brief.size(); ++op)
     {
-    if(op->name)
+    if(op->name.size())
       {
       os << " * ";
       this->TextFormatter.SetIndent("    ");
-      this->TextFormatter.PrintColumn(os, op->brief);
+      this->TextFormatter.PrintColumn(os, op->brief.c_str());
       }
     else
       {
       this->TextFormatter.SetIndent("");
-      this->TextFormatter.PrintColumn(os, op->brief);
+      this->TextFormatter.PrintColumn(os, op->brief.c_str());
       }
     os << "\n";
     }
@@ -441,7 +441,7 @@
     {
     this->ModulesSection.Append(cmDocumentationModulesHeader[0]);
     this->CreateModuleDocsForDir(dir, this->ModulesSection);
-    cmDocumentationEntry e = { 0, 0, 0 };
+    cmDocumentationEntry e = { "", "", "" };
     this->ModulesSection.Append(e);
     }
   return true;
@@ -475,7 +475,7 @@
 
   if(sectionHasHeader)
     {
-    cmDocumentationEntry e = { 0, 0, 0 };
+    cmDocumentationEntry e = { "", "", "" };
     this->CustomModulesSection.Append(e);
     }
   return true;
@@ -927,20 +927,20 @@
 {
   this->SeeAlsoSection.Clear();
   this->SeeAlsoString = ".B ";
-  for(const cmDocumentationEntry* i = also; i->brief; ++i)
+  for(const cmDocumentationEntry* i = also; i->brief.size(); ++i)
     {
     this->SeeAlsoString += i->brief;
-    this->SeeAlsoString += (i+1)->brief? "(1), ":"(1)";    
+    this->SeeAlsoString += (i+1)->brief.size() ? "(1), ":"(1)";    
     }
-  cmDocumentationEntry e = {0, 0, 0};
+  cmDocumentationEntry e = {"", "", ""};
   e.brief = this->SeeAlsoString.c_str();
   this->SeeAlsoSection.Append(e);
   for(const cmDocumentationEntry* i = cmDocumentationStandardSeeAlso;
-      i->brief; ++i)
+      i->brief.size(); ++i)
     {
     this->SeeAlsoSection.Append(*i);
     }
-  e.brief = 0;
+  e.brief = "";
   this->SeeAlsoSection.Append(e);
 }
 
@@ -958,9 +958,9 @@
     return false;
     }
   for(const cmDocumentationEntry* entry = this->CommandsSection.GetEntries();
-      entry->brief; ++entry)
+      entry->brief.size(); ++entry)
     {
-    if(entry->name && this->CurrentArgument == entry->name)
+    if(entry->name.size() && this->CurrentArgument == entry->name)
       {
       this->PrintDocumentationCommand(os, entry);
       return true;
@@ -968,10 +968,10 @@
     }
   for(const cmDocumentationEntry* 
       entry = this->CompatCommandsSection.GetEntries();
-      entry->brief; 
+      entry->brief.size(); 
       ++entry)
     {
-    if(entry->name && this->CurrentArgument == entry->name)
+    if(entry->name.size() && this->CurrentArgument == entry->name)
       {
       this->PrintDocumentationCommand(os, entry);
       return true;
@@ -1061,9 +1061,10 @@
       ++sectionIt)
     {
     for(const cmDocumentationEntry* 
-        entry = sectionIt->second->GetEntries(); entry->brief; ++entry)
+        entry = sectionIt->second->GetEntries(); entry->brief.size(); 
+        ++entry)
       {
-      if(entry->name && this->CurrentArgument == entry->name)
+      if(entry->name.size() && this->CurrentArgument == entry->name)
         {
         this->PrintDocumentationCommand(os, entry);
         return true;
@@ -1086,9 +1087,9 @@
     return false;
     }
   for(const cmDocumentationEntry* entry = this->CommandsSection.GetEntries();
-      entry->brief; ++entry)
+      entry->brief.size(); ++entry)
     {
-    if(entry->name)
+    if(entry->name.size())
       {
       os << entry->name << std::endl;
       }
@@ -1096,10 +1097,10 @@
   os << "\nCompatibility commands:" << std::endl;
   for(const cmDocumentationEntry* 
       entry = this->CompatCommandsSection.GetEntries();
-      entry->brief; 
+      entry->brief.size(); 
       ++entry)
     {
-    if(entry->name)
+    if(entry->name.size())
       {
       os << entry->name << std::endl;
       }
@@ -1117,10 +1118,10 @@
     }
   for(const cmDocumentationEntry* 
       entry = this->GlobalPropertiesSection.GetEntries();
-      entry->brief; 
+      entry->brief.size(); 
       ++entry)
     {
-    if(entry->name)
+    if(entry->name.size())
       {
       os << entry->name << std::endl;
       }
@@ -1132,9 +1133,10 @@
       ++sectionIt)
     {
     for(const cmDocumentationEntry* 
-        entry = sectionIt->second->GetEntries(); entry->brief; ++entry)
+        entry = sectionIt->second->GetEntries(); 
+        entry->brief.size(); ++entry)
       {
-      if(entry->name)
+      if(entry->name.size())
         {
         os << entry->name << std::endl;
         }
@@ -1155,9 +1157,9 @@
     return false;
     }
   for(const cmDocumentationEntry* entry = this->ModulesSection.GetEntries();
-      entry->brief; ++entry)
+      entry->brief.size(); ++entry)
     {
-    if(entry->name)
+    if(entry->name.size())
       {
       os << entry->name << std::endl;
       }
@@ -1167,9 +1169,10 @@
     {
     os << "\nCUSTOM MODULES\n" << std::endl;
     for(const cmDocumentationEntry* 
-        entry = this->CustomModulesSection.GetEntries(); entry->brief; ++entry)
+        entry = this->CustomModulesSection.GetEntries(); 
+        entry->brief.size(); ++entry)
       {
-      if(entry->name)
+      if(entry->name.size())
         {
         os << entry->name << std::endl;
         }
@@ -1253,7 +1256,7 @@
   cmDocumentationEntry singleCommandSection[3] =
     {
       {entry->name, entry->brief, entry->full},
-      {0,0,0}
+      {"","",""}
     };
   this->ClearSections();
   this->AddSection(0, &singleCommandSection[0]);
@@ -1407,26 +1410,26 @@
   this->Entries.erase(this->Entries.begin(), this->Entries.end());
   if(header)
     {
-    for(const cmDocumentationEntry* op = header; op->brief; ++op)
+    for(const cmDocumentationEntry* op = header; op->brief.size(); ++op)
       {
       this->Entries.push_back(*op);
       }
     }
   if(section)
     {
-    for(const cmDocumentationEntry* op = section; op->brief; ++op)
+    for(const cmDocumentationEntry* op = section; op->brief.size(); ++op)
       {
       this->Entries.push_back(*op);
       }
     }
   if(footer)
     {
-    for(const cmDocumentationEntry* op = footer; op->brief; ++op)
+    for(const cmDocumentationEntry* op = footer; op->brief.size(); ++op)
       {
       this->Entries.push_back(*op);
       }
     }
-  cmDocumentationEntry empty = {0,0,0};
+  cmDocumentationEntry empty = {"","",""};
   this->Entries.push_back(empty);
 }
 

Index: cmake.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmake.h,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -d -r1.88 -r1.89
--- cmake.h	27 Jul 2007 12:59:58 -0000	1.88
+++ cmake.h	9 Oct 2007 13:55:42 -0000	1.89
@@ -428,11 +428,11 @@
    "section."}
 
 #define CMAKE_STANDARD_INTRODUCTION \
-  {0, \
+  {"", \
    "CMake is a cross-platform build system generator.  Projects " \
    "specify their build process with platform-independent CMake listfiles " \
    "included in each directory of a source tree with the name " \
    "CMakeLists.txt. " \
    "Users build a project by using CMake to generate a build system " \
-   "for a native tool on their platform.", 0}
+   "for a native tool on their platform.", ""}
 #endif

Index: cmake.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmake.cxx,v
retrieving revision 1.320
retrieving revision 1.321
diff -u -d -r1.320 -r1.321
--- cmake.cxx	17 Sep 2007 19:20:54 -0000	1.320
+++ cmake.cxx	9 Oct 2007 13:55:42 -0000	1.321
@@ -2262,7 +2262,7 @@
       };
     v.push_back(e);
     }
-  cmDocumentationEntry empty = {0,0,0};
+  cmDocumentationEntry empty = {"","",""};
   v.push_back(empty);
 }
 
@@ -2271,7 +2271,7 @@
 {
   // get the properties for cmake
   this->PropertyDefinitions[type].GetPropertiesDocumentation(v);
-  cmDocumentationEntry empty = {0,0,0};
+  cmDocumentationEntry empty = {"","",""};
   v.push_back(empty);
 }
 
@@ -2296,7 +2296,7 @@
     delete generator;
     v.push_back(e);
     }
-  cmDocumentationEntry empty = {0,0,0};
+  cmDocumentationEntry empty = {"","",""};
   v.push_back(empty);
 }
 

Index: cmPropertyDefinitionMap.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmPropertyDefinitionMap.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- cmPropertyDefinitionMap.cxx	1 Dec 2006 18:35:03 -0000	1.1
+++ cmPropertyDefinitionMap.cxx	9 Oct 2007 13:55:42 -0000	1.2
@@ -45,7 +45,7 @@
       j != this->end(); ++j)
     {
     cmDocumentationEntry e = j->second.GetDocumentation();
-    if (e.brief)
+    if (e.brief.size())
       {
       v.push_back(e);
       }

Index: cmDocumentationFormatterText.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDocumentationFormatterText.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- cmDocumentationFormatterText.cxx	19 Sep 2007 13:05:28 -0000	1.1
+++ cmDocumentationFormatterText.cxx	9 Oct 2007 13:55:42 -0000	1.2
@@ -36,26 +36,26 @@
     os << name << "\n\n";
     }
   if(!section) { return; }
-  for(const cmDocumentationEntry* op = section; op->brief; ++op)
+  for(const cmDocumentationEntry* op = section; op->brief.size(); ++op)
     {
-    if(op->name)
+    if(op->name.size())
       {
       if(op->name[0])
         {
         os << "  " << op->name << "\n";
         }
       this->TextIndent = "       ";
-      this->PrintFormatted(os, op->brief);
-      if(op->full)
+      this->PrintFormatted(os, op->brief.c_str());
+      if(op->full.size())
         {
         os << "\n";
-        this->PrintFormatted(os, op->full);
+        this->PrintFormatted(os, op->full.c_str());
         }
       }
     else
       {
       this->TextIndent = "";
-      this->PrintFormatted(os, op->brief);
+      this->PrintFormatted(os, op->brief.c_str());
       }
     os << "\n";
     }

Index: cmakemain.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmakemain.cxx,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- cmakemain.cxx	19 Sep 2007 17:14:25 -0000	1.67
+++ cmakemain.cxx	9 Oct 2007 13:55:42 -0000	1.68
@@ -34,31 +34,31 @@
 //----------------------------------------------------------------------------
 static const cmDocumentationEntry cmDocumentationName[] =
 {
-  {0,
-   "  cmake - Cross-Platform Makefile Generator.", 0},
-  {0,0,0}
+  {"",
+   "  cmake - Cross-Platform Makefile Generator.", ""},
+  {"","",""}
 };
 
 //----------------------------------------------------------------------------
 static const cmDocumentationEntry cmDocumentationUsage[] =
 {
-  {0,
+  {"",
    "  cmake [options] <path-to-source>\n"
-   "  cmake [options] <path-to-existing-build>", 0},
-  {0,0,0}
+   "  cmake [options] <path-to-existing-build>", ""},
+  {"","",""}
 };
 
 //----------------------------------------------------------------------------
 static const cmDocumentationEntry cmDocumentationDescription[] =
 {
-  {0,
+  {"",
    "The \"cmake\" executable is the CMake command-line interface.  It may "
    "be used to configure projects in scripts.  Project configuration "
    "settings "
    "may be specified on the command line with the -D option.  The -i option "
-   "will cause cmake to interactively prompt for such settings.", 0},
+   "will cause cmake to interactively prompt for such settings.", ""},
   CMAKE_STANDARD_INTRODUCTION,
-  {0,0,0}
+  {"","",""}
 };
 
 //----------------------------------------------------------------------------
@@ -162,25 +162,25 @@
    "If a file is specified, the documentation is written into and the output "
    "format is determined depending on the filename suffix. Supported are man "
    "page, HTML and plain text."},
-  {0,0,0}
+  {"","",""}
 };
 
 //----------------------------------------------------------------------------
 static const cmDocumentationEntry cmDocumentationSeeAlso[] =
 {
-  {0, "ccmake", 0},
-  {0, "ctest", 0},
-  {0, 0, 0}
+  {"", "ccmake", ""},
+  {"", "ctest", ""},
+  {"", "", ""}
 };
 
 //----------------------------------------------------------------------------
 static const cmDocumentationEntry cmDocumentationNOTE[] =
 {
-  {0,
+  {"",
    "CMake no longer configures a project when run with no arguments.  "
    "In order to configure the project in the current directory, run\n"
-   "  cmake .", 0},
-  {0,0,0}
+   "  cmake .", ""},
+  {"","",""}
 };
 #endif
 

Index: cmStandardIncludes.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmStandardIncludes.h,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- cmStandardIncludes.h	29 Aug 2006 14:27:50 -0000	1.67
+++ cmStandardIncludes.h	9 Oct 2007 13:55:42 -0000	1.68
@@ -316,9 +316,9 @@
 /** Standard documentation entry for cmDocumentation's formatting.  */
 struct cmDocumentationEntry
 {
-  const char* name;
-  const char* brief;
-  const char* full;
+  std::string name;
+  std::string brief;
+  std::string full;
 };
 
 /** Data structure to represent a single command line.  */

Index: ctest.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/ctest.cxx,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -d -r1.96 -r1.97
--- ctest.cxx	11 Sep 2007 15:21:36 -0000	1.96
+++ ctest.cxx	9 Oct 2007 13:55:42 -0000	1.97
@@ -25,28 +25,28 @@
 //----------------------------------------------------------------------------
 static const cmDocumentationEntry cmDocumentationName[] =
 {
-  {0,
-   "  ctest - Testing driver provided by CMake.", 0},
-  {0,0,0}
+  {"",
+   "  ctest - Testing driver provided by CMake.", ""},
+  {"","",""}
 };
 
 //----------------------------------------------------------------------------
 static const cmDocumentationEntry cmDocumentationUsage[] =
 {
-  {0,
-   "  ctest [options]", 0},
-  {0,0,0}
+  {"",
+   "  ctest [options]", ""},
+  {"","",""}
 };
 
 //----------------------------------------------------------------------------
 static const cmDocumentationEntry cmDocumentationDescription[] =
 {
-  {0,
+  {"",
    "The \"ctest\" executable is the CMake test driver program.  "
    "CMake-generated build trees created for projects that use "
    "the ENABLE_TESTING and ADD_TEST commands have testing support.  "
-   "This program will run the tests and report results.", 0},
-  {0,0,0}
+   "This program will run the tests and report results.", ""},
+  {"","",""}
 };
 
 //----------------------------------------------------------------------------
@@ -194,15 +194,15 @@
    "This option allows performing the same CTest action (such as test) "
    "multiple times and submit all stages to the same dashboard (Dart2 "
    "required). Each execution requires different index." },
-  {0,0,0}
+  {"","",""}
 };
 
 //----------------------------------------------------------------------------
 static const cmDocumentationEntry cmDocumentationSeeAlso[] =
 {
-  {0, "cmake", 0},
-  {0, "ccmake", 0},
-  {0, 0, 0}
+  {"", "cmake", ""},
+  {"", "ccmake", ""},
+  {"", "", ""}
 };
 
 // this is a test driver program for cmCTest.

Index: cmDocumentationFormatterUsage.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDocumentationFormatterUsage.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- cmDocumentationFormatterUsage.cxx	19 Sep 2007 13:05:28 -0000	1.1
+++ cmDocumentationFormatterUsage.cxx	9 Oct 2007 13:55:42 -0000	1.2
@@ -31,31 +31,31 @@
     os << name << "\n";
     }
   if(!section) { return; }
-  for(const cmDocumentationEntry* op = section; op->brief; ++op)
+  for(const cmDocumentationEntry* op = section; op->brief.size(); ++op)
     {
-    if(op->name)
+    if(op->name.size())
       {
       os << "  " << op->name;
       this->TextIndent = "                                ";
       int align = static_cast<int>(strlen(this->TextIndent))-4;
-      for(int i = static_cast<int>(strlen(op->name)); i < align; ++i)
+      for(int i = static_cast<int>(op->name.size()); i < align; ++i)
         {
         os << " ";
         }
-      if ( strlen(op->name) > strlen(this->TextIndent)-4 )
+      if ( op->name.size() > strlen(this->TextIndent)-4 )
         {
         os << "\n";
         os.write(this->TextIndent, strlen(this->TextIndent)-2);
         }
       os << "= ";
-      this->PrintColumn(os, op->brief);
+      this->PrintColumn(os, op->brief.c_str());
       os << "\n";
       }
     else
       {
       os << "\n";
       this->TextIndent = "";
-      this->PrintFormatted(os, op->brief);
+      this->PrintFormatted(os, op->brief.c_str());
       }
     }
   os << "\n";

Index: cmDumpDocumentation.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDumpDocumentation.cxx,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- cmDumpDocumentation.cxx	28 Jun 2007 15:00:57 -0000	1.16
+++ cmDumpDocumentation.cxx	9 Oct 2007 13:55:42 -0000	1.17
@@ -25,35 +25,35 @@
 //----------------------------------------------------------------------------
 static const cmDocumentationEntry cmDocumentationName[] =
 {
-  {0,
-   "  DumpDocumentation - Dump documentation for CMake.", 0},
-  {0,0,0}
+  {"",
+   "  DumpDocumentation - Dump documentation for CMake.", ""},
+  {"","",""}
 };
 
 //----------------------------------------------------------------------------
 static const cmDocumentationEntry cmDocumentationUsage[] =
 {
-  {0,
-   "  DumpDocumentation [filename]", 0},
-  {0,0,0}
+  {"",
+   "  DumpDocumentation [filename]", ""},
+  {"","",""}
 };
 
 //----------------------------------------------------------------------------
 static const cmDocumentationEntry cmDocumentationDescription[] =
 {
-  {0,
+  {"",
    "The \"DumpDocumentation\" executable is only available in the build "
-   "tree.  It is used for testing, coverage, and documentation.", 0},
+   "tree.  It is used for testing, coverage, and documentation.", ""},
   CMAKE_STANDARD_INTRODUCTION,
-  {0,0,0}
+  {"","",""}
 };
 
 //----------------------------------------------------------------------------
 static const cmDocumentationEntry cmDocumentationOptions[] =
 {
   {"--all-for-coverage", 
-   "Dump all documentation to stdout.  For testing.", 0},
-  {0,0,0}
+   "Dump all documentation to stdout.  For testing.", ""},
+  {"","",""}
 };
 
 

Index: cmDocumentationFormatterMan.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDocumentationFormatterMan.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- cmDocumentationFormatterMan.cxx	19 Sep 2007 13:59:34 -0000	1.2
+++ cmDocumentationFormatterMan.cxx	9 Oct 2007 13:55:42 -0000	1.3
@@ -35,19 +35,19 @@
     os << ".SH " << name << "\n";
     }
   if(!section) { return; }
-  for(const cmDocumentationEntry* op = section; op->brief; ++op)
+  for(const cmDocumentationEntry* op = section; op->brief.size(); ++op)
     {
-    if(op->name)
+    if(op->name.size())
       {
       os << ".TP\n"
          << ".B " << (op->name[0]?op->name:"*") << "\n";
-      this->PrintFormatted(os, op->brief);
-      this->PrintFormatted(os, op->full);
+      this->PrintFormatted(os, op->brief.c_str());
+      this->PrintFormatted(os, op->full.c_str());
       }
     else
       {
       os << ".PP\n";
-      this->PrintFormatted(os, op->brief);
+      this->PrintFormatted(os, op->brief.c_str());
       }
     }
 }



More information about the Cmake-commits mailing list