Lines Matching refs:errorCode
44 UErrorCode errorCode;
48 errorCode=U_ZERO_ERROR;
52 &errorCode);
53 if( U_FAILURE(errorCode) ||
60 u_errorName(errorCode),
70 errorCode=U_ZERO_ERROR;
74 &errorCode);
75 if( U_FAILURE(errorCode) ||
82 u_errorName(errorCode),
88 errorCode=U_ZERO_ERROR;
92 &errorCode);
93 if( errorCode!=U_BUFFER_OVERFLOW_ERROR ||
100 u_errorName(errorCode),
105 errorCode=U_ZERO_ERROR;
109 &errorCode);
110 if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) {
113 u_errorName(errorCode));
117 errorCode=U_ZERO_ERROR;
121 &errorCode);
122 if( errorCode!=U_ILLEGAL_ARGUMENT_ERROR ||
127 u_errorName(errorCode),
142 UErrorCode errorCode;
146 errorCode=U_ZERO_ERROR;
150 &errorCode);
151 if( U_FAILURE(errorCode) ||
158 u_errorName(errorCode),
164 errorCode=U_ZERO_ERROR;
168 &errorCode);
169 if( U_FAILURE(errorCode) ||
176 u_errorName(errorCode),
181 errorCode=U_ZERO_ERROR;
185 &errorCode);
186 if( errorCode!=U_BUFFER_OVERFLOW_ERROR ||
191 u_errorName(errorCode));
196 errorCode=U_ZERO_ERROR;
200 &errorCode);
201 if( errorCode!=U_ILLEGAL_ARGUMENT_ERROR ||
206 u_errorName(errorCode),
211 errorCode=U_ZERO_ERROR;
215 &errorCode);
216 if( errorCode!=U_ILLEGAL_ARGUMENT_ERROR ||
221 u_errorName(errorCode),
239 UErrorCode errorCode;
241 errorCode=U_ZERO_ERROR;
242 titleIterChars=ubrk_open(UBRK_CHARACTER, "", beforeTitle, UPRV_LENGTHOF(beforeTitle), &errorCode);
243 if(U_FAILURE(errorCode)) {
244 log_err_status(errorCode, "error: ubrk_open(UBRK_CHARACTER)->%s\n", u_errorName(errorCode));
250 errorCode=U_ZERO_ERROR;
254 &errorCode);
255 if( U_FAILURE(errorCode) ||
262 u_errorName(errorCode),
268 errorCode=U_ZERO_ERROR;
272 &errorCode);
273 if( U_FAILURE(errorCode) ||
280 u_errorName(errorCode),
285 errorCode=U_ZERO_ERROR;
289 &errorCode);
290 if( errorCode!=U_BUFFER_OVERFLOW_ERROR ||
295 u_errorName(errorCode));
300 errorCode=U_ZERO_ERROR;
304 &errorCode);
305 if( errorCode!=U_ILLEGAL_ARGUMENT_ERROR ||
310 u_errorName(errorCode),
315 errorCode=U_ZERO_ERROR;
319 &errorCode);
320 if( errorCode!=U_ILLEGAL_ARGUMENT_ERROR ||
325 u_errorName(errorCode),
343 UErrorCode errorCode;
345 errorCode=U_ZERO_ERROR;
346 titleIterWord=ubrk_open(UBRK_WORD, "", beforeTitle, UPRV_LENGTHOF(beforeTitle), &errorCode);
347 if(U_FAILURE(errorCode)) {
348 log_err_status(errorCode, "error: ubrk_open(UBRK_WORD)->%s\n", u_errorName(errorCode));
354 errorCode=U_ZERO_ERROR;
358 &errorCode);
359 if( U_FAILURE(errorCode) ||
368 u_errorName(errorCode),
373 errorCode=U_ZERO_ERROR;
377 &errorCode);
378 if( U_FAILURE(errorCode) ||
387 u_errorName(errorCode),
435 UErrorCode errorCode;
460 errorCode=U_ZERO_ERROR;
464 &errorCode);
465 if( U_FAILURE(errorCode) ||
472 u_errorName(errorCode),
479 errorCode=U_ZERO_ERROR;
483 &errorCode);
484 if( U_FAILURE(errorCode) ||
491 u_errorName(errorCode),
499 errorCode=U_ZERO_ERROR;
503 &errorCode);
504 if( U_FAILURE(errorCode) ||
511 u_errorName(errorCode),
518 errorCode=U_ZERO_ERROR;
522 &errorCode);
523 if( U_FAILURE(errorCode) ||
530 u_errorName(errorCode),
537 errorCode=U_ZERO_ERROR;
541 &errorCode);
542 if( errorCode!=U_BUFFER_OVERFLOW_ERROR ||
549 u_errorName(errorCode),
553 errorCode=U_ZERO_ERROR;
557 &errorCode);
558 if( errorCode!=U_BUFFER_OVERFLOW_ERROR ||
563 u_errorName(errorCode));
567 errorCode=U_ZERO_ERROR;
571 &errorCode);
572 if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) {
575 u_errorName(errorCode));
579 errorCode=U_ZERO_ERROR;
583 &errorCode);
584 if( errorCode!=U_ILLEGAL_ARGUMENT_ERROR ||
589 u_errorName(errorCode),
594 errorCode=U_ZERO_ERROR;
598 &errorCode);
599 if( errorCode!=U_ILLEGAL_ARGUMENT_ERROR ||
604 u_errorName(errorCode),
609 errorCode=U_ZERO_ERROR;
613 &errorCode);
614 if( errorCode!=U_ILLEGAL_ARGUMENT_ERROR ||
619 u_errorName(errorCode),
636 UErrorCode errorCode;
639 errorCode=U_ZERO_ERROR;
657 result=u_strCaseCompare(mixed, -1, otherDefault, -1, U_FOLD_CASE_DEFAULT, &errorCode);
667 result=u_strCaseCompare(mixed, lenMixed, otherExcludeSpecialI, lenOtherExcludeSpecialI, U_FOLD_CASE_EXCLUDE_SPECIAL_I, &errorCode);
677 result=u_strCaseCompare(mixed, -1, different, lenDifferent, U_FOLD_CASE_DEFAULT, &errorCode);
687 result=u_strCaseCompare(mixed, 4, different, 4, U_FOLD_CASE_DEFAULT, &errorCode);
697 result=u_strCaseCompare(mixed, 5, different, 5, U_FOLD_CASE_DEFAULT, &errorCode);
735 UErrorCode errorCode;
737 errorCode=U_ZERO_ERROR;
738 csm=ucasemap_open("tur", 0xa5, &errorCode);
739 if(U_FAILURE(errorCode)) {
740 log_err("ucasemap_open(\"tur\") failed - %s\n", u_errorName(errorCode));
748 ucasemap_setLocale(csm, "I-kLInGOn-the-quick-brown-fox-jumps-over-the-lazy-dog", &errorCode);
754 errorCode=U_ZERO_ERROR;
759 ucasemap_setOptions(csm, 0x333333, &errorCode);
768 errorCode=U_ZERO_ERROR;
769 length=ucasemap_utf8ToLower(csm, utf8Out, (int32_t)sizeof(utf8Out), aBc, -1, &errorCode);
770 if(U_FAILURE(errorCode) || length!=3 || 0!=strcmp(abc, utf8Out)) {
775 errorCode=U_PARSE_ERROR;
777 length=ucasemap_utf8ToLower(csm, utf8Out, (int32_t)sizeof(utf8Out), aBc, -1, &errorCode);
778 if(errorCode!=U_PARSE_ERROR || 0!=strcmp(defg, utf8Out)) {
783 errorCode=U_ZERO_ERROR;
785 length=ucasemap_utf8ToUpper(csm, utf8Out, 2, utf8Out+1, 2, &errorCode);
786 if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR || 0!=strcmp(aBc, utf8Out)) {
791 errorCode=U_ZERO_ERROR;
793 length=ucasemap_utf8ToUpper(csm, utf8Out+1, 2, utf8Out, 2, &errorCode);
794 if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR || 0!=strcmp(aBc, utf8Out)) {
799 errorCode=U_ZERO_ERROR;
801 length=ucasemap_utf8ToLower(csm, NULL, (int32_t)sizeof(utf8Out), aBc, -1, &errorCode);
802 if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR || 0!=strcmp(defg, utf8Out)) {
807 errorCode=U_ZERO_ERROR;
809 length=ucasemap_utf8ToLower(csm, utf8Out, -2, aBc, -1, &errorCode);
810 if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR || 0!=strcmp(defg, utf8Out)) {
815 errorCode=U_ZERO_ERROR;
817 length=ucasemap_utf8ToLower(csm, utf8Out, (int32_t)sizeof(utf8Out), NULL, -1, &errorCode);
818 if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR || 0!=strcmp(defg, utf8Out)) {
823 errorCode=U_ZERO_ERROR;
825 length=ucasemap_utf8ToLower(csm, utf8Out, (int32_t)sizeof(utf8Out), aBc, -2, &errorCode);
826 if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR || 0!=strcmp(defg, utf8Out)) {
831 errorCode=U_ZERO_ERROR;
833 length=ucasemap_utf8ToUpper(csm, utf8Out, 2, aBc, 3, &errorCode);
834 if(errorCode!=U_BUFFER_OVERFLOW_ERROR || length!=3 || 0!=strcmp(defg+2, utf8Out+2)) {
839 errorCode=U_ZERO_ERROR;
841 length=ucasemap_utf8ToUpper(csm, utf8Out, 3, aBc, 3, &errorCode);
842 if(errorCode!=U_STRING_NOT_TERMINATED_WARNING || length!=3 || 0!=strcmp(ABCg, utf8Out)) {
847 errorCode=U_ZERO_ERROR;
849 length=ucasemap_utf8FoldCase(csm, utf8Out, (int32_t)sizeof(utf8Out), aBc, 3, &errorCode);
850 if(U_FAILURE(errorCode) || length!=3 || 0!=strcmp(abc, utf8Out)) {
880 UErrorCode errorCode;
882 errorCode=U_ZERO_ERROR;
883 csm=ucasemap_open("", 0, &errorCode);
884 if(U_FAILURE(errorCode)) {
885 log_err("ucasemap_open(\"\") failed - %s\n", u_errorName(errorCode));
895 length=ucasemap_toTitle(csm, buffer, UPRV_LENGTHOF(buffer), beforeTitle, UPRV_LENGTHOF(beforeTitle), &errorCode);
896 if( U_FAILURE(errorCode) ||
901 log_err_status(errorCode, "ucasemap_toTitle(default iterator)=%ld failed - %s\n", (long)length, u_errorName(errorCode));
903 if (U_SUCCESS(errorCode)) {
911 ucasemap_setOptions(csm, U_TITLECASE_NO_BREAK_ADJUSTMENT, &errorCode);
912 if(U_FAILURE(errorCode)) {
913 log_err_status(errorCode, "error: ucasemap_setOptions(U_TITLECASE_NO_BREAK_ADJUSTMENT) failed - %s\n", u_errorName(errorCode));
917 length=ucasemap_toTitle(csm, buffer, UPRV_LENGTHOF(buffer), beforeTitle, UPRV_LENGTHOF(beforeTitle), &errorCode);
918 if( U_FAILURE(errorCode) ||
923 log_err("ucasemap_toTitle(default iterator, no break adjustment)=%ld failed - %s\n", (long)length, u_errorName(errorCode));
927 errorCode=U_ZERO_ERROR;
928 sentenceIter=ubrk_open(UBRK_SENTENCE, "", NULL, 0, &errorCode);
929 if(U_FAILURE(errorCode)) {
930 log_err("error: ubrk_open(UBRK_SENTENCE) failed - %s\n", u_errorName(errorCode));
934 ucasemap_setBreakIterator(csm, sentenceIter, &errorCode);
935 if(U_FAILURE(errorCode)) {
936 log_err("error: ucasemap_setBreakIterator(sentence iterator) failed - %s\n", u_errorName(errorCode));
946 ucasemap_setOptions(csm, U_TITLECASE_NO_LOWERCASE, &errorCode);
947 if(U_FAILURE(errorCode)) {
948 log_err("error: ucasemap_setOptions(U_TITLECASE_NO_LOWERCASE) failed - %s\n", u_errorName(errorCode));
953 length=ucasemap_toTitle(csm, NULL, 0, beforeTitle, UPRV_LENGTHOF(beforeTitle), &errorCode);
954 if( errorCode!=U_BUFFER_OVERFLOW_ERROR ||
957 log_err("ucasemap_toTitle(preflight sentence break iterator, no lowercasing)=%ld failed - %s\n", (long)length, u_errorName(errorCode));
960 errorCode=U_ZERO_ERROR;
962 length=ucasemap_toTitle(csm, buffer, UPRV_LENGTHOF(buffer), beforeTitle, UPRV_LENGTHOF(beforeTitle), &errorCode);
963 if( U_FAILURE(errorCode) ||
968 log_err("ucasemap_toTitle(sentence break iterator, no lowercasing)=%ld failed - %s\n", (long)length, u_errorName(errorCode));
976 errorCode=U_ZERO_ERROR;
977 u_strToUTF8(utf8BeforeTitle, (int32_t)sizeof(utf8BeforeTitle), &utf8BeforeTitleLength, beforeTitle, UPRV_LENGTHOF(beforeTitle), &errorCode);
978 u_strToUTF8(utf8TitleSentNoLower, (int32_t)sizeof(utf8TitleSentNoLower), &utf8TitleSentNoLowerLength, titleSentNoLower, UPRV_LENGTHOF(titleSentNoLower), &errorCode);
980 length=ucasemap_utf8ToTitle(csm, utf8, (int32_t)sizeof(utf8), utf8BeforeTitle, utf8BeforeTitleLength, &errorCode);
981 if( U_FAILURE(errorCode) ||
986 log_err("ucasemap_utf8ToTitle(sentence break iterator, no lowercasing)=%ld failed - %s\n", (long)length, u_errorName(errorCode));