MCPcopy Create free account
hub / github.com/F-Stack/f-stack / DoParseCommand

Function DoParseCommand

tools/ngctl/main.c:488–501  ·  view source on GitHub ↗

* Parse a command line and execute the command */

Source from the content-addressed store, hash-verified

486 * Parse a command line and execute the command
487 */
488static int
489DoParseCommand(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

Callers 2

ReadFileFunction · 0.85
DoInteractiveFunction · 0.85

Calls 2

strtokFunction · 0.85
DoCommandFunction · 0.85

Tested by

no test coverage detected