X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/729e4ab9bc6618bc3d8a898e575df7f4019e29ca..4388f060552cc537e71e957d32f35e9d75a61233:/icuSources/common/ucnv_u32.c diff --git a/icuSources/common/ucnv_u32.c b/icuSources/common/ucnv_u32.c index f76b9b04..c24aaeee 100644 --- a/icuSources/common/ucnv_u32.c +++ b/icuSources/common/ucnv_u32.c @@ -1,6 +1,6 @@ /* ********************************************************************** -* Copyright (C) 2002-2009, International Business Machines +* Copyright (C) 2002-2011, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * file name: ucnv_u32.c @@ -19,6 +19,7 @@ #if !UCONFIG_NO_CONVERSION #include "unicode/ucnv.h" +#include "unicode/utf.h" #include "ucnv_bld.h" #include "ucnv_cnv.h" #include "cmemory.h" @@ -246,7 +247,7 @@ T_UConverter_fromUnicode_UTF32_BE(UConverterFromUnicodeArgs * args, while (mySource < sourceLimit && myTarget < targetLimit) { ch = *(mySource++); - if (UTF_IS_SURROGATE(ch)) { + if (U_IS_SURROGATE(ch)) { if (U_IS_LEAD(ch)) { lowsurogate: if (mySource < sourceLimit) { @@ -350,7 +351,7 @@ T_UConverter_fromUnicode_UTF32_BE_OFFSET_LOGIC(UConverterFromUnicodeArgs * args, while (mySource < sourceLimit && myTarget < targetLimit) { ch = *(mySource++); - if (UTF_IS_SURROGATE(ch)) { + if (U_IS_SURROGATE(ch)) { if (U_IS_LEAD(ch)) { lowsurogate: if (mySource < sourceLimit) { @@ -726,14 +727,14 @@ T_UConverter_fromUnicode_UTF32_LE(UConverterFromUnicodeArgs * args, { ch = *(mySource++); - if (UTF_IS_SURROGATE(ch)) { - if (U_IS_LEAD(ch)) + if (U16_IS_SURROGATE(ch)) { + if (U16_IS_LEAD(ch)) { lowsurogate: if (mySource < sourceLimit) { ch2 = *mySource; - if (U_IS_TRAIL(ch2)) { + if (U16_IS_TRAIL(ch2)) { ch = ((ch - SURROGATE_HIGH_START) << HALF_SHIFT) + ch2 + SURROGATE_LOW_BASE; mySource++; } @@ -838,14 +839,14 @@ T_UConverter_fromUnicode_UTF32_LE_OFFSET_LOGIC(UConverterFromUnicodeArgs * args, { ch = *(mySource++); - if (UTF_IS_SURROGATE(ch)) { - if (U_IS_LEAD(ch)) + if (U16_IS_SURROGATE(ch)) { + if (U16_IS_LEAD(ch)) { lowsurogate: if (mySource < sourceLimit) { ch2 = *mySource; - if (U_IS_TRAIL(ch2)) + if (U16_IS_TRAIL(ch2)) { ch = ((ch - SURROGATE_HIGH_START) << HALF_SHIFT) + ch2 + SURROGATE_LOW_BASE; mySource++;