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

Function parse_skipto

freebsd/kern/vfs_mountroot.c:461–488  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

459}
460
461static int
462parse_skipto(char **conf, int mc)
463{
464 int c, match;
465
466 while (1) {
467 c = parse_peek(conf);
468 if (c == 0)
469 return (PE_EOF);
470 switch (mc) {
471 case CC_WHITESPACE:
472 match = (c == ' ' || c == '\t' || c == '\n') ? 1 : 0;
473 break;
474 case CC_NONWHITESPACE:
475 if (c == '\n')
476 return (PE_EOL);
477 match = (c != ' ' && c != '\t') ? 1 : 0;
478 break;
479 default:
480 match = (c == mc) ? 1 : 0;
481 break;
482 }
483 if (match)
484 break;
485 parse_advance(conf);
486 }
487 return (0);
488}
489
490static int
491parse_token(char **conf, char **tok)

Callers 4

parse_tokenFunction · 0.85
parse_directiveFunction · 0.85
parse_mountFunction · 0.85
vfs_mountroot_parseFunction · 0.85

Calls 2

parse_peekFunction · 0.85
parse_advanceFunction · 0.85

Tested by

no test coverage detected