From: Carl Worth <cworth@cworth.org>
Date: Tue, 1 Nov 2011 20:47:26 +0000 (-0700)
Subject: Give CLI command names a _command prefix
X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=68f7c981ac5dedf2084d617f079f290edb6693cb;p=apitrace

Give CLI command names a _command prefix

This is just to set things up for a trace_command command, (which
cannot be named "trace" since that would conflict with "namespace
trace").
---

diff --git a/cli/cli.hpp b/cli/cli.hpp
index 0792aff..5236d8b 100644
--- a/cli/cli.hpp
+++ b/cli/cli.hpp
@@ -40,8 +40,6 @@ struct Command {
     Function function;
 };
 
-
-extern const Command dump;
-
+extern const Command dump_command;
 
 #endif /* _APITRACE_CLI_HPP_ */
diff --git a/cli/cli_dump.cpp b/cli/cli_dump.cpp
index 2164518..5baa5ae 100644
--- a/cli/cli_dump.cpp
+++ b/cli/cli_dump.cpp
@@ -114,7 +114,7 @@ command(int argc, char *argv[])
     return 0;
 }
 
-const Command dump = {
+const Command dump_command = {
     "dump",
     synopsis,
     usage,
diff --git a/cli/cli_main.cpp b/cli/cli_main.cpp
index 03587d7..981f39e 100644
--- a/cli/cli_main.cpp
+++ b/cli/cli_main.cpp
@@ -56,18 +56,18 @@ help_usage()
 }
 
 static int
-help_command(int argc, char *argv[]);
+do_help_command(int argc, char *argv[]);
 
-const Command help = {
+const Command help_command = {
     "help",
     help_synopsis,
     help_usage,
-    help_command
+    do_help_command
 };
 
 static const Command * commands[] = {
-    &dump,
-    &help,
+    &dump_command,
+    &help_command
 };
 
 static void
@@ -110,7 +110,7 @@ list_commands(void) {
 
 
 static int
-help_command(int argc, char *argv[])
+do_help_command(int argc, char *argv[])
 {
     const Command *command;
     int i;
@@ -152,7 +152,7 @@ main(int argc, char **argv)
         }
 
         if (strcmp(arg, "--help") == 0) {
-            return help_command(0, NULL);
+            return do_help_command(0, NULL);
         } else {
             std::cerr << "Error: unknown option " << arg << "\n";
             usage();