[cmake-commits] alex committed cmDocumentation.h 1.24 1.25 cmDocumentation.cxx 1.45 1.46

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Jul 3 08:26:34 EDT 2007


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

Modified Files:
	cmDocumentation.h cmDocumentation.cxx 
Log Message:

COMP: fix compile on HP-UX with aCC, reusing the same identifier for a
variable as for the enum type doesn't work here

Alex


Index: cmDocumentation.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDocumentation.cxx,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- cmDocumentation.cxx	28 Jun 2007 19:04:28 -0000	1.45
+++ cmDocumentation.cxx	3 Jul 2007 12:26:32 -0000	1.46
@@ -459,7 +459,7 @@
       i != this->RequestedHelpItems.end(); 
       ++i)
     {
-    this->CurrentForm = i->Form;
+    this->CurrentForm = i->HelpForm;
     this->CurrentArgument = i->Argument;
     // If a file name was given, use it.  Otherwise, default to the
     // given stream.
@@ -479,7 +479,7 @@
       }
     
     // Print this documentation type to the stream.
-    if(!this->PrintDocumentation(i->Type, *s) || !*s)
+    if(!this->PrintDocumentation(i->HelpType, *s) || !*s)
       {
       result = false;
       }
@@ -534,8 +534,8 @@
   if(argc == 1)
     {
     RequestedHelpItem help;
-    help.Type = cmDocumentation::Usage;
-    help.Form = cmDocumentation::UsageForm;
+    help.HelpType = cmDocumentation::Usage;
+    help.HelpForm = cmDocumentation::UsageForm;
     this->RequestedHelpItems.push_back(help);
     return true;
     }
@@ -554,111 +554,111 @@
        (strcmp(argv[i], "-h") == 0) ||
        (strcmp(argv[i], "-H") == 0))
       {
-      help.Type = cmDocumentation::Usage;
-      help.Form = cmDocumentation::UsageForm;
+      help.HelpType = cmDocumentation::Usage;
+      help.HelpForm = cmDocumentation::UsageForm;
       GET_OPT_COMMAND(help.Argument);
       // special case for single command
       if (!help.Argument.empty())
         {
-        help.Type = cmDocumentation::Single;
+        help.HelpType = cmDocumentation::Single;
         }
       }
     else if(strcmp(argv[i], "--help-properties") == 0)
       {
-      help.Type = cmDocumentation::Properties;
+      help.HelpType = cmDocumentation::Properties;
       GET_OPT_FILENAME(help.Filename);
-      help.Form = this->GetFormFromFilename(help.Filename);
+      help.HelpForm = this->GetFormFromFilename(help.Filename);
       }
     else if(strcmp(argv[i], "--help-modules") == 0)
       {
-      help.Type = cmDocumentation::Modules;
+      help.HelpType = cmDocumentation::Modules;
       GET_OPT_FILENAME(help.Filename);
-      help.Form = this->GetFormFromFilename(help.Filename);
+      help.HelpForm = this->GetFormFromFilename(help.Filename);
       }
     else if(strcmp(argv[i], "--help-commands") == 0)
       {
-      help.Type = cmDocumentation::Commands;
+      help.HelpType = cmDocumentation::Commands;
       GET_OPT_FILENAME(help.Filename);
-      help.Form = this->GetFormFromFilename(help.Filename);
+      help.HelpForm = this->GetFormFromFilename(help.Filename);
       }
     else if(strcmp(argv[i], "--help-compatcommands") == 0)
       {
-      help.Type = cmDocumentation::CompatCommands;
+      help.HelpType = cmDocumentation::CompatCommands;
       GET_OPT_FILENAME(help.Filename);
-      help.Form = this->GetFormFromFilename(help.Filename);
+      help.HelpForm = this->GetFormFromFilename(help.Filename);
       }
     else if(strcmp(argv[i], "--help-full") == 0)
       {
-      help.Type = cmDocumentation::Full;
+      help.HelpType = cmDocumentation::Full;
       GET_OPT_FILENAME(help.Filename);
-      help.Form = this->GetFormFromFilename(help.Filename);
+      help.HelpForm = this->GetFormFromFilename(help.Filename);
       }
     else if(strcmp(argv[i], "--help-html") == 0)
       {
-      help.Type = cmDocumentation::Full;
+      help.HelpType = cmDocumentation::Full;
       GET_OPT_FILENAME(help.Filename);
-      help.Form = cmDocumentation::HTMLForm;
+      help.HelpForm = cmDocumentation::HTMLForm;
       }
     else if(strcmp(argv[i], "--help-man") == 0)
       {
-      help.Type = cmDocumentation::Full;
+      help.HelpType = cmDocumentation::Full;
       GET_OPT_FILENAME(help.Filename);
-      help.Form = cmDocumentation::ManForm;
+      help.HelpForm = cmDocumentation::ManForm;
       }
     else if(strcmp(argv[i], "--help-command") == 0)
       {
-      help.Type = cmDocumentation::Single;
+      help.HelpType = cmDocumentation::Single;
       GET_OPT_COMMAND(help.Argument);
       GET_OPT_FILENAME(help.Filename);
-      help.Form = this->GetFormFromFilename(help.Filename);
+      help.HelpForm = this->GetFormFromFilename(help.Filename);
       }
     else if(strcmp(argv[i], "--help-module") == 0)
       {
-      help.Type = cmDocumentation::SingleModule;
+      help.HelpType = cmDocumentation::SingleModule;
       GET_OPT_COMMAND(help.Argument);
       GET_OPT_FILENAME(help.Filename);
-      help.Form = this->GetFormFromFilename(help.Filename);
+      help.HelpForm = this->GetFormFromFilename(help.Filename);
       }
     else if(strcmp(argv[i], "--help-property") == 0)
       {
-      help.Type = cmDocumentation::SingleProperty;
+      help.HelpType = cmDocumentation::SingleProperty;
       GET_OPT_COMMAND(help.Argument);
       GET_OPT_FILENAME(help.Filename);
-      help.Form = this->GetFormFromFilename(help.Filename);
+      help.HelpForm = this->GetFormFromFilename(help.Filename);
       }
     else if(strcmp(argv[i], "--help-command-list") == 0)
       {
-      help.Type = cmDocumentation::List;
+      help.HelpType = cmDocumentation::List;
       GET_OPT_FILENAME(help.Filename);
-      help.Form = cmDocumentation::TextForm;
+      help.HelpForm = cmDocumentation::TextForm;
       }
     else if(strcmp(argv[i], "--help-module-list") == 0)
       {
-      help.Type = cmDocumentation::ModuleList;
+      help.HelpType = cmDocumentation::ModuleList;
       GET_OPT_FILENAME(help.Filename);
-      help.Form = cmDocumentation::TextForm;
+      help.HelpForm = cmDocumentation::TextForm;
       }
     else if(strcmp(argv[i], "--help-property-list") == 0)
       {
-      help.Type = cmDocumentation::PropertyList;
+      help.HelpType = cmDocumentation::PropertyList;
       GET_OPT_FILENAME(help.Filename);
-      help.Form = cmDocumentation::TextForm;
+      help.HelpForm = cmDocumentation::TextForm;
       }
     else if(strcmp(argv[i], "--copyright") == 0)
       {
-      help.Type = cmDocumentation::Copyright;
+      help.HelpType = cmDocumentation::Copyright;
       GET_OPT_FILENAME(help.Filename);
-      help.Form = cmDocumentation::UsageForm;
+      help.HelpForm = cmDocumentation::UsageForm;
       }
     else if((strcmp(argv[i], "--version") == 0) || 
             (strcmp(argv[i], "-version") == 0) || 
             (strcmp(argv[i], "/V") == 0))
       {
-      help.Type = cmDocumentation::Version;
+      help.HelpType = cmDocumentation::Version;
       GET_OPT_FILENAME(help.Filename);
-      help.Form = cmDocumentation::UsageForm;
+      help.HelpForm = cmDocumentation::UsageForm;
       }
-    if(help.Type != None)
+    if(help.HelpType != None)
       {
       // This is a help option.  See if there is a file name given.
       result = true;

Index: cmDocumentation.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmDocumentation.h,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- cmDocumentation.h	2 Jul 2007 15:24:44 -0000	1.24
+++ cmDocumentation.h	3 Jul 2007 12:26:32 -0000	1.25
@@ -262,9 +262,9 @@
 
   struct RequestedHelpItem
   {
-    RequestedHelpItem():Form(TextForm), Type(None) {}
-    cmDocumentationEnums::Form Form;
-    cmDocumentationEnums::Type Type;
+    RequestedHelpItem():HelpForm(TextForm), HelpType(None) {}
+    cmDocumentationEnums::Form HelpForm;
+    cmDocumentationEnums::Type HelpType;
     std::string Filename;
     std::string Argument;
   };



More information about the Cmake-commits mailing list