Lines Matching refs:pos

36     pos = newOffset;  in resetToOffset()
41 return pos; in getOffset()
46 if(pos == length) { in handleNextCE32()
51 c = u8[pos++]; in handleNextCE32()
58 ((pos + 1) < length || length < 0) && in handleNextCE32()
59 U8_IS_VALID_LEAD3_AND_T1(c, t1 = u8[pos]) && in handleNextCE32()
60 (t2 = (u8[pos + 1] - 0x80)) <= 0x3f) { in handleNextCE32()
63 pos += 2; in handleNextCE32()
65 } else if(c < 0xe0 && c >= 0xc2 && pos != length && (t1 = (u8[pos] - 0x80)) <= 0x3f) { in handleNextCE32()
69 ++pos; in handleNextCE32()
74 c = utf8_nextCharSafeBody(u8, &pos, length, c, -3); in handleNextCE32()
82 length = --pos; in foundNULTerminator()
96 if(pos == length) { in nextCodePoint()
99 if(u8[pos] == 0 && length < 0) { in nextCodePoint()
100 length = pos; in nextCodePoint()
104 U8_NEXT_OR_FFFD(u8, pos, length, c); in nextCodePoint()
110 if(pos == 0) { in previousCodePoint()
114 U8_PREV_OR_FFFD(u8, 0, pos, c); in previousCodePoint()
120 U8_FWD_N(u8, pos, length, num); in forwardNumCodePoints()
125 U8_BACK_N(u8, 0, pos, num); in backwardNumCodePoints()
135 start = pos = newOffset; in resetToOffset()
142 return pos; in getOffset()
143 } else if(pos == 0) { in getOffset()
155 if(pos == length) { in handleNextCE32()
159 c = u8[pos++]; in handleNextCE32()
166 ((pos + 1) < length || length < 0) && in handleNextCE32()
167 U8_IS_VALID_LEAD3_AND_T1(c, t1 = u8[pos]) && in handleNextCE32()
168 (t2 = (u8[pos + 1] - 0x80)) <= 0x3f) { in handleNextCE32()
171 pos += 2; in handleNextCE32()
174 (pos != length && nextHasLccc()))) { in handleNextCE32()
175 pos -= 3; in handleNextCE32()
179 } else if(c < 0xe0 && c >= 0xc2 && pos != length && (t1 = (u8[pos] - 0x80)) <= 0x3f) { in handleNextCE32()
183 ++pos; in handleNextCE32()
184 if(CollationFCD::hasTccc(c) && pos != length && nextHasLccc()) { in handleNextCE32()
185 pos -= 2; in handleNextCE32()
192 c = utf8_nextCharSafeBody(u8, &pos, length, c, -3); in handleNextCE32()
197 if(CollationFCD::hasTccc(U16_LEAD(c)) && pos != length && nextHasLccc()) { in handleNextCE32()
198 pos -= 4; in handleNextCE32()
209 } else if(state == IN_FCD_SEGMENT && pos != limit) { in handleNextCE32()
211 } else if(state == IN_NORMALIZED && pos != normalized.length()) { in handleNextCE32()
212 c = normalized[pos++]; in handleNextCE32()
223 U_ASSERT(state == CHECK_FWD && pos != length); in nextHasLccc()
226 UChar32 c = u8[pos]; in nextHasLccc()
228 int32_t i = pos; in nextHasLccc()
236 U_ASSERT(state == CHECK_BWD && pos != 0); in previousHasTccc()
237 UChar32 c = u8[pos - 1]; in previousHasTccc()
239 int32_t i = pos; in previousHasTccc()
248 U_ASSERT(pos < normalized.length()); in handleGetTrailSurrogate()
250 if(U16_IS_TRAIL(trail = normalized[pos])) { ++pos; } in handleGetTrailSurrogate()
257 length = --pos; in foundNULTerminator()
269 if(pos == length || ((c = u8[pos]) == 0 && length < 0)) { in nextCodePoint()
273 ++pos; in nextCodePoint()
276 U8_NEXT_OR_FFFD(u8, pos, length, c); in nextCodePoint()
279 (pos != length && nextHasLccc()))) { in nextCodePoint()
282 pos -= U8_LENGTH(c); in nextCodePoint()
289 } else if(state == IN_FCD_SEGMENT && pos != limit) { in nextCodePoint()
290 U8_NEXT_OR_FFFD(u8, pos, length, c); in nextCodePoint()
292 } else if(state == IN_NORMALIZED && pos != normalized.length()) { in nextCodePoint()
293 c = normalized.char32At(pos); in nextCodePoint()
294 pos += U16_LENGTH(c); in nextCodePoint()
307 if(pos == 0) { in previousCodePoint()
310 if(U8_IS_SINGLE(c = u8[pos - 1])) { in previousCodePoint()
311 --pos; in previousCodePoint()
314 U8_PREV_OR_FFFD(u8, 0, pos, c); in previousCodePoint()
317 (pos != 0 && previousHasTccc()))) { in previousCodePoint()
320 pos += U8_LENGTH(c); in previousCodePoint()
327 } else if(state == IN_FCD_SEGMENT && pos != start) { in previousCodePoint()
328 U8_PREV_OR_FFFD(u8, 0, pos, c); in previousCodePoint()
330 } else if(state >= IN_NORMALIZED && pos != 0) { in previousCodePoint()
331 c = normalized.char32At(pos - 1); in previousCodePoint()
332 pos -= U16_LENGTH(c); in previousCodePoint()
361 (state == IN_FCD_SEGMENT && pos == limit) || in switchToForward()
362 (state == IN_NORMALIZED && pos == normalized.length())); in switchToForward()
365 start = pos; in switchToForward()
366 if(pos == limit) { in switchToForward()
378 start = pos = limit; in switchToForward()
387 U_ASSERT(state == CHECK_FWD && pos != length); in nextSegment()
389 int32_t segmentStart = pos; in nextSegment()
395 int32_t cpStart = pos; in nextSegment()
397 U8_NEXT_OR_FFFD(u8, pos, length, c); in nextSegment()
402 pos = cpStart; in nextSegment()
408 while(pos != length) { in nextSegment()
409 cpStart = pos; in nextSegment()
410 U8_NEXT_OR_FFFD(u8, pos, length, c); in nextSegment()
412 pos = cpStart; in nextSegment()
419 limit = pos; in nextSegment()
421 pos = 0; in nextSegment()
425 if(pos == length || prevCC == 0) { in nextSegment()
430 limit = pos; in nextSegment()
431 pos = segmentStart; in nextSegment()
432 U_ASSERT(pos != limit); in nextSegment()
440 (state == IN_FCD_SEGMENT && pos == start) || in switchToBackward()
441 (state >= IN_NORMALIZED && pos == 0)); in switchToBackward()
444 limit = pos; in switchToBackward()
445 if(pos == start) { in switchToBackward()
457 limit = pos = start; in switchToBackward()
466 U_ASSERT(state == CHECK_BWD && pos != 0); in previousSegment()
468 int32_t segmentLimit = pos; in previousSegment()
474 int32_t cpLimit = pos; in previousSegment()
476 U8_PREV_OR_FFFD(u8, 0, pos, c); in previousSegment()
481 pos = cpLimit; in previousSegment()
488 while(fcd16 > 0xff && pos != 0) { in previousSegment()
489 cpLimit = pos; in previousSegment()
490 U8_PREV_OR_FFFD(u8, 0, pos, c); in previousSegment()
493 pos = cpLimit; in previousSegment()
501 start = pos; in previousSegment()
503 pos = normalized.length(); in previousSegment()
507 if(pos == 0 || nextCC == 0) { in previousSegment()
512 start = pos; in previousSegment()
513 pos = segmentLimit; in previousSegment()
514 U_ASSERT(pos != start); in previousSegment()