Lines Matching refs:p

103 static int __init xbc_parse_error(const char *msg, const char *p)  in xbc_parse_error()  argument
106 xbc_err_pos = (int)(p - xbc_data); in xbc_parse_error()
194 const char *p = xbc_node_get_data(node); in xbc_node_match_prefix() local
195 int len = strlen(p); in xbc_node_match_prefix()
197 if (strncmp(*prefix, p, len)) in xbc_node_match_prefix()
200 p = *prefix + len; in xbc_node_match_prefix()
201 if (*p == '.') in xbc_node_match_prefix()
202 p++; in xbc_node_match_prefix()
203 else if (*p != '\0') in xbc_node_match_prefix()
205 *prefix = p; in xbc_node_match_prefix()
512 static char *skip_comment(char *p) in skip_comment() argument
516 ret = strchr(p, '\n'); in skip_comment()
518 ret = p + strlen(p); in skip_comment()
525 static char *skip_spaces_until_newline(char *p) in skip_spaces_until_newline() argument
527 while (isspace(*p) && *p != '\n') in skip_spaces_until_newline()
528 p++; in skip_spaces_until_newline()
529 return p; in skip_spaces_until_newline()
532 static int __init __xbc_open_brace(char *p) in __xbc_open_brace() argument
537 return xbc_parse_error("Exceed max depth of braces", p); in __xbc_open_brace()
542 static int __init __xbc_close_brace(char *p) in __xbc_close_brace() argument
547 return xbc_parse_error("Unexpected closing brace", p); in __xbc_close_brace()
563 char *p, *v = *__v; in __xbc_parse_value() local
575 p = v - 1; in __xbc_parse_value()
576 while ((c = *++p)) { in __xbc_parse_value()
578 return xbc_parse_error("Non printable value", p); in __xbc_parse_value()
583 *p++ = '\0'; in __xbc_parse_value()
584 p = skip_spaces_until_newline(p); in __xbc_parse_value()
585 c = *p; in __xbc_parse_value()
587 return xbc_parse_error("No value delimiter", p); in __xbc_parse_value()
588 if (*p) in __xbc_parse_value()
589 p++; in __xbc_parse_value()
593 *p++ = '\0'; in __xbc_parse_value()
599 return xbc_parse_error("No closing quotes", p); in __xbc_parse_value()
601 p = skip_comment(p); in __xbc_parse_value()
604 *__n = p; in __xbc_parse_value()
678 char *p; in __xbc_parse_keys() local
682 while ((p = strchr(k, '.'))) { in __xbc_parse_keys()
683 *p++ = '\0'; in __xbc_parse_keys()
687 k = p; in __xbc_parse_keys()
852 char *p, *q; in xbc_parse_tree() local
856 p = xbc_data; in xbc_parse_tree()
858 q = strpbrk(p, "{}=+;:\n#"); in xbc_parse_tree()
860 p = skip_spaces(p); in xbc_parse_tree()
861 if (*p != '\0') in xbc_parse_tree()
862 ret = xbc_parse_error("No delimiter", p); in xbc_parse_tree()
880 ret = xbc_parse_kv(&p, q, c); in xbc_parse_tree()
883 ret = xbc_open_brace(&p, q); in xbc_parse_tree()
890 ret = xbc_parse_key(&p, q); in xbc_parse_tree()
893 ret = xbc_close_brace(&p, q); in xbc_parse_tree()