MCPcopy Create free account
hub / github.com/apitrace/apitrace / do_help_command

Function do_help_command

cli/cli_main.cpp:158–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156
157
158static int
159do_help_command(int argc, char *argv[])
160{
161 const Command *command;
162 int i;
163
164 if (argc != 2) {
165 help_usage();
166 return 0;
167 }
168
169 char *command_name = argv[1];
170
171 for (i = 0; i < ARRAY_SIZE(commands); i++) {
172 command = commands[i];
173
174 if (strcmp(command_name, command->name) == 0) {
175 (command->usage) ();
176 return 0;
177 }
178 }
179
180 std::cerr << "error: Unknown command: " << command_name
181 << " (see \"apitrace help\").\n";
182
183 return 1;
184}
185
186static int
187do_version_command(int argc, char *argv[])

Callers 1

mainFunction · 0.85

Calls 1

help_usageFunction · 0.85

Tested by

no test coverage detected