]> git.cworth.org Git - apitrace/blobdiff - cli/cli_main.cpp
Add a new "apitrace trace" command to the command-line interface.
[apitrace] / cli / cli_main.cpp
index 1731640a02395ffb5a1eb4ce335badd8eecaeda2..a3abf54a0d6daab8aee1a5e09c71d6af6bdfeb48 100644 (file)
@@ -27,7 +27,7 @@
 
 
 /*
- * Top-level application for accessing almost of apitrace
+ * Top-level application for accessing almost all of apitrace
  * functionality.
  */
 
@@ -56,18 +56,19 @@ 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,
+    &trace_command,
+    &help_command
 };
 
 static void
@@ -110,7 +111,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 +153,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();