Lines Matching refs:errorCode

42     UErrorCode errorCode;
46 errorCode=U_ZERO_ERROR;
50 &errorCode);
51 if( U_FAILURE(errorCode) ||
58 u_errorName(errorCode),
68 errorCode=U_ZERO_ERROR;
72 &errorCode);
73 if( U_FAILURE(errorCode) ||
80 u_errorName(errorCode),
86 errorCode=U_ZERO_ERROR;
90 &errorCode);
91 if( errorCode!=U_BUFFER_OVERFLOW_ERROR ||
98 u_errorName(errorCode),
103 errorCode=U_ZERO_ERROR;
107 &errorCode);
108 if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) {
111 u_errorName(errorCode));
115 errorCode=U_ZERO_ERROR;
119 &errorCode);
120 if( errorCode!=U_ILLEGAL_ARGUMENT_ERROR ||
125 u_errorName(errorCode),
140 UErrorCode errorCode;
144 errorCode=U_ZERO_ERROR;
148 &errorCode);
149 if( U_FAILURE(errorCode) ||
156 u_errorName(errorCode),
162 errorCode=U_ZERO_ERROR;
166 &errorCode);
167 if( U_FAILURE(errorCode) ||
174 u_errorName(errorCode),
179 errorCode=U_ZERO_ERROR;
183 &errorCode);
184 if( errorCode!=U_BUFFER_OVERFLOW_ERROR ||
189 u_errorName(errorCode));
194 errorCode=U_ZERO_ERROR;
198 &errorCode);
199 if( errorCode!=U_ILLEGAL_ARGUMENT_ERROR ||
204 u_errorName(errorCode),
209 errorCode=U_ZERO_ERROR;
213 &errorCode);
214 if( errorCode!=U_ILLEGAL_ARGUMENT_ERROR ||
219 u_errorName(errorCode),
237 UErrorCode errorCode;
239 errorCode=U_ZERO_ERROR;
240 titleIterChars=ubrk_open(UBRK_CHARACTER, "", beforeTitle, sizeof(beforeTitle)/U_SIZEOF_UCHAR, &errorCode);
241 if(U_FAILURE(errorCode)) {
242 log_err_status(errorCode, "error: ubrk_open(UBRK_CHARACTER)->%s\n", u_errorName(errorCode));
248 errorCode=U_ZERO_ERROR;
252 &errorCode);
253 if( U_FAILURE(errorCode) ||
260 u_errorName(errorCode),
266 errorCode=U_ZERO_ERROR;
270 &errorCode);
271 if( U_FAILURE(errorCode) ||
278 u_errorName(errorCode),
283 errorCode=U_ZERO_ERROR;
287 &errorCode);
288 if( errorCode!=U_BUFFER_OVERFLOW_ERROR ||
293 u_errorName(errorCode));
298 errorCode=U_ZERO_ERROR;
302 &errorCode);
303 if( errorCode!=U_ILLEGAL_ARGUMENT_ERROR ||
308 u_errorName(errorCode),
313 errorCode=U_ZERO_ERROR;
317 &errorCode);
318 if( errorCode!=U_ILLEGAL_ARGUMENT_ERROR ||
323 u_errorName(errorCode),
341 UErrorCode errorCode;
343 errorCode=U_ZERO_ERROR;
344 titleIterWord=ubrk_open(UBRK_WORD, "", beforeTitle, sizeof(beforeTitle)/U_SIZEOF_UCHAR, &errorCode);
345 if(U_FAILURE(errorCode)) {
346 log_err_status(errorCode, "error: ubrk_open(UBRK_WORD)->%s\n", u_errorName(errorCode));
352 errorCode=U_ZERO_ERROR;
356 &errorCode);
357 if( U_FAILURE(errorCode) ||
366 u_errorName(errorCode),
371 errorCode=U_ZERO_ERROR;
375 &errorCode);
376 if( U_FAILURE(errorCode) ||
385 u_errorName(errorCode),
433 UErrorCode errorCode;
458 errorCode=U_ZERO_ERROR;
462 &errorCode);
463 if( U_FAILURE(errorCode) ||
470 u_errorName(errorCode),
477 errorCode=U_ZERO_ERROR;
481 &errorCode);
482 if( U_FAILURE(errorCode) ||
489 u_errorName(errorCode),
497 errorCode=U_ZERO_ERROR;
501 &errorCode);
502 if( U_FAILURE(errorCode) ||
509 u_errorName(errorCode),
516 errorCode=U_ZERO_ERROR;
520 &errorCode);
521 if( U_FAILURE(errorCode) ||
528 u_errorName(errorCode),
535 errorCode=U_ZERO_ERROR;
539 &errorCode);
540 if( errorCode!=U_BUFFER_OVERFLOW_ERROR ||
547 u_errorName(errorCode),
551 errorCode=U_ZERO_ERROR;
555 &errorCode);
556 if( errorCode!=U_BUFFER_OVERFLOW_ERROR ||
561 u_errorName(errorCode));
565 errorCode=U_ZERO_ERROR;
569 &errorCode);
570 if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) {
573 u_errorName(errorCode));
577 errorCode=U_ZERO_ERROR;
581 &errorCode);
582 if( errorCode!=U_ILLEGAL_ARGUMENT_ERROR ||
587 u_errorName(errorCode),
592 errorCode=U_ZERO_ERROR;
596 &errorCode);
597 if( errorCode!=U_ILLEGAL_ARGUMENT_ERROR ||
602 u_errorName(errorCode),
607 errorCode=U_ZERO_ERROR;
611 &errorCode);
612 if( errorCode!=U_ILLEGAL_ARGUMENT_ERROR ||
617 u_errorName(errorCode),
634 UErrorCode errorCode;
637 errorCode=U_ZERO_ERROR;
655 result=u_strCaseCompare(mixed, -1, otherDefault, -1, U_FOLD_CASE_DEFAULT, &errorCode);
665 result=u_strCaseCompare(mixed, lenMixed, otherExcludeSpecialI, lenOtherExcludeSpecialI, U_FOLD_CASE_EXCLUDE_SPECIAL_I, &errorCode);
675 result=u_strCaseCompare(mixed, -1, different, lenDifferent, U_FOLD_CASE_DEFAULT, &errorCode);
685 result=u_strCaseCompare(mixed, 4, different, 4, U_FOLD_CASE_DEFAULT, &errorCode);
695 result=u_strCaseCompare(mixed, 5, different, 5, U_FOLD_CASE_DEFAULT, &errorCode);
733 UErrorCode errorCode;
735 errorCode=U_ZERO_ERROR;
736 csm=ucasemap_open("tur", 0xa5, &errorCode);
737 if(U_FAILURE(errorCode)) {
738 log_err("ucasemap_open(\"tur\") failed - %s\n", u_errorName(errorCode));
746 ucasemap_setLocale(csm, "I-kLInGOn-the-quick-brown-fox-jumps-over-the-lazy-dog", &errorCode);
752 errorCode=U_ZERO_ERROR;
757 ucasemap_setOptions(csm, 0x333333, &errorCode);
766 errorCode=U_ZERO_ERROR;
767 length=ucasemap_utf8ToLower(csm, utf8Out, (int32_t)sizeof(utf8Out), aBc, -1, &errorCode);
768 if(U_FAILURE(errorCode) || length!=3 || 0!=strcmp(abc, utf8Out)) {
773 errorCode=U_PARSE_ERROR;
775 length=ucasemap_utf8ToLower(csm, utf8Out, (int32_t)sizeof(utf8Out), aBc, -1, &errorCode);
776 if(errorCode!=U_PARSE_ERROR || 0!=strcmp(defg, utf8Out)) {
781 errorCode=U_ZERO_ERROR;
783 length=ucasemap_utf8ToUpper(csm, utf8Out, 2, utf8Out+1, 2, &errorCode);
784 if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR || 0!=strcmp(aBc, utf8Out)) {
789 errorCode=U_ZERO_ERROR;
791 length=ucasemap_utf8ToUpper(csm, utf8Out+1, 2, utf8Out, 2, &errorCode);
792 if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR || 0!=strcmp(aBc, utf8Out)) {
797 errorCode=U_ZERO_ERROR;
799 length=ucasemap_utf8ToLower(csm, NULL, (int32_t)sizeof(utf8Out), aBc, -1, &errorCode);
800 if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR || 0!=strcmp(defg, utf8Out)) {
805 errorCode=U_ZERO_ERROR;
807 length=ucasemap_utf8ToLower(csm, utf8Out, -2, aBc, -1, &errorCode);
808 if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR || 0!=strcmp(defg, utf8Out)) {
813 errorCode=U_ZERO_ERROR;
815 length=ucasemap_utf8ToLower(csm, utf8Out, (int32_t)sizeof(utf8Out), NULL, -1, &errorCode);
816 if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR || 0!=strcmp(defg, utf8Out)) {
821 errorCode=U_ZERO_ERROR;
823 length=ucasemap_utf8ToLower(csm, utf8Out, (int32_t)sizeof(utf8Out), aBc, -2, &errorCode);
824 if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR || 0!=strcmp(defg, utf8Out)) {
829 errorCode=U_ZERO_ERROR;
831 length=ucasemap_utf8ToUpper(csm, utf8Out, 2, aBc, 3, &errorCode);
832 if(errorCode!=U_BUFFER_OVERFLOW_ERROR || length!=3 || 0!=strcmp(defg+2, utf8Out+2)) {
837 errorCode=U_ZERO_ERROR;
839 length=ucasemap_utf8ToUpper(csm, utf8Out, 3, aBc, 3, &errorCode);
840 if(errorCode!=U_STRING_NOT_TERMINATED_WARNING || length!=3 || 0!=strcmp(ABCg, utf8Out)) {
845 errorCode=U_ZERO_ERROR;
847 length=ucasemap_utf8FoldCase(csm, utf8Out, (int32_t)sizeof(utf8Out), aBc, 3, &errorCode);
848 if(U_FAILURE(errorCode) || length!=3 || 0!=strcmp(abc, utf8Out)) {
878 UErrorCode errorCode;
880 errorCode=U_ZERO_ERROR;
881 csm=ucasemap_open("", 0, &errorCode);
882 if(U_FAILURE(errorCode)) {
883 log_err("ucasemap_open(\"\") failed - %s\n", u_errorName(errorCode));
893 length=ucasemap_toTitle(csm, buffer, UPRV_LENGTHOF(buffer), beforeTitle, UPRV_LENGTHOF(beforeTitle), &errorCode);
894 if( U_FAILURE(errorCode) ||
899 log_err_status(errorCode, "ucasemap_toTitle(default iterator)=%ld failed - %s\n", (long)length, u_errorName(errorCode));
901 if (U_SUCCESS(errorCode)) {
909 ucasemap_setOptions(csm, U_TITLECASE_NO_BREAK_ADJUSTMENT, &errorCode);
910 if(U_FAILURE(errorCode)) {
911 log_err_status(errorCode, "error: ucasemap_setOptions(U_TITLECASE_NO_BREAK_ADJUSTMENT) failed - %s\n", u_errorName(errorCode));
915 length=ucasemap_toTitle(csm, buffer, UPRV_LENGTHOF(buffer), beforeTitle, UPRV_LENGTHOF(beforeTitle), &errorCode);
916 if( U_FAILURE(errorCode) ||
921 log_err("ucasemap_toTitle(default iterator, no break adjustment)=%ld failed - %s\n", (long)length, u_errorName(errorCode));
925 errorCode=U_ZERO_ERROR;
926 sentenceIter=ubrk_open(UBRK_SENTENCE, "", NULL, 0, &errorCode);
927 if(U_FAILURE(errorCode)) {
928 log_err("error: ubrk_open(UBRK_SENTENCE) failed - %s\n", u_errorName(errorCode));
932 ucasemap_setBreakIterator(csm, sentenceIter, &errorCode);
933 if(U_FAILURE(errorCode)) {
934 log_err("error: ucasemap_setBreakIterator(sentence iterator) failed - %s\n", u_errorName(errorCode));
944 ucasemap_setOptions(csm, U_TITLECASE_NO_LOWERCASE, &errorCode);
945 if(U_FAILURE(errorCode)) {
946 log_err("error: ucasemap_setOptions(U_TITLECASE_NO_LOWERCASE) failed - %s\n", u_errorName(errorCode));
951 length=ucasemap_toTitle(csm, NULL, 0, beforeTitle, UPRV_LENGTHOF(beforeTitle), &errorCode);
952 if( errorCode!=U_BUFFER_OVERFLOW_ERROR ||
955 log_err("ucasemap_toTitle(preflight sentence break iterator, no lowercasing)=%ld failed - %s\n", (long)length, u_errorName(errorCode));
958 errorCode=U_ZERO_ERROR;
960 length=ucasemap_toTitle(csm, buffer, UPRV_LENGTHOF(buffer), beforeTitle, UPRV_LENGTHOF(beforeTitle), &errorCode);
961 if( U_FAILURE(errorCode) ||
966 log_err("ucasemap_toTitle(sentence break iterator, no lowercasing)=%ld failed - %s\n", (long)length, u_errorName(errorCode));
974 errorCode=U_ZERO_ERROR;
975 u_strToUTF8(utf8BeforeTitle, (int32_t)sizeof(utf8BeforeTitle), &utf8BeforeTitleLength, beforeTitle, UPRV_LENGTHOF(beforeTitle), &errorCode);
976 u_strToUTF8(utf8TitleSentNoLower, (int32_t)sizeof(utf8TitleSentNoLower), &utf8TitleSentNoLowerLength, titleSentNoLower, UPRV_LENGTHOF(titleSentNoLower), &errorCode);
978 length=ucasemap_utf8ToTitle(csm, utf8, (int32_t)sizeof(utf8), utf8BeforeTitle, utf8BeforeTitleLength, &errorCode);
979 if( U_FAILURE(errorCode) ||
984 log_err("ucasemap_utf8ToTitle(sentence break iterator, no lowercasing)=%ld failed - %s\n", (long)length, u_errorName(errorCode));