Skip to content

Commit

Permalink
deps: ICU 60.2 bump
Browse files Browse the repository at this point in the history
- Update to Maintainance ICU 60.2
- CLDR 32.0.1
- http://site.icu-project.org/download/60#TOC-ICU-60.2-bug-fixes
- Subsumes #16931

PR-URL: #17687
Reviewed-By: Tiancheng "Timothy" Gu <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
srl295 committed Jan 18, 2018
1 parent f7c709f commit e42708c
Show file tree
Hide file tree
Showing 14 changed files with 51 additions and 31 deletions.
4 changes: 2 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -1132,8 +1132,8 @@ def glob_to_var(dir_base, dir_sub, patch_dir):
def configure_intl(o):
icus = [
{
'url': 'https://ssl.icu-project.org/files/icu4c/60.1/icu4c-60_1-src.zip',
'md5': 'e6cb990ac2a3161d31a3def8435f80cb',
'url': 'https://ssl.icu-project.org/files/icu4c/60.2/icu4c-60_2-src.zip',
'md5': '115908818fd0324530b2acb1b029738d',
},
]
def icu_download(path):
Expand Down
2 changes: 1 addition & 1 deletion deps/icu-small/source/common/rbbi_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Empty file modified deps/icu-small/source/common/rbbicst.pl
100644 → 100755
Empty file.
18 changes: 15 additions & 3 deletions deps/icu-small/source/common/ucnv_u8.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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;
}

Expand All @@ -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;
Expand Down Expand Up @@ -811,7 +814,7 @@ ucnv_UTF8FromUTF8(UConverterFromUnicodeArgs *pFromUArgs,
}

/* copy the legal byte sequence to the target */
{
if(count>=toULength) {
int8_t i;

for(i=0; i<oldToULength; ++i) {
Expand All @@ -822,9 +825,18 @@ ucnv_UTF8FromUTF8(UConverterFromUnicodeArgs *pFromUArgs,
*target++=*source++;
}
count-=toULength;
} else {
// A supplementary character that does not fit into the target.
// Let the standard converter handle this.
source-=(toULength-oldToULength);
pToUArgs->source=(char *)source;
pFromUArgs->target=(char *)target;
*pErrorCode=U_USING_DEFAULT_WARNING;
return;
}
}
}
U_ASSERT(count>=0);

if(U_SUCCESS(*pErrorCode) && source<sourceLimit) {
if(target==(const uint8_t *)pFromUArgs->targetLimit) {
Expand Down
2 changes: 1 addition & 1 deletion deps/icu-small/source/common/unicode/brkiter.h
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ class U_COMMON_API BreakIterator : public UObject {
* 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;
Expand Down
12 changes: 6 additions & 6 deletions deps/icu-small/source/common/unicode/ucnv.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
* converter, you can get its properties, set options, convert your data and
* close the converter.</p>
*
* <p>Since many software programs recogize different converter names for
* <p>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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -452,7 +452,7 @@ ucnv_openU(const UChar *name,
* @param platform the platform in which the codepage number exists
* @param err error status <TT>U_MEMORY_ALLOCATION_ERROR, U_FILE_ACCESS_ERROR</TT>
* @return the created Unicode converter object, or <TT>NULL</TT> if an error
* occured.
* occurred.
* @see ucnv_open
* @see ucnv_openU
* @see ucnv_close
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
18 changes: 9 additions & 9 deletions deps/icu-small/source/common/unicode/utext.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
*****************************************************************************/

Expand Down Expand Up @@ -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 -
Expand Down Expand Up @@ -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.
* <p>
Expand All @@ -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,
Expand All @@ -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
*/
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
*
Expand Down Expand Up @@ -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
Expand All @@ -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
*/
Expand Down
6 changes: 3 additions & 3 deletions deps/icu-small/source/common/unicode/uvernum.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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 */

/*===========================================================================
Expand Down
Binary file modified deps/icu-small/source/data/in/icudt60l.dat
Binary file not shown.
12 changes: 10 additions & 2 deletions deps/icu-small/source/i18n/calendar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
Expand Down
Empty file modified deps/icu-small/source/i18n/regexcst.pl
100644 → 100755
Empty file.
Empty file modified deps/icu-small/source/i18n/unicode/selfmt.h
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion deps/icu-small/source/tools/genrb/genrb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
6 changes: 3 additions & 3 deletions deps/icu-small/source/tools/genrb/parse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit e42708c

Please sign in to comment.