Skip to content

Commit 7a6d2ad

Browse files
srl295evanlucas
authored andcommitted
deps: Intl: Check in "small-icu" 57.1
* 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 <[email protected]>
1 parent dce6413 commit 7a6d2ad

File tree

893 files changed

+475138
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

893 files changed

+475138
-0
lines changed

deps/icu-small/LICENSE

+393
Large diffs are not rendered by default.

deps/icu-small/README-SMALL-ICU.txt

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Small ICU sources - auto generated by shrink-icu-src.py
2+
3+
This directory contains the ICU subset used by --with-intl=small-icu (the default)
4+
It is a strict subset of ICU 57 source files with the following exception(s):
5+
* deps/icu-small/source/data/in/icudt57l.dat : Reduced-size data file
6+
7+
8+
To rebuild this directory, see ../../tools/icu/README.md

deps/icu-small/license.html

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2+
"http://www.w3.org/TR/html4/loose.dtd">
3+
<html>
4+
<head>
5+
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
6+
<title>ICU License - moved to LICENSE</title>
7+
</head>
8+
9+
<body BGCOLOR="#ffffff">
10+
<p>
11+
The ICU license is now in plain text format, see <a href="./LICENSE">LICENSE</a>.
12+
Update links and software appropriately.
13+
</p>
14+
15+
<i>Copyright (c) 1995-2016 International Business Machines Corporation and others</i>
16+
17+
</body>
18+
</html>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
/*
2+
*******************************************************************************
3+
* Copyright (C) 2011-2012, International Business Machines
4+
* Corporation and others. All Rights Reserved.
5+
*******************************************************************************
6+
* file name: appendable.cpp
7+
* encoding: US-ASCII
8+
* tab size: 8 (not used)
9+
* indentation:4
10+
*
11+
* created on: 2010dec07
12+
* created by: Markus W. Scherer
13+
*/
14+
15+
#include "unicode/utypes.h"
16+
#include "unicode/appendable.h"
17+
#include "unicode/utf16.h"
18+
19+
U_NAMESPACE_BEGIN
20+
21+
Appendable::~Appendable() {}
22+
23+
UBool
24+
Appendable::appendCodePoint(UChar32 c) {
25+
if(c<=0xffff) {
26+
return appendCodeUnit((UChar)c);
27+
} else {
28+
return appendCodeUnit(U16_LEAD(c)) && appendCodeUnit(U16_TRAIL(c));
29+
}
30+
}
31+
32+
UBool
33+
Appendable::appendString(const UChar *s, int32_t length) {
34+
if(length<0) {
35+
UChar c;
36+
while((c=*s++)!=0) {
37+
if(!appendCodeUnit(c)) {
38+
return FALSE;
39+
}
40+
}
41+
} else if(length>0) {
42+
const UChar *limit=s+length;
43+
do {
44+
if(!appendCodeUnit(*s++)) {
45+
return FALSE;
46+
}
47+
} while(s<limit);
48+
}
49+
return TRUE;
50+
}
51+
52+
UBool
53+
Appendable::reserveAppendCapacity(int32_t /*appendCapacity*/) {
54+
return TRUE;
55+
}
56+
57+
UChar *
58+
Appendable::getAppendBuffer(int32_t minCapacity,
59+
int32_t /*desiredCapacityHint*/,
60+
UChar *scratch, int32_t scratchCapacity,
61+
int32_t *resultCapacity) {
62+
if(minCapacity<1 || scratchCapacity<minCapacity) {
63+
*resultCapacity=0;
64+
return NULL;
65+
}
66+
*resultCapacity=scratchCapacity;
67+
return scratch;
68+
}
69+
70+
// UnicodeStringAppendable is implemented in unistr.cpp.
71+
72+
U_NAMESPACE_END

0 commit comments

Comments
 (0)