X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/729e4ab9bc6618bc3d8a898e575df7f4019e29ca..0f5d89e82340278ed3d7d50029f37cab2c41a57e:/icuSources/io/ustream.cpp diff --git a/icuSources/io/ustream.cpp b/icuSources/io/ustream.cpp index 3fd6237d..948521a7 100644 --- a/icuSources/io/ustream.cpp +++ b/icuSources/io/ustream.cpp @@ -1,6 +1,8 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html /* ********************************************************************** -* Copyright (C) 2001-2010, International Business Machines +* Copyright (C) 2001-2016, International Business Machines * Corporation and others. All Rights Reserved. ********************************************************************** * FILE NAME : ustream.cpp @@ -12,25 +14,22 @@ ****************************************************************************** */ - #include "unicode/utypes.h" + +#if !UCONFIG_NO_CONVERSION + #include "unicode/uobject.h" #include "unicode/ustream.h" #include "unicode/ucnv.h" #include "unicode/uchar.h" +#include "unicode/utf16.h" #include "ustr_cnv.h" #include "cmemory.h" #include // console IO -#if U_IOSTREAM_SOURCE >= 198506 - -#if U_IOSTREAM_SOURCE >= 199711 #define STD_NAMESPACE std:: -#else -#define STD_NAMESPACE -#endif #define STD_OSTREAM STD_NAMESPACE ostream #define STD_ISTREAM STD_NAMESPACE istream @@ -89,7 +88,7 @@ operator>>(STD_ISTREAM& stream, UnicodeString& str) converter = u_getDefaultConverter(&errorCode); if(U_SUCCESS(errorCode)) { UChar *us = uBuffer; - const UChar *uLimit = uBuffer + sizeof(uBuffer)/sizeof(*uBuffer); + const UChar *uLimit = uBuffer + UPRV_LENGTHOF(uBuffer); const char *s, *sLimit; char ch; UChar ch32; @@ -169,4 +168,3 @@ STOP_READING: U_NAMESPACE_END #endif -