| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1635140 commit 8cda730
497 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,8 +1,8 @@ | |||
| 1 | 1 | ICU sources - auto generated by shrink-icu-src.py | |
| 2 | 2 | ||
| 3 | 3 | This directory contains the ICU subset used by --with-intl=full-icu | |
| 4 | - It is a strict subset of ICU 71 source files with the following exception(s): | ||
| 5 | - * deps/icu-small/source/data/in/icudt71l.dat.bz2 : compressed data file | ||
| 4 | + It is a strict subset of ICU 72 source files with the following exception(s): | ||
| 5 | + * deps/icu-small/source/data/in/icudt72l.dat.bz2 : compressed data file | ||
| 6 | 6 | ||
| 7 | 7 | ||
| 8 | 8 | To rebuild this directory, see ../../tools/icu/README.md | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -37,23 +37,23 @@ Appendable::appendString(const UChar *s, int32_t length) { | |||
| 37 | 37 | UChar c; | |
| 38 | 38 | while((c=*s++)!=0) { | |
| 39 | 39 | if(!appendCodeUnit(c)) { | |
| 40 | - return FALSE; | ||
| 40 | + return false; | ||
| 41 | 41 | } | |
| 42 | 42 | } | |
| 43 | 43 | } else if(length>0) { | |
| 44 | 44 | const UChar *limit=s+length; | |
| 45 | 45 | do { | |
| 46 | 46 | if(!appendCodeUnit(*s++)) { | |
| 47 | - return FALSE; | ||
| 47 | + return false; | ||
| 48 | 48 | } | |
| 49 | 49 | } while(s<limit); | |
| 50 | 50 | } | |
| 51 | - return TRUE; | ||
| 51 | + return true; | ||
| 52 | 52 | } | |
| 53 | 53 | ||
| 54 | 54 | UBool | |
| 55 | 55 | Appendable::reserveAppendCapacity(int32_t /*appendCapacity*/) { | |
| 56 | - return TRUE; | ||
| 56 | + return true; | ||
| 57 | 57 | } | |
| 58 | 58 | ||
| 59 | 59 | UChar * | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -309,9 +309,9 @@ BMPSet::contains(UChar32 c) const { | |||
| 309 | 309 | // surrogate or supplementary code point | |
| 310 | 310 | return containsSlow(c, list4kStarts[0xd], list4kStarts[0x11]); | |
| 311 | 311 | } else { | |
| 312 | - // Out-of-range code points get FALSE, consistent with long-standing | ||
| 312 | + // Out-of-range code points get false, consistent with long-standing | ||
| 313 | 313 | // behavior of UnicodeSet::contains(c). | |
| 314 | - return FALSE; | ||
| 314 | + return false; | ||
| 315 | 315 | } | |
| 316 | 316 | } | |
| 317 | 317 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -261,10 +261,10 @@ ICULanguageBreakFactory::loadDictionaryMatcherFor(UScriptCode script) { | |||
| 261 | 261 | const UChar *extStart = u_memrchr(dictfname, 0x002e, dictnlength); // last dot | |
| 262 | 262 | if (extStart != NULL) { | |
| 263 | 263 | int32_t len = (int32_t)(extStart - dictfname); | |
| 264 | - ext.appendInvariantChars(UnicodeString(FALSE, extStart + 1, dictnlength - len - 1), status); | ||
| 264 | + ext.appendInvariantChars(UnicodeString(false, extStart + 1, dictnlength - len - 1), status); | ||
| 265 | 265 | dictnlength = len; | |
| 266 | 266 | } | |
| 267 | - dictnbuf.appendInvariantChars(UnicodeString(FALSE, dictfname, dictnlength), status); | ||
| 267 | + dictnbuf.appendInvariantChars(UnicodeString(false, dictfname, dictnlength), status); | ||
| 268 | 268 | ures_close(b); | |
| 269 | 269 | ||
| 270 | 270 | UDataMemory *file = udata_open(U_ICUDATA_BRKITR, ext.data(), dictnbuf.data(), &status); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -279,7 +279,7 @@ ICUBreakIteratorService::~ICUBreakIteratorService() {} | |||
| 279 | 279 | // defined in ucln_cmn.h | |
| 280 | 280 | U_NAMESPACE_END | |
| 281 | 281 | ||
| 282 | - static icu::UInitOnce gInitOnceBrkiter = U_INITONCE_INITIALIZER; | ||
| 282 | + static icu::UInitOnce gInitOnceBrkiter {}; | ||
| 283 | 283 | static icu::ICULocaleService* gService = NULL; | |
| 284 | 284 | ||
| 285 | 285 | ||
@@ -296,7 +296,7 @@ static UBool U_CALLCONV breakiterator_cleanup(void) { | |||
| 296 | 296 | } | |
| 297 | 297 | gInitOnceBrkiter.reset(); | |
| 298 | 298 | #endif | |
| 299 | - return TRUE; | ||
| 299 | + return true; | ||
| 300 | 300 | } | |
| 301 | 301 | U_CDECL_END | |
| 302 | 302 | U_NAMESPACE_BEGIN | |
@@ -347,7 +347,7 @@ BreakIterator::unregister(URegistryKey key, UErrorCode& status) | |||
| 347 | 347 | } | |
| 348 | 348 | status = U_MEMORY_ALLOCATION_ERROR; | |
| 349 | 349 | } | |
| 350 | - return FALSE; | ||
| 350 | + return false; | ||
| 351 | 351 | } | |
| 352 | 352 | ||
| 353 | 353 | // ------------------------------------- | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,7 +20,7 @@ U_NAMESPACE_BEGIN | |||
| 20 | 20 | UBool | |
| 21 | 21 | ByteSinkUtil::appendChange(int32_t length, const char16_t *s16, int32_t s16Length, | |
| 22 | 22 | ByteSink &sink, Edits *edits, UErrorCode &errorCode) { | |
| 23 | - if (U_FAILURE(errorCode)) { return FALSE; } | ||
| 23 | + if (U_FAILURE(errorCode)) { return false; } | ||
| 24 | 24 | char scratch[200]; | |
| 25 | 25 | int32_t s8Length = 0; | |
| 26 | 26 | for (int32_t i = 0; i < s16Length;) { | |
@@ -44,25 +44,25 @@ ByteSinkUtil::appendChange(int32_t length, const char16_t *s16, int32_t s16Lengt | |||
| 44 | 44 | } | |
| 45 | 45 | if (j > (INT32_MAX - s8Length)) { | |
| 46 | 46 | errorCode = U_INDEX_OUTOFBOUNDS_ERROR; | |
| 47 | - return FALSE; | ||
| 47 | + return false; | ||
| 48 | 48 | } | |
| 49 | 49 | sink.Append(buffer, j); | |
| 50 | 50 | s8Length += j; | |
| 51 | 51 | } | |
| 52 | 52 | if (edits != nullptr) { | |
| 53 | 53 | edits->addReplace(length, s8Length); | |
| 54 | 54 | } | |
| 55 | - return TRUE; | ||
| 55 | + return true; | ||
| 56 | 56 | } | |
| 57 | 57 | ||
| 58 | 58 | UBool | |
| 59 | 59 | ByteSinkUtil::appendChange(const uint8_t *s, const uint8_t *limit, | |
| 60 | 60 | const char16_t *s16, int32_t s16Length, | |
| 61 | 61 | ByteSink &sink, Edits *edits, UErrorCode &errorCode) { | |
| 62 | - if (U_FAILURE(errorCode)) { return FALSE; } | ||
| 62 | + if (U_FAILURE(errorCode)) { return false; } | ||
| 63 | 63 | if ((limit - s) > INT32_MAX) { | |
| 64 | 64 | errorCode = U_INDEX_OUTOFBOUNDS_ERROR; | |
| 65 | - return FALSE; | ||
| 65 | + return false; | ||
| 66 | 66 | } | |
| 67 | 67 | return appendChange((int32_t)(limit - s), s16, s16Length, sink, edits, errorCode); | |
| 68 | 68 | } | |
@@ -109,16 +109,16 @@ UBool | |||
| 109 | 109 | ByteSinkUtil::appendUnchanged(const uint8_t *s, const uint8_t *limit, | |
| 110 | 110 | ByteSink &sink, uint32_t options, Edits *edits, | |
| 111 | 111 | UErrorCode &errorCode) { | |
| 112 | - if (U_FAILURE(errorCode)) { return FALSE; } | ||
| 112 | + if (U_FAILURE(errorCode)) { return false; } | ||
| 113 | 113 | if ((limit - s) > INT32_MAX) { | |
| 114 | 114 | errorCode = U_INDEX_OUTOFBOUNDS_ERROR; | |
| 115 | - return FALSE; | ||
| 115 | + return false; | ||
| 116 | 116 | } | |
| 117 | 117 | int32_t length = (int32_t)(limit - s); | |
| 118 | 118 | if (length > 0) { | |
| 119 | 119 | appendNonEmptyUnchanged(s, length, sink, options, edits); | |
| 120 | 120 | } | |
| 121 | - return TRUE; | ||
| 121 | + return true; | ||
| 122 | 122 | } | |
| 123 | 123 | ||
| 124 | 124 | CharStringByteSink::CharStringByteSink(CharString* dest) : dest_(*dest) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,6 +4,9 @@ | |||
| 4 | 4 | // bytesinkutil.h | |
| 5 | 5 | // created: 2017sep14 Markus W. Scherer | |
| 6 | 6 | ||
| 7 | + #ifndef BYTESINKUTIL_H | ||
| 8 | + #define BYTESINKUTIL_H | ||
| 9 | + | ||
| 7 | 10 | #include "unicode/utypes.h" | |
| 8 | 11 | #include "unicode/bytestream.h" | |
| 9 | 12 | #include "unicode/edits.h" | |
@@ -81,3 +84,5 @@ class U_COMMON_API CharStringByteSink : public ByteSink { | |||
| 81 | 84 | }; | |
| 82 | 85 | ||
| 83 | 86 | U_NAMESPACE_END | |
| 87 | + | ||
| 88 | + #endif //BYTESINKUTIL_H | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -30,14 +30,14 @@ void ByteSink::Flush() {} | |||
| 30 | 30 | ||
| 31 | 31 | CheckedArrayByteSink::CheckedArrayByteSink(char* outbuf, int32_t capacity) | |
| 32 | 32 | : outbuf_(outbuf), capacity_(capacity < 0 ? 0 : capacity), | |
| 33 | - size_(0), appended_(0), overflowed_(FALSE) { | ||
| 33 | + size_(0), appended_(0), overflowed_(false) { | ||
| 34 | 34 | } | |
| 35 | 35 | ||
| 36 | 36 | CheckedArrayByteSink::~CheckedArrayByteSink() {} | |
| 37 | 37 | ||
| 38 | 38 | CheckedArrayByteSink& CheckedArrayByteSink::Reset() { | |
| 39 | 39 | size_ = appended_ = 0; | |
| 40 | - overflowed_ = FALSE; | ||
| 40 | + overflowed_ = false; | ||
| 41 | 41 | return *this; | |
| 42 | 42 | } | |
| 43 | 43 | ||
@@ -48,14 +48,14 @@ void CheckedArrayByteSink::Append(const char* bytes, int32_t n) { | |||
| 48 | 48 | if (n > (INT32_MAX - appended_)) { | |
| 49 | 49 | // TODO: Report as integer overflow, not merely buffer overflow. | |
| 50 | 50 | appended_ = INT32_MAX; | |
| 51 | - overflowed_ = TRUE; | ||
| 51 | + overflowed_ = true; | ||
| 52 | 52 | return; | |
| 53 | 53 | } | |
| 54 | 54 | appended_ += n; | |
| 55 | 55 | int32_t available = capacity_ - size_; | |
| 56 | 56 | if (n > available) { | |
| 57 | 57 | n = available; | |
| 58 | - overflowed_ = TRUE; | ||
| 58 | + overflowed_ = true; | ||
| 59 | 59 | } | |
| 60 | 60 | if (n > 0 && bytes != (outbuf_ + size_)) { | |
| 61 | 61 | uprv_memcpy(outbuf_ + size_, bytes, n); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -337,13 +337,13 @@ BytesTrie::findUniqueValueFromBranch(const uint8_t *pos, int32_t length, | |||
| 337 | 337 | } | |
| 338 | 338 | } else { | |
| 339 | 339 | uniqueValue=value; | |
| 340 | - haveUniqueValue=TRUE; | ||
| 340 | + haveUniqueValue=true; | ||
| 341 | 341 | } | |
| 342 | 342 | } else { | |
| 343 | 343 | if(!findUniqueValue(pos+value, haveUniqueValue, uniqueValue)) { | |
| 344 | 344 | return NULL; | |
| 345 | 345 | } | |
| 346 | - haveUniqueValue=TRUE; | ||
| 346 | + haveUniqueValue=true; | ||
| 347 | 347 | } | |
| 348 | 348 | } while(--length>1); | |
| 349 | 349 | return pos+1; // ignore the last comparison byte | |
@@ -359,9 +359,9 @@ BytesTrie::findUniqueValue(const uint8_t *pos, UBool haveUniqueValue, int32_t &u | |||
| 359 | 359 | } | |
| 360 | 360 | pos=findUniqueValueFromBranch(pos, node+1, haveUniqueValue, uniqueValue); | |
| 361 | 361 | if(pos==NULL) { | |
| 362 | - return FALSE; | ||
| 362 | + return false; | ||
| 363 | 363 | } | |
| 364 | - haveUniqueValue=TRUE; | ||
| 364 | + haveUniqueValue=true; | ||
| 365 | 365 | } else if(node<kMinValueLead) { | |
| 366 | 366 | // linear-match node | |
| 367 | 367 | pos+=node-kMinLinearMatch+1; // Ignore the match bytes. | |
@@ -370,14 +370,14 @@ BytesTrie::findUniqueValue(const uint8_t *pos, UBool haveUniqueValue, int32_t &u | |||
| 370 | 370 | int32_t value=readValue(pos, node>>1); | |
| 371 | 371 | if(haveUniqueValue) { | |
| 372 | 372 | if(value!=uniqueValue) { | |
| 373 | - return FALSE; | ||
| 373 | + return false; | ||
| 374 | 374 | } | |
| 375 | 375 | } else { | |
| 376 | 376 | uniqueValue=value; | |
| 377 | - haveUniqueValue=TRUE; | ||
| 377 | + haveUniqueValue=true; | ||
| 378 | 378 | } | |
| 379 | 379 | if(isFinal) { | |
| 380 | - return TRUE; | ||
| 380 | + return true; | ||
| 381 | 381 | } | |
| 382 | 382 | pos=skipValue(pos, node); | |
| 383 | 383 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -231,7 +231,7 @@ BytesTrieBuilder::buildBytes(UStringTrieBuildOption buildOption, UErrorCode &err | |||
| 231 | 231 | } | |
| 232 | 232 | uprv_sortArray(elements, elementsLength, (int32_t)sizeof(BytesTrieElement), | |
| 233 | 233 | compareElementStrings, strings, | |
| 234 | - FALSE, // need not be a stable sort | ||
| 234 | + false, // need not be a stable sort | ||
| 235 | 235 | &errorCode); | |
| 236 | 236 | if(U_FAILURE(errorCode)) { | |
| 237 | 237 | return; | |
@@ -375,7 +375,7 @@ BytesTrieBuilder::createLinearMatchNode(int32_t i, int32_t byteIndex, int32_t le | |||
| 375 | 375 | UBool | |
| 376 | 376 | BytesTrieBuilder::ensureCapacity(int32_t length) { | |
| 377 | 377 | if(bytes==NULL) { | |
| 378 | - return FALSE; // previous memory allocation had failed | ||
| 378 | + return false; // previous memory allocation had failed | ||
| 379 | 379 | } | |
| 380 | 380 | if(length>bytesCapacity) { | |
| 381 | 381 | int32_t newCapacity=bytesCapacity; | |
@@ -388,15 +388,15 @@ BytesTrieBuilder::ensureCapacity(int32_t length) { | |||
| 388 | 388 | uprv_free(bytes); | |
| 389 | 389 | bytes=NULL; | |
| 390 | 390 | bytesCapacity=0; | |
| 391 | - return FALSE; | ||
| 391 | + return false; | ||
| 392 | 392 | } | |
| 393 | 393 | uprv_memcpy(newBytes+(newCapacity-bytesLength), | |
| 394 | 394 | bytes+(bytesCapacity-bytesLength), bytesLength); | |
| 395 | 395 | uprv_free(bytes); | |
| 396 | 396 | bytes=newBytes; | |
| 397 | 397 | bytesCapacity=newCapacity; | |
| 398 | 398 | } | |
| 399 | - return TRUE; | ||
| 399 | + return true; | ||
| 400 | 400 | } | |
| 401 | 401 | ||
| 402 | 402 | int32_t | |
@@ -463,7 +463,7 @@ int32_t | |||
| 463 | 463 | BytesTrieBuilder::writeValueAndType(UBool hasValue, int32_t value, int32_t node) { | |
| 464 | 464 | int32_t offset=write(node); | |
| 465 | 465 | if(hasValue) { | |
| 466 | - offset=writeValueAndFinal(value, FALSE); | ||
| 466 | + offset=writeValueAndFinal(value, false); | ||
| 467 | 467 | } | |
| 468 | 468 | return offset; | |
| 469 | 469 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments