Home | History | Annotate | Download | only in common

Lines Matching full:errorcode

61               UErrorCode &errorCode) const {
62 if(U_SUCCESS(errorCode)) {
66 errorCode=U_ILLEGAL_ARGUMENT_ERROR;
74 UErrorCode &errorCode) const {
75 if(U_SUCCESS(errorCode)) {
79 errorCode=U_ILLEGAL_ARGUMENT_ERROR;
87 UErrorCode &errorCode) const {
88 if(U_SUCCESS(errorCode)) {
92 errorCode=U_ILLEGAL_ARGUMENT_ERROR;
132 UErrorCode &errorCode) const {
133 if(U_FAILURE(errorCode)) {
139 errorCode=U_ILLEGAL_ARGUMENT_ERROR;
145 if(buffer.init(src.length(), errorCode)) {
146 normalize(sArray, sArray+src.length(), buffer, errorCode);
152 ReorderingBuffer &buffer, UErrorCode &errorCode) const = 0;
158 UErrorCode &errorCode) const {
159 return normalizeSecondAndAppend(first, second, TRUE, errorCode);
164 UErrorCode &errorCode) const {
165 return normalizeSecondAndAppend(first, second, FALSE, errorCode);
171 UErrorCode &errorCode) const {
172 uprv_checkCanGetBuffer(first, errorCode);
173 if(U_FAILURE(errorCode)) {
178 errorCode=U_ILLEGAL_ARGUMENT_ERROR;
185 if(buffer.init(firstLength+second.length(), errorCode)) {
187 safeMiddle, buffer, errorCode);
190 if(U_FAILURE(errorCode)) {
199 ReorderingBuffer &buffer, UErrorCode &errorCode) const = 0;
242 isNormalized(const UnicodeString &s, UErrorCode &errorCode) const {
243 if(U_FAILURE(errorCode)) {
248 errorCode=U_ILLEGAL_ARGUMENT_ERROR;
252 return sLimit==spanQuickCheckYes(sArray, sLimit, errorCode);
255 quickCheck(const UnicodeString &s, UErrorCode &errorCode) const {
256 return Normalizer2WithImpl::isNormalized(s, errorCode) ? UNORM_YES : UNORM_NO;
259 spanQuickCheckYes(const UnicodeString &s, UErrorCode &errorCode) const {
260 if(U_FAILURE(errorCode)) {
265 errorCode=U_ILLEGAL_ARGUMENT_ERROR;
268 return (int32_t)(spanQuickCheckYes(sArray, sArray+s.length(), errorCode)-sArray);
271 spanQuickCheckYes(const UChar *src, const UChar *limit, UErrorCode &errorCode) const = 0;
290 ReorderingBuffer &buffer, UErrorCode &errorCode) const {
291 impl.decompose(src, limit, &buffer, errorCode);
297 ReorderingBuffer &buffer, UErrorCode &errorCode) const {
298 impl.decomposeAndAppend(src, limit, doNormalize, safeMiddle, buffer, errorCode);
301 spanQuickCheckYes(const UChar *src, const UChar *limit, UErrorCode &errorCode) const {
302 return impl.decompose(src, limit, NULL, errorCode);
324 ReorderingBuffer &buffer, UErrorCode &errorCode) const {
325 impl.compose(src, limit, onlyContiguous, TRUE, buffer, errorCode);
331 ReorderingBuffer &buffer, UErrorCode &errorCode) const {
332 impl.composeAndAppend(src, limit, doNormalize, onlyContiguous, safeMiddle, buffer, errorCode);
336 isNormalized(const UnicodeString &s, UErrorCode &errorCode) const {
337 if(U_FAILURE(errorCode)) {
342 errorCode=U_ILLEGAL_ARGUMENT_ERROR;
347 if(!buffer.init(5, errorCode)) { // small destCapacity for substring normalization
350 return impl.compose(sArray, sArray+s.length(), onlyContiguous, FALSE, buffer, errorCode);
353 quickCheck(const UnicodeString &s, UErrorCode &errorCode) const {
354 if(U_FAILURE(errorCode)) {
359 errorCode=U_ILLEGAL_ARGUMENT_ERROR;
397 ReorderingBuffer &buffer, UErrorCode &errorCode) const {
398 impl.makeFCD(src, limit, &buffer, errorCode);
404 ReorderingBuffer &buffer, UErrorCode &errorCode) const {
405 impl.makeFCDAndAppend(src, limit, doNormalize, safeMiddle, buffer, errorCode);
408 spanQuickCheckYes(const UChar *src, const UChar *limit, UErrorCode &errorCode) const {
409 return impl.makeFCD(src, limit, NULL, errorCode);
424 UErrorCode &errorCode);
437 UErrorCode &errorCode) {
438 if(U_FAILURE(errorCode)) {
443 errorCode=U_MEMORY_ALLOCATION_ERROR;
446 allModes->impl.load(packageName, name, errorCode);
447 return U_SUCCESS(errorCode) ? allModes.orphan() : NULL;
467 errorCode) {
469 nfcSingleton = Norm2AllModes::createInstance(NULL, "nfc", errorCode);
471 nfkcSingleton = Norm2AllModes::createInstance(NULL, "nfkc", errorCode);
473 nfkc_cfSingleton = Norm2AllModes::createInstance(NULL, "nfkc_cf", errorCode);
508 const Normalizer2 *Normalizer2Factory::getNFCInstance(UErrorCode &errorCode) {
509 umtx_initOnce(nfcInitOnce, &initSingletons, "nfc", errorCode);
513 const Normalizer2 *Normalizer2Factory::getNFDInstance(UErrorCode &errorCode) {
514 umtx_initOnce(nfcInitOnce, &initSingletons, "nfc", errorCode);
518 const Normalizer2 *Normalizer2Factory::getFCDInstance(UErrorCode &errorCode) {
519 umtx_initOnce(nfcInitOnce, &initSingletons, "nfc", errorCode);
523 const Normalizer2 *Normalizer2Factory::getFCCInstance(UErrorCode &errorCode) {
524 umtx_initOnce(nfcInitOnce, &initSingletons, "nfc", errorCode);
528 const Normalizer2 *Normalizer2Factory::getNFKCInstance(UErrorCode &errorCode) {
529 umtx_initOnce(nfkcInitOnce, &initSingletons, "nfkc", errorCode);
533 const Normalizer2 *Normalizer2Factory::getNFKDInstance(UErrorCode &errorCode) {
534 umtx_initOnce(nfkcInitOnce, &initSingletons, "nfkc", errorCode);
538 const Normalizer2 *Normalizer2Factory::getNFKC_CFInstance(UErrorCode &errorCode) {
539 umtx_initOnce(nfkc_cfInitOnce, &initSingletons, "nfkc_cf", errorCode);
543 const Normalizer2 *Normalizer2Factory::getNoopInstance(UErrorCode &errorCode) {
544 umtx_initOnce(noopInitOnce, &initSingletons, "noop", errorCode);
549 Normalizer2Factory::getInstance(UNormalizationMode mode, UErrorCode &errorCode) {
550 if(U_FAILURE(errorCode)) {
555 return getNFDInstance(errorCode);
557 return getNFKDInstance(errorCode);
559 return getNFCInstance(errorCode);
561 return getNFKCInstance(errorCode);
563 return getFCDInstance(errorCode);
565 return getNoopInstance(errorCode);
570 Normalizer2Factory::getNFCImpl(UErrorCode &errorCode) {
571 umtx_initOnce(nfcInitOnce, &initSingletons, "nfc", errorCode);
576 Normalizer2Factory::getNFKCImpl(UErrorCode &errorCode) {
577 umtx_initOnce(nfkcInitOnce, &initSingletons, "nfkc", errorCode);
582 Normalizer2Factory::getNFKC_CFImpl(UErrorCode &errorCode) {
583 umtx_initOnce(nfkc_cfInitOnce, &initSingletons, "nfkc_cf", errorCode);
593 Normalizer2::getNFCInstance(UErrorCode &errorCode) {
594 return Normalizer2Factory::getNFCInstance(errorCode);
598 Normalizer2::getNFDInstance(UErrorCode &errorCode) {
599 return Normalizer2Factory::getNFDInstance(errorCode);
603 Normalizer2::getNFKCInstance(UErrorCode &errorCode) {
604 return Normalizer2Factory::getNFKCInstance(errorCode);
608 Normalizer2::getNFKDInstance(UErrorCode &errorCode) {
609 return Normalizer2Factory::getNFKDInstance(errorCode);
613 Normalizer2::getNFKCCasefoldInstance(UErrorCode &errorCode) {
614 return Normalizer2Factory::getNFKC_CFInstance(errorCode);
621 UErrorCode &errorCode) {
622 if(U_FAILURE(errorCode)) {
626 errorCode=U_ILLEGAL_ARGUMENT_ERROR;
632 umtx_initOnce(nfcInitOnce, &initSingletons, "nfc", errorCode);
635 umtx_initOnce(nfkcInitOnce, &initSingletons, "nfkc", errorCode);
638 umtx_initOnce(nfkc_cfInitOnce, &initSingletons, "nfkc_cf", errorCode);
642 if(allModes==NULL && U_SUCCESS(errorCode)) {
651 Norm2AllModes::createInstance(packageName, name, errorCode));
652 if(U_SUCCESS(errorCode)) {
655 cache=uhash_open(uhash_hashChars, uhash_compareChars, NULL, &errorCode);
656 if(U_FAILURE(errorCode)) {
667 errorCode=U_MEMORY_ALLOCATION_ERROR;
671 uhash_put(cache, nameCopy, allModes=localAllModes.orphan(), &errorCode);
679 if(allModes!=NULL && U_SUCCESS(errorCode)) {
964 UErrorCode errorCode=U_ZERO_ERROR;
965 const Normalizer2 *nfd=Normalizer2Factory::getNFDInstance(errorCode);
966 if(U_SUCCESS(errorCode)) {
978 UErrorCode errorCode=U_ZERO_ERROR;
979 const Normalizer2 *norm2=Normalizer2Factory::getInstance(mode, errorCode);
980 if(U_SUCCESS(errorCode)) {
989 UErrorCode errorCode=U_ZERO_ERROR;
990 const Normalizer2Impl *impl=Normalizer2Factory::getNFCImpl(errorCode);
991 if(U_SUCCESS(errorCode)) {