| OLD | NEW |
| 1 /* | 1 /* |
| 2 ***************************************************************************** | 2 ***************************************************************************** |
| 3 * Copyright (C) 1996-2011, International Business Machines Corporation and * | 3 * Copyright (C) 1996-2014, International Business Machines Corporation and |
| 4 * others. All Rights Reserved. * | 4 * others. All Rights Reserved. |
| 5 ***************************************************************************** | 5 ***************************************************************************** |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "unicode/utypes.h" | 8 #include "unicode/utypes.h" |
| 9 | 9 |
| 10 #if !UCONFIG_NO_NORMALIZATION | 10 #if !UCONFIG_NO_NORMALIZATION |
| 11 | 11 |
| 12 #include "unicode/caniter.h" | 12 #include "unicode/caniter.h" |
| 13 #include "unicode/normalizer2.h" | 13 #include "unicode/normalizer2.h" |
| 14 #include "unicode/uchar.h" | 14 #include "unicode/uchar.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 | 64 |
| 65 /** | 65 /** |
| 66 *@param source string to get results for | 66 *@param source string to get results for |
| 67 */ | 67 */ |
| 68 CanonicalIterator::CanonicalIterator(const UnicodeString &sourceStr, UErrorCode
&status) : | 68 CanonicalIterator::CanonicalIterator(const UnicodeString &sourceStr, UErrorCode
&status) : |
| 69 pieces(NULL), | 69 pieces(NULL), |
| 70 pieces_length(0), | 70 pieces_length(0), |
| 71 pieces_lengths(NULL), | 71 pieces_lengths(NULL), |
| 72 current(NULL), | 72 current(NULL), |
| 73 current_length(0), | 73 current_length(0), |
| 74 nfd(*Normalizer2Factory::getNFDInstance(status)), | 74 nfd(*Normalizer2::getNFDInstance(status)), |
| 75 nfcImpl(*Normalizer2Factory::getNFCImpl(status)) | 75 nfcImpl(*Normalizer2Factory::getNFCImpl(status)) |
| 76 { | 76 { |
| 77 if(U_SUCCESS(status) && nfcImpl.ensureCanonIterData(status)) { | 77 if(U_SUCCESS(status) && nfcImpl.ensureCanonIterData(status)) { |
| 78 setSource(sourceStr, status); | 78 setSource(sourceStr, status); |
| 79 } | 79 } |
| 80 } | 80 } |
| 81 | 81 |
| 82 CanonicalIterator::~CanonicalIterator() { | 82 CanonicalIterator::~CanonicalIterator() { |
| 83 cleanPieces(); | 83 cleanPieces(); |
| 84 } | 84 } |
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 568 if(U_FAILURE(status) || trial.compare(segment+segmentPos, segLen - segmentPo
s) != 0) { | 568 if(U_FAILURE(status) || trial.compare(segment+segmentPos, segLen - segmentPo
s) != 0) { |
| 569 return NULL; | 569 return NULL; |
| 570 } | 570 } |
| 571 | 571 |
| 572 return getEquivalents2(fillinResult, temp.getBuffer()+inputLen, temp.length(
)-inputLen, status); | 572 return getEquivalents2(fillinResult, temp.getBuffer()+inputLen, temp.length(
)-inputLen, status); |
| 573 } | 573 } |
| 574 | 574 |
| 575 U_NAMESPACE_END | 575 U_NAMESPACE_END |
| 576 | 576 |
| 577 #endif /* #if !UCONFIG_NO_NORMALIZATION */ | 577 #endif /* #if !UCONFIG_NO_NORMALIZATION */ |
| OLD | NEW |