Lines Matching defs:ct
79 static char *whatcmd(const struct cmd_table **ct, char *);
178 const struct cmd_table *ct = cmd_table, *cs;
192 ct = cmd_table;
195 p = whatcmd(&ct, p);
196 if (ct == NULL) {
198 ct = cmd_table;
199 } else if (ct->cmd_type == CMDT_SET && p != NULL) {
202 } else if (ct->cmd_type == CMDT_MDC && p != NULL) {
210 printf("%s: syntax error\n", ct->cmd_name);
213 ct = cs;
215 cmd.cmd = ct;
218 cmd.argv[0] = ct->cmd_name;
229 whatcmd(const struct cmd_table **ct, char *p)
239 while ((*ct)->cmd_name != NULL && strncmp(p, (*ct)->cmd_name, l))
240 (*ct)++;
242 if ((*ct)->cmd_name == NULL)
243 *ct = NULL;
321 print_help(const struct cmd_table *ct)
323 for (; ct->cmd_name != NULL; ct++)
324 printf(" %s", ct->cmd_name);