Lines Matching refs:status
89 #define STRPOS_CHECK_STATUS(status, error) \ argument
90 if ( U_FAILURE( (status) ) ) { \
91 intl_error_set_code( NULL, (status) ); \
105 UErrorCode status; in grapheme_strpos_utf16() local
113 status = U_ZERO_ERROR; in grapheme_strpos_utf16()
114 intl_convert_utf8_to_utf16(&uhaystack, &uhaystack_len, haystack, haystack_len, &status ); in grapheme_strpos_utf16()
115 STRPOS_CHECK_STATUS(status, "Error converting input string to UTF-16"); in grapheme_strpos_utf16()
117 status = U_ZERO_ERROR; in grapheme_strpos_utf16()
118 intl_convert_utf8_to_utf16(&uneedle, &uneedle_len, needle, needle_len, &status ); in grapheme_strpos_utf16()
119 STRPOS_CHECK_STATUS(status, "Error converting needle string to UTF-16"); in grapheme_strpos_utf16()
122 status = U_ZERO_ERROR; in grapheme_strpos_utf16()
123 bi = grapheme_get_break_iterator(u_break_iterator_buffer, &status ); in grapheme_strpos_utf16()
124 STRPOS_CHECK_STATUS(status, "Failed to get iterator"); in grapheme_strpos_utf16()
125 status = U_ZERO_ERROR; in grapheme_strpos_utf16()
126 ubrk_setText(bi, uhaystack, uhaystack_len, &status); in grapheme_strpos_utf16()
127 STRPOS_CHECK_STATUS(status, "Failed to set up iterator"); in grapheme_strpos_utf16()
140 status = U_ZERO_ERROR; in grapheme_strpos_utf16()
141 src = usearch_open(uneedle, uneedle_len, uhaystack, uhaystack_len, "", bi, &status); in grapheme_strpos_utf16()
142 STRPOS_CHECK_STATUS(status, "Error creating search object"); in grapheme_strpos_utf16()
146 status = U_ZERO_ERROR; in grapheme_strpos_utf16()
147 ucol_setAttribute(coll, UCOL_STRENGTH, UCOL_SECONDARY, &status); in grapheme_strpos_utf16()
148 STRPOS_CHECK_STATUS(status, "Error setting collation strength"); in grapheme_strpos_utf16()
159 status = U_ZERO_ERROR; in grapheme_strpos_utf16()
160 usearch_setOffset(src, last ? 0 : offset_pos, &status); in grapheme_strpos_utf16()
161 STRPOS_CHECK_STATUS(status, "Invalid search offset"); in grapheme_strpos_utf16()
167 char_pos = usearch_last(src, &status); in grapheme_strpos_utf16()
176 char_pos = usearch_next(src, &status); in grapheme_strpos_utf16()
185 char_pos = usearch_next(src, &status); in grapheme_strpos_utf16()
187 STRPOS_CHECK_STATUS(status, "Error looking up string"); in grapheme_strpos_utf16()
234 UErrorCode status = U_ZERO_ERROR; in grapheme_split_string() local
238 bi = grapheme_get_break_iterator((void*)u_break_iterator_buffer, &status ); in grapheme_split_string()
240 if( U_FAILURE(status) ) { in grapheme_split_string()
244 ubrk_setText(bi, text, text_length, &status); in grapheme_split_string()
273 UErrorCode status = U_ZERO_ERROR; in grapheme_count_graphemes() local
275 ubrk_setText(bi, string, string_len, &status); in grapheme_count_graphemes()
373 UBreakIterator* grapheme_get_break_iterator(void *stack_buffer, UErrorCode *status ) in grapheme_get_break_iterator() argument
383 status); in grapheme_get_break_iterator()
389 return ubrk_clone(global_break_iterator, status); in grapheme_get_break_iterator()
393 return ubrk_safeClone(global_break_iterator, stack_buffer, &buffer_size, status); in grapheme_get_break_iterator()