Skip to content

Commit

Permalink
deps: Intl: Check in "small-icu" 57.1
Browse files Browse the repository at this point in the history
* this commit has "small" ICU 57.1.
See other related commit for tools to generate this commit.

Fixes: #3476
PR-URL: #6088
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
srl295 authored and evanlucas committed May 17, 2016
1 parent dce6413 commit 7a6d2ad
Show file tree
Hide file tree
Showing 893 changed files with 475,138 additions and 0 deletions.
393 changes: 393 additions & 0 deletions deps/icu-small/LICENSE

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions deps/icu-small/README-SMALL-ICU.txt
@@ -0,0 +1,8 @@
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


To rebuild this directory, see ../../tools/icu/README.md
18 changes: 18 additions & 0 deletions deps/icu-small/license.html
@@ -0,0 +1,18 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>ICU License - moved to LICENSE</title>
</head>

<body BGCOLOR="#ffffff">
<p>
The ICU license is now in plain text format, see <a href="./LICENSE">LICENSE</a>.
Update links and software appropriately.
</p>

<i>Copyright (c) 1995-2016 International Business Machines Corporation and others</i>

</body>
</html>
72 changes: 72 additions & 0 deletions deps/icu-small/source/common/appendable.cpp
@@ -0,0 +1,72 @@
/*
*******************************************************************************
* Copyright (C) 2011-2012, International Business Machines
* Corporation and others. All Rights Reserved.
*******************************************************************************
* file name: appendable.cpp
* encoding: US-ASCII
* tab size: 8 (not used)
* indentation:4
*
* created on: 2010dec07
* created by: Markus W. Scherer
*/

#include "unicode/utypes.h"
#include "unicode/appendable.h"
#include "unicode/utf16.h"

U_NAMESPACE_BEGIN

Appendable::~Appendable() {}

UBool
Appendable::appendCodePoint(UChar32 c) {
if(c<=0xffff) {
return appendCodeUnit((UChar)c);
} else {
return appendCodeUnit(U16_LEAD(c)) && appendCodeUnit(U16_TRAIL(c));
}
}

UBool
Appendable::appendString(const UChar *s, int32_t length) {
if(length<0) {
UChar c;
while((c=*s++)!=0) {
if(!appendCodeUnit(c)) {
return FALSE;
}
}
} else if(length>0) {
const UChar *limit=s+length;
do {
if(!appendCodeUnit(*s++)) {
return FALSE;
}
} while(s<limit);
}
return TRUE;
}

UBool
Appendable::reserveAppendCapacity(int32_t /*appendCapacity*/) {
return TRUE;
}

UChar *
Appendable::getAppendBuffer(int32_t minCapacity,
int32_t /*desiredCapacityHint*/,
UChar *scratch, int32_t scratchCapacity,
int32_t *resultCapacity) {
if(minCapacity<1 || scratchCapacity<minCapacity) {
*resultCapacity=0;
return NULL;
}
*resultCapacity=scratchCapacity;
return scratch;
}

// UnicodeStringAppendable is implemented in unistr.cpp.

U_NAMESPACE_END

0 comments on commit 7a6d2ad

Please sign in to comment.