cmd_table
} cmd_table[] = {
struct _cmd_table *cmd = cmd_table;
cmd_table commands[] = {
} cmd_table[] = {
for (i = 0; cmd_table[i].name != NULL; i++)
if (strcmp(cmd_table[i].name, name) == 0)
return &cmd_table[i];
for (i = 0; cmd_table[i].name != NULL; i++)
if (strcmp(cmd_table[i].name, name) == 0)
cmd_table commands[] = {
struct db_command_table *cmd_table, bool dopager);
db_command(struct db_command **last_cmdp, struct db_command_table *cmd_table,
while (cmd_table != NULL) {
result = db_cmd_search(db_tok_string, cmd_table, &cmd);
if (cmd_table == &db_cmd_table) {
db_cmd_list(cmd_table);
if ((cmd_table = cmd->more) != NULL) {
db_cmd_list(cmd_table);
for (i = 0, l = nitems(cmd_table); i < l; i++) {
multi = i + 1 < l && cmd_table[i].cmd ==
cmd_table[i + 1].cmd;
cmd_table[i].command, (cmd_table[i].cmp &
for (; i + 1 < l && cmd_table[i].cmd ==
cmd_table[i + 1].cmd; i++)
xo_error(" | %s%s", cmd_table[i + 1].command,
(cmd_table[i].cmp & PS_CMP_PLURAL) ?
if (cmd_table[i].usage != NULL)
xo_error(" %s", cmd_table[i].usage);
for (i = 0; i < nitems(cmd_table); i++) {
if (cmd == NULL && (cmd_table[i].cmp & PS_CMP_SUBSTR))
cmp = strncasecmp(str, cmd_table[i].command, l -
((cmd_table[i].cmp & PS_CMP_PLURAL) && s ? 1 : 0));
else if ((cmd_table[i].cmp & PS_CMP_PLURAL) && s &&
l == strlen(cmd_table[i].command) + 1)
cmp = strncasecmp(str, cmd_table[i].command, l - 1);
cmp = strcasecmp(str, cmd_table[i].command);
cmd = &cmd_table[i];
static const struct procstat_cmd cmd_table[] = {