Skip to content

Commit

Permalink
deps: Intl: ICU 58 bump - small icu (BIG COMMIT)
Browse files Browse the repository at this point in the history
This commit contains the ICU 58.1 delta.
It is especially large because of the ICU license change,
and, because the line endings were off previously.

* bump to ICU 58.1 - check in small ICU source
* from 58.1 final http://site.icu-project.org/download/58

Fixes: nodejs#7844
PR-URL: nodejs#9234
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
srl295 committed Oct 31, 2016
1 parent 3c386db commit ced7e4d
Show file tree
Hide file tree
Showing 897 changed files with 23,548 additions and 18,793 deletions.
94 changes: 43 additions & 51 deletions deps/icu-small/LICENSE
Original file line number Diff line number Diff line change
@@ -1,9 +1,50 @@
ICU License - ICU 1.8.1 and later
COPYRIGHT AND PERMISSION NOTICE (ICU 58 and later)

Copyright © 1991-2016 Unicode, Inc. All rights reserved.
Distributed under the Terms of Use in http://www.unicode.org/copyright.html

Permission is hereby granted, free of charge, to any person obtaining
a copy of the Unicode data files and any associated documentation
(the "Data Files") or Unicode software and any associated documentation
(the "Software") to deal in the Data Files or Software
without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, and/or sell copies of
the Data Files or Software, and to permit persons to whom the Data Files
or Software are furnished to do so, provided that either
(a) this copyright and permission notice appear with all copies
of the Data Files or Software, or
(b) this copyright and permission notice appear in associated
Documentation.

THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT OF THIRD PARTY RIGHTS.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THE DATA FILES OR SOFTWARE.

Except as contained in this notice, the name of a copyright holder
shall not be used in advertising or otherwise to promote the sale,
use or other dealings in these Data Files or Software without prior
written authorization of the copyright holder.

---------------------

Third-Party Software Licenses

This section contains third-party software notices and/or additional
terms for licensed third-party software components included within ICU
libraries.

1. ICU License - ICU 1.8.1 to ICU 57.1

COPYRIGHT AND PERMISSION NOTICE

Copyright (c) 1995-2016 International Business Machines Corporation and others

All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining
Expand Down Expand Up @@ -31,58 +72,9 @@ shall not be used in advertising or otherwise to promote the sale, use
or other dealings in this Software without prior written authorization
of the copyright holder.


All trademarks and registered trademarks mentioned herein are the
property of their respective owners.

---------------------

Third-Party Software Licenses

This section contains third-party software notices and/or additional
terms for licensed third-party software components included within ICU
libraries.

1. Unicode Data Files and Software

COPYRIGHT AND PERMISSION NOTICE

Copyright © 1991-2016 Unicode, Inc. All rights reserved.
Distributed under the Terms of Use in
http://www.unicode.org/copyright.html.

Permission is hereby granted, free of charge, to any person obtaining
a copy of the Unicode data files and any associated documentation
(the "Data Files") or Unicode software and any associated documentation
(the "Software") to deal in the Data Files or Software
without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, and/or sell copies of
the Data Files or Software, and to permit persons to whom the Data Files
or Software are furnished to do so, provided that
(a) this copyright and permission notice appear with all copies
of the Data Files or Software,
(b) this copyright and permission notice appear in associated
documentation, and
(c) there is clear notice in each modified Data File or in the Software
as well as in the documentation associated with the Data File(s) or
Software that the data or software has been modified.

THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT OF THIRD PARTY RIGHTS.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS
NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THE DATA FILES OR SOFTWARE.

Except as contained in this notice, the name of a copyright holder
shall not be used in advertising or otherwise to promote the sale,
use or other dealings in these Data Files or Software without prior
written authorization of the copyright holder.

2. Chinese/Japanese Word Break Dictionary Data (cjdict.txt)

# The Google Chrome software developed by Google is licensed under
Expand Down
5 changes: 3 additions & 2 deletions deps/icu-small/README-SMALL-ICU.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
Small ICU sources - auto generated by shrink-icu-src.py

This directory contains the ICU subset used by --with-intl=small-icu (the default)
It is a strict subset of ICU 57 source files with the following exception(s):
* deps/icu-small/source/data/in/icudt57l.dat : Reduced-size data file
It is a strict subset of ICU 58 source files with the following exception(s):
* deps/icu-small/source/data/in/icudt58l.dat : Reduced-size data file


To rebuild this directory, see ../../tools/icu/README.md

18 changes: 0 additions & 18 deletions deps/icu-small/license.html

This file was deleted.

2 changes: 2 additions & 0 deletions deps/icu-small/source/common/appendable.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
*******************************************************************************
* Copyright (C) 2011-2012, International Business Machines
Expand Down
2 changes: 2 additions & 0 deletions deps/icu-small/source/common/bmpset.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
******************************************************************************
*
Expand Down
2 changes: 2 additions & 0 deletions deps/icu-small/source/common/bmpset.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
******************************************************************************
*
Expand Down
10 changes: 6 additions & 4 deletions deps/icu-small/source/common/brkeng.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
************************************************************************************
* Copyright (C) 2006-2016, International Business Machines Corporation
Expand Down Expand Up @@ -84,7 +86,7 @@ UnhandledEngine::findBreaks( UText *text,
int32_t breakType,
UStack &/*foundBreaks*/ ) const {
if (breakType >= 0 && breakType < UPRV_LENGTHOF(fHandled)) {
UChar32 c = utext_current32(text);
UChar32 c = utext_current32(text);
if (reverse) {
while((int32_t)utext_getNativeIndex(text) > startPos && fHandled[breakType]->contains(c)) {
c = utext_previous32(text);
Expand Down Expand Up @@ -166,7 +168,7 @@ ICULanguageBreakFactory::getEngineFor(UChar32 c, int32_t breakType) {
}
}
}

// We didn't find an engine. Create one.
lbe = loadEngineFor(c, breakType);
if (lbe != NULL) {
Expand Down Expand Up @@ -241,7 +243,7 @@ ICULanguageBreakFactory::loadEngineFor(UChar32 c, int32_t breakType) {
}

DictionaryMatcher *
ICULanguageBreakFactory::loadDictionaryMatcherFor(UScriptCode script, int32_t /* brkType */) {
ICULanguageBreakFactory::loadDictionaryMatcherFor(UScriptCode script, int32_t /* brkType */) {
UErrorCode status = U_ZERO_ERROR;
// open root from brkitr tree.
UResourceBundle *b = ures_open(U_ICUDATA_BRKITR, "", &status);
Expand Down Expand Up @@ -282,7 +284,7 @@ ICULanguageBreakFactory::loadDictionaryMatcherFor(UScriptCode script, int32_t /*
m = new UCharsDictionaryMatcher(characters, file);
}
if (m == NULL) {
// no matcher exists to take ownership - either we are an invalid
// no matcher exists to take ownership - either we are an invalid
// type or memory allocation failed
udata_close(file);
}
Expand Down
4 changes: 3 additions & 1 deletion deps/icu-small/source/common/brkeng.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/**
************************************************************************************
* Copyright (C) 2006-2012, International Business Machines Corporation and others. *
Expand Down Expand Up @@ -276,7 +278,7 @@ class ICULanguageBreakFactory : public LanguageBreakFactory {
* <p>Create a DictionaryMatcher for the specified script and break type.</p>
* @param script An ISO 15924 script code that identifies the dictionary to be
* created.
* @param breakType The kind of text break for which a dictionary is
* @param breakType The kind of text break for which a dictionary is
* sought.
* @return A DictionaryMatcher with the desired characteristics, or NULL.
*/
Expand Down
8 changes: 6 additions & 2 deletions deps/icu-small/source/common/brkiter.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
*******************************************************************************
* Copyright (C) 1997-2015, International Business Machines Corporation and
Expand Down Expand Up @@ -117,7 +119,7 @@ BreakIterator::buildInstance(const Locale& loc, const char *type, int32_t kind,
// If there is a result, set the valid locale and actual locale, and the kind
if (U_SUCCESS(status) && result != NULL) {
U_LOCALE_BASED(locBased, *(BreakIterator*)result);
locBased.setLocaleIDs(ures_getLocaleByType(b, ULOC_VALID_LOCALE, &status),
locBased.setLocaleIDs(ures_getLocaleByType(b, ULOC_VALID_LOCALE, &status),
actualLocale.data());
result->setBreakType(kind);
}
Expand Down Expand Up @@ -285,7 +287,7 @@ static UBool U_CALLCONV breakiterator_cleanup(void) {
U_CDECL_END
U_NAMESPACE_BEGIN

static void U_CALLCONV
static void U_CALLCONV
initService(void) {
gService = new ICUBreakIteratorService();
ucln_common_registerCleanup(UCLN_COMMON_BREAKITERATOR, breakiterator_cleanup);
Expand Down Expand Up @@ -418,6 +420,7 @@ BreakIterator::makeInstance(const Locale& loc, int32_t kind, UErrorCode& status)
break;
case UBRK_SENTENCE:
result = BreakIterator::buildInstance(loc, "sentence", kind, status);
#if !UCONFIG_NO_FILTERED_BREAK_ITERATION
{
char ssKeyValue[kKeyValueLenMax] = {0};
UErrorCode kvStatus = U_ZERO_ERROR;
Expand All @@ -430,6 +433,7 @@ BreakIterator::makeInstance(const Locale& loc, int32_t kind, UErrorCode& status)
}
}
}
#endif
break;
case UBRK_TITLE:
result = BreakIterator::buildInstance(loc, "title", kind, status);
Expand Down
2 changes: 2 additions & 0 deletions deps/icu-small/source/common/bytestream.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
// Copyright (C) 2009-2011, International Business Machines
// Corporation and others. All Rights Reserved.
//
Expand Down
2 changes: 2 additions & 0 deletions deps/icu-small/source/common/bytestrie.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
*******************************************************************************
* Copyright (C) 2010-2011, International Business Machines
Expand Down
10 changes: 6 additions & 4 deletions deps/icu-small/source/common/bytestriebuilder.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
*******************************************************************************
* Copyright (C) 2010-2012, International Business Machines
Expand Down Expand Up @@ -35,7 +37,7 @@ class BytesTrieElement : public UMemory {
public:
// Use compiler's default constructor, initializes nothing.

void setTo(const StringPiece &s, int32_t val, CharString &strings, UErrorCode &errorCode);
void setTo(StringPiece s, int32_t val, CharString &strings, UErrorCode &errorCode);

StringPiece getString(const CharString &strings) const {
int32_t offset=stringOffset;
Expand Down Expand Up @@ -86,7 +88,7 @@ class BytesTrieElement : public UMemory {
};

void
BytesTrieElement::setTo(const StringPiece &s, int32_t val,
BytesTrieElement::setTo(StringPiece s, int32_t val,
CharString &strings, UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) {
return;
Expand Down Expand Up @@ -143,7 +145,7 @@ BytesTrieBuilder::~BytesTrieBuilder() {
}

BytesTrieBuilder &
BytesTrieBuilder::add(const StringPiece &s, int32_t value, UErrorCode &errorCode) {
BytesTrieBuilder::add(StringPiece s, int32_t value, UErrorCode &errorCode) {
if(U_FAILURE(errorCode)) {
return *this;
}
Expand All @@ -165,7 +167,7 @@ BytesTrieBuilder::add(const StringPiece &s, int32_t value, UErrorCode &errorCode
return *this; // error instead of dereferencing null
}
if(elementsLength>0) {
uprv_memcpy(newElements, elements, elementsLength*sizeof(BytesTrieElement));
uprv_memcpy(newElements, elements, (size_t)elementsLength*sizeof(BytesTrieElement));
}
delete[] elements;
elements=newElements;
Expand Down
10 changes: 7 additions & 3 deletions deps/icu-small/source/common/bytestrieiterator.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// Copyright (C) 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/*
*******************************************************************************
* Copyright (C) 2010-2012, International Business Machines
Expand Down Expand Up @@ -139,7 +141,6 @@ BytesTrie::Iterator::next(UErrorCode &errorCode) {
} else {
pos_=skipValue(pos, node);
}
sp_.set(str_->data(), str_->length());
return TRUE;
}
if(maxLength_>0 && str_->length()==maxLength_) {
Expand Down Expand Up @@ -167,10 +168,14 @@ BytesTrie::Iterator::next(UErrorCode &errorCode) {
}
}

StringPiece
BytesTrie::Iterator::getString() const {
return str_ == NULL ? StringPiece() : str_->toStringPiece();
}

UBool
BytesTrie::Iterator::truncateAndStop() {
pos_=NULL;
sp_.set(str_->data(), str_->length());
value_=-1; // no real value for str
return TRUE;
}
Expand Down Expand Up @@ -199,7 +204,6 @@ BytesTrie::Iterator::branchNext(const uint8_t *pos, int32_t length, UErrorCode &
str_->append((char)trieByte, errorCode);
if(isFinal) {
pos_=NULL;
sp_.set(str_->data(), str_->length());
value_=value;
return NULL;
} else {
Expand Down
Loading

0 comments on commit ced7e4d

Please sign in to comment.