X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/46f4442e9a5a4f3b98b7c1083586332f6a8a99a4..08b89b0a244153b9f5bbb2f49c55ab0f7298122e:/icuSources/tools/toolutil/ucbuf.c diff --git a/icuSources/tools/toolutil/ucbuf.c b/icuSources/tools/toolutil/ucbuf.c index 5194ea6f..23f2c9f1 100644 --- a/icuSources/tools/toolutil/ucbuf.c +++ b/icuSources/tools/toolutil/ucbuf.c @@ -1,7 +1,7 @@ /* ******************************************************************************* * -* Copyright (C) 1998-2008, International Business Machines +* Copyright (C) 1998-2011, International Business Machines * Corporation and others. All Rights Reserved. * ******************************************************************************* @@ -17,14 +17,15 @@ #include "unicode/utypes.h" #include "unicode/putil.h" +#include "unicode/uchar.h" #include "unicode/ucnv.h" #include "unicode/ucnv_err.h" +#include "unicode/ustring.h" +#include "unicode/utf16.h" #include "filestrm.h" #include "cstring.h" #include "cmemory.h" #include "ustrfmt.h" -#include "unicode/ustring.h" -#include "unicode/uchar.h" #include "ucbuf.h" #include @@ -65,7 +66,7 @@ ucbuf_autodetect_fs(FileStream* in, const char** cp, UConverter** conv, int32_t* /* unread the bytes beyond what was consumed for U+FEFF */ T_FileStream_rewind(in); if (*signatureLength > 0) { - numRead = T_FileStream_read(in, start, *signatureLength); + T_FileStream_read(in, start, *signatureLength); } if(*cp==NULL){ @@ -353,8 +354,8 @@ ucbuf_getc32(UCHARBUF* buf,UErrorCode* error){ return U_EOF; } } - if(UTF_IS_LEAD(*(buf->currentPos))){ - retVal=UTF16_GET_PAIR_VALUE(buf->currentPos[0],buf->currentPos[1]); + if(U16_IS_LEAD(*(buf->currentPos))){ + retVal=U16_GET_SUPPLEMENTARY(buf->currentPos[0],buf->currentPos[1]); buf->currentPos+=2; }else{ retVal = *(buf->currentPos++);