* Parse a command line and execute the command */
| 486 | * Parse a command line and execute the command |
| 487 | */ |
| 488 | static int |
| 489 | DoParseCommand(const char *line) |
| 490 | { |
| 491 | char *av[MAX_ARGS]; |
| 492 | int ac; |
| 493 | |
| 494 | /* Parse line */ |
| 495 | for (ac = 0, av[0] = strtok((char *)line, WHITESPACE); |
| 496 | ac < MAX_ARGS - 1 && av[ac]; |
| 497 | av[++ac] = strtok(NULL, WHITESPACE)); |
| 498 | |
| 499 | /* Do command */ |
| 500 | return (DoCommand(ac, av)); |
| 501 | } |
| 502 | |
| 503 | /* |
| 504 | * Execute the command |
no test coverage detected