Lines Matching defs:cmd
70 struct cmd {
77 static struct cmd cmds[] = {
239 static int do_one(struct context *context, struct cmd *cmd, char **argv)
245 if (cmd->opencard && context->uc_mgr == NULL) {
251 context->command, cmd->id);
255 switch (cmd->code) {
316 switch (cmd->code) {
367 if (cmd->code == OM_GET)
383 if (cmd->code == OM_GETI)
396 context->command, cmd->id);
405 struct cmd *cmd;
410 for (cmd = cmds; cmd->id != NULL; cmd++) {
411 if (strcmp(cmd->id, command) == 0)
414 if (cmd->id == NULL) {
420 if (acnt < cmd->args) {
422 context->command, cmd->args, acnt);
426 err = do_one(context, cmd, argv);
429 i += cmd->args;
453 char cmd[MAX_BUF];
524 if (fgets(cmd, MAX_BUF, in) == NULL)
526 err = parse_line(context, cmd);