This is just to set things up for a trace_command command, (which
cannot be named "trace" since that would conflict with "namespace
trace").
-
-extern const Command dump;
-
+extern const Command dump_command;
#endif /* _APITRACE_CLI_HPP_ */
#endif /* _APITRACE_CLI_HPP_ */
+const Command dump_command = {
-help_command(int argc, char *argv[]);
+do_help_command(int argc, char *argv[]);
+const Command help_command = {
"help",
help_synopsis,
help_usage,
"help",
help_synopsis,
help_usage,
};
static const Command * commands[] = {
};
static const Command * commands[] = {
+ &dump_command,
+ &help_command
-help_command(int argc, char *argv[])
+do_help_command(int argc, char *argv[])
{
const Command *command;
int i;
{
const Command *command;
int i;
}
if (strcmp(arg, "--help") == 0) {
}
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();
} else {
std::cerr << "Error: unknown option " << arg << "\n";
usage();