| 488 | } |
| 489 | |
| 490 | static int |
| 491 | parse_token(char **conf, char **tok) |
| 492 | { |
| 493 | char *p; |
| 494 | size_t len; |
| 495 | int error; |
| 496 | |
| 497 | *tok = NULL; |
| 498 | error = parse_skipto(conf, CC_NONWHITESPACE); |
| 499 | if (error) |
| 500 | return (error); |
| 501 | p = *conf; |
| 502 | error = parse_skipto(conf, CC_WHITESPACE); |
| 503 | len = *conf - p; |
| 504 | *tok = malloc(len + 1, M_TEMP, M_WAITOK | M_ZERO); |
| 505 | bcopy(p, *tok, len); |
| 506 | return (0); |
| 507 | } |
| 508 | |
| 509 | static void |
| 510 | parse_dir_ask_printenv(const char *var) |
no test coverage detected