Lines Matching refs:errorCode
38 UBool ReorderingBuffer::init(int32_t destCapacity, UErrorCode &errorCode) {
43 errorCode=U_MEMORY_ALLOCATION_ERROR;
70 UBool ReorderingBuffer::appendSupplementary(UChar32 c, uint8_t cc, UErrorCode &errorCode) {
71 if(remainingCapacity<2 && !resize(2, errorCode)) {
91 UErrorCode &errorCode) {
95 if(remainingCapacity<length && !resize(length, errorCode)) {
121 append(c, leadCC, errorCode);
127 UBool ReorderingBuffer::appendZeroCC(UChar32 c, UErrorCode &errorCode) {
129 if(remainingCapacity<cpLength && !resize(cpLength, errorCode)) {
145 UBool ReorderingBuffer::appendZeroCC(const UChar *s, const UChar *sLimit, UErrorCode &errorCode) {
150 if(remainingCapacity<length && !resize(length, errorCode)) {
179 UBool ReorderingBuffer::resize(int32_t appendLength, UErrorCode &errorCode) {
194 errorCode=U_MEMORY_ALLOCATION_ERROR;
248 CanonIterData(UErrorCode &errorCode);
250 void addToStartSet(UChar32 origin, UChar32 decompLead, UErrorCode &errorCode);
284 Normalizer2Impl::load(const char *packageName, const char *name, UErrorCode &errorCode) {
285 if(U_FAILURE(errorCode)) {
288 memory=udata_openChoice(packageName, "nrm", name, isAcceptable, this, &errorCode);
289 if(U_FAILURE(errorCode)) {
296 errorCode=U_INVALID_FORMAT_ERROR; // Not enough indexes.
313 &errorCode);
314 if(U_FAILURE(errorCode)) {
378 Normalizer2Impl::addPropertyStarts(const USetAdder *sa, UErrorCode & /*errorCode*/) const {
391 Normalizer2Impl::addCanonIterPropertyStarts(const USetAdder *sa, UErrorCode &errorCode) const {
393 if(ensureCanonIterData(errorCode)) {
404 UErrorCode &errorCode) const {
417 buffer->appendZeroCC(prevSrc, src, errorCode);
429 UErrorCode &errorCode) const {
432 src=copyLowPrefixFromNulTerminated(src, minNoCP, buffer, errorCode);
433 if(U_FAILURE(errorCode)) {
478 if(!buffer->appendZeroCC(prevSrc, src, errorCode)) {
493 if(!decompose(c, norm16, *buffer, errorCode)) {
519 UErrorCode &errorCode) const {
524 if(!decompose(c, norm16, buffer, errorCode)) {
533 UErrorCode &errorCode) const {
539 return buffer.append(c, getCCFromYesOrMaybe(norm16), errorCode);
543 return buffer.appendZeroCC(jamos, jamos+Hangul::decompose(c, jamos), errorCode);
559 return buffer.append((const UChar *)mapping+1, length, leadCC, trailCC, errorCode);
643 UErrorCode &errorCode) const {
646 decompose(src, limit, &buffer, errorCode);
661 if (buffer.append(src, (int32_t)(iter.codePointStart-src), firstCC, prevCC, errorCode)) {
662 buffer.appendZeroCC(iter.codePointStart, limit, errorCode);
1030 UErrorCode &errorCode) const {
1048 errorCode);
1049 if(U_FAILURE(errorCode)) {
1097 if(!buffer.appendZeroCC(prevSrc, src, errorCode)) {
1173 if(!buffer.appendBMP((UChar)c, 0, errorCode)) {
1223 if(!buffer.append(c, cc, errorCode)) {
1264 if(!decomposeShort(prevBoundary, src, buffer, errorCode)) {
1296 UErrorCode errorCode=U_ZERO_ERROR;
1297 src=copyLowPrefixFromNulTerminated(src, minNoMaybeCP, NULL, errorCode);
1400 UErrorCode &errorCode) const {
1413 TRUE, buffer, errorCode);
1414 if(U_FAILURE(errorCode)) {
1421 compose(src, limit, onlyContiguous, TRUE, buffer, errorCode);
1426 buffer.appendZeroCC(src, limit, errorCode);
1567 UErrorCode &errorCode) const {
1573 src=copyLowPrefixFromNulTerminated(src, MIN_CCC_LCCC_CP, buffer, errorCode);
1574 if(U_FAILURE(errorCode)) {
1632 if(buffer!=NULL && !buffer->appendZeroCC(prevSrc, src, errorCode)) {
1674 if(buffer!=NULL && !buffer->appendZeroCC(c, errorCode)) {
1697 if(!decomposeShort(prevBoundary, src, *buffer, errorCode)) {
1711 UErrorCode &errorCode) const {
1723 makeFCD(middleStart, middleStart+middle.length(), &buffer, errorCode);
1724 if(U_FAILURE(errorCode)) {
1731 makeFCD(src, limit, &buffer, errorCode);
1736 buffer.appendZeroCC(src, limit, errorCode);
1757 CanonIterData::CanonIterData(UErrorCode &errorCode) :
1758 trie(utrie2_open(0, 0, &errorCode)),
1759 canonStartSets(uprv_deleteUObject, NULL, errorCode) {}
1765 void CanonIterData::addToStartSet(UChar32 origin, UChar32 decompLead, UErrorCode &errorCode) {
1770 utrie2_set32(trie, decompLead, canonValue|origin, &errorCode);
1777 errorCode=U_MEMORY_ALLOCATION_ERROR;
1782 utrie2_set32(trie, decompLead, canonValue, &errorCode);
1783 canonStartSets.addElement(set, errorCode);
1797 singleton(s), impl(ni), errorCode(ec) {}
1798 CanonIterData *getInstance(UErrorCode &errorCode) {
1801 (CanonIterData *)singleton.getInstance(createInstance, this, duplicate, errorCode);
1805 static void *createInstance(const void *context, UErrorCode &errorCode);
1808 impl.makeCanonIterDataFromNorm16(start, end, (uint16_t)value, *newData, errorCode);
1810 return U_SUCCESS(errorCode);
1817 UErrorCode &errorCode;
1830 void *CanonIterDataSingleton::createInstance(const void *context, UErrorCode &errorCode) {
1832 me->newData=new CanonIterData(errorCode);
1834 errorCode=U_MEMORY_ALLOCATION_ERROR;
1837 if(U_SUCCESS(errorCode)) {
1839 utrie2_freeze(me->newData->trie, UTRIE2_32_VALUE_BITS, &errorCode);
1840 if(U_SUCCESS(errorCode)) {
1850 UErrorCode &errorCode) const {
1895 newData.addToStartSet(c, c2, errorCode);
1905 &errorCode);
1912 newData.addToStartSet(c, c2, errorCode);
1916 utrie2_set32(newData.trie, c, newValue, &errorCode);
1921 UBool Normalizer2Impl::ensureCanonIterData(UErrorCode &errorCode) const {
1924 CanonIterDataSingleton(me->canonIterDataSingleton, *me, errorCode).getInstance(errorCode);
1925 return U_SUCCESS(errorCode);