Lines Matching refs:p

105 static int __init xbc_parse_error(const char *msg, const char *p)  in xbc_parse_error()  argument
108 xbc_err_pos = (int)(p - xbc_data); in xbc_parse_error()
196 const char *p = xbc_node_get_data(node); in xbc_node_match_prefix() local
197 int len = strlen(p); in xbc_node_match_prefix()
199 if (strncmp(*prefix, p, len)) in xbc_node_match_prefix()
202 p = *prefix + len; in xbc_node_match_prefix()
203 if (*p == '.') in xbc_node_match_prefix()
204 p++; in xbc_node_match_prefix()
205 else if (*p != '\0') in xbc_node_match_prefix()
207 *prefix = p; in xbc_node_match_prefix()
514 static char *skip_comment(char *p) in skip_comment() argument
518 ret = strchr(p, '\n'); in skip_comment()
520 ret = p + strlen(p); in skip_comment()
527 static char *skip_spaces_until_newline(char *p) in skip_spaces_until_newline() argument
529 while (isspace(*p) && *p != '\n') in skip_spaces_until_newline()
530 p++; in skip_spaces_until_newline()
531 return p; in skip_spaces_until_newline()
534 static int __init __xbc_open_brace(char *p) in __xbc_open_brace() argument
539 return xbc_parse_error("Exceed max depth of braces", p); in __xbc_open_brace()
544 static int __init __xbc_close_brace(char *p) in __xbc_close_brace() argument
549 return xbc_parse_error("Unexpected closing brace", p); in __xbc_close_brace()
565 char *p, *v = *__v; in __xbc_parse_value() local
577 p = v - 1; in __xbc_parse_value()
578 while ((c = *++p)) { in __xbc_parse_value()
580 return xbc_parse_error("Non printable value", p); in __xbc_parse_value()
585 *p++ = '\0'; in __xbc_parse_value()
586 p = skip_spaces_until_newline(p); in __xbc_parse_value()
587 c = *p; in __xbc_parse_value()
589 return xbc_parse_error("No value delimiter", p); in __xbc_parse_value()
590 if (*p) in __xbc_parse_value()
591 p++; in __xbc_parse_value()
595 *p++ = '\0'; in __xbc_parse_value()
601 return xbc_parse_error("No closing quotes", p); in __xbc_parse_value()
603 p = skip_comment(p); in __xbc_parse_value()
606 *__n = p; in __xbc_parse_value()
680 char *p; in __xbc_parse_keys() local
684 while ((p = strchr(k, '.'))) { in __xbc_parse_keys()
685 *p++ = '\0'; in __xbc_parse_keys()
689 k = p; in __xbc_parse_keys()
854 char *p, *q; in xbc_parse_tree() local
858 p = xbc_data; in xbc_parse_tree()
860 q = strpbrk(p, "{}=+;:\n#"); in xbc_parse_tree()
862 p = skip_spaces(p); in xbc_parse_tree()
863 if (*p != '\0') in xbc_parse_tree()
864 ret = xbc_parse_error("No delimiter", p); in xbc_parse_tree()
882 ret = xbc_parse_kv(&p, q, c); in xbc_parse_tree()
885 ret = xbc_open_brace(&p, q); in xbc_parse_tree()
892 ret = xbc_parse_key(&p, q); in xbc_parse_tree()
895 ret = xbc_close_brace(&p, q); in xbc_parse_tree()