]> git.saurik.com Git - apple/icu.git/blobdiff - icuSources/tools/toolutil/ucbuf.c
ICU-531.48.tar.gz
[apple/icu.git] / icuSources / tools / toolutil / ucbuf.c
index 5194ea6f76ffdc664ec4e66fae3952d5c526150c..23f2c9f195c807f122158dbcd378bae5467c8c16 100644 (file)
@@ -1,7 +1,7 @@
 /*
 *******************************************************************************
 *
-*   Copyright (C) 1998-2008, International Business Machines
+*   Copyright (C) 1998-2011, International Business Machines
 *   Corporation and others.  All Rights Reserved.
 *
 *******************************************************************************
 
 #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 <stdio.h>
 
@@ -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++);