Lines Matching refs:commands
61 } commands[] = {
136 for (i = 0; commands[i].cmd != NULL; i++)
137 if (!strcmp(argv[0], commands[i].cmd))
138 return(commands[i].func(argc, argv));
152 for (i = 0; commands[i].cmd != NULL; i++)
153 if (!strcmp(argv[1], commands[i].cmd)) {
154 fprintf(stderr, "%s\n", commands[i].text);
161 fprintf(stderr, "Valid commands are:\n");
162 for (i = 0; commands[i].cmd != NULL; i++)
163 fprintf(stderr, " %-20s %s\n", commands[i].cmd, commands[i].desc);