Lines Matching defs:cmd_table
86 static const struct procstat_cmd cmd_table[] = {
158 for (i = 0, l = nitems(cmd_table); i < l; i++) {
159 multi = i + 1 < l && cmd_table[i].cmd ==
160 cmd_table[i + 1].cmd;
162 cmd_table[i].command, (cmd_table[i].cmp &
164 for (; i + 1 < l && cmd_table[i].cmd ==
165 cmd_table[i + 1].cmd; i++)
166 xo_error(" | %s%s", cmd_table[i + 1].command,
167 (cmd_table[i].cmp & PS_CMP_PLURAL) ?
171 if (cmd_table[i].usage != NULL)
172 xo_error(" %s", cmd_table[i].usage);
267 for (i = 0; i < nitems(cmd_table); i++) {
272 if (cmd == NULL && (cmd_table[i].cmp & PS_CMP_SUBSTR))
273 cmp = strncasecmp(str, cmd_table[i].command, l -
274 ((cmd_table[i].cmp & PS_CMP_PLURAL) && s ? 1 : 0));
275 else if ((cmd_table[i].cmp & PS_CMP_PLURAL) && s &&
276 l == strlen(cmd_table[i].command) + 1)
277 cmp = strncasecmp(str, cmd_table[i].command, l - 1);
279 cmp = strcasecmp(str, cmd_table[i].command);
281 cmd = &cmd_table[i];