Lines Matching refs:errorCode
39 void load(const char *packageName, const char *name, UErrorCode &errorCode);
77 LoadedNormalizer2Impl::load(const char *packageName, const char *name, UErrorCode &errorCode) { in load() argument
78 if(U_FAILURE(errorCode)) { in load()
81 memory=udata_openChoice(packageName, "nrm", name, isAcceptable, this, &errorCode); in load()
82 if(U_FAILURE(errorCode)) { in load()
89 errorCode=U_INVALID_FORMAT_ERROR; // Not enough indexes. in load()
97 &errorCode); in load()
98 if(U_FAILURE(errorCode)) { in load()
118 UErrorCode &errorCode) { in createInstance() argument
119 if(U_FAILURE(errorCode)) { in createInstance()
124 errorCode=U_MEMORY_ALLOCATION_ERROR; in createInstance()
127 impl->load(packageName, name, errorCode); in createInstance()
128 return createInstance(impl, errorCode); in createInstance()
149 static void U_CALLCONV initSingletons(const char *what, UErrorCode &errorCode) { in initSingletons() argument
152 nfcSingleton = Norm2AllModes::createInstance(nullptr, "nfc", errorCode); in initSingletons()
156 nfkcSingleton = Norm2AllModes::createInstance(nullptr, "nfkc", errorCode); in initSingletons()
158 nfkc_cfSingleton = Norm2AllModes::createInstance(nullptr, "nfkc_cf", errorCode); in initSingletons()
195 Norm2AllModes::getNFCInstance(UErrorCode &errorCode) { in getNFCInstance() argument
196 if(U_FAILURE(errorCode)) { return nullptr; } in getNFCInstance()
197 umtx_initOnce(nfcInitOnce, &initSingletons, "nfc", errorCode); in getNFCInstance()
203 Norm2AllModes::getNFKCInstance(UErrorCode &errorCode) { in getNFKCInstance() argument
204 if(U_FAILURE(errorCode)) { return nullptr; } in getNFKCInstance()
205 umtx_initOnce(nfkcInitOnce, &initSingletons, "nfkc", errorCode); in getNFKCInstance()
210 Norm2AllModes::getNFKC_CFInstance(UErrorCode &errorCode) { in getNFKC_CFInstance() argument
211 if(U_FAILURE(errorCode)) { return nullptr; } in getNFKC_CFInstance()
212 umtx_initOnce(nfkc_cfInitOnce, &initSingletons, "nfkc_cf", errorCode); in getNFKC_CFInstance()
218 Normalizer2::getNFCInstance(UErrorCode &errorCode) { in getNFCInstance() argument
219 const Norm2AllModes *allModes=Norm2AllModes::getNFCInstance(errorCode); in getNFCInstance()
224 Normalizer2::getNFDInstance(UErrorCode &errorCode) { in getNFDInstance() argument
225 const Norm2AllModes *allModes=Norm2AllModes::getNFCInstance(errorCode); in getNFDInstance()
229 const Normalizer2 *Normalizer2Factory::getFCDInstance(UErrorCode &errorCode) { in getFCDInstance() argument
230 const Norm2AllModes *allModes=Norm2AllModes::getNFCInstance(errorCode); in getFCDInstance()
234 const Normalizer2 *Normalizer2Factory::getFCCInstance(UErrorCode &errorCode) { in getFCCInstance() argument
235 const Norm2AllModes *allModes=Norm2AllModes::getNFCInstance(errorCode); in getFCCInstance()
240 Normalizer2Factory::getNFCImpl(UErrorCode &errorCode) { in getNFCImpl() argument
241 const Norm2AllModes *allModes=Norm2AllModes::getNFCInstance(errorCode); in getNFCImpl()
247 Normalizer2::getNFKCInstance(UErrorCode &errorCode) { in getNFKCInstance() argument
248 const Norm2AllModes *allModes=Norm2AllModes::getNFKCInstance(errorCode); in getNFKCInstance()
253 Normalizer2::getNFKDInstance(UErrorCode &errorCode) { in getNFKDInstance() argument
254 const Norm2AllModes *allModes=Norm2AllModes::getNFKCInstance(errorCode); in getNFKDInstance()
259 Normalizer2::getNFKCCasefoldInstance(UErrorCode &errorCode) { in getNFKCCasefoldInstance() argument
260 const Norm2AllModes *allModes=Norm2AllModes::getNFKC_CFInstance(errorCode); in getNFKCCasefoldInstance()
268 UErrorCode &errorCode) { in getInstance() argument
269 if(U_FAILURE(errorCode)) { in getInstance()
273 errorCode=U_ILLEGAL_ARGUMENT_ERROR; in getInstance()
279 allModes=Norm2AllModes::getNFCInstance(errorCode); in getInstance()
281 allModes=Norm2AllModes::getNFKCInstance(errorCode); in getInstance()
283 allModes=Norm2AllModes::getNFKC_CFInstance(errorCode); in getInstance()
286 if(allModes==nullptr && U_SUCCESS(errorCode)) { in getInstance()
296 Norm2AllModes::createInstance(packageName, name, errorCode)); in getInstance()
297 if(U_SUCCESS(errorCode)) { in getInstance()
300 cache=uhash_open(uhash_hashChars, uhash_compareChars, nullptr, &errorCode); in getInstance()
301 if(U_FAILURE(errorCode)) { in getInstance()
312 errorCode=U_MEMORY_ALLOCATION_ERROR; in getInstance()
317 uhash_put(cache, nameCopy, localAllModes.orphan(), &errorCode); in getInstance()
325 if(allModes!=nullptr && U_SUCCESS(errorCode)) { in getInstance()
343 Normalizer2Factory::getInstance(UNormalizationMode mode, UErrorCode &errorCode) { in getInstance() argument
344 if(U_FAILURE(errorCode)) { in getInstance()
349 return Normalizer2::getNFDInstance(errorCode); in getInstance()
351 return Normalizer2::getNFKDInstance(errorCode); in getInstance()
353 return Normalizer2::getNFCInstance(errorCode); in getInstance()
355 return Normalizer2::getNFKCInstance(errorCode); in getInstance()
357 return getFCDInstance(errorCode); in getInstance()
359 return getNoopInstance(errorCode); in getInstance()
364 Normalizer2Factory::getNFKCImpl(UErrorCode &errorCode) { in getNFKCImpl() argument
365 const Norm2AllModes *allModes=Norm2AllModes::getNFKCInstance(errorCode); in getNFKCImpl()
370 Normalizer2Factory::getNFKC_CFImpl(UErrorCode &errorCode) { in getNFKC_CFImpl() argument
371 const Norm2AllModes *allModes=Norm2AllModes::getNFKC_CFInstance(errorCode); in getNFKC_CFImpl()
409 UErrorCode errorCode=U_ZERO_ERROR; in unorm_getQuickCheck() local
410 const Normalizer2 *norm2=Normalizer2Factory::getInstance(mode, errorCode); in unorm_getQuickCheck()
411 if(U_SUCCESS(errorCode)) { in unorm_getQuickCheck()