• Home
  • Raw
  • Download

Lines Matching refs:search

578     UBreakIterator *breakiterator = strsrch->search->internalBreakIter;  in checkBreakBoundary()
609 UBreakIterator *breakiterator = strsrch->search->breakIter; in isBreakUnit()
630 const UChar *text = strsrch->search->text + in isBreakUnit()
706 int32_t textlength = strsrch->search->textLength; in getNextUStringSearchBaseOffset()
710 const UChar *text = strsrch->search->text; in getNextUStringSearchBaseOffset()
771 strsrch->search->matchedIndex = USEARCH_DONE; in setMatchNotFound()
772 strsrch->search->matchedLength = 0; in setMatchNotFound()
773 if (strsrch->search->isForwardSearching) { in setMatchNotFound()
774 setColEIterOffset(strsrch->textIter, strsrch->search->textLength); in setMatchNotFound()
839 const UChar *text = strsrch->search->text + start; in checkExtraMatchAccents()
959 UBool accent = getFCD(strsrch->search->text, &temp, in hasAccentsBeforeMatch()
960 strsrch->search->textLength) > 0xFF; in hasAccentsBeforeMatch()
969 U16_BACK_1(strsrch->search->text, 0, temp); in hasAccentsBeforeMatch()
970 if (getFCD(strsrch->search->text, &temp, in hasAccentsBeforeMatch()
971 strsrch->search->textLength) & LAST_BYTE_MASK_) { in hasAccentsBeforeMatch()
1006 const UChar *text = strsrch->search->text; in hasAccentsAfterMatch()
1008 int32_t textlength = strsrch->search->textLength; in hasAccentsAfterMatch()
1087 UnicodeString(FALSE, strsrch->search->text + start, end - start), t2, status); in checkIdentical()
1107 int32_t lastmatchindex = strsrch->search->matchedIndex; in checkRepeatedMatch()
1112 if (strsrch->search->isForwardSearching) { in checkRepeatedMatch()
1118 if (!result && !strsrch->search->isOverlap) { in checkRepeatedMatch()
1119 if (strsrch->search->isForwardSearching) { in checkRepeatedMatch()
1120 result = start < lastmatchindex + strsrch->search->matchedLength; in checkRepeatedMatch()
1168 int32_t textlength = strsrch->search->textLength; in checkNextExactContractionMatch()
1171 const UChar *text = strsrch->search->text; in checkNextExactContractionMatch()
1273 if (!strsrch->search->breakIter && strsrch->strength == UCOL_PRIMARY) { in checkNextExactMatch()
1278 strsrch->search->matchedIndex = start; in checkNextExactMatch()
1279 strsrch->search->matchedLength = *textoffset - start; in checkNextExactMatch()
1451 const UChar *text = strsrch->search->text; in doNextCanonicalPrefixMatch()
1452 int32_t textlength = strsrch->search->textLength; in doNextCanonicalPrefixMatch()
1497 strsrch->search->text + offset, in doNextCanonicalPrefixMatch()
1581 const UChar *text = strsrch->search->text; in doNextCanonicalSuffixMatch()
1714 const UChar *text = strsrch->search->text; in doNextCanonicalMatch()
1788 const UChar *text = strsrch->search->text; in getPreviousUStringSearchBaseOffset()
1790 if (getFCD(text, &offset, strsrch->search->textLength) >> in getPreviousUStringSearchBaseOffset()
1818 int32_t textlength = strsrch->search->textLength; in checkNextCanonicalContractionMatch()
1821 const UChar *text = strsrch->search->text; in checkNextCanonicalContractionMatch()
1852 int32_t textlength = strsrch->search->textLength; in checkNextCanonicalContractionMatch()
1921 strsrch->search->matchedIndex = getPreviousUStringSearchBaseOffset( in checkNextCanonicalMatch()
1924 strsrch->search->matchedLength = *textoffset - in checkNextCanonicalMatch()
1925 strsrch->search->matchedIndex; in checkNextCanonicalMatch()
1941 *textoffset = getNextBaseOffset(strsrch->search->text, *textoffset, in checkNextCanonicalMatch()
1942 strsrch->search->textLength); in checkNextCanonicalMatch()
1946 strsrch->search->matchedIndex = start; in checkNextCanonicalMatch()
1947 strsrch->search->matchedLength = *textoffset - start; in checkNextCanonicalMatch()
1970 if (strsrch->search->isOverlap) { in reverseShift()
1971 if (textoffset != strsrch->search->textLength) { in reverseShift()
2015 int32_t textlength = strsrch->search->textLength; in checkPreviousExactContractionMatch()
2018 const UChar *text = strsrch->search->text; in checkPreviousExactContractionMatch()
2115 *textoffset = getPreviousBaseOffset(strsrch->search->text, in checkPreviousExactMatch()
2121 if (!strsrch->search->breakIter && strsrch->strength == UCOL_PRIMARY) { in checkPreviousExactMatch()
2125 strsrch->search->matchedIndex = *textoffset; in checkPreviousExactMatch()
2126 strsrch->search->matchedLength = end - *textoffset; in checkPreviousExactMatch()
2155 const UChar *text = strsrch->search->text; in doPreviousCanonicalSuffixMatch()
2159 if (!(getFCD(text, &tempend, strsrch->search->textLength) & in doPreviousCanonicalSuffixMatch()
2164 end = getNextBaseOffset(text, end, strsrch->search->textLength); in doPreviousCanonicalSuffixMatch()
2199 strsrch->search->text + start, in doPreviousCanonicalSuffixMatch()
2241 const UChar *text = strsrch->search->text; in doPreviousCanonicalPrefixMatch()
2254 strsrch->search->textLength); in doPreviousCanonicalPrefixMatch()
2377 const UChar *text = strsrch->search->text; in doPreviousCanonicalMatch()
2379 int32_t textlength = strsrch->search->textLength; in doPreviousCanonicalMatch()
2455 int32_t textlength = strsrch->search->textLength; in checkPreviousCanonicalContractionMatch()
2458 const UChar *text = strsrch->search->text; in checkPreviousCanonicalContractionMatch()
2559 strsrch->search->matchedIndex = *textoffset; in checkPreviousCanonicalMatch()
2560 strsrch->search->matchedLength = in checkPreviousCanonicalMatch()
2580 *textoffset = getPreviousBaseOffset(strsrch->search->text, in checkPreviousCanonicalMatch()
2585 strsrch->search->matchedIndex = *textoffset; in checkPreviousCanonicalMatch()
2586 strsrch->search->matchedLength = end - *textoffset; in checkPreviousCanonicalMatch()
2701 result->search = (USearch *)uprv_malloc(sizeof(USearch)); in usearch_openFromCollator()
2702 if (result->search == NULL) { in usearch_openFromCollator()
2708 result->search->text = text; in usearch_openFromCollator()
2709 result->search->textLength = textlength; in usearch_openFromCollator()
2716 result->search->breakIter = breakiter; in usearch_openFromCollator()
2718 …result->search->internalBreakIter = ubrk_open(UBRK_CHARACTER, ucol_getLocaleByType(result->collato… in usearch_openFromCollator()
2725 result->search->matchedLength = 0; in usearch_openFromCollator()
2726 result->search->matchedIndex = USEARCH_DONE; in usearch_openFromCollator()
2736 result->search->isOverlap = FALSE; in usearch_openFromCollator()
2737 result->search->isCanonicalMatch = FALSE; in usearch_openFromCollator()
2738 result->search->elementComparisonType = 0; in usearch_openFromCollator()
2739 result->search->isForwardSearching = TRUE; in usearch_openFromCollator()
2740 result->search->reset = TRUE; in usearch_openFromCollator()
2776 if (strsrch->search->internalBreakIter) { in usearch_close()
2777 ubrk_close(strsrch->search->internalBreakIter); in usearch_close()
2781 uprv_free(strsrch->search); in usearch_close()
2811 if (isOutOfBounds(strsrch->search->textLength, position)) { in usearch_setOffset()
2817 strsrch->search->matchedIndex = USEARCH_DONE; in usearch_setOffset()
2818 strsrch->search->matchedLength = 0; in usearch_setOffset()
2819 strsrch->search->reset = FALSE; in usearch_setOffset()
2827 if (isOutOfBounds(strsrch->search->textLength, result)) { in usearch_getOffset()
2844 strsrch->search->isOverlap = (value == USEARCH_ON ? TRUE : FALSE); in usearch_setAttribute()
2847 strsrch->search->isCanonicalMatch = (value == USEARCH_ON ? TRUE : in usearch_setAttribute()
2852 strsrch->search->elementComparisonType = (int16_t)value; in usearch_setAttribute()
2854 strsrch->search->elementComparisonType = 0; in usearch_setAttribute()
2874 return (strsrch->search->isOverlap == TRUE ? USEARCH_ON : in usearch_getAttribute()
2877 return (strsrch->search->isCanonicalMatch == TRUE ? USEARCH_ON : in usearch_getAttribute()
2881 int16_t value = strsrch->search->elementComparisonType; in usearch_getAttribute()
2901 return strsrch->search->matchedIndex; in usearch_getMatchedStart()
2919 int32_t copylength = strsrch->search->matchedLength; in usearch_getMatchedText()
2920 int32_t copyindex = strsrch->search->matchedIndex; in usearch_getMatchedText()
2930 uprv_memcpy(result, strsrch->search->text + copyindex, in usearch_getMatchedText()
2934 strsrch->search->matchedLength, status); in usearch_getMatchedText()
2941 return strsrch->search->matchedLength; in usearch_getMatchedLength()
2953 strsrch->search->breakIter = breakiter; in usearch_setBreakIterator()
2955 ubrk_setText(breakiter, strsrch->search->text, in usearch_setBreakIterator()
2956 strsrch->search->textLength, status); in usearch_setBreakIterator()
2965 return strsrch->search->breakIter; in usearch_getBreakIterator()
2986 strsrch->search->text = text; in usearch_setText()
2987 strsrch->search->textLength = textlength; in usearch_setText()
2989 strsrch->search->matchedIndex = USEARCH_DONE; in usearch_setText()
2990 strsrch->search->matchedLength = 0; in usearch_setText()
2991 strsrch->search->reset = TRUE; in usearch_setText()
2993 if (strsrch->search->breakIter != NULL) { in usearch_setText()
2994 ubrk_setText(strsrch->search->breakIter, text, in usearch_setText()
2997 ubrk_setText(strsrch->search->internalBreakIter, text, textlength, status); in usearch_setText()
3007 *length = strsrch->search->textLength; in usearch_getText()
3008 return strsrch->search->text; in usearch_getText()
3037 ubrk_close(strsrch->search->internalBreakIter); in usearch_setCollator()
3038 …strsrch->search->internalBreakIter = ubrk_open(UBRK_CHARACTER, ucol_getLocaleByType(collator, ULOC… in usearch_setCollator()
3039 … strsrch->search->text, strsrch->search->textLength, status); in usearch_setCollator()
3048 strsrch->search->text, in usearch_setCollator()
3049 strsrch->search->textLength, in usearch_setCollator()
3116 strsrch->search->isForwardSearching = TRUE; in usearch_first()
3130 strsrch->search->isForwardSearching = TRUE; in usearch_following()
3144 strsrch->search->isForwardSearching = FALSE; in usearch_last()
3145 usearch_setOffset(strsrch, strsrch->search->textLength, status); in usearch_last()
3158 strsrch->search->isForwardSearching = FALSE; in usearch_preceding()
3197 USearch *search = strsrch->search; in usearch_next() local
3198 search->reset = FALSE; in usearch_next()
3199 int32_t textlength = search->textLength; in usearch_next()
3200 if (search->isForwardSearching) { in usearch_next()
3203 || (!search->isOverlap && in usearch_next()
3205 (search->matchedIndex != USEARCH_DONE && in usearch_next()
3206 offset + search->matchedLength >= textlength)))) { in usearch_next()
3213 (! search->isOverlap && in usearch_next()
3214 (search->matchedIndex != USEARCH_DONE && in usearch_next()
3215 offset + search->matchedLength > textlength))) { in usearch_next()
3228 search->isForwardSearching = TRUE; in usearch_next()
3229 if (search->matchedIndex != USEARCH_DONE) { in usearch_next()
3232 return search->matchedIndex; in usearch_next()
3238 if (search->matchedIndex == USEARCH_DONE) { in usearch_next()
3239 search->matchedIndex = offset; in usearch_next()
3242 U16_FWD_1(search->text, search->matchedIndex, textlength); in usearch_next()
3245 search->matchedLength = 0; in usearch_next()
3246 setColEIterOffset(strsrch->textIter, search->matchedIndex); in usearch_next()
3248 if (search->matchedIndex == textlength) { in usearch_next()
3249 search->matchedIndex = USEARCH_DONE; in usearch_next()
3253 if (search->matchedLength > 0) { in usearch_next()
3255 if (search->isOverlap) { in usearch_next()
3260 offset + search->matchedLength, status); in usearch_next()
3268 search->matchedIndex = offset - 1; in usearch_next()
3271 if (search->isCanonicalMatch) { in usearch_next()
3285 if (search->matchedIndex == USEARCH_DONE) { in usearch_next()
3286 ucol_setOffset(strsrch->textIter, search->textLength, status); in usearch_next()
3288 ucol_setOffset(strsrch->textIter, search->matchedIndex, status); in usearch_next()
3292 return search->matchedIndex; in usearch_next()
3303 USearch *search = strsrch->search; in usearch_previous() local
3304 if (search->reset) { in usearch_previous()
3305 offset = search->textLength; in usearch_previous()
3306 search->isForwardSearching = FALSE; in usearch_previous()
3307 search->reset = FALSE; in usearch_previous()
3314 int32_t matchedindex = search->matchedIndex; in usearch_previous()
3315 if (search->isForwardSearching == TRUE) { in usearch_previous()
3321 search->isForwardSearching = FALSE; in usearch_previous()
3329 (!search->isOverlap && in usearch_previous()
3349 search->matchedIndex = in usearch_previous()
3351 if (search->matchedIndex == 0) { in usearch_previous()
3356 U16_BACK_1(search->text, 0, search->matchedIndex); in usearch_previous()
3357 setColEIterOffset(strsrch->textIter, search->matchedIndex); in usearch_previous()
3359 search->matchedLength = 0; in usearch_previous()
3363 if (strsrch->search->isCanonicalMatch) { in usearch_previous()
3378 return search->matchedIndex; in usearch_previous()
3431 ucol_setText(strsrch->textIter, strsrch->search->text, in usearch_reset()
3432 strsrch->search->textLength, in usearch_reset()
3434 strsrch->search->matchedLength = 0; in usearch_reset()
3435 strsrch->search->matchedIndex = USEARCH_DONE; in usearch_reset()
3436 strsrch->search->isOverlap = FALSE; in usearch_reset()
3437 strsrch->search->isCanonicalMatch = FALSE; in usearch_reset()
3438 strsrch->search->elementComparisonType = 0; in usearch_reset()
3439 strsrch->search->isForwardSearching = TRUE; in usearch_reset()
3440 strsrch->search->reset = TRUE; in usearch_reset()
3489 if (ss->search->elementComparisonType != 0) { in CEIBuffer()
3631 const UChar *text = strsrch->search->text; in nextBoundaryAfter()
3632 int32_t textLen = strsrch->search->textLength; in nextBoundaryAfter()
3668 UBreakIterator *breakiterator = strsrch->search->breakIter; in nextBoundaryAfter()
3671 breakiterator = strsrch->search->internalBreakIter; in nextBoundaryAfter()
3693 const UChar *text = strsrch->search->text; in isBreakBoundary()
3694 int32_t textLen = strsrch->search->textLength; in isBreakBoundary()
3719 UBreakIterator *breakiterator = strsrch->search->breakIter; in isBreakBoundary()
3722 breakiterator = strsrch->search->internalBreakIter; in isBreakBoundary()
3736 UBreakIterator *breakiterator = strsrch->search->breakIter;
3822 UChar32 codePointAt(const USearch &search, int32_t index) { in codePointAt() argument
3823 if (index < search.textLength) { in codePointAt()
3825 U16_NEXT(search.text, index, search.textLength, c); in codePointAt()
3831 UChar32 codePointBefore(const USearch &search, int32_t index) { in codePointBefore() argument
3834 U16_PREV(search.text, 0, index, c); in codePointBefore()
3869 startIdx > strsrch->search->textLength || in usearch_search()
3932 …UCompareCEsResult ceMatch = compareCE64s(targetCEI->ce, patCE, strsrch->search->elementComparisonT… in usearch_search()
3979 if (strsrch->search->elementComparisonType == 0) { in usearch_search()
3997 …UCompareCEsResult ceMatch = compareCE64s(nextCEI->ce, patCE, strsrch->search->elementComparisonTyp… in usearch_search()
4047 if (strsrch->search->text != NULL && strsrch->search->textLength > maxLimit) { in usearch_search()
4049 strsrch->search->breakIter == NULL && in usearch_search()
4052 (strsrch->nfd->hasBoundaryBefore(codePointAt(*strsrch->search, maxLimit)) || in usearch_search()
4053 … strsrch->nfd->hasBoundaryAfter(codePointBefore(*strsrch->search, maxLimit))); in usearch_search()
4169 startIdx > strsrch->search->textLength || in usearch_searchBackwards()
4191 if (startIdx < strsrch->search->textLength) { in usearch_searchBackwards()
4192 UBreakIterator *bi = strsrch->search->internalBreakIter; in usearch_searchBackwards()
4247 …UCompareCEsResult ceMatch = compareCE64s(targetCEI->ce, patCE, strsrch->search->elementComparisonT… in usearch_searchBackwards()
4330 if (strsrch->search->text != NULL && strsrch->search->textLength > maxLimit) { in usearch_searchBackwards()
4332 strsrch->search->breakIter == NULL && in usearch_searchBackwards()
4335 (strsrch->nfd->hasBoundaryBefore(codePointAt(*strsrch->search, maxLimit)) || in usearch_searchBackwards()
4336 … strsrch->nfd->hasBoundaryAfter(codePointBefore(*strsrch->search, maxLimit))); in usearch_searchBackwards()
4436 int32_t textlength = strsrch->search->textLength; in usearch_handleNextExact()
4519 setColEIterOffset(coleiter, strsrch->search->matchedIndex); in usearch_handleNextExact()
4531 strsrch->search->matchedIndex = start; in usearch_handleNextExact()
4532 strsrch->search->matchedLength = end - start; in usearch_handleNextExact()
4550 int32_t textlength = strsrch->search->textLength; in usearch_handleNextCanonical()
4634 setColEIterOffset(coleiter, strsrch->search->matchedIndex); in usearch_handleNextCanonical()
4646 strsrch->search->matchedIndex = start; in usearch_handleNextCanonical()
4647 strsrch->search->matchedLength = end - start; in usearch_handleNextCanonical()
4672 if (strsrch->search->matchedIndex != USEARCH_DONE) { in usearch_handlePreviousExact()
4673 textoffset = strsrch->search->matchedIndex; in usearch_handlePreviousExact()
4760 if (strsrch->search->isOverlap) { in usearch_handlePreviousExact()
4761 if (strsrch->search->matchedIndex != USEARCH_DONE) { in usearch_handlePreviousExact()
4762 textOffset = strsrch->search->matchedIndex + strsrch->search->matchedLength - 1; in usearch_handlePreviousExact()
4791 strsrch->search->matchedIndex = start; in usearch_handlePreviousExact()
4792 strsrch->search->matchedLength = end - start; in usearch_handlePreviousExact()
4820 if (strsrch->search->matchedIndex != USEARCH_DONE) { in usearch_handlePreviousCanonical()
4821 textoffset = strsrch->search->matchedIndex; in usearch_handlePreviousCanonical()
4913 if (strsrch->search->isOverlap) { in usearch_handlePreviousCanonical()
4914 if (strsrch->search->matchedIndex != USEARCH_DONE) { in usearch_handlePreviousCanonical()
4915 textOffset = strsrch->search->matchedIndex + strsrch->search->matchedLength - 1; in usearch_handlePreviousCanonical()
4944 strsrch->search->matchedIndex = start; in usearch_handlePreviousCanonical()
4945 strsrch->search->matchedLength = end - start; in usearch_handlePreviousCanonical()