Lines Matching refs:p
15 static char *find_end_of_item(char *p) in find_end_of_item() argument
19 if (*p == '[' || *p == '{') depth++; in find_end_of_item()
20 if (*p == ']' || *p == '}') depth--; in find_end_of_item()
21 p++; in find_end_of_item()
22 } while (depth > 0 || (*p != ',' && *p != '}')); in find_end_of_item()
24 if (*p == '}') in find_end_of_item()
25 return p; /* End of parent dict */ in find_end_of_item()
27 p++; in find_end_of_item()
28 while (*p == ' ') p++; in find_end_of_item()
29 return p; in find_end_of_item()
36 char *p = (char*)*arg; in encode_tree() local
38 if (*p == '[') in encode_tree()
41 p++; in encode_tree()
43 tree.left.arg = p; in encode_tree()
45 p = find_end_of_item(p); in encode_tree()
47 tree.right.arg = p; in encode_tree()
53 tree.leaf = atoi(p); in encode_tree()
64 char *p = (char*)*arg; in encode_dictionary() local
65 if (*p == '{') p++; in encode_dictionary()
66 while (*p != '}') in encode_dictionary()
70 if (*p != '\'') in encode_dictionary()
73 p++; /* Starting quote of key */ in encode_dictionary()
74 textlen = strchr(p, '\'') - p; in encode_dictionary()
75 strncpy(pair.key, p, textlen); in encode_dictionary()
77 p += textlen + 2; in encode_dictionary()
79 while (*p == ' ') p++; in encode_dictionary()
81 if (*p == '[') in encode_dictionary()
85 pair.treeValue.arg = p; in encode_dictionary()
87 else if (*p == '\'') in encode_dictionary()
91 p++; in encode_dictionary()
92 textlen = strchr(p, '\'') - p; in encode_dictionary()
93 strncpy(pair.stringValue, p, textlen); in encode_dictionary()
96 else if (*p == '{') in encode_dictionary()
101 pair.dictValue.dictItem.arg = p; in encode_dictionary()
107 pair.intValue = atoi(p); in encode_dictionary()
110 p = find_end_of_item(p); in encode_dictionary()