Lines Matching refs:pos

66 #define MB_FAILURE(pos, advance) do { \  argument
67 *cursor = pos + (advance); \
72 #define CHECK_LEN(pos, chars_need) ((str_len - (pos)) >= (chars_need)) argument
96 size_t pos = *cursor; in get_next_char() local
100 assert(pos <= str_len); in get_next_char()
102 if (!CHECK_LEN(pos, 1)) in get_next_char()
103 MB_FAILURE(pos, 1); in get_next_char()
113 c = str[pos]; in get_next_char()
116 pos++; in get_next_char()
118 MB_FAILURE(pos, 1); in get_next_char()
120 if (!CHECK_LEN(pos, 2)) in get_next_char()
121 MB_FAILURE(pos, 1); in get_next_char()
123 if (!utf8_trail(str[pos + 1])) { in get_next_char()
124 MB_FAILURE(pos, utf8_lead(str[pos + 1]) ? 1 : 2); in get_next_char()
126 this_char = ((c & 0x1f) << 6) | (str[pos + 1] & 0x3f); in get_next_char()
128 MB_FAILURE(pos, 2); in get_next_char()
130 pos += 2; in get_next_char()
132 size_t avail = str_len - pos; in get_next_char()
135 !utf8_trail(str[pos + 1]) || !utf8_trail(str[pos + 2])) { in get_next_char()
136 if (avail < 2 || utf8_lead(str[pos + 1])) in get_next_char()
137 MB_FAILURE(pos, 1); in get_next_char()
138 else if (avail < 3 || utf8_lead(str[pos + 2])) in get_next_char()
139 MB_FAILURE(pos, 2); in get_next_char()
141 MB_FAILURE(pos, 3); in get_next_char()
144 this_char = ((c & 0x0f) << 12) | ((str[pos + 1] & 0x3f) << 6) | (str[pos + 2] & 0x3f); in get_next_char()
146 MB_FAILURE(pos, 3); in get_next_char()
148 MB_FAILURE(pos, 3); in get_next_char()
150 pos += 3; in get_next_char()
152 size_t avail = str_len - pos; in get_next_char()
155 !utf8_trail(str[pos + 1]) || !utf8_trail(str[pos + 2]) || in get_next_char()
156 !utf8_trail(str[pos + 3])) { in get_next_char()
157 if (avail < 2 || utf8_lead(str[pos + 1])) in get_next_char()
158 MB_FAILURE(pos, 1); in get_next_char()
159 else if (avail < 3 || utf8_lead(str[pos + 2])) in get_next_char()
160 MB_FAILURE(pos, 2); in get_next_char()
161 else if (avail < 4 || utf8_lead(str[pos + 3])) in get_next_char()
162 MB_FAILURE(pos, 3); in get_next_char()
164 MB_FAILURE(pos, 4); in get_next_char()
167 …this_char = ((c & 0x07) << 18) | ((str[pos + 1] & 0x3f) << 12) | ((str[pos + 2] & 0x3f) << 6) | (s… in get_next_char()
169 MB_FAILURE(pos, 4); in get_next_char()
171 pos += 4; in get_next_char()
173 MB_FAILURE(pos, 1); in get_next_char()
181 unsigned char c = str[pos]; in get_next_char()
184 if (!CHECK_LEN(pos, 2)) in get_next_char()
185 MB_FAILURE(pos, 1); in get_next_char()
187 next = str[pos + 1]; in get_next_char()
193 MB_FAILURE(pos, 1); in get_next_char()
195 pos += 2; in get_next_char()
198 pos += 1; in get_next_char()
205 unsigned char c = str[pos]; in get_next_char()
208 if (!CHECK_LEN(pos, 2)) in get_next_char()
209 MB_FAILURE(pos, 1); in get_next_char()
211 next = str[pos + 1]; in get_next_char()
217 MB_FAILURE(pos, 1); in get_next_char()
219 MB_FAILURE(pos, 2); in get_next_char()
221 pos += 2; in get_next_char()
224 pos += 1; in get_next_char()
231 unsigned char c = str[pos]; in get_next_char()
234 if (!CHECK_LEN(pos, 2)) in get_next_char()
235 MB_FAILURE(pos, 1); in get_next_char()
237 next = str[pos + 1]; in get_next_char()
242 MB_FAILURE(pos, 1); in get_next_char()
244 MB_FAILURE(pos, 2); in get_next_char()
246 pos += 2; in get_next_char()
249 pos += 1; in get_next_char()
251 MB_FAILURE(pos, 1); in get_next_char()
258 unsigned char c = str[pos]; in get_next_char()
261 if (!CHECK_LEN(pos, 2)) in get_next_char()
262 MB_FAILURE(pos, 1); in get_next_char()
264 next = str[pos + 1]; in get_next_char()
269 MB_FAILURE(pos, 1); in get_next_char()
271 MB_FAILURE(pos, 2); in get_next_char()
273 pos += 2; in get_next_char()
276 pos += 1; in get_next_char()
278 MB_FAILURE(pos, 1); in get_next_char()
285 unsigned char c = str[pos]; in get_next_char()
289 if (!CHECK_LEN(pos, 2)) in get_next_char()
290 MB_FAILURE(pos, 1); in get_next_char()
291 next = str[pos + 1]; in get_next_char()
297 MB_FAILURE(pos, (next != 0xA0 && next != 0xFF) ? 1 : 2); in get_next_char()
299 pos += 2; in get_next_char()
302 if (!CHECK_LEN(pos, 2)) in get_next_char()
303 MB_FAILURE(pos, 1); in get_next_char()
305 next = str[pos + 1]; in get_next_char()
310 MB_FAILURE(pos, (next != 0xA0 && next != 0xFF) ? 1 : 2); in get_next_char()
312 pos += 2; in get_next_char()
314 size_t avail = str_len - pos; in get_next_char()
316 if (avail < 3 || !(str[pos + 1] >= 0xA1 && str[pos + 1] <= 0xFE) || in get_next_char()
317 !(str[pos + 2] >= 0xA1 && str[pos + 2] <= 0xFE)) { in get_next_char()
318 if (avail < 2 || (str[pos + 1] != 0xA0 && str[pos + 1] != 0xFF)) in get_next_char()
319 MB_FAILURE(pos, 1); in get_next_char()
320 else if (avail < 3 || (str[pos + 2] != 0xA0 && str[pos + 2] != 0xFF)) in get_next_char()
321 MB_FAILURE(pos, 2); in get_next_char()
323 MB_FAILURE(pos, 3); in get_next_char()
326 this_char = (c << 16) | (str[pos + 1] << 8) | str[pos + 2]; in get_next_char()
328 pos += 3; in get_next_char()
332 pos += 1; in get_next_char()
334 MB_FAILURE(pos, 1); in get_next_char()
340 this_char = str[pos++]; in get_next_char()
344 *cursor = pos; in get_next_char()
1382 char *pos = (char*)&old[cursor+1]; in php_escape_html_entities_ex() local
1383 valid = process_numeric_entity((const char **)&pos, &code_point); in php_escape_html_entities_ex()
1390 ent_len = pos - (char*)&old[cursor]; in php_escape_html_entities_ex()