From c340e7426feb0243e36ab8c0e1886615caf1b037 Mon Sep 17 00:00:00 2001 From: Markus Scherer Date: Fri, 19 Oct 2001 23:25:07 +0000 Subject: [PATCH] ICU-1007 check _haveData() in iteration X-SVN-Rev: 6351 --- icu4c/source/common/unorm.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/icu4c/source/common/unorm.cpp b/icu4c/source/common/unorm.cpp index e0bdb67ced..4134c50529 100644 --- a/icu4c/source/common/unorm.cpp +++ b/icu4c/source/common/unorm.cpp @@ -824,8 +824,6 @@ unorm_quickCheck(const UChar *src, result=UNORM_MAYBE; } } - -/* return result; */ } /* make NFD & NFKD ---------------------------------------------------------- */ @@ -1840,10 +1838,6 @@ _compose(UChar *dest, int32_t destCapacity, UChar c, c2, minNoMaybe; uint8_t cc, prevCC; - if(!_haveData(*pErrorCode)) { - return 0; - } - if(!compat) { minNoMaybe=(UChar)indexes[_NORM_INDEX_MIN_NFC_NO_MAYBE]; qcMask=_NORM_QC_NFC; @@ -2335,7 +2329,7 @@ _findPreviousIterationBoundary(UCharIterator &src, return bufferCapacity-startIndex; } -U_CFUNC int32_t +U_CAPI int32_t U_EXPORT2 unorm_previousNormalize(UChar *dest, int32_t destCapacity, UCharIterator *src, UNormalizationMode mode, UBool ignoreHangul, @@ -2347,6 +2341,10 @@ unorm_previousNormalize(UChar *dest, int32_t destCapacity, int32_t startIndex, bufferLength, bufferCapacity, destLength; UChar minC; + if(!_haveData(*pErrorCode)) { + return 0; + } + switch(mode) { case UNORM_NFD: case UNORM_NFKD: @@ -2545,7 +2543,7 @@ _findNextIterationBoundary(UCharIterator &src, return bufferIndex; } -U_CFUNC int32_t +U_CAPI int32_t U_EXPORT2 unorm_nextNormalize(UChar *dest, int32_t destCapacity, UCharIterator *src, UNormalizationMode mode, UBool ignoreHangul, @@ -2557,6 +2555,10 @@ unorm_nextNormalize(UChar *dest, int32_t destCapacity, int32_t bufferLength, bufferCapacity, destLength; UChar minC; + if(!_haveData(*pErrorCode)) { + return 0; + } + switch(mode) { case UNORM_NFD: case UNORM_NFKD: