From e42708c8e3d2c3917419ba7b536d3bb003b0df97 Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Thu, 14 Dec 2017 11:26:30 -0800 Subject: deps: ICU 60.2 bump - Update to Maintainance ICU 60.2 - CLDR 32.0.1 - http://site.icu-project.org/download/60#TOC-ICU-60.2-bug-fixes - Subsumes https://github.com/nodejs/node/pull/16931 PR-URL: https://github.com/nodejs/node/pull/17687 Reviewed-By: Tiancheng "Timothy" Gu Reviewed-By: Richard Lau Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- deps/icu-small/source/common/rbbi_cache.h | 2 +- deps/icu-small/source/common/rbbicst.pl | 0 deps/icu-small/source/common/ucnv_u8.cpp | 18 +++++++++++++++--- deps/icu-small/source/common/unicode/brkiter.h | 2 +- deps/icu-small/source/common/unicode/ucnv.h | 12 ++++++------ deps/icu-small/source/common/unicode/utext.h | 18 +++++++++--------- deps/icu-small/source/common/unicode/uvernum.h | 6 +++--- deps/icu-small/source/data/in/icudt60l.dat | Bin 2710368 -> 2787232 bytes deps/icu-small/source/i18n/calendar.cpp | 12 ++++++++++-- deps/icu-small/source/i18n/regexcst.pl | 0 deps/icu-small/source/i18n/unicode/selfmt.h | 0 deps/icu-small/source/tools/genrb/genrb.cpp | 2 +- deps/icu-small/source/tools/genrb/parse.cpp | 6 +++--- 13 files changed, 49 insertions(+), 29 deletions(-) mode change 100644 => 100755 deps/icu-small/source/common/rbbicst.pl mode change 100644 => 100755 deps/icu-small/source/i18n/regexcst.pl mode change 100644 => 100755 deps/icu-small/source/i18n/unicode/selfmt.h (limited to 'deps/icu-small') diff --git a/deps/icu-small/source/common/rbbi_cache.h b/deps/icu-small/source/common/rbbi_cache.h index b8a18d81de..8dc7320db9 100644 --- a/deps/icu-small/source/common/rbbi_cache.h +++ b/deps/icu-small/source/common/rbbi_cache.h @@ -121,7 +121,7 @@ class RuleBasedBreakIterator::BreakCache: public UMemory { * If the requested position is a break boundary, leave the iteration * position on it. * If the requested position is not a boundary, leave the iteration - * position on the preceding boundary and include both the the + * position on the preceding boundary and include both the * preceding and following boundaries in the cache. * Additional boundaries, either preceding or following, may be added * to the cache as a side effect. diff --git a/deps/icu-small/source/common/rbbicst.pl b/deps/icu-small/source/common/rbbicst.pl old mode 100644 new mode 100755 diff --git a/deps/icu-small/source/common/ucnv_u8.cpp b/deps/icu-small/source/common/ucnv_u8.cpp index 866cf81659..c7ef87fd50 100644 --- a/deps/icu-small/source/common/ucnv_u8.cpp +++ b/deps/icu-small/source/common/ucnv_u8.cpp @@ -28,6 +28,7 @@ #include "unicode/utf.h" #include "unicode/utf8.h" #include "unicode/utf16.h" +#include "uassert.h" #include "ucnv_bld.h" #include "ucnv_cnv.h" #include "cmemory.h" @@ -694,7 +695,9 @@ ucnv_UTF8FromUTF8(UConverterFromUnicodeArgs *pFromUArgs, // Use a single counter for source and target, counting the minimum of // the source length and the target capacity. // Let the standard converter handle edge cases. + const uint8_t *limit=sourceLimit; if(count>targetCapacity) { + limit-=(count-targetCapacity); count=targetCapacity; } @@ -707,11 +710,11 @@ ucnv_UTF8FromUTF8(UConverterFromUnicodeArgs *pFromUArgs, // sequence from the previous buffer. int32_t length=count-toULimit; if(length>0) { - uint8_t b1=*(sourceLimit-1); + uint8_t b1=*(limit-1); if(U8_IS_SINGLE(b1)) { // common ASCII character } else if(U8_IS_TRAIL(b1) && length>=2) { - uint8_t b2=*(sourceLimit-2); + uint8_t b2=*(limit-2); if(0xe0<=b2 && b2<0xf0 && U8_IS_VALID_LEAD3_AND_T1(b2, b1)) { // truncated 3-byte sequence count-=2; @@ -811,7 +814,7 @@ moreBytes: } /* copy the legal byte sequence to the target */ - { + if(count>=toULength) { int8_t i; for(i=0; isource=(char *)source; + pFromUArgs->target=(char *)target; + *pErrorCode=U_USING_DEFAULT_WARNING; + return; } } } + U_ASSERT(count>=0); if(U_SUCCESS(*pErrorCode) && sourcetargetLimit) { diff --git a/deps/icu-small/source/common/unicode/brkiter.h b/deps/icu-small/source/common/unicode/brkiter.h index 9c1ac7531b..c64bb71222 100644 --- a/deps/icu-small/source/common/unicode/brkiter.h +++ b/deps/icu-small/source/common/unicode/brkiter.h @@ -292,7 +292,7 @@ public: * does nothing. Negative values move to previous boundaries * and positive values move to later boundaries. * @return The new iterator position, or - * DONE if there are fewer than |n| boundaries in the specfied direction. + * DONE if there are fewer than |n| boundaries in the specified direction. * @stable ICU 2.0 */ virtual int32_t next(int32_t n) = 0; diff --git a/deps/icu-small/source/common/unicode/ucnv.h b/deps/icu-small/source/common/unicode/ucnv.h index 86e3b84474..05d0050f4a 100644 --- a/deps/icu-small/source/common/unicode/ucnv.h +++ b/deps/icu-small/source/common/unicode/ucnv.h @@ -29,7 +29,7 @@ * converter, you can get its properties, set options, convert your data and * close the converter.

* - *

Since many software programs recogize different converter names for + *

Since many software programs recognize different converter names for * different types of converters, there are other functions in this API to * iterate over the converter aliases. The functions {@link ucnv_getAvailableName() }, * {@link ucnv_getAlias() } and {@link ucnv_getStandardName() } are some of the @@ -184,7 +184,7 @@ typedef enum { /** * Function pointer for error callback in the codepage to unicode direction. - * Called when an error has occured in conversion to unicode, or on open/close of the callback (see reason). + * Called when an error has occurred in conversion to unicode, or on open/close of the callback (see reason). * @param context Pointer to the callback's private data * @param args Information about the conversion in progress * @param codeUnits Points to 'length' bytes of the concerned codepage sequence @@ -452,7 +452,7 @@ ucnv_openU(const UChar *name, * @param platform the platform in which the codepage number exists * @param err error status U_MEMORY_ALLOCATION_ERROR, U_FILE_ACCESS_ERROR * @return the created Unicode converter object, or NULL if an error - * occured. + * occurred. * @see ucnv_open * @see ucnv_openU * @see ucnv_close @@ -596,7 +596,7 @@ U_NAMESPACE_END * stateful, then subChars will be an empty string. * * @param converter the Unicode converter - * @param subChars the subsitution characters + * @param subChars the substitution characters * @param len on input the capacity of subChars, on output the number * of bytes copied to it * @param err the outgoing error status code. @@ -832,7 +832,7 @@ ucnv_getMinCharSize(const UConverter *converter); * name will be filled in. * * @param converter the Unicode converter. - * @param displayLocale is the specific Locale we want to localised for + * @param displayLocale is the specific Locale we want to localized for * @param displayName user provided buffer to be filled in * @param displayNameCapacity size of displayName Buffer * @param err error status code @@ -877,7 +877,7 @@ ucnv_getName(const UConverter *converter, UErrorCode *err); * * @param converter the Unicode converter * @param err the error status code. - * @return If any error occurrs, -1 will be returned otherwise, the codepage number + * @return If any error occurs, -1 will be returned otherwise, the codepage number * will be returned * @see ucnv_openCCSID * @see ucnv_getPlatform diff --git a/deps/icu-small/source/common/unicode/utext.h b/deps/icu-small/source/common/unicode/utext.h index 55709d403a..7eea1da240 100644 --- a/deps/icu-small/source/common/unicode/utext.h +++ b/deps/icu-small/source/common/unicode/utext.h @@ -389,7 +389,7 @@ utext_equals(const UText *a, const UText *b); /***************************************************************************** * - * Functions to work with the text represeted by a UText wrapper + * Functions to work with the text represented by a UText wrapper * *****************************************************************************/ @@ -433,7 +433,7 @@ utext_isLengthExpensive(const UText *ut); * * The iteration position will be set to the start of the returned code point. * - * This function is roughly equivalent to the the sequence + * This function is roughly equivalent to the sequence * utext_setNativeIndex(index); * utext_current32(); * (There is a subtle difference if the index is out of bounds by being less than zero - @@ -592,7 +592,7 @@ U_STABLE void U_EXPORT2 utext_setNativeIndex(UText *ut, int64_t nativeIndex); /** - * Move the iterator postion by delta code points. The number of code points + * Move the iterator position by delta code points. The number of code points * is a signed number; a negative delta will move the iterator backwards, * towards the start of the text. *

@@ -611,7 +611,7 @@ U_STABLE UBool U_EXPORT2 utext_moveIndex32(UText *ut, int32_t delta); /** - * Get the native index of the character preceeding the current position. + * Get the native index of the character preceding the current position. * If the iteration position is already at the start of the text, zero * is returned. * The value returned is the same as that obtained from the following sequence, @@ -628,7 +628,7 @@ utext_moveIndex32(UText *ut, int32_t delta); * native index of the character most recently returned from utext_next(). * * @param ut the text to be accessed - * @return the native index of the character preceeding the current index position, + * @return the native index of the character preceding the current index position, * or zero if the current position is at the start of the text. * @stable ICU 3.6 */ @@ -1054,7 +1054,7 @@ UTextAccess(UText *ut, int64_t nativeIndex, UBool forward); * be NUL-terminated if there is sufficient space in the destination buffer. * * @param ut the UText from which to extract data. - * @param nativeStart the native index of the first characer to extract. + * @param nativeStart the native index of the first character to extract. * @param nativeLimit the native string index of the position following the last * character to extract. * @param dest the UChar (UTF-16) buffer into which the extracted text is placed @@ -1211,7 +1211,7 @@ UTextClose(UText *ut); struct UTextFuncs { /** * (public) Function table size, sizeof(UTextFuncs) - * Intended for use should the table grow to accomodate added + * Intended for use should the table grow to accommodate added * functions in the future, to allow tests for older format * function tables that do not contain the extensions. * @@ -1345,7 +1345,7 @@ typedef struct UTextFuncs UTextFuncs; struct UText { /** * (private) Magic. Used to help detect when UText functions are handed - * invalid or unitialized UText structs. + * invalid or uninitialized UText structs. * utext_openXYZ() functions take an initialized, * but not necessarily open, UText struct as an * optional fill-in parameter. This magic field @@ -1367,7 +1367,7 @@ struct UText { /** - * Text provider properties. This set of flags is maintainted by the + * Text provider properties. This set of flags is maintained by the * text provider implementation. * @stable ICU 3.4 */ diff --git a/deps/icu-small/source/common/unicode/uvernum.h b/deps/icu-small/source/common/unicode/uvernum.h index ce7dec1553..d905a0f50d 100644 --- a/deps/icu-small/source/common/unicode/uvernum.h +++ b/deps/icu-small/source/common/unicode/uvernum.h @@ -64,7 +64,7 @@ * This value will change in the subsequent releases of ICU * @stable ICU 2.6 */ -#define U_ICU_VERSION_MINOR_NUM 1 +#define U_ICU_VERSION_MINOR_NUM 2 /** The current ICU patchlevel version as an integer. * This value will change in the subsequent releases of ICU @@ -119,7 +119,7 @@ * This value will change in the subsequent releases of ICU * @stable ICU 2.4 */ -#define U_ICU_VERSION "60.1" +#define U_ICU_VERSION "60.2" /** The current ICU library major/minor version as a string without dots, for library name suffixes. * This value will change in the subsequent releases of ICU @@ -131,7 +131,7 @@ /** Data version in ICU4C. * @internal ICU 4.4 Internal Use Only **/ -#define U_ICU_DATA_VERSION "60.1" +#define U_ICU_DATA_VERSION "60.2" #endif /* U_HIDE_INTERNAL_API */ /*=========================================================================== diff --git a/deps/icu-small/source/data/in/icudt60l.dat b/deps/icu-small/source/data/in/icudt60l.dat index 2e04376ae8..c81ffccfa9 100644 Binary files a/deps/icu-small/source/data/in/icudt60l.dat and b/deps/icu-small/source/data/in/icudt60l.dat differ diff --git a/deps/icu-small/source/i18n/calendar.cpp b/deps/icu-small/source/i18n/calendar.cpp index 426bd7904c..7ccaa43b82 100644 --- a/deps/icu-small/source/i18n/calendar.cpp +++ b/deps/icu-small/source/i18n/calendar.cpp @@ -708,6 +708,8 @@ fZone(NULL), fRepeatedWallTime(UCAL_WALLTIME_LAST), fSkippedWallTime(UCAL_WALLTIME_LAST) { + validLocale[0] = 0; + actualLocale[0] = 0; clear(); if (U_FAILURE(success)) { return; @@ -734,6 +736,8 @@ fZone(NULL), fRepeatedWallTime(UCAL_WALLTIME_LAST), fSkippedWallTime(UCAL_WALLTIME_LAST) { + validLocale[0] = 0; + actualLocale[0] = 0; if (U_FAILURE(success)) { return; } @@ -766,6 +770,8 @@ fZone(NULL), fRepeatedWallTime(UCAL_WALLTIME_LAST), fSkippedWallTime(UCAL_WALLTIME_LAST) { + validLocale[0] = 0; + actualLocale[0] = 0; if (U_FAILURE(success)) { return; } @@ -822,8 +828,10 @@ Calendar::operator=(const Calendar &right) fWeekendCease = right.fWeekendCease; fWeekendCeaseMillis = right.fWeekendCeaseMillis; fNextStamp = right.fNextStamp; - uprv_strcpy(validLocale, right.validLocale); - uprv_strcpy(actualLocale, right.actualLocale); + uprv_strncpy(validLocale, right.validLocale, sizeof(validLocale)); + uprv_strncpy(actualLocale, right.actualLocale, sizeof(actualLocale)); + validLocale[sizeof(validLocale)-1] = 0; + actualLocale[sizeof(validLocale)-1] = 0; } return *this; diff --git a/deps/icu-small/source/i18n/regexcst.pl b/deps/icu-small/source/i18n/regexcst.pl old mode 100644 new mode 100755 diff --git a/deps/icu-small/source/i18n/unicode/selfmt.h b/deps/icu-small/source/i18n/unicode/selfmt.h old mode 100644 new mode 100755 diff --git a/deps/icu-small/source/tools/genrb/genrb.cpp b/deps/icu-small/source/tools/genrb/genrb.cpp index 68870bd90a..c4fc462066 100644 --- a/deps/icu-small/source/tools/genrb/genrb.cpp +++ b/deps/icu-small/source/tools/genrb/genrb.cpp @@ -652,7 +652,7 @@ processFile(const char *filename, const char *cp, goto finish; } if (ucbuf == NULL || U_FAILURE(status)) { - fprintf(stderr, "An error occured processing file %s. Error: %s\n", + fprintf(stderr, "An error occurred processing file %s. Error: %s\n", openFileName == NULL ? filename : openFileName, u_errorName(status)); goto finish; } diff --git a/deps/icu-small/source/tools/genrb/parse.cpp b/deps/icu-small/source/tools/genrb/parse.cpp index f003aa3abf..ddfb082afe 100644 --- a/deps/icu-small/source/tools/genrb/parse.cpp +++ b/deps/icu-small/source/tools/genrb/parse.cpp @@ -362,7 +362,7 @@ parseUCARules(ParseState* state, char *tag, uint32_t startline, const struct USt ucbuf = ucbuf_open(filename, &cp, getShowWarning(),FALSE, status); if (U_FAILURE(*status)) { - error(line, "An error occured while opening the input file %s\n", filename); + error(line, "An error occurred while opening the input file %s\n", filename); return NULL; } @@ -500,7 +500,7 @@ parseTransliterator(ParseState* state, char *tag, uint32_t startline, const stru ucbuf = ucbuf_open(filename, &cp, getShowWarning(),FALSE, status); if (U_FAILURE(*status)) { - error(line, "An error occured while opening the input file %s\n", filename); + error(line, "An error occurred while opening the input file %s\n", filename); return NULL; } @@ -758,7 +758,7 @@ GenrbImporter::getRules( return; } if (ucbuf.isNull() || U_FAILURE(errorCode)) { - fprintf(stderr, "An error occured processing file %s. Error: %s\n", openFileName.data(), u_errorName(errorCode)); + fprintf(stderr, "An error occurred processing file %s. Error: %s\n", openFileName.data(), u_errorName(errorCode)); return; } -- cgit v1.2.3