diff --git a/docs/userguide/boundaryanalysis/index.md b/docs/userguide/boundaryanalysis/index.md index c98b9255bd3..8297a64a7c4 100644 --- a/docs/userguide/boundaryanalysis/index.md +++ b/docs/userguide/boundaryanalysis/index.md @@ -350,10 +350,10 @@ UBool isWholeWord(BreakIterator& wordBrk, int32_t start, int32_t end) { if (s.isEmpty()) - return FALSE; + return false; wordBrk.setText(s); if (!wordBrk.isBoundary(start)) - return FALSE; + return false; return wordBrk.isBoundary(end); } ``` @@ -367,10 +367,10 @@ UBool isWholeWord(UBreakIterator* wordBrk, int32_t start, int32_t end, UErrorCode* err) { - UBool result = FALSE; + UBool result = false; if (wordBrk == NULL || s == NULL) { *err = U_ILLEGAL_ARGUMENT_ERROR; - return FALSE; + return false; } ubrk_setText(wordBrk, s, sLen, err); if (U_SUCCESS(*err)) { diff --git a/docs/userguide/collation/examples.md b/docs/userguide/collation/examples.md index 044c5e975ae..ee0fdada20a 100644 --- a/docs/userguide/collation/examples.md +++ b/docs/userguide/collation/examples.md @@ -53,7 +53,7 @@ UBool collateWithLocaleInC(const char* locale, UErrorCode *status) UCollator *myCollator = 0; if (U_FAILURE(*status)) { - return FALSE; + return false; } u_uastrcpy(source, "This is a test."); u_uastrcpy(target, "THIS IS A TEST."); @@ -63,7 +63,7 @@ UBool collateWithLocaleInC(const char* locale, UErrorCode *status) /*Report the error with display name... */ fprintf(stderr, "Failed to create the collator for : \"%s\"\n", dispName); - return FALSE; + return false; } result = ucol_strcoll(myCollator, source, u_strlen(source), target, u_strlen(target)); /* result is 1, secondary differences only for ignorable space characters*/ @@ -71,7 +71,7 @@ UBool collateWithLocaleInC(const char* locale, UErrorCode *status) { fprintf(stderr, "Comparing two strings with only secondary differences in C failed.\n"); - return FALSE; + return false; } /* To compare them with just primary differences */ ucol_setStrength(myCollator, UCOL_PRIMARY); @@ -81,7 +81,7 @@ UBool collateWithLocaleInC(const char* locale, UErrorCode *status) { fprintf(stderr, "Comparing two strings with no differences in C failed.\n"); - return FALSE; + return false; } /* Now, do the same comparison with keys */ @@ -93,10 +93,10 @@ UBool collateWithLocaleInC(const char* locale, UErrorCode *status) { fprintf(stderr, "Comparing two strings with sort keys in C failed.\n"); - return FALSE; + return false; } ucol_close(myCollator); - return TRUE; + return true; } ``` @@ -122,7 +122,7 @@ UBool collateWithLocaleInCPP(const Locale& locale, UErrorCode& status) Collator *myCollator = 0; if (U_FAILURE(status)) { - return FALSE; + return false; } myCollator = Collator::createInstance(locale, status); if (U_FAILURE(status)){ @@ -130,7 +130,7 @@ UBool collateWithLocaleInCPP(const Locale& locale, UErrorCode& status) /*Report the error with display name... */ fprintf(stderr, "%s: Failed to create the collator for : \"%s\"\n", dispName); - return FALSE; + return false; } result = myCollator->compare(source, target); /* result is 1, secondary differences only for ignorable space characters*/ @@ -138,7 +138,7 @@ UBool collateWithLocaleInCPP(const Locale& locale, UErrorCode& status) { fprintf(stderr, "Comparing two strings with only secondary differences in C failed.\n"); - return FALSE; + return false; } /* To compare them with just primary differences */ myCollator->setStrength(Collator::PRIMARY); @@ -148,7 +148,7 @@ UBool collateWithLocaleInCPP(const Locale& locale, UErrorCode& status) { fprintf(stderr, "Comparing two strings with no differences in C failed.\n"); - return FALSE; + return false; } /* Now, do the same comparison with keys */ myCollator->getCollationKey(source, sourceKey, status); @@ -160,10 +160,10 @@ UBool collateWithLocaleInCPP(const Locale& locale, UErrorCode& status) { fprintf(stderr, "%s: Comparing two strings with sort keys in C failed.\n"); - return FALSE; + return false; } delete myCollator; - return TRUE; + return true; } ``` @@ -175,7 +175,7 @@ int main() { UErrorCode status = U_ZERO_ERROR; fprintf(stdout, "\n"); - if (collateWithLocaleInCPP(Locale("en", "US"), status) != TRUE) + if (collateWithLocaleInCPP(Locale("en", "US"), status) != true) { fprintf(stderr, "Collate with locale in C++ failed.\n"); @@ -185,7 +185,7 @@ int main() } status = U_ZERO_ERROR; fprintf(stdout, "\n"); - if (collateWithLocaleInC("en_US", &status) != TRUE) + if (collateWithLocaleInC("en_US", &status) != true) { fprintf(stderr, "%s: Collate with locale in C failed.\n"); diff --git a/docs/userguide/conversion/converters.md b/docs/userguide/conversion/converters.md index 348f9718e13..081dada9f39 100644 --- a/docs/userguide/conversion/converters.md +++ b/docs/userguide/conversion/converters.md @@ -350,7 +350,7 @@ UConverter* newCnv = ucnv_safeClone(oldCnv, 0, &bufferSize, &err) 3. In conversions to Unicode from Multi-byte encodings or conversions from Unicode involving surrogates, if (a) only a partial byte sequence is - retrieved from the source buffer, (b) the "flush" parameter is set to "TRUE" + retrieved from the source buffer, (b) the "flush" parameter is set to "true" and (c) the end of source is reached, then the callback is called with `U_TRUNCATED_CHAR_FOUND`. @@ -368,7 +368,7 @@ calling: direction. The converters are reset implicitly when the conversion functions are called -with the "flush" parameter set to "TRUE" and the source is consumed. +with the "flush" parameter set to "true" and the source is consumed. ### Error @@ -774,12 +774,12 @@ can be used. In such a scenario, the inner write does not occur unless a buffer overflow occurs OR 'flush' is true. So, the 'write' and resetting of the target and targetLimit pointers would only happen -`if (err == U_BUFFER_OVERFLOW_ERROR || flush == TRUE)` +`if (err == U_BUFFER_OVERFLOW_ERROR || flush == true)` -The flush parameter on each conversion call should be set to FALSE, until the +The flush parameter on each conversion call should be set to false, until the conversion call is called for the last time for the buffer. This is because the conversion is stateful. On the last conversion call, the flush parameter should -be set to TRUE. More details are mentioned in the API reference in +be set to true. More details are mentioned in the API reference in [ucnv.h](https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/ucnv_8h.html) . ### 4. Pre-flighting diff --git a/docs/userguide/conversion/detection.md b/docs/userguide/conversion/detection.md index ec1b201518a..62d4ed572ac 100644 --- a/docs/userguide/conversion/detection.md +++ b/docs/userguide/conversion/detection.md @@ -256,7 +256,7 @@ static char buffer[BUFFER_SIZE] = {....}; int32_t inputLength = ... // length of the input text UErrorCode status = U_ZERO_ERROR; ucsdet_setText(csd, buffer, inputLength, &status); -ucsdet_enableInputFilter(csd, TRUE); +ucsdet_enableInputFilter(csd, true); ucm = ucsdet_detect(csd, &status); ``` diff --git a/docs/userguide/conversion/index.md b/docs/userguide/conversion/index.md index cadd6dd41f4..b389cd64b81 100644 --- a/docs/userguide/conversion/index.md +++ b/docs/userguide/conversion/index.md @@ -141,7 +141,7 @@ Unicode. references](https://unicode-org.github.io/icu-docs/apidoc/released/icu4c/ucnv_8h.html) . 7. For data exchange (rather than pure display), turn off fallback - mappings: `ucnv_setFallback(cnv, FALSE)`; + mappings: `ucnv_setFallback(cnv, false)`; 8. For some text formats, especially XML and HTML, it is possible to set an "escape callback" function that turns unmappable Unicode code points diff --git a/docs/userguide/dev/codingguidelines.md b/docs/userguide/dev/codingguidelines.md index 39a055fa6ea..c2596993841 100644 --- a/docs/userguide/dev/codingguidelines.md +++ b/docs/userguide/dev/codingguidelines.md @@ -460,6 +460,7 @@ Starting with ICU 68 (2020q4), we no longer define these in public header files (unless `U_DEFINE_FALSE_AND_TRUE`=1), in order to avoid name collisions with code outside ICU defining enum constants and similar with these names. +Starting with ICU 72 (2022q4), we no longer use these anywhere in ICU. Instead, the versions of the C and C++ standards we require now do define type `bool` and values `false` & `true`, and we and our users can use these values. diff --git a/docs/userguide/dev/sync/custom.md b/docs/userguide/dev/sync/custom.md index 4662904b098..b5c268d1520 100644 --- a/docs/userguide/dev/sync/custom.md +++ b/docs/userguide/dev/sync/custom.md @@ -203,8 +203,8 @@ static std::condition_variable initCondition; // function on this thread, or wait for some other thread to complete the initialization. // // The actual call to the init function is made inline by template code -// that knows the C++ types involved. This function returns TRUE if -// the inline code needs to invoke the Init function, or FALSE if the initialization +// that knows the C++ types involved. This function returns true if +// the inline code needs to invoke the Init function, or false if the initialization // has completed on another thread. // // UInitOnce::fState values: @@ -217,7 +217,7 @@ UBool umtx_initImplPreInit(UInitOnce &uio) { int32_t state = uio.fState; if (state == 0) { umtx_storeRelease(uio.fState, 1); - return TRUE; // Caller will next call the init function. + return true; // Caller will next call the init function. } else { while (uio.fState == 1) { // Another thread is currently running the initialization. @@ -225,7 +225,7 @@ UBool umtx_initImplPreInit(UInitOnce &uio) { initCondition.wait(initLock); } U_ASSERT(uio.fState == 2); - return FALSE; + return false; } } diff --git a/docs/userguide/strings/index.md b/docs/userguide/strings/index.md index 7fcbcf800be..6fd0ce6c42a 100644 --- a/docs/userguide/strings/index.md +++ b/docs/userguide/strings/index.md @@ -445,7 +445,7 @@ when it is constructed from a NULL `UChar *` pointer, then the UnicodeString object becomes "bogus". This can be tested with the isBogus() function. A UnicodeString can be put into the "bogus" state explicitly with the setToBogus() function. This is different from an empty string (although a "bogus" string also -returns TRUE from isEmpty()) and may be used equivalently to NULL in `UChar *` C +returns true from isEmpty()) and may be used equivalently to NULL in `UChar *` C APIs (or null references in Java, or NULL values in SQL). A string remains "bogus" until a non-bogus string value is assigned to it. For complete details of the behavior of "bogus" strings see the description of the setToBogus() diff --git a/docs/userguide/transforms/normalization/index.md b/docs/userguide/transforms/normalization/index.md index a37a5446bce..623a852a4b8 100644 --- a/docs/userguide/transforms/normalization/index.md +++ b/docs/userguide/transforms/normalization/index.md @@ -229,7 +229,7 @@ public: // unnormalized suffix as a read-only alias (does not copy characters) UnicodeString unnormalized=s.tempSubString(spanQCYes); // set the fcdString to the FCD prefix as a read-only alias - fcdString.setTo(FALSE, s.getBuffer(), spanQCYes); + fcdString.setTo(false, s.getBuffer(), spanQCYes); // automatic copy-on-write, and append the FCD'ed suffix fcd.normalizeSecondAndAppend(fcdString, unnormalized, errorCode); ps=&fcdString; diff --git a/icu4c/source/common/appendable.cpp b/icu4c/source/common/appendable.cpp index fca3c1e4133..f9b20180eb7 100644 --- a/icu4c/source/common/appendable.cpp +++ b/icu4c/source/common/appendable.cpp @@ -37,23 +37,23 @@ Appendable::appendString(const UChar *s, int32_t length) { UChar c; while((c=*s++)!=0) { if(!appendCodeUnit(c)) { - return FALSE; + return false; } } } else if(length>0) { const UChar *limit=s+length; do { if(!appendCodeUnit(*s++)) { - return FALSE; + return false; } } while(s (INT32_MAX - s8Length)) { errorCode = U_INDEX_OUTOFBOUNDS_ERROR; - return FALSE; + return false; } sink.Append(buffer, j); s8Length += j; @@ -52,17 +52,17 @@ ByteSinkUtil::appendChange(int32_t length, const char16_t *s16, int32_t s16Lengt if (edits != nullptr) { edits->addReplace(length, s8Length); } - return TRUE; + return true; } UBool ByteSinkUtil::appendChange(const uint8_t *s, const uint8_t *limit, const char16_t *s16, int32_t s16Length, ByteSink &sink, Edits *edits, UErrorCode &errorCode) { - if (U_FAILURE(errorCode)) { return FALSE; } + if (U_FAILURE(errorCode)) { return false; } if ((limit - s) > INT32_MAX) { errorCode = U_INDEX_OUTOFBOUNDS_ERROR; - return FALSE; + return false; } return appendChange((int32_t)(limit - s), s16, s16Length, sink, edits, errorCode); } @@ -109,16 +109,16 @@ UBool ByteSinkUtil::appendUnchanged(const uint8_t *s, const uint8_t *limit, ByteSink &sink, uint32_t options, Edits *edits, UErrorCode &errorCode) { - if (U_FAILURE(errorCode)) { return FALSE; } + if (U_FAILURE(errorCode)) { return false; } if ((limit - s) > INT32_MAX) { errorCode = U_INDEX_OUTOFBOUNDS_ERROR; - return FALSE; + return false; } int32_t length = (int32_t)(limit - s); if (length > 0) { appendNonEmptyUnchanged(s, length, sink, options, edits); } - return TRUE; + return true; } CharStringByteSink::CharStringByteSink(CharString* dest) : dest_(*dest) { diff --git a/icu4c/source/common/bytestream.cpp b/icu4c/source/common/bytestream.cpp index 0d0e4dda39b..c14f206dfe4 100644 --- a/icu4c/source/common/bytestream.cpp +++ b/icu4c/source/common/bytestream.cpp @@ -30,14 +30,14 @@ void ByteSink::Flush() {} CheckedArrayByteSink::CheckedArrayByteSink(char* outbuf, int32_t capacity) : outbuf_(outbuf), capacity_(capacity < 0 ? 0 : capacity), - size_(0), appended_(0), overflowed_(FALSE) { + size_(0), appended_(0), overflowed_(false) { } CheckedArrayByteSink::~CheckedArrayByteSink() {} CheckedArrayByteSink& CheckedArrayByteSink::Reset() { size_ = appended_ = 0; - overflowed_ = FALSE; + overflowed_ = false; return *this; } @@ -48,14 +48,14 @@ void CheckedArrayByteSink::Append(const char* bytes, int32_t n) { if (n > (INT32_MAX - appended_)) { // TODO: Report as integer overflow, not merely buffer overflow. appended_ = INT32_MAX; - overflowed_ = TRUE; + overflowed_ = true; return; } appended_ += n; int32_t available = capacity_ - size_; if (n > available) { n = available; - overflowed_ = TRUE; + overflowed_ = true; } if (n > 0 && bytes != (outbuf_ + size_)) { uprv_memcpy(outbuf_ + size_, bytes, n); diff --git a/icu4c/source/common/bytestrie.cpp b/icu4c/source/common/bytestrie.cpp index c4d498c4bfa..c272cc40221 100644 --- a/icu4c/source/common/bytestrie.cpp +++ b/icu4c/source/common/bytestrie.cpp @@ -337,13 +337,13 @@ BytesTrie::findUniqueValueFromBranch(const uint8_t *pos, int32_t length, } } else { uniqueValue=value; - haveUniqueValue=TRUE; + haveUniqueValue=true; } } else { if(!findUniqueValue(pos+value, haveUniqueValue, uniqueValue)) { return NULL; } - haveUniqueValue=TRUE; + haveUniqueValue=true; } } while(--length>1); return pos+1; // ignore the last comparison byte @@ -359,9 +359,9 @@ BytesTrie::findUniqueValue(const uint8_t *pos, UBool haveUniqueValue, int32_t &u } pos=findUniqueValueFromBranch(pos, node+1, haveUniqueValue, uniqueValue); if(pos==NULL) { - return FALSE; + return false; } - haveUniqueValue=TRUE; + haveUniqueValue=true; } else if(node>1); if(haveUniqueValue) { if(value!=uniqueValue) { - return FALSE; + return false; } } else { uniqueValue=value; - haveUniqueValue=TRUE; + haveUniqueValue=true; } if(isFinal) { - return TRUE; + return true; } pos=skipValue(pos, node); } diff --git a/icu4c/source/common/bytestriebuilder.cpp b/icu4c/source/common/bytestriebuilder.cpp index 82dad42ca5f..ac7d3d867e5 100644 --- a/icu4c/source/common/bytestriebuilder.cpp +++ b/icu4c/source/common/bytestriebuilder.cpp @@ -231,7 +231,7 @@ BytesTrieBuilder::buildBytes(UStringTrieBuildOption buildOption, UErrorCode &err } uprv_sortArray(elements, elementsLength, (int32_t)sizeof(BytesTrieElement), compareElementStrings, strings, - FALSE, // need not be a stable sort + false, // need not be a stable sort &errorCode); if(U_FAILURE(errorCode)) { return; @@ -375,7 +375,7 @@ BytesTrieBuilder::createLinearMatchNode(int32_t i, int32_t byteIndex, int32_t le UBool BytesTrieBuilder::ensureCapacity(int32_t length) { if(bytes==NULL) { - return FALSE; // previous memory allocation had failed + return false; // previous memory allocation had failed } if(length>bytesCapacity) { int32_t newCapacity=bytesCapacity; @@ -388,7 +388,7 @@ BytesTrieBuilder::ensureCapacity(int32_t length) { uprv_free(bytes); bytes=NULL; bytesCapacity=0; - return FALSE; + return false; } uprv_memcpy(newBytes+(newCapacity-bytesLength), bytes+(bytesCapacity-bytesLength), bytesLength); @@ -396,7 +396,7 @@ BytesTrieBuilder::ensureCapacity(int32_t length) { bytes=newBytes; bytesCapacity=newCapacity; } - return TRUE; + return true; } int32_t @@ -463,7 +463,7 @@ int32_t BytesTrieBuilder::writeValueAndType(UBool hasValue, int32_t value, int32_t node) { int32_t offset=write(node); if(hasValue) { - offset=writeValueAndFinal(value, FALSE); + offset=writeValueAndFinal(value, false); } return offset; } diff --git a/icu4c/source/common/bytestrieiterator.cpp b/icu4c/source/common/bytestrieiterator.cpp index e64961a1f13..eacb7eedb0d 100644 --- a/icu4c/source/common/bytestrieiterator.cpp +++ b/icu4c/source/common/bytestrieiterator.cpp @@ -101,12 +101,12 @@ BytesTrie::Iterator::hasNext() const { return pos_!=NULL || !stack_->isEmpty(); UBool BytesTrie::Iterator::next(UErrorCode &errorCode) { if(U_FAILURE(errorCode)) { - return FALSE; + return false; } const uint8_t *pos=pos_; if(pos==NULL) { if(stack_->isEmpty()) { - return FALSE; + return false; } // Pop the state off the stack and continue with the next outbound edge of // the branch node. @@ -119,7 +119,7 @@ BytesTrie::Iterator::next(UErrorCode &errorCode) { if(length>1) { pos=branchNext(pos, length, errorCode); if(pos==NULL) { - return TRUE; // Reached a final value. + return true; // Reached a final value. } } else { str_->append((char)*pos++, errorCode); @@ -141,7 +141,7 @@ BytesTrie::Iterator::next(UErrorCode &errorCode) { } else { pos_=skipValue(pos, node); } - return TRUE; + return true; } if(maxLength_>0 && str_->length()==maxLength_) { return truncateAndStop(); @@ -152,7 +152,7 @@ BytesTrie::Iterator::next(UErrorCode &errorCode) { } pos=branchNext(pos, node+1, errorCode); if(pos==NULL) { - return TRUE; // Reached a final value. + return true; // Reached a final value. } } else { // Linear-match node, append length bytes to str_. @@ -177,7 +177,7 @@ UBool BytesTrie::Iterator::truncateAndStop() { pos_=NULL; value_=-1; // no real value for str - return TRUE; + return true; } // Branch node, needs to take the first outbound edge and push state for the rest. diff --git a/icu4c/source/common/caniter.cpp b/icu4c/source/common/caniter.cpp index a2083afde3c..81f17265fbb 100644 --- a/icu4c/source/common/caniter.cpp +++ b/icu4c/source/common/caniter.cpp @@ -119,7 +119,7 @@ UnicodeString CanonicalIterator::getSource() { * Resets the iterator so that one can start again from the beginning. */ void CanonicalIterator::reset() { - done = FALSE; + done = false; for (int i = 0; i < current_length; ++i) { current[i] = 0; } @@ -151,7 +151,7 @@ UnicodeString CanonicalIterator::next() { for (i = current_length - 1; ; --i) { if (i < 0) { - done = TRUE; + done = true; break; } current[i]++; @@ -176,7 +176,7 @@ void CanonicalIterator::setSource(const UnicodeString &newSource, UErrorCode &st if(U_FAILURE(status)) { return; } - done = FALSE; + done = false; cleanPieces(); @@ -521,7 +521,7 @@ Hashtable *CanonicalIterator::extract(Hashtable *fillinResult, UChar32 comp, con int32_t decompLen=decompString.length(); // See if it matches the start of segment (at segmentPos) - UBool ok = FALSE; + UBool ok = false; UChar32 cp; int32_t decompPos = 0; UChar32 decompCp; @@ -537,7 +537,7 @@ Hashtable *CanonicalIterator::extract(Hashtable *fillinResult, UChar32 comp, con if (decompPos == decompLen) { // done, have all decomp characters! temp.append(segment+i, segLen-i); - ok = TRUE; + ok = true; break; } U16_NEXT(decomp, decompPos, decompLen, decompCp); diff --git a/icu4c/source/common/characterproperties.cpp b/icu4c/source/common/characterproperties.cpp index 15bd9228407..2316a391a38 100644 --- a/icu4c/source/common/characterproperties.cpp +++ b/icu4c/source/common/characterproperties.cpp @@ -85,7 +85,7 @@ UBool U_CALLCONV characterproperties_cleanup() { ucptrie_close(reinterpret_cast(maps[i])); maps[i] = nullptr; } - return TRUE; + return true; } void U_CALLCONV initInclusion(UPropertySource src, UErrorCode &errorCode) { diff --git a/icu4c/source/common/charstr.cpp b/icu4c/source/common/charstr.cpp index c35622882c4..8a0994c7374 100644 --- a/icu4c/source/common/charstr.cpp +++ b/icu4c/source/common/charstr.cpp @@ -220,7 +220,7 @@ UBool CharString::ensureCapacity(int32_t capacity, int32_t desiredCapacityHint, UErrorCode &errorCode) { if(U_FAILURE(errorCode)) { - return FALSE; + return false; } if(capacity>buffer.getCapacity()) { if(desiredCapacityHint==0) { @@ -230,10 +230,10 @@ UBool CharString::ensureCapacity(int32_t capacity, buffer.resize(capacity, len+1)==NULL ) { errorCode=U_MEMORY_ALLOCATION_ERROR; - return FALSE; + return false; } } - return TRUE; + return true; } CharString &CharString::appendPathPart(StringPiece s, UErrorCode &errorCode) { diff --git a/icu4c/source/common/cmemory.cpp b/icu4c/source/common/cmemory.cpp index 663c1411e4c..64f5034921f 100644 --- a/icu4c/source/common/cmemory.cpp +++ b/icu4c/source/common/cmemory.cpp @@ -134,5 +134,5 @@ U_CFUNC UBool cmemory_cleanup(void) { pAlloc = NULL; pRealloc = NULL; pFree = NULL; - return TRUE; + return true; } diff --git a/icu4c/source/common/dictbe.cpp b/icu4c/source/common/dictbe.cpp index 4fdbdf2760f..768eb49b95c 100644 --- a/icu4c/source/common/dictbe.cpp +++ b/icu4c/source/common/dictbe.cpp @@ -119,7 +119,7 @@ public: // Select the currently marked candidate, point after it in the text, and invalidate self int32_t acceptMarked( UText *text ); - // Back up from the current candidate to the next shorter one; return TRUE if that exists + // Back up from the current candidate to the next shorter one; return true if that exists // and point the text after it UBool backUp( UText *text ); @@ -165,9 +165,9 @@ UBool PossibleWord::backUp( UText *text ) { if (current > 0) { utext_setNativeIndex(text, offset + cuLengths[--current]); - return TRUE; + return true; } - return FALSE; + return false; } /* @@ -1146,7 +1146,7 @@ CjkBreakEngine::divideUpDictionaryRange( UText *inText, // Input UText is in one contiguous UTF-16 chunk. // Use Read-only aliasing UnicodeString. - inString.setTo(FALSE, + inString.setTo(false, inText->chunkContents + rangeStart - inText->chunkNativeStart, rangeEnd - rangeStart); } else { diff --git a/icu4c/source/common/edits.cpp b/icu4c/source/common/edits.cpp index 92ca36fb5d0..21d7c3f0061 100644 --- a/icu4c/source/common/edits.cpp +++ b/icu4c/source/common/edits.cpp @@ -221,7 +221,7 @@ UBool Edits::growArray() { // Not U_BUFFER_OVERFLOW_ERROR because that could be confused on a string transform API // with a result-string-buffer overflow. errorCode_ = U_INDEX_OUTOFBOUNDS_ERROR; - return FALSE; + return false; } else if (capacity >= (INT32_MAX / 2)) { newCapacity = INT32_MAX; } else { @@ -230,25 +230,25 @@ UBool Edits::growArray() { // Grow by at least 5 units so that a maximal change record will fit. if ((newCapacity - capacity) < 5) { errorCode_ = U_INDEX_OUTOFBOUNDS_ERROR; - return FALSE; + return false; } uint16_t *newArray = (uint16_t *)uprv_malloc((size_t)newCapacity * 2); if (newArray == NULL) { errorCode_ = U_MEMORY_ALLOCATION_ERROR; - return FALSE; + return false; } uprv_memcpy(newArray, array, (size_t)length * 2); releaseArray(); array = newArray; capacity = newCapacity; - return TRUE; + return true; } UBool Edits::copyErrorTo(UErrorCode &outErrorCode) const { - if (U_FAILURE(outErrorCode)) { return TRUE; } - if (U_SUCCESS(errorCode_)) { return FALSE; } + if (U_FAILURE(outErrorCode)) { return true; } + if (U_SUCCESS(errorCode_)) { return false; } outErrorCode = errorCode_; - return TRUE; + return true; } Edits &Edits::mergeAndAppend(const Edits &ab, const Edits &bc, UErrorCode &errorCode) { @@ -257,7 +257,7 @@ Edits &Edits::mergeAndAppend(const Edits &ab, const Edits &bc, UErrorCode &error // Parallel iteration over both Edits. Iterator abIter = ab.getFineIterator(); Iterator bcIter = bc.getFineIterator(); - UBool abHasNext = TRUE, bcHasNext = TRUE; + UBool abHasNext = true, bcHasNext = true; // Copy iterator state into local variables, so that we can modify and subdivide spans. // ab old & new length, bc old & new length int32_t aLength = 0, ab_bLength = 0, bc_bLength = 0, cLength = 0; @@ -400,7 +400,7 @@ Edits &Edits::mergeAndAppend(const Edits &ab, const Edits &bc, UErrorCode &error Edits::Iterator::Iterator(const uint16_t *a, int32_t len, UBool oc, UBool crs) : array(a), index(0), length(len), remaining(0), onlyChanges_(oc), coarse(crs), - dir(0), changed(FALSE), oldLength_(0), newLength_(0), + dir(0), changed(false), oldLength_(0), newLength_(0), srcIndex(0), replIndex(0), destIndex(0) {} int32_t Edits::Iterator::readLength(int32_t head) { @@ -441,16 +441,16 @@ void Edits::Iterator::updatePreviousIndexes() { UBool Edits::Iterator::noNext() { // No change before or beyond the string. dir = 0; - changed = FALSE; + changed = false; oldLength_ = newLength_ = 0; - return FALSE; + return false; } UBool Edits::Iterator::next(UBool onlyChanges, UErrorCode &errorCode) { // Forward iteration: Update the string indexes to the limit of the current span, // and post-increment-read array units to assemble a new span. // Leaves the array index one after the last unit of that span. - if (U_FAILURE(errorCode)) { return FALSE; } + if (U_FAILURE(errorCode)) { return false; } // We have an errorCode in case we need to start guarding against integer overflows. // It is also convenient for caller loops if we bail out when an error was set elsewhere. if (dir > 0) { @@ -464,7 +464,7 @@ UBool Edits::Iterator::next(UBool onlyChanges, UErrorCode &errorCode) { // Stay on the current one of a sequence of compressed changes. ++index; // next() rests on the index after the sequence unit. dir = 1; - return TRUE; + return true; } } dir = 1; @@ -473,7 +473,7 @@ UBool Edits::Iterator::next(UBool onlyChanges, UErrorCode &errorCode) { // Fine-grained iterator: Continue a sequence of compressed changes. if (remaining > 1) { --remaining; - return TRUE; + return true; } remaining = 0; } @@ -483,7 +483,7 @@ UBool Edits::Iterator::next(UBool onlyChanges, UErrorCode &errorCode) { int32_t u = array[index++]; if (u <= MAX_UNCHANGED) { // Combine adjacent unchanged ranges. - changed = FALSE; + changed = false; oldLength_ = u + 1; while (index < length && (u = array[index]) <= MAX_UNCHANGED) { ++index; @@ -498,10 +498,10 @@ UBool Edits::Iterator::next(UBool onlyChanges, UErrorCode &errorCode) { // already fetched u > MAX_UNCHANGED at index ++index; } else { - return TRUE; + return true; } } - changed = TRUE; + changed = true; if (u <= MAX_SHORT_CHANGE) { int32_t oldLen = u >> 12; int32_t newLen = (u >> 9) & MAX_SHORT_CHANGE_NEW_LENGTH; @@ -516,14 +516,14 @@ UBool Edits::Iterator::next(UBool onlyChanges, UErrorCode &errorCode) { if (num > 1) { remaining = num; // This is the first of two or more changes. } - return TRUE; + return true; } } else { U_ASSERT(u <= 0x7fff); oldLength_ = readLength((u >> 6) & 0x3f); newLength_ = readLength(u & 0x3f); if (!coarse) { - return TRUE; + return true; } } // Combine adjacent changes. @@ -539,14 +539,14 @@ UBool Edits::Iterator::next(UBool onlyChanges, UErrorCode &errorCode) { newLength_ += readLength(u & 0x3f); } } - return TRUE; + return true; } UBool Edits::Iterator::previous(UErrorCode &errorCode) { // Backward iteration: Pre-decrement-read array units to assemble a new span, // then update the string indexes to the start of that span. // Leaves the array index on the head unit of that span. - if (U_FAILURE(errorCode)) { return FALSE; } + if (U_FAILURE(errorCode)) { return false; } // We have an errorCode in case we need to start guarding against integer overflows. // It is also convenient for caller loops if we bail out when an error was set elsewhere. if (dir >= 0) { @@ -559,7 +559,7 @@ UBool Edits::Iterator::previous(UErrorCode &errorCode) { // Stay on the current one of a sequence of compressed changes. --index; // previous() rests on the sequence unit. dir = -1; - return TRUE; + return true; } updateNextIndexes(); } @@ -572,7 +572,7 @@ UBool Edits::Iterator::previous(UErrorCode &errorCode) { if (remaining <= (u & SHORT_CHANGE_NUM_MASK)) { ++remaining; updatePreviousIndexes(); - return TRUE; + return true; } remaining = 0; } @@ -582,7 +582,7 @@ UBool Edits::Iterator::previous(UErrorCode &errorCode) { int32_t u = array[--index]; if (u <= MAX_UNCHANGED) { // Combine adjacent unchanged ranges. - changed = FALSE; + changed = false; oldLength_ = u + 1; while (index > 0 && (u = array[index - 1]) <= MAX_UNCHANGED) { --index; @@ -591,9 +591,9 @@ UBool Edits::Iterator::previous(UErrorCode &errorCode) { newLength_ = oldLength_; // No need to handle onlyChanges as long as previous() is called only from findIndex(). updatePreviousIndexes(); - return TRUE; + return true; } - changed = TRUE; + changed = true; if (u <= MAX_SHORT_CHANGE) { int32_t oldLen = u >> 12; int32_t newLen = (u >> 9) & MAX_SHORT_CHANGE_NEW_LENGTH; @@ -609,7 +609,7 @@ UBool Edits::Iterator::previous(UErrorCode &errorCode) { remaining = 1; // This is the last of two or more changes. } updatePreviousIndexes(); - return TRUE; + return true; } } else { if (u <= 0x7fff) { @@ -629,7 +629,7 @@ UBool Edits::Iterator::previous(UErrorCode &errorCode) { } if (!coarse) { updatePreviousIndexes(); - return TRUE; + return true; } } // Combine adjacent changes. @@ -648,7 +648,7 @@ UBool Edits::Iterator::previous(UErrorCode &errorCode) { } } updatePreviousIndexes(); - return TRUE; + return true; } int32_t Edits::Iterator::findIndex(int32_t i, UBool findSource, UErrorCode &errorCode) { @@ -705,7 +705,7 @@ int32_t Edits::Iterator::findIndex(int32_t i, UBool findSource, UErrorCode &erro // The index is in the current span. return 0; } - while (next(FALSE, errorCode)) { + while (next(false, errorCode)) { if (findSource) { spanStart = srcIndex; spanLength = oldLength_; @@ -739,7 +739,7 @@ int32_t Edits::Iterator::findIndex(int32_t i, UBool findSource, UErrorCode &erro } int32_t Edits::Iterator::destinationIndexFromSourceIndex(int32_t i, UErrorCode &errorCode) { - int32_t where = findIndex(i, TRUE, errorCode); + int32_t where = findIndex(i, true, errorCode); if (where < 0) { // Error or before the string. return 0; @@ -758,7 +758,7 @@ int32_t Edits::Iterator::destinationIndexFromSourceIndex(int32_t i, UErrorCode & } int32_t Edits::Iterator::sourceIndexFromDestinationIndex(int32_t i, UErrorCode &errorCode) { - int32_t where = findIndex(i, FALSE, errorCode); + int32_t where = findIndex(i, false, errorCode); if (where < 0) { // Error or before the string. return 0; diff --git a/icu4c/source/common/filteredbrk.cpp b/icu4c/source/common/filteredbrk.cpp index e4817367a5a..edab8e44986 100644 --- a/icu4c/source/common/filteredbrk.cpp +++ b/icu4c/source/common/filteredbrk.cpp @@ -614,11 +614,11 @@ SimpleFilteredBreakIteratorBuilder::build(BreakIterator* adoptBreakIterator, UEr i++) { const UnicodeString *abbr = fSet.getStringAt(i); if(abbr) { - FB_TRACE("build",abbr,TRUE,i); + FB_TRACE("build",abbr,true,i); ustrs[n] = *abbr; // copy by value - FB_TRACE("ustrs[n]",&ustrs[n],TRUE,i); + FB_TRACE("ustrs[n]",&ustrs[n],true,i); } else { - FB_TRACE("build",abbr,FALSE,i); + FB_TRACE("build",abbr,false,i); status = U_MEMORY_ALLOCATION_ERROR; return NULL; } @@ -629,37 +629,37 @@ SimpleFilteredBreakIteratorBuilder::build(BreakIterator* adoptBreakIterator, UEr for(int i=0;i-1 && (nn+1)!=ustrs[i].length()) { - FB_TRACE("partial",&ustrs[i],FALSE,i); + FB_TRACE("partial",&ustrs[i],false,i); // is partial. // is it unique? int sameAs = -1; for(int j=0;jadd(prefix, kPARTIAL, status); revCount++; - FB_TRACE("Added partial",&prefix,FALSE, i); - FB_TRACE(u_errorName(status),&ustrs[i],FALSE,i); + FB_TRACE("Added partial",&prefix,false, i); + FB_TRACE(u_errorName(status),&ustrs[i],false,i); partials[i] = kSuppressInReverse | kAddToForward; } else { - FB_TRACE("NOT adding partial",&prefix,FALSE, i); - FB_TRACE(u_errorName(status),&ustrs[i],FALSE,i); + FB_TRACE("NOT adding partial",&prefix,false, i); + FB_TRACE(u_errorName(status),&ustrs[i],false,i); } } } @@ -668,9 +668,9 @@ SimpleFilteredBreakIteratorBuilder::build(BreakIterator* adoptBreakIterator, UEr ustrs[i].reverse(); builder->add(ustrs[i], kMATCH, status); revCount++; - FB_TRACE(u_errorName(status), &ustrs[i], FALSE, i); + FB_TRACE(u_errorName(status), &ustrs[i], false, i); } else { - FB_TRACE("Adding fwd",&ustrs[i], FALSE, i); + FB_TRACE("Adding fwd",&ustrs[i], false, i); // an optimization would be to only add the portion after the '.' // for example, for "Ph.D." we store ".hP" in the reverse table. We could just store "D." in the forward, @@ -682,12 +682,12 @@ SimpleFilteredBreakIteratorBuilder::build(BreakIterator* adoptBreakIterator, UEr ////if(debug2) u_printf("SUPPRESS- not Added(%d): /%S/ status=%s\n",partials[i], ustrs[i].getTerminatedBuffer(), u_errorName(status)); } } - FB_TRACE("AbbrCount",NULL,FALSE, subCount); + FB_TRACE("AbbrCount",NULL,false, subCount); if(revCount>0) { backwardsTrie.adoptInstead(builder->build(USTRINGTRIE_BUILD_FAST, status)); if(U_FAILURE(status)) { - FB_TRACE(u_errorName(status),NULL,FALSE, -1); + FB_TRACE(u_errorName(status),NULL,false, -1); return NULL; } } @@ -695,7 +695,7 @@ SimpleFilteredBreakIteratorBuilder::build(BreakIterator* adoptBreakIterator, UEr if(fwdCount>0) { forwardsPartialTrie.adoptInstead(builder2->build(USTRINGTRIE_BUILD_FAST, status)); if(U_FAILURE(status)) { - FB_TRACE(u_errorName(status),NULL,FALSE, -1); + FB_TRACE(u_errorName(status),NULL,false, -1); return NULL; } } diff --git a/icu4c/source/common/filterednormalizer2.cpp b/icu4c/source/common/filterednormalizer2.cpp index 1a0914d3f7b..63f01206e97 100644 --- a/icu4c/source/common/filterednormalizer2.cpp +++ b/icu4c/source/common/filterednormalizer2.cpp @@ -137,14 +137,14 @@ UnicodeString & FilteredNormalizer2::normalizeSecondAndAppend(UnicodeString &first, const UnicodeString &second, UErrorCode &errorCode) const { - return normalizeSecondAndAppend(first, second, TRUE, errorCode); + return normalizeSecondAndAppend(first, second, true, errorCode); } UnicodeString & FilteredNormalizer2::append(UnicodeString &first, const UnicodeString &second, UErrorCode &errorCode) const { - return normalizeSecondAndAppend(first, second, FALSE, errorCode); + return normalizeSecondAndAppend(first, second, false, errorCode); } UnicodeString & @@ -224,7 +224,7 @@ UBool FilteredNormalizer2::isNormalized(const UnicodeString &s, UErrorCode &errorCode) const { uprv_checkCanGetBuffer(s, errorCode); if(U_FAILURE(errorCode)) { - return FALSE; + return false; } USetSpanCondition spanCondition=USET_SPAN_SIMPLE; for(int32_t prevSpanLimit=0; prevSpanLimitlevel == UPLUG_LEVEL_INVALID) { plug->pluginStatus = U_PLUGIN_DIDNT_SET_LEVEL; - plug->awaitingLoad = FALSE; + plug->awaitingLoad = false; } } else { plug->pluginStatus = U_INTERNAL_PROGRAM_ERROR; - plug->awaitingLoad = FALSE; + plug->awaitingLoad = false; } } @@ -322,7 +322,7 @@ static void uplug_loadPlug(UPlugData *plug, UErrorCode *status) { return; } uplug_callPlug(plug, UPLUG_REASON_LOAD, status); - plug->awaitingLoad = FALSE; + plug->awaitingLoad = false; if(!U_SUCCESS(*status)) { plug->pluginStatus = U_INTERNAL_PROGRAM_ERROR; } @@ -347,8 +347,8 @@ static UPlugData *uplug_allocateEmptyPlug(UErrorCode *status) plug->structSize = sizeof(UPlugData); plug->name[0]=0; plug->level = UPLUG_LEVEL_UNKNOWN; /* initialize to null state */ - plug->awaitingLoad = TRUE; - plug->dontUnload = FALSE; + plug->awaitingLoad = true; + plug->dontUnload = false; plug->pluginStatus = U_ZERO_ERROR; plug->libName[0] = 0; plug->config[0]=0; @@ -403,9 +403,9 @@ static void uplug_deallocatePlug(UPlugData *plug, UErrorCode *status) { pluginCount = uplug_removeEntryAt(pluginList, pluginCount, sizeof(plug[0]), uplug_pluginNumber(plug)); } else { /* not ok- leave as a message. */ - plug->awaitingLoad=FALSE; + plug->awaitingLoad=false; plug->entrypoint=0; - plug->dontUnload=TRUE; + plug->dontUnload=true; } } @@ -558,8 +558,8 @@ uplug_initErrorPlug(const char *libName, const char *sym, const char *config, co if(U_FAILURE(*status)) return NULL; plug->pluginStatus = loadStatus; - plug->awaitingLoad = FALSE; /* Won't load. */ - plug->dontUnload = TRUE; /* cannot unload. */ + plug->awaitingLoad = false; /* Won't load. */ + plug->dontUnload = true; /* cannot unload. */ if(sym!=NULL) { uprv_strncpy(plug->sym, sym, UPLUG_NAME_MAX); @@ -646,7 +646,7 @@ static UBool U_CALLCONV uplug_cleanup(void) } /* close other held libs? */ gCurrentLevel = UPLUG_LEVEL_LOW; - return TRUE; + return true; } #if U_ENABLE_DYLOAD @@ -678,7 +678,7 @@ static void uplug_loadWaitingPlugs(UErrorCode *status) { currentLevel = newLevel; } } - pluginToLoad->awaitingLoad = FALSE; + pluginToLoad->awaitingLoad = false; } } } @@ -694,7 +694,7 @@ static void uplug_loadWaitingPlugs(UErrorCode *status) { } else { uplug_loadPlug(pluginToLoad, &subStatus); } - pluginToLoad->awaitingLoad = FALSE; + pluginToLoad->awaitingLoad = false; } } diff --git a/icu4c/source/common/loadednormalizer2impl.cpp b/icu4c/source/common/loadednormalizer2impl.cpp index ef3a0c6a50d..24ff629f84f 100644 --- a/icu4c/source/common/loadednormalizer2impl.cpp +++ b/icu4c/source/common/loadednormalizer2impl.cpp @@ -67,9 +67,9 @@ LoadedNormalizer2Impl::isAcceptable(void * /*context*/, ) { // Normalizer2Impl *me=(Normalizer2Impl *)context; // uprv_memcpy(me->dataVersion, pInfo->dataVersion, 4); - return TRUE; + return true; } else { - return FALSE; + return false; } } @@ -185,7 +185,7 @@ static UBool U_CALLCONV uprv_loaded_normalizer2_cleanup() { uhash_close(cache); cache=NULL; - return TRUE; + return true; } U_CDECL_END diff --git a/icu4c/source/common/localebuilder.cpp b/icu4c/source/common/localebuilder.cpp index cdeb5557581..c1e1f2ad682 100644 --- a/icu4c/source/common/localebuilder.cpp +++ b/icu4c/source/common/localebuilder.cpp @@ -459,7 +459,7 @@ Locale LocaleBuilder::build(UErrorCode& errorCode) UBool LocaleBuilder::copyErrorTo(UErrorCode &outErrorCode) const { if (U_FAILURE(outErrorCode)) { // Do not overwrite the older error code - return TRUE; + return true; } outErrorCode = status_; return U_FAILURE(outErrorCode); diff --git a/icu4c/source/common/localematcher.cpp b/icu4c/source/common/localematcher.cpp index 2cad708d99f..2f8664b6f7b 100644 --- a/icu4c/source/common/localematcher.cpp +++ b/icu4c/source/common/localematcher.cpp @@ -60,7 +60,7 @@ LocaleMatcher::Result::Result(LocaleMatcher::Result &&src) U_NOEXCEPT : if (desiredIsOwned) { src.desiredLocale = nullptr; src.desiredIndex = -1; - src.desiredIsOwned = FALSE; + src.desiredIsOwned = false; } } @@ -82,7 +82,7 @@ LocaleMatcher::Result &LocaleMatcher::Result::operator=(LocaleMatcher::Result && if (desiredIsOwned) { src.desiredLocale = nullptr; src.desiredIndex = -1; - src.desiredIsOwned = FALSE; + src.desiredIsOwned = false; } return *this; } @@ -287,10 +287,10 @@ LocaleMatcher::Builder &LocaleMatcher::Builder::internalSetThresholdDistance(int #endif UBool LocaleMatcher::Builder::copyErrorTo(UErrorCode &outErrorCode) const { - if (U_FAILURE(outErrorCode)) { return TRUE; } - if (U_SUCCESS(errorCode_)) { return FALSE; } + if (U_FAILURE(outErrorCode)) { return true; } + if (U_SUCCESS(errorCode_)) { return false; } outErrorCode = errorCode_; - return TRUE; + return true; } LocaleMatcher LocaleMatcher::Builder::build(UErrorCode &errorCode) const { @@ -632,30 +632,30 @@ const Locale *LocaleMatcher::getBestMatchForListString( LocaleMatcher::Result LocaleMatcher::getBestMatchResult( const Locale &desiredLocale, UErrorCode &errorCode) const { if (U_FAILURE(errorCode)) { - return Result(nullptr, defaultLocale, -1, -1, FALSE); + return Result(nullptr, defaultLocale, -1, -1, false); } int32_t suppIndex = getBestSuppIndex( getMaximalLsrOrUnd(likelySubtags, desiredLocale, errorCode), nullptr, errorCode); if (U_FAILURE(errorCode) || suppIndex < 0) { - return Result(nullptr, defaultLocale, -1, -1, FALSE); + return Result(nullptr, defaultLocale, -1, -1, false); } else { - return Result(&desiredLocale, supportedLocales[suppIndex], 0, suppIndex, FALSE); + return Result(&desiredLocale, supportedLocales[suppIndex], 0, suppIndex, false); } } LocaleMatcher::Result LocaleMatcher::getBestMatchResult( Locale::Iterator &desiredLocales, UErrorCode &errorCode) const { if (U_FAILURE(errorCode) || !desiredLocales.hasNext()) { - return Result(nullptr, defaultLocale, -1, -1, FALSE); + return Result(nullptr, defaultLocale, -1, -1, false); } LocaleLsrIterator lsrIter(likelySubtags, desiredLocales, ULOCMATCH_TEMPORARY_LOCALES); int32_t suppIndex = getBestSuppIndex(lsrIter.next(errorCode), &lsrIter, errorCode); if (U_FAILURE(errorCode) || suppIndex < 0) { - return Result(nullptr, defaultLocale, -1, -1, FALSE); + return Result(nullptr, defaultLocale, -1, -1, false); } else { return Result(lsrIter.orphanRemembered(), supportedLocales[suppIndex], - lsrIter.getBestDesiredIndex(), suppIndex, TRUE); + lsrIter.getBestDesiredIndex(), suppIndex, true); } } diff --git a/icu4c/source/common/localeprioritylist.cpp b/icu4c/source/common/localeprioritylist.cpp index 4455eedb75e..e5ba0a3c777 100644 --- a/icu4c/source/common/localeprioritylist.cpp +++ b/icu4c/source/common/localeprioritylist.cpp @@ -234,7 +234,7 @@ void LocalePriorityList::sort(UErrorCode &errorCode) { // The comparator forces a stable sort via the item index. if (U_FAILURE(errorCode) || getLength() <= 1 || !hasWeights) { return; } uprv_sortArray(list->array.getAlias(), listLength, sizeof(LocaleAndWeight), - compareLocaleAndWeight, nullptr, FALSE, &errorCode); + compareLocaleAndWeight, nullptr, false, &errorCode); } U_NAMESPACE_END diff --git a/icu4c/source/common/locavailable.cpp b/icu4c/source/common/locavailable.cpp index 8fe74ea1fb8..cf341e1f74c 100644 --- a/icu4c/source/common/locavailable.cpp +++ b/icu4c/source/common/locavailable.cpp @@ -54,7 +54,7 @@ static UBool U_CALLCONV locale_available_cleanup(void) availableLocaleListCount = 0; gInitOnceLocale.reset(); - return TRUE; + return true; } U_CDECL_END @@ -203,7 +203,7 @@ static UBool U_CALLCONV uloc_cleanup(void) { gAvailableLocaleCounts[i] = 0; } ginstalledLocalesInitOnce.reset(); - return TRUE; + return true; } // Load Installed Locales. This function will be called exactly once diff --git a/icu4c/source/common/locdispnames.cpp b/icu4c/source/common/locdispnames.cpp index c512a0164c2..637556cc71d 100644 --- a/icu4c/source/common/locdispnames.cpp +++ b/icu4c/source/common/locdispnames.cpp @@ -514,11 +514,11 @@ uloc_getDisplayName(const char *locale, UChar formatCloseParen = 0x0029; // ) UChar formatReplaceCloseParen = 0x005D; // ] - UBool haveLang = TRUE; /* assume true, set false if we find we don't have + UBool haveLang = true; /* assume true, set false if we find we don't have a lang component in the locale */ - UBool haveRest = TRUE; /* assume true, set false if we find we don't have + UBool haveRest = true; /* assume true, set false if we find we don't have any other component in the locale */ - UBool retry = FALSE; /* set true if we need to retry, see below */ + UBool retry = false; /* set true if we need to retry, see below */ int32_t langi = 0; /* index of the language substitution (0 or 1), virtually always 0 */ @@ -625,7 +625,7 @@ uloc_getDisplayName(const char *locale, } for(int32_t subi=0,resti=0;subi<2;) { /* iterate through patterns 0 and 1*/ - UBool subdone = FALSE; /* set true when ready to move to next substitution */ + UBool subdone = false; /* set true when ready to move to next substitution */ /* prep p and cap for calls to get display components, pin cap to 0 since they complain if cap is negative */ @@ -643,10 +643,10 @@ uloc_getDisplayName(const char *locale, length+=langLen; haveLang=langLen>0; } - subdone=TRUE; + subdone=true; } else { /* {1} */ if(!haveRest) { - subdone=TRUE; + subdone=true; } else { int32_t len; /* length of component (plus other stuff) we just fetched */ switch(resti++) { @@ -667,7 +667,7 @@ uloc_getDisplayName(const char *locale, const char* kw=uenum_next(kenum.getAlias(), &len, pErrorCode); if (kw == NULL) { len=0; /* mark that we didn't add a component */ - subdone=TRUE; + subdone=true; } else { /* incorporating this behavior into the loop made it even more complex, so just special case it here */ @@ -772,7 +772,7 @@ uloc_getDisplayName(const char *locale, /* would have fit, but didn't because of pattern prefix. */ sub0Pos=0; /* stops initial padding (and a second retry, so we won't end up here again) */ - retry=TRUE; + retry=true; } } } diff --git a/icu4c/source/common/locdistance.cpp b/icu4c/source/common/locdistance.cpp index 0f649679d8d..fb22fe79ed3 100644 --- a/icu4c/source/common/locdistance.cpp +++ b/icu4c/source/common/locdistance.cpp @@ -51,7 +51,7 @@ UBool U_CALLCONV cleanup() { delete gLocaleDistance; gLocaleDistance = nullptr; gInitOnce.reset(); - return TRUE; + return true; } } // namespace diff --git a/icu4c/source/common/locdspnm.cpp b/icu4c/source/common/locdspnm.cpp index f73cedd7286..401f1fecbff 100644 --- a/icu4c/source/common/locdspnm.cpp +++ b/icu4c/source/common/locdspnm.cpp @@ -403,7 +403,7 @@ struct LocaleDisplayNamesImpl::CapitalizationContextSink : public ResourceSink { LocaleDisplayNamesImpl& parent; CapitalizationContextSink(LocaleDisplayNamesImpl& _parent) - : hasCapitalizationUsage(FALSE), parent(_parent) {} + : hasCapitalizationUsage(false), parent(_parent) {} virtual ~CapitalizationContextSink(); virtual void put(const char *key, ResourceValue &value, UBool /*noFallback*/, @@ -437,8 +437,8 @@ struct LocaleDisplayNamesImpl::CapitalizationContextSink : public ResourceSink { int32_t titlecaseInt = (parent.capitalizationContext == UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU) ? intVector[0] : intVector[1]; if (titlecaseInt == 0) { continue; } - parent.fCapitalization[usageEnum] = TRUE; - hasCapitalizationUsage = TRUE; + parent.fCapitalization[usageEnum] = true; + hasCapitalizationUsage = true; } } }; @@ -490,7 +490,7 @@ LocaleDisplayNamesImpl::initialize(void) { #if !UCONFIG_NO_BREAK_ITERATION // Only get the context data if we need it! This is a const object so we know now... // Also check whether we will need a break iterator (depends on the data) - UBool needBrkIter = FALSE; + UBool needBrkIter = false; if (capitalizationContext == UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU || capitalizationContext == UDISPCTX_CAPITALIZATION_FOR_STANDALONE) { LocalUResourceBundlePointer resource(ures_open(NULL, locale.getName(), &status)); if (U_FAILURE(status)) { return; } @@ -593,8 +593,8 @@ LocaleDisplayNamesImpl::localeDisplayName(const Locale& loc, ncat(buffer, ULOC_FULLNAME_CAPACITY, lang, "_", script, "_", country, (char *)0); localeIdName(buffer, resultName, false); if (!resultName.isBogus()) { - hasScript = FALSE; - hasCountry = FALSE; + hasScript = false; + hasCountry = false; break; } } @@ -602,7 +602,7 @@ LocaleDisplayNamesImpl::localeDisplayName(const Locale& loc, ncat(buffer, ULOC_FULLNAME_CAPACITY, lang, "_", script, (char *)0); localeIdName(buffer, resultName, false); if (!resultName.isBogus()) { - hasScript = FALSE; + hasScript = false; break; } } @@ -610,11 +610,11 @@ LocaleDisplayNamesImpl::localeDisplayName(const Locale& loc, ncat(buffer, ULOC_FULLNAME_CAPACITY, lang, "_", country, (char*)0); localeIdName(buffer, resultName, false); if (!resultName.isBogus()) { - hasCountry = FALSE; + hasCountry = false; break; } } - } while (FALSE); + } while (false); } if (resultName.isBogus() || resultName.isEmpty()) { localeIdName(lang, resultName, substitute == UDISPCTX_SUBSTITUTE); @@ -629,7 +629,7 @@ LocaleDisplayNamesImpl::localeDisplayName(const Locale& loc, UErrorCode status = U_ZERO_ERROR; if (hasScript) { - UnicodeString script_str = scriptDisplayName(script, temp, TRUE); + UnicodeString script_str = scriptDisplayName(script, temp, true); if (script_str.isBogus()) { result.setToBogus(); return result; @@ -637,7 +637,7 @@ LocaleDisplayNamesImpl::localeDisplayName(const Locale& loc, resultRemainder.append(script_str); } if (hasCountry) { - UnicodeString region_str = regionDisplayName(country, temp, TRUE); + UnicodeString region_str = regionDisplayName(country, temp, true); if (region_str.isBogus()) { result.setToBogus(); return result; @@ -645,7 +645,7 @@ LocaleDisplayNamesImpl::localeDisplayName(const Locale& loc, appendWithSep(resultRemainder, region_str); } if (hasVariant) { - UnicodeString variant_str = variantDisplayName(variant, temp, TRUE); + UnicodeString variant_str = variantDisplayName(variant, temp, true); if (variant_str.isBogus()) { result.setToBogus(); return result; @@ -666,10 +666,10 @@ LocaleDisplayNamesImpl::localeDisplayName(const Locale& loc, if (U_FAILURE(status) || status == U_STRING_NOT_TERMINATED_WARNING) { return result; } - keyDisplayName(key, temp, TRUE); + keyDisplayName(key, temp, true); temp.findAndReplace(formatOpenParen, formatReplaceOpenParen); temp.findAndReplace(formatCloseParen, formatReplaceCloseParen); - keyValueDisplayName(key, value, temp2, TRUE); + keyValueDisplayName(key, value, temp2, true); temp2.findAndReplace(formatOpenParen, formatReplaceOpenParen); temp2.findAndReplace(formatCloseParen, formatReplaceCloseParen); if (temp2 != UnicodeString(value, -1, US_INV)) { @@ -797,13 +797,13 @@ LocaleDisplayNamesImpl::scriptDisplayName(const char* script, UnicodeString& LocaleDisplayNamesImpl::scriptDisplayName(const char* script, UnicodeString& result) const { - return scriptDisplayName(script, result, FALSE); + return scriptDisplayName(script, result, false); } UnicodeString& LocaleDisplayNamesImpl::scriptDisplayName(UScriptCode scriptCode, UnicodeString& result) const { - return scriptDisplayName(uscript_getName(scriptCode), result, FALSE); + return scriptDisplayName(uscript_getName(scriptCode), result, false); } UnicodeString& @@ -827,7 +827,7 @@ LocaleDisplayNamesImpl::regionDisplayName(const char* region, UnicodeString& LocaleDisplayNamesImpl::regionDisplayName(const char* region, UnicodeString& result) const { - return regionDisplayName(region, result, FALSE); + return regionDisplayName(region, result, false); } @@ -847,7 +847,7 @@ LocaleDisplayNamesImpl::variantDisplayName(const char* variant, UnicodeString& LocaleDisplayNamesImpl::variantDisplayName(const char* variant, UnicodeString& result) const { - return variantDisplayName(variant, result, FALSE); + return variantDisplayName(variant, result, false); } UnicodeString& @@ -866,7 +866,7 @@ LocaleDisplayNamesImpl::keyDisplayName(const char* key, UnicodeString& LocaleDisplayNamesImpl::keyDisplayName(const char* key, UnicodeString& result) const { - return keyDisplayName(key, result, FALSE); + return keyDisplayName(key, result, false); } UnicodeString& @@ -908,7 +908,7 @@ UnicodeString& LocaleDisplayNamesImpl::keyValueDisplayName(const char* key, const char* value, UnicodeString& result) const { - return keyValueDisplayName(key, value, result, FALSE); + return keyValueDisplayName(key, value, result, false); } //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/icu4c/source/common/locid.cpp b/icu4c/source/common/locid.cpp index 876cdc47cf5..5cd083866c7 100644 --- a/icu4c/source/common/locid.cpp +++ b/icu4c/source/common/locid.cpp @@ -128,7 +128,7 @@ static UBool U_CALLCONV locale_cleanup(void) gDefaultLocalesHashT = NULL; } gDefaultLocale = NULL; - return TRUE; + return true; } @@ -171,7 +171,7 @@ Locale *locale_set_default_internal(const char *id, UErrorCode& status) { // Synchronize this entire function. Mutex lock(&gDefaultLocaleMutex); - UBool canonicalize = FALSE; + UBool canonicalize = false; // If given a NULL string for the locale id, grab the default // name from the system. @@ -179,7 +179,7 @@ Locale *locale_set_default_internal(const char *id, UErrorCode& status) { // the current ICU default locale.) if (id == NULL) { id = uprv_getDefaultLocaleID(); // This function not thread safe? TODO: verify. - canonicalize = TRUE; // always canonicalize host ID + canonicalize = true; // always canonicalize host ID } CharString localeNameBuf; @@ -212,7 +212,7 @@ Locale *locale_set_default_internal(const char *id, UErrorCode& status) { status = U_MEMORY_ALLOCATION_ERROR; return gDefaultLocale; } - newDefault->init(localeNameBuf.data(), FALSE); + newDefault->init(localeNameBuf.data(), false); uhash_put(gDefaultLocalesHashT, (char*) newDefault->getName(), newDefault, &status); if (U_FAILURE(status)) { return gDefaultLocale; @@ -269,7 +269,7 @@ Locale::~Locale() Locale::Locale() : UObject(), fullName(fullNameBuffer), baseName(NULL) { - init(NULL, FALSE); + init(NULL, false); } /* @@ -292,7 +292,7 @@ Locale::Locale( const char * newLanguage, { if( (newLanguage==NULL) && (newCountry == NULL) && (newVariant == NULL) ) { - init(NULL, FALSE); /* shortcut */ + init(NULL, false); /* shortcut */ } else { @@ -397,7 +397,7 @@ Locale::Locale( const char * newLanguage, } // Parse it, because for example 'language' might really be a complete // string. - init(togo.data(), FALSE); + init(togo.data(), false); } } @@ -521,7 +521,7 @@ static const char* const KNOWN_CANONICALIZED[] = { static UBool U_CALLCONV cleanupKnownCanonicalized() { gKnownCanonicalizedInitOnce.reset(); if (gKnownCanonicalized) { uhash_close(gKnownCanonicalized); } - return TRUE; + return true; } static void U_CALLCONV loadKnownCanonicalized(UErrorCode &status) { @@ -689,7 +689,7 @@ AliasData::cleanup() { gInitOnce.reset(); delete gSingleton; - return TRUE; + return true; } void @@ -1817,7 +1817,7 @@ ulocimp_isCanonicalizedLocaleForTest(const char* localeName) /*This function initializes a Locale from a C locale ID*/ Locale& Locale::init(const char* localeID, UBool canonicalize) { - fIsBogus = FALSE; + fIsBogus = false; /* Free our current storage */ if ((baseName != fullName) && (baseName != fullNameBuffer)) { uprv_free(baseName); @@ -2021,7 +2021,7 @@ Locale::setToBogus() { *language = 0; *script = 0; *country = 0; - fIsBogus = TRUE; + fIsBogus = true; variantBegin = 0; } @@ -2071,7 +2071,7 @@ Locale::addLikelySubtags(UErrorCode& status) { return; } - init(maximizedLocaleID.data(), /*canonicalize=*/FALSE); + init(maximizedLocaleID.data(), /*canonicalize=*/false); if (isBogus()) { status = U_ILLEGAL_ARGUMENT_ERROR; } @@ -2093,7 +2093,7 @@ Locale::minimizeSubtags(UErrorCode& status) { return; } - init(minimizedLocaleID.data(), /*canonicalize=*/FALSE); + init(minimizedLocaleID.data(), /*canonicalize=*/false); if (isBogus()) { status = U_ILLEGAL_ARGUMENT_ERROR; } @@ -2112,7 +2112,7 @@ Locale::canonicalize(UErrorCode& status) { if (U_FAILURE(status)) { return; } - init(uncanonicalized.data(), /*canonicalize=*/TRUE); + init(uncanonicalized.data(), /*canonicalize=*/true); if (isBogus()) { status = U_ILLEGAL_ARGUMENT_ERROR; } @@ -2159,7 +2159,7 @@ Locale::forLanguageTag(StringPiece tag, UErrorCode& status) return result; } - result.init(localeID.data(), /*canonicalize=*/FALSE); + result.init(localeID.data(), /*canonicalize=*/false); if (result.isBogus()) { status = U_ILLEGAL_ARGUMENT_ERROR; } @@ -2178,7 +2178,7 @@ Locale::toLanguageTag(ByteSink& sink, UErrorCode& status) const return; } - ulocimp_toLanguageTag(fullName, sink, /*strict=*/FALSE, &status); + ulocimp_toLanguageTag(fullName, sink, /*strict=*/false, &status); } Locale U_EXPORT2 @@ -2186,7 +2186,7 @@ Locale::createFromName (const char *name) { if (name) { Locale l(""); - l.init(name, FALSE); + l.init(name, false); return l; } else { @@ -2197,7 +2197,7 @@ Locale::createFromName (const char *name) Locale U_EXPORT2 Locale::createCanonical(const char* name) { Locale loc(""); - loc.init(name, TRUE); + loc.init(name, true); return loc; } @@ -2240,7 +2240,7 @@ const char* const* U_EXPORT2 Locale::getISOLanguages() // Set the locale's data based on a posix id. void Locale::setFromPOSIXID(const char *posixID) { - init(posixID, TRUE); + init(posixID, true); } const Locale & U_EXPORT2 @@ -2530,7 +2530,7 @@ Locale::createKeywords(UErrorCode &status) const if(assignment > variantStart) { CharString keywords; CharStringByteSink sink(&keywords); - ulocimp_getKeywords(variantStart+1, '@', sink, FALSE, &status); + ulocimp_getKeywords(variantStart+1, '@', sink, false, &status); if (U_SUCCESS(status) && !keywords.isEmpty()) { result = new KeywordEnumeration(keywords.data(), keywords.length(), 0, status); if (!result) { @@ -2559,7 +2559,7 @@ Locale::createUnicodeKeywords(UErrorCode &status) const if(assignment > variantStart) { CharString keywords; CharStringByteSink sink(&keywords); - ulocimp_getKeywords(variantStart+1, '@', sink, FALSE, &status); + ulocimp_getKeywords(variantStart+1, '@', sink, false, &status); if (U_SUCCESS(status) && !keywords.isEmpty()) { result = new UnicodeKeywordEnumeration(keywords.data(), keywords.length(), 0, status); if (!result) { diff --git a/icu4c/source/common/loclikely.cpp b/icu4c/source/common/loclikely.cpp index d80096b588e..ec0dca28a45 100644 --- a/icu4c/source/common/loclikely.cpp +++ b/icu4c/source/common/loclikely.cpp @@ -201,7 +201,7 @@ createTagStringWithAlternates( **/ char tagBuffer[ULOC_FULLNAME_CAPACITY]; int32_t tagLength = 0; - UBool regionAppended = FALSE; + UBool regionAppended = false; if (langLength > 0) { appendTag( @@ -209,7 +209,7 @@ createTagStringWithAlternates( langLength, tagBuffer, &tagLength, - /*withSeparator=*/FALSE); + /*withSeparator=*/false); } else if (alternateTags == NULL) { /* @@ -246,7 +246,7 @@ createTagStringWithAlternates( alternateLangLength, tagBuffer, &tagLength, - /*withSeparator=*/FALSE); + /*withSeparator=*/false); } } @@ -256,7 +256,7 @@ createTagStringWithAlternates( scriptLength, tagBuffer, &tagLength, - /*withSeparator=*/TRUE); + /*withSeparator=*/true); } else if (alternateTags != NULL) { /* @@ -281,7 +281,7 @@ createTagStringWithAlternates( alternateScriptLength, tagBuffer, &tagLength, - /*withSeparator=*/TRUE); + /*withSeparator=*/true); } } @@ -291,9 +291,9 @@ createTagStringWithAlternates( regionLength, tagBuffer, &tagLength, - /*withSeparator=*/TRUE); + /*withSeparator=*/true); - regionAppended = TRUE; + regionAppended = true; } else if (alternateTags != NULL) { /* @@ -317,9 +317,9 @@ createTagStringWithAlternates( alternateRegionLength, tagBuffer, &tagLength, - /*withSeparator=*/TRUE); + /*withSeparator=*/true); - regionAppended = TRUE; + regionAppended = true; } } @@ -622,7 +622,7 @@ createLikelySubtagsString( likelySubtags, sink, err); - return TRUE; + return true; } } @@ -678,7 +678,7 @@ createLikelySubtagsString( likelySubtags, sink, err); - return TRUE; + return true; } } @@ -734,7 +734,7 @@ createLikelySubtagsString( likelySubtags, sink, err); - return TRUE; + return true; } } @@ -789,11 +789,11 @@ createLikelySubtagsString( likelySubtags, sink, err); - return TRUE; + return true; } } - return FALSE; + return false; error: @@ -801,7 +801,7 @@ error: *err = U_ILLEGAL_ARGUMENT_ERROR; } - return FALSE; + return false; } #define CHECK_TRAILING_VARIANT_SIZE(trailing, trailingLength) UPRV_BLOCK_MACRO_BEGIN { \ @@ -836,7 +836,7 @@ _uloc_addLikelySubtags(const char* localeID, const char* trailing = ""; int32_t trailingLength = 0; int32_t trailingIndex = 0; - UBool success = FALSE; + UBool success = false; if(U_FAILURE(*err)) { goto error; @@ -901,7 +901,7 @@ error: if (!U_FAILURE(*err)) { *err = U_ILLEGAL_ARGUMENT_ERROR; } - return FALSE; + return false; } // Add likely subtags to the sink @@ -925,7 +925,7 @@ _uloc_minimizeSubtags(const char* localeID, const char* trailing = ""; int32_t trailingLength = 0; int32_t trailingIndex = 0; - UBool successGetMax = FALSE; + UBool successGetMax = false; if(U_FAILURE(*err)) { goto error; @@ -1248,7 +1248,7 @@ _ulocimp_addLikelySubtags(const char* localeID, if (U_SUCCESS(*status)) { return _uloc_addLikelySubtags(localeBuffer.getBuffer(), sink, status); } else { - return FALSE; + return false; } } @@ -1320,14 +1320,14 @@ uloc_isRightToLeft(const char *locale) { char lang[8]; int32_t langLength = uloc_getLanguage(locale, lang, UPRV_LENGTHOF(lang), &errorCode); if (U_FAILURE(errorCode) || errorCode == U_STRING_NOT_TERMINATED_WARNING) { - return FALSE; + return false; } if (langLength > 0) { const char* langPtr = uprv_strstr(LANG_DIR_STRING, lang); if (langPtr != NULL) { switch (langPtr[langLength]) { - case '-': return FALSE; - case '+': return TRUE; + case '-': return false; + case '+': return true; default: break; // partial match of a longer code } } @@ -1340,12 +1340,12 @@ uloc_isRightToLeft(const char *locale) { ulocimp_addLikelySubtags(locale, sink, &errorCode); } if (U_FAILURE(errorCode) || errorCode == U_STRING_NOT_TERMINATED_WARNING) { - return FALSE; + return false; } scriptLength = uloc_getScript(likely.data(), script, UPRV_LENGTHOF(script), &errorCode); if (U_FAILURE(errorCode) || errorCode == U_STRING_NOT_TERMINATED_WARNING || scriptLength == 0) { - return FALSE; + return false; } } UScriptCode scriptCode = (UScriptCode)u_getPropertyValueEnum(UCHAR_SCRIPT, script); @@ -1392,7 +1392,7 @@ ulocimp_getRegionForSupplementalData(const char *localeID, UBool inferRegion, if (U_FAILURE(*status)) { rgLen = 0; } else if (rgLen == 0 && inferRegion) { - // no unicode_region_subtag but inferRegion TRUE, try likely subtags + // no unicode_region_subtag but inferRegion true, try likely subtags rgStatus = U_ZERO_ERROR; icu::CharString locBuf; { diff --git a/icu4c/source/common/loclikelysubtags.cpp b/icu4c/source/common/loclikelysubtags.cpp index fcf10b0b431..e913c66a35b 100644 --- a/icu4c/source/common/loclikelysubtags.cpp +++ b/icu4c/source/common/loclikelysubtags.cpp @@ -233,7 +233,7 @@ private: return false; } for (int i = 0; i < length; ++i) { - stringArray.getValue(i, value); // returns TRUE because i < length + stringArray.getValue(i, value); // returns true because i < length rawIndexes[i] = strings.add(value.getUnicodeString(errorCode), errorCode); if (U_FAILURE(errorCode)) { return false; } } @@ -251,7 +251,7 @@ UBool U_CALLCONV cleanup() { delete gLikelySubtags; gLikelySubtags = nullptr; gInitOnce.reset(); - return TRUE; + return true; } } // namespace diff --git a/icu4c/source/common/locmap.cpp b/icu4c/source/common/locmap.cpp index 29a5646385e..78cfd1ca86b 100644 --- a/icu4c/source/common/locmap.cpp +++ b/icu4c/source/common/locmap.cpp @@ -1053,7 +1053,7 @@ uprv_convertToPosix(uint32_t hostid, char *posixID, int32_t posixIDCapacity, UEr { uint16_t langID; uint32_t localeIndex; - UBool bLookup = TRUE; + UBool bLookup = true; const char *pPosixID = NULL; #if U_PLATFORM_HAS_WIN32_API && UCONFIG_USE_WINDOWS_LCID_MAPPING_API @@ -1074,7 +1074,7 @@ uprv_convertToPosix(uint32_t hostid, char *posixID, int32_t posixIDCapacity, UEr if (tmpLen > 1) { int32_t i = 0; // Only need to look up in table if have _, eg for de-de_phoneb type alternate sort. - bLookup = FALSE; + bLookup = false; for (i = 0; i < UPRV_LENGTHOF(locName); i++) { locName[i] = (char)(windowsLocaleName[i]); @@ -1088,7 +1088,7 @@ uprv_convertToPosix(uint32_t hostid, char *posixID, int32_t posixIDCapacity, UEr // TODO: Should these be mapped from _phoneb to @collation=phonebook, etc.? locName[i] = '\0'; tmpLen = i; - bLookup = TRUE; + bLookup = true; break; } else if (windowsLocaleName[i] == L'-') @@ -1201,7 +1201,7 @@ uprv_convertToLCIDPlatform(const char* localeID, UErrorCode* status) char asciiBCP47Tag[LOCALE_NAME_MAX_LENGTH] = {}; // this will change it from de_DE@collation=phonebook to de-DE-u-co-phonebk form - (void)uloc_toLanguageTag(mylocaleID, asciiBCP47Tag, UPRV_LENGTHOF(asciiBCP47Tag), FALSE, status); + (void)uloc_toLanguageTag(mylocaleID, asciiBCP47Tag, UPRV_LENGTHOF(asciiBCP47Tag), false, status); if (U_SUCCESS(*status)) { diff --git a/icu4c/source/common/locutil.cpp b/icu4c/source/common/locutil.cpp index 52b5f7ab1df..6e2bd497f81 100644 --- a/icu4c/source/common/locutil.cpp +++ b/icu4c/source/common/locutil.cpp @@ -41,7 +41,7 @@ static UBool U_CALLCONV service_cleanup(void) { delete LocaleUtility_cache; LocaleUtility_cache = NULL; } - return TRUE; + return true; } diff --git a/icu4c/source/common/messagepattern.cpp b/icu4c/source/common/messagepattern.cpp index 66fd2f4c93b..52afab5f026 100644 --- a/icu4c/source/common/messagepattern.cpp +++ b/icu4c/source/common/messagepattern.cpp @@ -97,9 +97,9 @@ public: UBool ensureCapacityForOneMore(int32_t oldLength, UErrorCode &errorCode); UBool equals(const MessagePatternList &other, int32_t length) const { for(int32_t i=0; i a; @@ -124,13 +124,13 @@ template UBool MessagePatternList::ensureCapacityForOneMore(int32_t oldLength, UErrorCode &errorCode) { if(U_FAILURE(errorCode)) { - return FALSE; + return false; } if(a.getCapacity()>oldLength || a.resize(2*oldLength, oldLength)!=NULL) { - return TRUE; + return true; } errorCode=U_MEMORY_ALLOCATION_ERROR; - return FALSE; + return false; } // MessagePatternList specializations -------------------------------------- *** @@ -147,7 +147,7 @@ MessagePattern::MessagePattern(UErrorCode &errorCode) : aposMode(UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE), partsList(NULL), parts(NULL), partsLength(0), numericValuesList(NULL), numericValues(NULL), numericValuesLength(0), - hasArgNames(FALSE), hasArgNumbers(FALSE), needsAutoQuoting(FALSE) { + hasArgNames(false), hasArgNumbers(false), needsAutoQuoting(false) { init(errorCode); } @@ -155,7 +155,7 @@ MessagePattern::MessagePattern(UMessagePatternApostropheMode mode, UErrorCode &e : aposMode(mode), partsList(NULL), parts(NULL), partsLength(0), numericValuesList(NULL), numericValues(NULL), numericValuesLength(0), - hasArgNames(FALSE), hasArgNumbers(FALSE), needsAutoQuoting(FALSE) { + hasArgNames(false), hasArgNumbers(false), needsAutoQuoting(false) { init(errorCode); } @@ -163,7 +163,7 @@ MessagePattern::MessagePattern(const UnicodeString &pattern, UParseError *parseE : aposMode(UCONFIG_MSGPAT_DEFAULT_APOSTROPHE_MODE), partsList(NULL), parts(NULL), partsLength(0), numericValuesList(NULL), numericValues(NULL), numericValuesLength(0), - hasArgNames(FALSE), hasArgNumbers(FALSE), needsAutoQuoting(FALSE) { + hasArgNames(false), hasArgNumbers(false), needsAutoQuoting(false) { if(init(errorCode)) { parse(pattern, parseError, errorCode); } @@ -172,15 +172,15 @@ MessagePattern::MessagePattern(const UnicodeString &pattern, UParseError *parseE UBool MessagePattern::init(UErrorCode &errorCode) { if(U_FAILURE(errorCode)) { - return FALSE; + return false; } partsList=new MessagePatternPartsList(); if(partsList==NULL) { errorCode=U_MEMORY_ALLOCATION_ERROR; - return FALSE; + return false; } parts=partsList->a.getAlias(); - return TRUE; + return true; } MessagePattern::MessagePattern(const MessagePattern &other) @@ -215,7 +215,7 @@ MessagePattern::operator=(const MessagePattern &other) { UBool MessagePattern::copyStorage(const MessagePattern &other, UErrorCode &errorCode) { if(U_FAILURE(errorCode)) { - return FALSE; + return false; } parts=NULL; partsLength=0; @@ -225,14 +225,14 @@ MessagePattern::copyStorage(const MessagePattern &other, UErrorCode &errorCode) partsList=new MessagePatternPartsList(); if(partsList==NULL) { errorCode=U_MEMORY_ALLOCATION_ERROR; - return FALSE; + return false; } parts=partsList->a.getAlias(); } if(other.partsLength>0) { partsList->copyFrom(*other.partsList, other.partsLength, errorCode); if(U_FAILURE(errorCode)) { - return FALSE; + return false; } parts=partsList->a.getAlias(); partsLength=other.partsLength; @@ -242,19 +242,19 @@ MessagePattern::copyStorage(const MessagePattern &other, UErrorCode &errorCode) numericValuesList=new MessagePatternDoubleList(); if(numericValuesList==NULL) { errorCode=U_MEMORY_ALLOCATION_ERROR; - return FALSE; + return false; } numericValues=numericValuesList->a.getAlias(); } numericValuesList->copyFrom( *other.numericValuesList, other.numericValuesLength, errorCode); if(U_FAILURE(errorCode)) { - return FALSE; + return false; } numericValues=numericValuesList->a.getAlias(); numericValuesLength=other.numericValuesLength; } - return TRUE; + return true; } MessagePattern::~MessagePattern() { @@ -303,8 +303,8 @@ void MessagePattern::clear() { // Mostly the same as preParse(). msg.remove(); - hasArgNames=hasArgNumbers=FALSE; - needsAutoQuoting=FALSE; + hasArgNames=hasArgNumbers=false; + needsAutoQuoting=false; partsLength=0; numericValuesLength=0; } @@ -414,8 +414,8 @@ MessagePattern::preParse(const UnicodeString &pattern, UParseError *parseError, parseError->postContext[0]=0; } msg=pattern; - hasArgNames=hasArgNumbers=FALSE; - needsAutoQuoting=FALSE; + hasArgNames=hasArgNumbers=false; + needsAutoQuoting=false; partsLength=0; numericValuesLength=0; } @@ -458,7 +458,7 @@ MessagePattern::parseMessage(int32_t index, int32_t msgStartLength, // Add a Part for auto-quoting. addPart(UMSGPAT_PART_TYPE_INSERT_CHAR, index, 0, u_apos, errorCode); // value=char to be inserted - needsAutoQuoting=TRUE; + needsAutoQuoting=true; } else { c=msg.charAt(index); if(c==u_apos) { @@ -491,7 +491,7 @@ MessagePattern::parseMessage(int32_t index, int32_t msgStartLength, // Add a Part for auto-quoting. addPart(UMSGPAT_PART_TYPE_INSERT_CHAR, index, 0, u_apos, errorCode); // value=char to be inserted - needsAutoQuoting=TRUE; + needsAutoQuoting=true; break; } } @@ -500,7 +500,7 @@ MessagePattern::parseMessage(int32_t index, int32_t msgStartLength, // Add a Part for auto-quoting. addPart(UMSGPAT_PART_TYPE_INSERT_CHAR, index, 0, u_apos, errorCode); // value=char to be inserted - needsAutoQuoting=TRUE; + needsAutoQuoting=true; } } } else if(UMSGPAT_ARG_TYPE_HAS_PLURAL_STYLE(parentType) && c==u_pound) { @@ -560,7 +560,7 @@ MessagePattern::parseArg(int32_t index, int32_t argStartLength, int32_t nestingL errorCode=U_INDEX_OUTOFBOUNDS_ERROR; return 0; } - hasArgNumbers=TRUE; + hasArgNumbers=true; addPart(UMSGPAT_PART_TYPE_ARG_NUMBER, nameIndex, length, number, errorCode); } else if(number==UMSGPAT_ARG_NAME_NOT_NUMBER) { int32_t length=index-nameIndex; @@ -569,7 +569,7 @@ MessagePattern::parseArg(int32_t index, int32_t argStartLength, int32_t nestingL errorCode=U_INDEX_OUTOFBOUNDS_ERROR; return 0; } - hasArgNames=TRUE; + hasArgNames=true; addPart(UMSGPAT_PART_TYPE_ARG_NAME, nameIndex, length, 0, errorCode); } else { // number<-1 (ARG_NAME_NOT_VALID) setParseError(parseError, nameIndex); // Bad argument syntax. @@ -727,7 +727,7 @@ MessagePattern::parseChoiceStyle(int32_t index, int32_t nestingLevel, errorCode=U_INDEX_OUTOFBOUNDS_ERROR; return 0; } - parseDouble(numberIndex, index, TRUE, parseError, errorCode); // adds ARG_INT or ARG_DOUBLE + parseDouble(numberIndex, index, true, parseError, errorCode); // adds ARG_INT or ARG_DOUBLE if(U_FAILURE(errorCode)) { return 0; } @@ -774,8 +774,8 @@ MessagePattern::parsePluralOrSelectStyle(UMessagePatternArgType argType, return 0; } int32_t start=index; - UBool isEmpty=TRUE; - UBool hasOther=FALSE; + UBool isEmpty=true; + UBool hasOther=false; for(;;) { // First, collect the selector looking for a small set of terminators. // It would be a little faster to consider the syntax of each possible @@ -811,7 +811,7 @@ MessagePattern::parsePluralOrSelectStyle(UMessagePatternArgType argType, return 0; } addPart(UMSGPAT_PART_TYPE_ARG_SELECTOR, selectorIndex, length, 0, errorCode); - parseDouble(selectorIndex+1, index, FALSE, + parseDouble(selectorIndex+1, index, false, parseError, errorCode); // adds ARG_INT or ARG_DOUBLE } else { index=skipIdentifier(index); @@ -845,12 +845,12 @@ MessagePattern::parsePluralOrSelectStyle(UMessagePatternArgType argType, errorCode=U_INDEX_OUTOFBOUNDS_ERROR; return 0; } - parseDouble(valueIndex, index, FALSE, + parseDouble(valueIndex, index, false, parseError, errorCode); // adds ARG_INT or ARG_DOUBLE if(U_FAILURE(errorCode)) { return 0; } - isEmpty=FALSE; + isEmpty=false; continue; // no message fragment after the offset } else { // normal selector word @@ -861,7 +861,7 @@ MessagePattern::parsePluralOrSelectStyle(UMessagePatternArgType argType, } addPart(UMSGPAT_PART_TYPE_ARG_SELECTOR, selectorIndex, length, 0, errorCode); if(0==msg.compare(selectorIndex, length, kOther, 0, 5)) { - hasOther=TRUE; + hasOther=true; } } } @@ -880,7 +880,7 @@ MessagePattern::parsePluralOrSelectStyle(UMessagePatternArgType argType, if(U_FAILURE(errorCode)) { return 0; } - isEmpty=FALSE; + isEmpty=false; } } @@ -901,11 +901,11 @@ MessagePattern::parseArgNumber(const UnicodeString &s, int32_t start, int32_t li return 0; } else { number=0; - badNumber=TRUE; // leading zero + badNumber=true; // leading zero } } else if(0x31<=c && c<=0x39) { number=c-0x30; - badNumber=FALSE; + badNumber=false; } else { return UMSGPAT_ARG_NAME_NOT_NUMBER; } @@ -913,7 +913,7 @@ MessagePattern::parseArgNumber(const UnicodeString &s, int32_t start, int32_t li c=s.charAt(start++); if(0x30<=c && c<=0x39) { if(number>=INT32_MAX/10) { - badNumber=TRUE; // overflow + badNumber=true; // overflow } number=number*10+(c-0x30); } else { diff --git a/icu4c/source/common/normalizer2.cpp b/icu4c/source/common/normalizer2.cpp index 36ad5b8b0cf..3617264490e 100644 --- a/icu4c/source/common/normalizer2.cpp +++ b/icu4c/source/common/normalizer2.cpp @@ -62,7 +62,7 @@ Normalizer2::normalizeUTF8(uint32_t /*options*/, StringPiece src, ByteSink &sink UBool Normalizer2::getRawDecomposition(UChar32, UnicodeString &) const { - return FALSE; + return false; } UChar32 @@ -142,7 +142,7 @@ class NoopNormalizer2 : public Normalizer2 { } virtual UBool getDecomposition(UChar32, UnicodeString &) const U_OVERRIDE { - return FALSE; + return false; } // No need to U_OVERRIDE the default getRawDecomposition(). virtual UBool @@ -161,9 +161,9 @@ class NoopNormalizer2 : public Normalizer2 { spanQuickCheckYes(const UnicodeString &s, UErrorCode &) const U_OVERRIDE { return s.length(); } - virtual UBool hasBoundaryBefore(UChar32) const U_OVERRIDE { return TRUE; } - virtual UBool hasBoundaryAfter(UChar32) const U_OVERRIDE { return TRUE; } - virtual UBool isInert(UChar32) const U_OVERRIDE { return TRUE; } + virtual UBool hasBoundaryBefore(UChar32) const U_OVERRIDE { return true; } + virtual UBool hasBoundaryAfter(UChar32) const U_OVERRIDE { return true; } + virtual UBool isInert(UChar32) const U_OVERRIDE { return true; } }; NoopNormalizer2::~NoopNormalizer2() {} @@ -299,7 +299,7 @@ static UBool U_CALLCONV uprv_normalizer2_cleanup() { nfcSingleton = NULL; nfcInitOnce.reset(); #endif - return TRUE; + return true; } U_CDECL_END @@ -423,7 +423,7 @@ unorm2_normalizeSecondAndAppend(const UNormalizer2 *norm2, return normalizeSecondAndAppend(norm2, first, firstLength, firstCapacity, second, secondLength, - TRUE, pErrorCode); + true, pErrorCode); } U_CAPI int32_t U_EXPORT2 @@ -434,7 +434,7 @@ unorm2_append(const UNormalizer2 *norm2, return normalizeSecondAndAppend(norm2, first, firstLength, firstCapacity, second, secondLength, - FALSE, pErrorCode); + false, pErrorCode); } U_CAPI int32_t U_EXPORT2 diff --git a/icu4c/source/common/normalizer2impl.cpp b/icu4c/source/common/normalizer2impl.cpp index e6bd75e7173..d7e05e44d72 100644 --- a/icu4c/source/common/normalizer2impl.cpp +++ b/icu4c/source/common/normalizer2impl.cpp @@ -185,7 +185,7 @@ UBool ReorderingBuffer::init(int32_t destCapacity, UErrorCode &errorCode) { if(start==NULL) { // getBuffer() already did str.setToBogus() errorCode=U_MEMORY_ALLOCATION_ERROR; - return FALSE; + return false; } limit=start+length; remainingCapacity=str.getCapacity()-length; @@ -201,7 +201,7 @@ UBool ReorderingBuffer::init(int32_t destCapacity, UErrorCode &errorCode) { } reorderStart=codePointLimit; } - return TRUE; + return true; } UBool ReorderingBuffer::equals(const UChar *otherStart, const UChar *otherLimit) const { @@ -217,7 +217,7 @@ UBool ReorderingBuffer::equals(const uint8_t *otherStart, const uint8_t *otherLi int32_t otherLength = (int32_t)(otherLimit - otherStart); // For equal strings, UTF-8 is at least as long as UTF-16, and at most three times as long. if (otherLength < length || (otherLength / 3) > length) { - return FALSE; + return false; } // Compare valid strings from between normalization boundaries. // (Invalid sequences are normalization-inert.) @@ -225,21 +225,21 @@ UBool ReorderingBuffer::equals(const uint8_t *otherStart, const uint8_t *otherLi if (i >= length) { return j >= otherLength; } else if (j >= otherLength) { - return FALSE; + return false; } // Not at the end of either string yet. UChar32 c, other; U16_NEXT_UNSAFE(start, i, c); U8_NEXT_UNSAFE(otherStart, j, other); if (c != other) { - return FALSE; + return false; } } } UBool ReorderingBuffer::appendSupplementary(UChar32 c, uint8_t cc, UErrorCode &errorCode) { if(remainingCapacity<2 && !resize(2, errorCode)) { - return FALSE; + return false; } if(lastCC<=cc || cc==0) { limit[0]=U16_LEAD(c); @@ -253,17 +253,17 @@ UBool ReorderingBuffer::appendSupplementary(UChar32 c, uint8_t cc, UErrorCode &e insert(c, cc); } remainingCapacity-=2; - return TRUE; + return true; } UBool ReorderingBuffer::append(const UChar *s, int32_t length, UBool isNFD, uint8_t leadCC, uint8_t trailCC, UErrorCode &errorCode) { if(length==0) { - return TRUE; + return true; } if(remainingCapacity 1) { - src = decomposeShort(src, limit, STOP_AT_DECOMP_BOUNDARY, FALSE /* onlyContiguous */, + src = decomposeShort(src, limit, STOP_AT_DECOMP_BOUNDARY, false /* onlyContiguous */, buffer, errorCode); } if (U_FAILURE(errorCode)) { @@ -931,7 +931,7 @@ Normalizer2Impl::decomposeShort(const uint8_t *src, const uint8_t *limit, if (leadCC == 0 && stopAt == STOP_AT_DECOMP_BOUNDARY) { return prevSrc; } - if (!buffer.append((const char16_t *)mapping+1, length, TRUE, leadCC, trailCC, errorCode)) { + if (!buffer.append((const char16_t *)mapping+1, length, true, leadCC, trailCC, errorCode)) { return nullptr; } } @@ -1052,7 +1052,7 @@ void Normalizer2Impl::decomposeAndAppend(const UChar *src, const UChar *limit, limit=u_strchr(p, 0); } - if (buffer.append(src, (int32_t)(p - src), FALSE, firstCC, prevCC, errorCode)) { + if (buffer.append(src, (int32_t)(p - src), false, firstCC, prevCC, errorCode)) { buffer.appendZeroCC(p, limit, errorCode); } } @@ -1064,7 +1064,7 @@ UBool Normalizer2Impl::hasDecompBoundaryBefore(UChar32 c) const { UBool Normalizer2Impl::norm16HasDecompBoundaryBefore(uint16_t norm16) const { if (norm16 < minNoNoCompNoMaybeCC) { - return TRUE; + return true; } if (norm16 >= limitNoNo) { return norm16 <= MIN_NORMAL_MAYBE_YES || norm16 == JAMO_VT; @@ -1072,23 +1072,23 @@ UBool Normalizer2Impl::norm16HasDecompBoundaryBefore(uint16_t norm16) const { // c decomposes, get everything from the variable-length extra data const uint16_t *mapping=getMapping(norm16); uint16_t firstUnit=*mapping; - // TRUE if leadCC==0 (hasFCDBoundaryBefore()) + // true if leadCC==0 (hasFCDBoundaryBefore()) return (firstUnit&MAPPING_HAS_CCC_LCCC_WORD)==0 || (*(mapping-1)&0xff00)==0; } UBool Normalizer2Impl::hasDecompBoundaryAfter(UChar32 c) const { if (c < minDecompNoCP) { - return TRUE; + return true; } if (c <= 0xffff && !singleLeadMightHaveNonZeroFCD16(c)) { - return TRUE; + return true; } return norm16HasDecompBoundaryAfter(getNorm16(c)); } UBool Normalizer2Impl::norm16HasDecompBoundaryAfter(uint16_t norm16) const { if(norm16 <= minYesNo || isHangulLVT(norm16)) { - return TRUE; + return true; } if (norm16 >= limitNoNo) { if (isMaybeOrNonZeroCC(norm16)) { @@ -1103,13 +1103,13 @@ UBool Normalizer2Impl::norm16HasDecompBoundaryAfter(uint16_t norm16) const { // decomp after-boundary: same as hasFCDBoundaryAfter(), // fcd16<=1 || trailCC==0 if(firstUnit>0x1ff) { - return FALSE; // trailCC>1 + return false; // trailCC>1 } if(firstUnit<=0xff) { - return TRUE; // trailCC==0 + return true; // trailCC==0 } // if(trailCC==1) test leadCC==0, same as checking for before-boundary - // TRUE if leadCC==0 (hasFCDBoundaryBefore()) + // true if leadCC==0 (hasFCDBoundaryBefore()) return (firstUnit&MAPPING_HAS_CCC_LCCC_WORD)==0 || (*(mapping-1)&0xff00)==0; } @@ -1235,7 +1235,7 @@ void Normalizer2Impl::recompose(ReorderingBuffer &buffer, int32_t recomposeStart // and are only initialized now to avoid compiler warnings. compositionsList=NULL; // used as indicator for whether we have a forward-combining starter starter=NULL; - starterIsSupplementary=FALSE; + starterIsSupplementary=false; prevCC=0; for(;;) { @@ -1301,7 +1301,7 @@ void Normalizer2Impl::recompose(ReorderingBuffer &buffer, int32_t recomposeStart *starter=(UChar)composite; // The composite is shorter than the starter, // move the intermediate characters forward one. - starterIsSupplementary=FALSE; + starterIsSupplementary=false; q=starter+1; r=q+1; while(r cc) { // Fails FCD test, need to decompose and contiguously recompose. if (!doCompose) { - return FALSE; + return false; } } else { // If !onlyContiguous (not FCC), then we ignore the tccc of @@ -1634,7 +1634,7 @@ Normalizer2Impl::compose(const UChar *src, const UChar *limit, if (doCompose) { buffer.appendZeroCC(prevBoundary, limit, errorCode); } - return TRUE; + return true; } uint8_t prevCC = cc; nextSrc = src; @@ -1643,7 +1643,7 @@ Normalizer2Impl::compose(const UChar *src, const UChar *limit, cc = getCCFromNormalYesOrMaybe(n16); if (prevCC > cc) { if (!doCompose) { - return FALSE; + return false; } break; } @@ -1678,28 +1678,28 @@ Normalizer2Impl::compose(const UChar *src, const UChar *limit, } int32_t recomposeStartIndex=buffer.length(); // We know there is not a boundary here. - decomposeShort(prevSrc, src, FALSE /* !stopAtCompBoundary */, onlyContiguous, + decomposeShort(prevSrc, src, false /* !stopAtCompBoundary */, onlyContiguous, buffer, errorCode); // Decompose until the next boundary. - src = decomposeShort(src, limit, TRUE /* stopAtCompBoundary */, onlyContiguous, + src = decomposeShort(src, limit, true /* stopAtCompBoundary */, onlyContiguous, buffer, errorCode); if (U_FAILURE(errorCode)) { break; } if ((src - prevSrc) > INT32_MAX) { // guard before buffer.equals() errorCode = U_INDEX_OUTOFBOUNDS_ERROR; - return TRUE; + return true; } recompose(buffer, recomposeStartIndex, onlyContiguous); if(!doCompose) { if(!buffer.equals(prevSrc, src)) { - return FALSE; + return false; } buffer.remove(); } prevBoundary=src; } - return TRUE; + return true; } // Very similar to compose(): Make the same changes in both places if relevant. @@ -1846,7 +1846,7 @@ void Normalizer2Impl::composeAndAppend(const UChar *src, const UChar *limit, middle.append(src, (int32_t)(firstStarterInSrc-src)); const UChar *middleStart=middle.getBuffer(); compose(middleStart, middleStart+middle.length(), onlyContiguous, - TRUE, buffer, errorCode); + true, buffer, errorCode); if(U_FAILURE(errorCode)) { return; } @@ -1854,7 +1854,7 @@ void Normalizer2Impl::composeAndAppend(const UChar *src, const UChar *limit, } } if(doCompose) { - compose(src, limit, onlyContiguous, TRUE, buffer, errorCode); + compose(src, limit, onlyContiguous, true, buffer, errorCode); } else { if(limit==NULL) { // appendZeroCC() needs limit!=NULL limit=u_strchr(src, 0); @@ -1883,7 +1883,7 @@ Normalizer2Impl::composeUTF8(uint32_t options, UBool onlyContiguous, ByteSinkUtil::appendUnchanged(prevBoundary, limit, *sink, options, edits, errorCode); } - return TRUE; + return true; } if (*src < minNoMaybeLead) { ++src; @@ -1904,7 +1904,7 @@ Normalizer2Impl::composeUTF8(uint32_t options, UBool onlyContiguous, // Medium-fast path: Handle cases that do not require full decomposition and recomposition. if (!isMaybeOrNonZeroCC(norm16)) { // minNoNo <= norm16 < minMaybeYes if (sink == nullptr) { - return FALSE; + return false; } // Fast path for mapping a character that is immediately surrounded by boundaries. // In this case, we need not decompose around the current character. @@ -1972,7 +1972,7 @@ Normalizer2Impl::composeUTF8(uint32_t options, UBool onlyContiguous, UChar32 l = prev - Hangul::JAMO_L_BASE; if ((uint32_t)l < Hangul::JAMO_L_COUNT) { if (sink == nullptr) { - return FALSE; + return false; } int32_t t = getJamoTMinusBase(src, limit); if (t >= 0) { @@ -2008,7 +2008,7 @@ Normalizer2Impl::composeUTF8(uint32_t options, UBool onlyContiguous, // The current character is a Jamo Trailing consonant, // compose with previous Hangul LV that does not contain a Jamo T. if (sink == nullptr) { - return FALSE; + return false; } UChar32 syllable = prev + getJamoTMinusBase(prevSrc, src); prevSrc -= 3; // Replace the Hangul LV as well. @@ -2031,7 +2031,7 @@ Normalizer2Impl::composeUTF8(uint32_t options, UBool onlyContiguous, if (onlyContiguous /* FCC */ && getPreviousTrailCC(prevBoundary, prevSrc) > cc) { // Fails FCD test, need to decompose and contiguously recompose. if (sink == nullptr) { - return FALSE; + return false; } } else { // If !onlyContiguous (not FCC), then we ignore the tccc of @@ -2044,7 +2044,7 @@ Normalizer2Impl::composeUTF8(uint32_t options, UBool onlyContiguous, ByteSinkUtil::appendUnchanged(prevBoundary, limit, *sink, options, edits, errorCode); } - return TRUE; + return true; } uint8_t prevCC = cc; nextSrc = src; @@ -2053,7 +2053,7 @@ Normalizer2Impl::composeUTF8(uint32_t options, UBool onlyContiguous, cc = getCCFromNormalYesOrMaybe(n16); if (prevCC > cc) { if (sink == nullptr) { - return FALSE; + return false; } break; } @@ -2098,12 +2098,12 @@ Normalizer2Impl::composeUTF8(uint32_t options, UBool onlyContiguous, } if ((src - prevSrc) > INT32_MAX) { // guard before buffer.equals() errorCode = U_INDEX_OUTOFBOUNDS_ERROR; - return TRUE; + return true; } recompose(buffer, 0, onlyContiguous); if (!buffer.equals(prevSrc, src)) { if (sink == nullptr) { - return FALSE; + return false; } if (prevBoundary != prevSrc && !ByteSinkUtil::appendUnchanged(prevBoundary, prevSrc, @@ -2117,12 +2117,12 @@ Normalizer2Impl::composeUTF8(uint32_t options, UBool onlyContiguous, prevBoundary = src; } } - return TRUE; + return true; } UBool Normalizer2Impl::hasCompBoundaryBefore(const UChar *src, const UChar *limit) const { if (src == limit || *src < minCompNoMaybeCP) { - return TRUE; + return true; } UChar32 c; uint16_t norm16; @@ -2132,7 +2132,7 @@ UBool Normalizer2Impl::hasCompBoundaryBefore(const UChar *src, const UChar *limi UBool Normalizer2Impl::hasCompBoundaryBefore(const uint8_t *src, const uint8_t *limit) const { if (src == limit) { - return TRUE; + return true; } uint16_t norm16; UCPTRIE_FAST_U8_NEXT(normTrie, UCPTRIE_16, src, limit, norm16); @@ -2142,7 +2142,7 @@ UBool Normalizer2Impl::hasCompBoundaryBefore(const uint8_t *src, const uint8_t * UBool Normalizer2Impl::hasCompBoundaryAfter(const UChar *start, const UChar *p, UBool onlyContiguous) const { if (start == p) { - return TRUE; + return true; } UChar32 c; uint16_t norm16; @@ -2153,7 +2153,7 @@ UBool Normalizer2Impl::hasCompBoundaryAfter(const UChar *start, const UChar *p, UBool Normalizer2Impl::hasCompBoundaryAfter(const uint8_t *start, const uint8_t *p, UBool onlyContiguous) const { if (start == p) { - return TRUE; + return true; } uint16_t norm16; UCPTRIE_FAST_U8_PREV(normTrie, UCPTRIE_16, start, p, norm16); @@ -2399,7 +2399,7 @@ Normalizer2Impl::makeFCD(const UChar *src, const UChar *limit, * The source text does not fulfill the conditions for FCD. * Decompose and reorder a limited piece of the text. */ - decomposeShort(prevBoundary, src, FALSE, FALSE, *buffer, errorCode); + decomposeShort(prevBoundary, src, false, false, *buffer, errorCode); if (U_FAILURE(errorCode)) { break; } @@ -2665,7 +2665,7 @@ UBool Normalizer2Impl::isCanonSegmentStarter(UChar32 c) const { UBool Normalizer2Impl::getCanonStartSet(UChar32 c, UnicodeSet &set) const { int32_t canonValue=getCanonValue(c)&~CANON_NOT_SEGMENT_STARTER; if(canonValue==0) { - return FALSE; + return false; } set.clear(); int32_t value=canonValue&CANON_VALUE_MASK; @@ -2684,7 +2684,7 @@ UBool Normalizer2Impl::getCanonStartSet(UChar32 c, UnicodeSet &set) const { addComposites(getCompositionsList(norm16), set); } } - return TRUE; + return true; } U_NAMESPACE_END diff --git a/icu4c/source/common/normlzr.cpp b/icu4c/source/common/normlzr.cpp index 1f4fa151797..58de61591f8 100644 --- a/icu4c/source/common/normlzr.cpp +++ b/icu4c/source/common/normlzr.cpp @@ -205,7 +205,7 @@ Normalizer::isNormalized(const UnicodeString& source, return n2->isNormalized(source, status); } } else { - return FALSE; + return false; } } @@ -483,7 +483,7 @@ Normalizer::nextNormalize() { currentIndex=nextIndex; text->setIndex(nextIndex); if(!text->hasNext()) { - return FALSE; + return false; } // Skip at least one character so we make progress. UnicodeString segment(text->next32PostInc()); @@ -507,7 +507,7 @@ Normalizer::previousNormalize() { nextIndex=currentIndex; text->setIndex(currentIndex); if(!text->hasPrevious()) { - return FALSE; + return false; } UnicodeString segment; while(text->hasPrevious()) { diff --git a/icu4c/source/common/patternprops.cpp b/icu4c/source/common/patternprops.cpp index c38a7e276de..da3243d3010 100644 --- a/icu4c/source/common/patternprops.cpp +++ b/icu4c/source/common/patternprops.cpp @@ -118,49 +118,49 @@ static const uint32_t syntaxOrWhiteSpace2000[]={ UBool PatternProps::isSyntax(UChar32 c) { if(c<0) { - return FALSE; + return false; } else if(c<=0xff) { return (UBool)(latin1[c]>>1)&1; } else if(c<0x2010) { - return FALSE; + return false; } else if(c<=0x3030) { uint32_t bits=syntax2000[index2000[(c-0x2000)>>5]]; return (UBool)((bits>>(c&0x1f))&1); } else if(0xfd3e<=c && c<=0xfe46) { return c<=0xfd3f || 0xfe45<=c; } else { - return FALSE; + return false; } } UBool PatternProps::isSyntaxOrWhiteSpace(UChar32 c) { if(c<0) { - return FALSE; + return false; } else if(c<=0xff) { return (UBool)(latin1[c]&1); } else if(c<0x200e) { - return FALSE; + return false; } else if(c<=0x3030) { uint32_t bits=syntaxOrWhiteSpace2000[index2000[(c-0x2000)>>5]]; return (UBool)((bits>>(c&0x1f))&1); } else if(0xfd3e<=c && c<=0xfe46) { return c<=0xfd3f || 0xfe45<=c; } else { - return FALSE; + return false; } } UBool PatternProps::isWhiteSpace(UChar32 c) { if(c<0) { - return FALSE; + return false; } else if(c<=0xff) { return (UBool)(latin1[c]>>2)&1; } else if(0x200e<=c && c<=0x2029) { return c<=0x200f || 0x2028<=c; } else { - return FALSE; + return false; } } @@ -207,15 +207,15 @@ PatternProps::trimWhiteSpace(const UChar *s, int32_t &length) { UBool PatternProps::isIdentifier(const UChar *s, int32_t length) { if(length<=0) { - return FALSE; + return false; } const UChar *limit=s+length; do { if(isSyntaxOrWhiteSpace(*s++)) { - return FALSE; + return false; } } while(sisCompacted=TRUE; + pv->isCompacted=true; rows=pv->rows; columns=pv->columns; @@ -360,7 +360,7 @@ upvec_compact(UPropsVectors *pv, UPVecCompactHandler *handler, void *context, UE /* sort the properties vectors to find unique vector values */ uprv_sortArray(pv->v, rows, columns*4, - upvec_compareRows, pv, FALSE, pErrorCode); + upvec_compareRows, pv, false, pErrorCode); if(U_FAILURE(*pErrorCode)) { return; } @@ -503,7 +503,7 @@ upvec_compactToUTrie2Handler(void *context, (void)columns; UPVecToUTrie2Context *toUTrie2=(UPVecToUTrie2Context *)context; if(starttrie, start, end, (uint32_t)rowIndex, TRUE, pErrorCode); + utrie2_setRange32(toUTrie2->trie, start, end, (uint32_t)rowIndex, true, pErrorCode); } else { switch(start) { case UPVEC_INITIAL_VALUE_CP: diff --git a/icu4c/source/common/punycode.cpp b/icu4c/source/common/punycode.cpp index 4832938ff7e..f95722da27d 100644 --- a/icu4c/source/common/punycode.cpp +++ b/icu4c/source/common/punycode.cpp @@ -573,7 +573,7 @@ u_strFromPunycode(const UChar *src, int32_t srcLength, /* Case of last character determines uppercase flag: */ caseFlags[codeUnitIndex]=IS_BASIC_UPPERCASE(src[in-1]); if(cpLength==2) { - caseFlags[codeUnitIndex+1]=FALSE; + caseFlags[codeUnitIndex+1]=false; } } } diff --git a/icu4c/source/common/putil.cpp b/icu4c/source/common/putil.cpp index 41f6e3c66b7..f27c8737d21 100644 --- a/icu4c/source/common/putil.cpp +++ b/icu4c/source/common/putil.cpp @@ -244,7 +244,7 @@ u_signBit(double d) { */ UDate fakeClock_t0 = 0; /** Time to start the clock from **/ UDate fakeClock_dt = 0; /** Offset (fake time - real time) **/ -UBool fakeClock_set = FALSE; /** True if fake clock has spun up **/ +UBool fakeClock_set = false; /** True if fake clock has spun up **/ static UDate getUTCtime_real() { struct timeval posixTime; @@ -269,7 +269,7 @@ static UDate getUTCtime_fake() { fprintf(stderr,"U_DEBUG_FAKETIME was set at compile time, but U_FAKETIME_START was not set.\n" "Set U_FAKETIME_START to the number of milliseconds since 1/1/1970 to set the ICU clock.\n"); } - fakeClock_set = TRUE; + fakeClock_set = true; } umtx_unlock(&fakeClockMutex); @@ -905,7 +905,7 @@ static UBool compareBinaryFiles(const char* defaultTZFileName, const char* TZFil int32_t sizeFileRead; int32_t sizeFileToRead; char bufferFile[MAX_READ_SIZE]; - UBool result = TRUE; + UBool result = true; if (tzInfo->defaultTZFilePtr == NULL) { tzInfo->defaultTZFilePtr = fopen(defaultTZFileName, "r"); @@ -925,7 +925,7 @@ static UBool compareBinaryFiles(const char* defaultTZFileName, const char* TZFil sizeFileLeft = sizeFile; if (sizeFile != tzInfo->defaultTZFileSize) { - result = FALSE; + result = false; } else { /* Store the data from the files in separate buffers and * compare each byte to determine equality. @@ -942,7 +942,7 @@ static UBool compareBinaryFiles(const char* defaultTZFileName, const char* TZFil sizeFileRead = fread(bufferFile, 1, sizeFileToRead, file); if (memcmp(tzInfo->defaultTZBuffer + tzInfo->defaultTZPosition, bufferFile, sizeFileRead) != 0) { - result = FALSE; + result = false; break; } sizeFileLeft -= sizeFileRead; @@ -950,7 +950,7 @@ static UBool compareBinaryFiles(const char* defaultTZFileName, const char* TZFil } } } else { - result = FALSE; + result = false; } if (file != NULL) { @@ -1189,7 +1189,7 @@ uprv_tzname(int n) tzInfo->defaultTZBuffer = NULL; tzInfo->defaultTZFileSize = 0; tzInfo->defaultTZFilePtr = NULL; - tzInfo->defaultTZstatus = FALSE; + tzInfo->defaultTZstatus = false; tzInfo->defaultTZPosition = 0; gTimeZoneBufferPtr = searchForTZFile(TZZONEINFO, tzInfo); @@ -1295,7 +1295,7 @@ static UBool U_CALLCONV putil_cleanup(void) gCorrectedPOSIXLocaleHeapAllocated = false; } #endif - return TRUE; + return true; } /* @@ -1344,16 +1344,16 @@ U_CAPI UBool U_EXPORT2 uprv_pathIsAbsolute(const char *path) { if(!path || !*path) { - return FALSE; + return false; } if(*path == U_FILE_SEP_CHAR) { - return TRUE; + return true; } #if (U_FILE_SEP_CHAR != U_FILE_ALT_SEP_CHAR) if(*path == U_FILE_ALT_SEP_CHAR) { - return TRUE; + return true; } #endif @@ -1361,11 +1361,11 @@ uprv_pathIsAbsolute(const char *path) if( (((path[0] >= 'A') && (path[0] <= 'Z')) || ((path[0] >= 'a') && (path[0] <= 'z'))) && path[1] == ':' ) { - return TRUE; + return true; } #endif - return FALSE; + return false; } /* Backup setting of ICU_DATA_DIR_PREFIX_ENV_VAR @@ -1402,12 +1402,12 @@ static BOOL U_CALLCONV getIcuDataDirectoryUnderWindowsDirectory(char* directoryB if ((windowsPathUtf8Len + UPRV_LENGTHOF(ICU_DATA_DIR_WINDOWS)) < bufferLength) { uprv_strcpy(directoryBuffer, windowsPathUtf8); uprv_strcat(directoryBuffer, ICU_DATA_DIR_WINDOWS); - return TRUE; + return true; } } } - return FALSE; + return false; } #endif diff --git a/icu4c/source/common/rbbi.cpp b/icu4c/source/common/rbbi.cpp index acc1f5b349a..2769263894b 100644 --- a/icu4c/source/common/rbbi.cpp +++ b/icu4c/source/common/rbbi.cpp @@ -39,7 +39,7 @@ #include "uvectr32.h" #ifdef RBBI_DEBUG -static UBool gTrace = FALSE; +static UBool gTrace = false; #endif U_NAMESPACE_BEGIN @@ -267,7 +267,7 @@ RuleBasedBreakIterator::operator=(const RuleBasedBreakIterator& that) { } // TODO: clone fLanguageBreakEngines from "that" UErrorCode status = U_ZERO_ERROR; - utext_clone(&fText, &that.fText, FALSE, TRUE, &status); + utext_clone(&fText, &that.fText, false, true, &status); if (fCharIter != &fSCharIter) { delete fCharIter; @@ -354,13 +354,13 @@ void RuleBasedBreakIterator::init(UErrorCode &status) { } #ifdef RBBI_DEBUG - static UBool debugInitDone = FALSE; - if (debugInitDone == FALSE) { + static UBool debugInitDone = false; + if (debugInitDone == false) { char *debugEnv = getenv("U_RBBIDEBUG"); if (debugEnv && uprv_strstr(debugEnv, "trace")) { - gTrace = TRUE; + gTrace = true; } - debugInitDone = TRUE; + debugInitDone = true; } #endif } @@ -439,7 +439,7 @@ void RuleBasedBreakIterator::setText(UText *ut, UErrorCode &status) { } fBreakCache->reset(); fDictionaryCache->reset(); - utext_clone(&fText, ut, FALSE, TRUE, &status); + utext_clone(&fText, ut, false, true, &status); // Set up a dummy CharacterIterator to be returned if anyone // calls getText(). With input from UText, there is no reasonable @@ -460,7 +460,7 @@ void RuleBasedBreakIterator::setText(UText *ut, UErrorCode &status) { UText *RuleBasedBreakIterator::getUText(UText *fillIn, UErrorCode &status) const { - UText *result = utext_clone(fillIn, &fText, FALSE, TRUE, &status); + UText *result = utext_clone(fillIn, &fText, false, true, &status); return result; } @@ -548,7 +548,7 @@ RuleBasedBreakIterator &RuleBasedBreakIterator::refreshInputText(UText *input, U } int64_t pos = utext_getNativeIndex(&fText); // Shallow read-only clone of the new UText into the existing input UText - utext_clone(&fText, input, FALSE, TRUE, &status); + utext_clone(&fText, input, false, true, &status); if (U_FAILURE(status)) { return *this; } @@ -696,7 +696,7 @@ UBool RuleBasedBreakIterator::isBoundary(int32_t offset) { // out-of-range indexes are never boundary positions if (offset < 0) { first(); // For side effects on current position, tag values. - return FALSE; + return false; } // Adjust offset to be on a code point boundary and not beyond the end of the text. @@ -713,9 +713,9 @@ UBool RuleBasedBreakIterator::isBoundary(int32_t offset) { } if (result && adjustedOffset < offset && utext_char32At(&fText, offset) == U_SENTINEL) { - // Original offset is beyond the end of the text. Return FALSE, it's not a boundary, + // Original offset is beyond the end of the text. Return false, it's not a boundary, // but the iteration position remains set to the end of the text, which is a boundary. - return FALSE; + return false; } if (!result) { // Not on a boundary. isBoundary() must leave iterator on the following boundary. @@ -838,7 +838,7 @@ int32_t RuleBasedBreakIterator::handleNext() { result = initialPosition; c = UTEXT_NEXT32(&fText); if (c==U_SENTINEL) { - fDone = TRUE; + fDone = true; return UBRK_DONE; } @@ -1167,7 +1167,7 @@ UBool U_CALLCONV rbbi_cleanup(void) { gEmptyString = nullptr; gLanguageBreakFactoriesInitOnce.reset(); gRBBIInitOnce.reset(); - return TRUE; + return true; } U_CDECL_END diff --git a/icu4c/source/common/rbbi_cache.cpp b/icu4c/source/common/rbbi_cache.cpp index 4f83c5c604f..45e02528cf9 100644 --- a/icu4c/source/common/rbbi_cache.cpp +++ b/icu4c/source/common/rbbi_cache.cpp @@ -45,7 +45,7 @@ void RuleBasedBreakIterator::DictionaryCache::reset() { UBool RuleBasedBreakIterator::DictionaryCache::following(int32_t fromPos, int32_t *result, int32_t *statusIndex) { if (fromPos >= fLimit || fromPos < fStart) { fPositionInCache = -1; - return FALSE; + return false; } // Sequential iteration, move from previous boundary to the following @@ -55,13 +55,13 @@ UBool RuleBasedBreakIterator::DictionaryCache::following(int32_t fromPos, int32_ ++fPositionInCache; if (fPositionInCache >= fBreaks.size()) { fPositionInCache = -1; - return FALSE; + return false; } r = fBreaks.elementAti(fPositionInCache); U_ASSERT(r > fromPos); *result = r; *statusIndex = fOtherRuleStatusIndex; - return TRUE; + return true; } // Random indexing. Linear search for the boundary following the given position. @@ -71,7 +71,7 @@ UBool RuleBasedBreakIterator::DictionaryCache::following(int32_t fromPos, int32_ if (r > fromPos) { *result = r; *statusIndex = fOtherRuleStatusIndex; - return TRUE; + return true; } } UPRV_UNREACHABLE_EXIT; @@ -81,7 +81,7 @@ UBool RuleBasedBreakIterator::DictionaryCache::following(int32_t fromPos, int32_ UBool RuleBasedBreakIterator::DictionaryCache::preceding(int32_t fromPos, int32_t *result, int32_t *statusIndex) { if (fromPos <= fStart || fromPos > fLimit) { fPositionInCache = -1; - return FALSE; + return false; } if (fromPos == fLimit) { @@ -98,12 +98,12 @@ UBool RuleBasedBreakIterator::DictionaryCache::preceding(int32_t fromPos, int32_ U_ASSERT(r < fromPos); *result = r; *statusIndex = ( r== fStart) ? fFirstRuleStatusIndex : fOtherRuleStatusIndex; - return TRUE; + return true; } if (fPositionInCache == 0) { fPositionInCache = -1; - return FALSE; + return false; } for (fPositionInCache = fBreaks.size()-1; fPositionInCache >= 0; --fPositionInCache) { @@ -111,7 +111,7 @@ UBool RuleBasedBreakIterator::DictionaryCache::preceding(int32_t fromPos, int32_ if (r < fromPos) { *result = r; *statusIndex = ( r == fStart) ? fFirstRuleStatusIndex : fOtherRuleStatusIndex; - return TRUE; + return true; } } UPRV_UNREACHABLE_EXIT; @@ -227,7 +227,7 @@ void RuleBasedBreakIterator::BreakCache::reset(int32_t pos, int32_t ruleStatus) int32_t RuleBasedBreakIterator::BreakCache::current() { fBI->fPosition = fTextIdx; fBI->fRuleStatusIndex = fStatuses[fBufIdx]; - fBI->fDone = FALSE; + fBI->fDone = false; return fTextIdx; } @@ -302,18 +302,18 @@ void RuleBasedBreakIterator::BreakCache::previous(UErrorCode &status) { UBool RuleBasedBreakIterator::BreakCache::seek(int32_t pos) { if (pos < fBoundaries[fStartBufIdx] || pos > fBoundaries[fEndBufIdx]) { - return FALSE; + return false; } if (pos == fBoundaries[fStartBufIdx]) { // Common case: seek(0), from BreakIterator::first() fBufIdx = fStartBufIdx; fTextIdx = fBoundaries[fBufIdx]; - return TRUE; + return true; } if (pos == fBoundaries[fEndBufIdx]) { fBufIdx = fEndBufIdx; fTextIdx = fBoundaries[fBufIdx]; - return TRUE; + return true; } int32_t min = fStartBufIdx; @@ -331,13 +331,13 @@ UBool RuleBasedBreakIterator::BreakCache::seek(int32_t pos) { fBufIdx = modChunkSize(max - 1); fTextIdx = fBoundaries[fBufIdx]; U_ASSERT(fTextIdx <= pos); - return TRUE; + return true; } UBool RuleBasedBreakIterator::BreakCache::populateNear(int32_t position, UErrorCode &status) { if (U_FAILURE(status)) { - return FALSE; + return false; } U_ASSERT(position < fBoundaries[fStartBufIdx] || position > fBoundaries[fEndBufIdx]); @@ -476,13 +476,13 @@ UBool RuleBasedBreakIterator::BreakCache::populateFollowing() { if (fBI->fDictionaryCache->following(fromPosition, &pos, &ruleStatusIdx)) { addFollowing(pos, ruleStatusIdx, UpdateCachePosition); - return TRUE; + return true; } fBI->fPosition = fromPosition; pos = fBI->handleNext(); if (pos == UBRK_DONE) { - return FALSE; + return false; } ruleStatusIdx = fBI->fRuleStatusIndex; @@ -492,7 +492,7 @@ UBool RuleBasedBreakIterator::BreakCache::populateFollowing() { fBI->fDictionaryCache->populateDictionary(fromPosition, pos, fromRuleStatusIdx, ruleStatusIdx); if (fBI->fDictionaryCache->following(fromPosition, &pos, &ruleStatusIdx)) { addFollowing(pos, ruleStatusIdx, UpdateCachePosition); - return TRUE; + return true; // TODO: may want to move a sizable chunk of dictionary cache to break cache at this point. // But be careful with interactions with populateNear(). } @@ -515,18 +515,18 @@ UBool RuleBasedBreakIterator::BreakCache::populateFollowing() { addFollowing(pos, fBI->fRuleStatusIndex, RetainCachePosition); } - return TRUE; + return true; } UBool RuleBasedBreakIterator::BreakCache::populatePreceding(UErrorCode &status) { if (U_FAILURE(status)) { - return FALSE; + return false; } int32_t fromPosition = fBoundaries[fStartBufIdx]; if (fromPosition == 0) { - return FALSE; + return false; } int32_t position = 0; @@ -534,7 +534,7 @@ UBool RuleBasedBreakIterator::BreakCache::populatePreceding(UErrorCode &status) if (fBI->fDictionaryCache->preceding(fromPosition, &position, &positionStatusIdx)) { addPreceding(position, positionStatusIdx, UpdateCachePosition); - return TRUE; + return true; } int32_t backupPosition = fromPosition; @@ -588,7 +588,7 @@ UBool RuleBasedBreakIterator::BreakCache::populatePreceding(UErrorCode &status) break; } - UBool segmentHandledByDictionary = FALSE; + UBool segmentHandledByDictionary = false; if (fBI->fDictionaryCharCount != 0) { // Segment from the rules includes dictionary characters. // Subdivide it, with subdivided results going into the dictionary cache. @@ -615,12 +615,12 @@ UBool RuleBasedBreakIterator::BreakCache::populatePreceding(UErrorCode &status) } while (position < fromPosition); // Move boundaries from the side buffer to the main circular buffer. - UBool success = FALSE; + UBool success = false; if (!fSideBuffer.isEmpty()) { positionStatusIdx = fSideBuffer.popi(); position = fSideBuffer.popi(); addPreceding(position, positionStatusIdx, UpdateCachePosition); - success = TRUE; + success = true; } while (!fSideBuffer.isEmpty()) { diff --git a/icu4c/source/common/rbbicst.pl b/icu4c/source/common/rbbicst.pl index 1a01386c7c1..65907b0f63f 100755 --- a/icu4c/source/common/rbbicst.pl +++ b/icu4c/source/common/rbbicst.pl @@ -111,9 +111,9 @@ line_loop: while (<>) { # # do the 'n' flag # - $state_flag[$num_states] = $javaOutput? "false" : "FALSE"; + $state_flag[$num_states] = "false"; if ($fields[0] eq "n") { - $state_flag[$num_states] = $javaOutput? "true": "TRUE"; + $state_flag[$num_states] = "true"; shift @fields; } @@ -403,7 +403,7 @@ else # emit the state transition table # print "static const struct RBBIRuleTableEl gRuleParseStateTable[] = {\n"; - print " {doNOP, 0, 0, 0, TRUE}\n"; # State 0 is a dummy. Real states start with index = 1. + print " {doNOP, 0, 0, 0, true}\n"; # State 0 is a dummy. Real states start with index = 1. for ($state=1; $state < $num_states; $state++) { print " , {$state_func_name[$state],"; if ($state_literal_chars[$state] ne "") { diff --git a/icu4c/source/common/rbbidata.cpp b/icu4c/source/common/rbbidata.cpp index 6338ed3ed85..f50fc458a51 100644 --- a/icu4c/source/common/rbbidata.cpp +++ b/icu4c/source/common/rbbidata.cpp @@ -38,7 +38,7 @@ RBBIDataWrapper::RBBIDataWrapper(const RBBIDataHeader *data, UErrorCode &status) RBBIDataWrapper::RBBIDataWrapper(const RBBIDataHeader *data, enum EDontAdopt, UErrorCode &status) { init0(); init(data, status); - fDontFreeData = TRUE; + fDontFreeData = true; } RBBIDataWrapper::RBBIDataWrapper(UDataMemory* udm, UErrorCode &status) { @@ -86,7 +86,7 @@ void RBBIDataWrapper::init0() { fTrie = NULL; fUDataMem = NULL; fRefCount = 0; - fDontFreeData = TRUE; + fDontFreeData = true; } void RBBIDataWrapper::init(const RBBIDataHeader *data, UErrorCode &status) { @@ -102,7 +102,7 @@ void RBBIDataWrapper::init(const RBBIDataHeader *data, UErrorCode &status) { // that is no longer supported. At that time fFormatVersion was // an int32_t field, rather than an array of 4 bytes. - fDontFreeData = FALSE; + fDontFreeData = false; if (data->fFTableLen != 0) { fForwardTable = (RBBIStateTable *)((char *)data + fHeader->fFTable); } diff --git a/icu4c/source/common/rbbinode.cpp b/icu4c/source/common/rbbinode.cpp index 27bcd8f8feb..da5937cafd7 100644 --- a/icu4c/source/common/rbbinode.cpp +++ b/icu4c/source/common/rbbinode.cpp @@ -58,10 +58,10 @@ RBBINode::RBBINode(NodeType t) : UMemory() { fInputSet = NULL; fFirstPos = 0; fLastPos = 0; - fNullable = FALSE; - fLookAheadEnd = FALSE; - fRuleRoot = FALSE; - fChainIn = FALSE; + fNullable = false; + fLookAheadEnd = false; + fRuleRoot = false; + fChainIn = false; fVal = 0; fPrecedence = precZero; @@ -92,7 +92,7 @@ RBBINode::RBBINode(const RBBINode &other) : UMemory(other) { fLastPos = other.fLastPos; fNullable = other.fNullable; fVal = other.fVal; - fRuleRoot = FALSE; + fRuleRoot = false; fChainIn = other.fChainIn; UErrorCode status = U_ZERO_ERROR; fFirstPosSet = new UVector(status); // TODO - get a real status from somewhere @@ -355,11 +355,11 @@ void RBBINode::printTree(const RBBINode *node, UBool printHeading) { // Unconditionally dump children of all other node types. if (node->fType != varRef) { if (node->fLeftChild != NULL) { - printTree(node->fLeftChild, FALSE); + printTree(node->fLeftChild, false); } if (node->fRightChild != NULL) { - printTree(node->fRightChild, FALSE); + printTree(node->fRightChild, false); } } } diff --git a/icu4c/source/common/rbbirb.cpp b/icu4c/source/common/rbbirb.cpp index e5c250dfe40..a9d76f24827 100644 --- a/icu4c/source/common/rbbirb.cpp +++ b/icu4c/source/common/rbbirb.cpp @@ -65,9 +65,9 @@ RBBIRuleBuilder::RBBIRuleBuilder(const UnicodeString &rules, fDefaultTree = &fForwardTree; fForwardTable = NULL; fRuleStatusVals = NULL; - fChainRules = FALSE; - fLBCMNoChain = FALSE; - fLookAheadHardBreak = FALSE; + fChainRules = false; + fLBCMNoChain = false; + fLookAheadHardBreak = false; fUSetNodes = NULL; fRuleStatusVals = NULL; fScanner = NULL; diff --git a/icu4c/source/common/rbbirpt.h b/icu4c/source/common/rbbirpt.h index 586953c90c6..ca1bcf45dc4 100644 --- a/icu4c/source/common/rbbirpt.h +++ b/icu4c/source/common/rbbirpt.h @@ -79,110 +79,110 @@ struct RBBIRuleTableEl { }; static const struct RBBIRuleTableEl gRuleParseStateTable[] = { - {doNOP, 0, 0, 0, TRUE} - , {doExprStart, 254, 29, 9, FALSE} // 1 start - , {doNOP, 132, 1,0, TRUE} // 2 - , {doNoChain, 94 /* ^ */, 12, 9, TRUE} // 3 - , {doExprStart, 36 /* $ */, 88, 98, FALSE} // 4 - , {doNOP, 33 /* ! */, 19,0, TRUE} // 5 - , {doNOP, 59 /* ; */, 1,0, TRUE} // 6 - , {doNOP, 252, 0,0, FALSE} // 7 - , {doExprStart, 255, 29, 9, FALSE} // 8 - , {doEndOfRule, 59 /* ; */, 1,0, TRUE} // 9 break-rule-end - , {doNOP, 132, 9,0, TRUE} // 10 - , {doRuleError, 255, 103,0, FALSE} // 11 - , {doExprStart, 254, 29,0, FALSE} // 12 start-after-caret - , {doNOP, 132, 12,0, TRUE} // 13 - , {doRuleError, 94 /* ^ */, 103,0, FALSE} // 14 - , {doExprStart, 36 /* $ */, 88, 37, FALSE} // 15 - , {doRuleError, 59 /* ; */, 103,0, FALSE} // 16 - , {doRuleError, 252, 103,0, FALSE} // 17 - , {doExprStart, 255, 29,0, FALSE} // 18 - , {doNOP, 33 /* ! */, 21,0, TRUE} // 19 rev-option - , {doReverseDir, 255, 28, 9, FALSE} // 20 - , {doOptionStart, 130, 23,0, TRUE} // 21 option-scan1 - , {doRuleError, 255, 103,0, FALSE} // 22 - , {doNOP, 129, 23,0, TRUE} // 23 option-scan2 - , {doOptionEnd, 255, 25,0, FALSE} // 24 - , {doNOP, 59 /* ; */, 1,0, TRUE} // 25 option-scan3 - , {doNOP, 132, 25,0, TRUE} // 26 - , {doRuleError, 255, 103,0, FALSE} // 27 - , {doExprStart, 255, 29, 9, FALSE} // 28 reverse-rule - , {doRuleChar, 254, 38,0, TRUE} // 29 term - , {doNOP, 132, 29,0, TRUE} // 30 - , {doRuleChar, 131, 38,0, TRUE} // 31 - , {doNOP, 91 /* [ */, 94, 38, FALSE} // 32 - , {doLParen, 40 /* ( */, 29, 38, TRUE} // 33 - , {doNOP, 36 /* $ */, 88, 37, FALSE} // 34 - , {doDotAny, 46 /* . */, 38,0, TRUE} // 35 - , {doRuleError, 255, 103,0, FALSE} // 36 - , {doCheckVarDef, 255, 38,0, FALSE} // 37 term-var-ref - , {doNOP, 132, 38,0, TRUE} // 38 expr-mod - , {doUnaryOpStar, 42 /* * */, 43,0, TRUE} // 39 - , {doUnaryOpPlus, 43 /* + */, 43,0, TRUE} // 40 - , {doUnaryOpQuestion, 63 /* ? */, 43,0, TRUE} // 41 - , {doNOP, 255, 43,0, FALSE} // 42 - , {doExprCatOperator, 254, 29,0, FALSE} // 43 expr-cont - , {doNOP, 132, 43,0, TRUE} // 44 - , {doExprCatOperator, 131, 29,0, FALSE} // 45 - , {doExprCatOperator, 91 /* [ */, 29,0, FALSE} // 46 - , {doExprCatOperator, 40 /* ( */, 29,0, FALSE} // 47 - , {doExprCatOperator, 36 /* $ */, 29,0, FALSE} // 48 - , {doExprCatOperator, 46 /* . */, 29,0, FALSE} // 49 - , {doExprCatOperator, 47 /* / */, 55,0, FALSE} // 50 - , {doExprCatOperator, 123 /* { */, 67,0, TRUE} // 51 - , {doExprOrOperator, 124 /* | */, 29,0, TRUE} // 52 - , {doExprRParen, 41 /* ) */, 255,0, TRUE} // 53 - , {doExprFinished, 255, 255,0, FALSE} // 54 - , {doSlash, 47 /* / */, 57,0, TRUE} // 55 look-ahead - , {doNOP, 255, 103,0, FALSE} // 56 - , {doExprCatOperator, 254, 29,0, FALSE} // 57 expr-cont-no-slash - , {doNOP, 132, 43,0, TRUE} // 58 - , {doExprCatOperator, 131, 29,0, FALSE} // 59 - , {doExprCatOperator, 91 /* [ */, 29,0, FALSE} // 60 - , {doExprCatOperator, 40 /* ( */, 29,0, FALSE} // 61 - , {doExprCatOperator, 36 /* $ */, 29,0, FALSE} // 62 - , {doExprCatOperator, 46 /* . */, 29,0, FALSE} // 63 - , {doExprOrOperator, 124 /* | */, 29,0, TRUE} // 64 - , {doExprRParen, 41 /* ) */, 255,0, TRUE} // 65 - , {doExprFinished, 255, 255,0, FALSE} // 66 - , {doNOP, 132, 67,0, TRUE} // 67 tag-open - , {doStartTagValue, 128, 70,0, FALSE} // 68 - , {doTagExpectedError, 255, 103,0, FALSE} // 69 - , {doNOP, 132, 74,0, TRUE} // 70 tag-value - , {doNOP, 125 /* } */, 74,0, FALSE} // 71 - , {doTagDigit, 128, 70,0, TRUE} // 72 - , {doTagExpectedError, 255, 103,0, FALSE} // 73 - , {doNOP, 132, 74,0, TRUE} // 74 tag-close - , {doTagValue, 125 /* } */, 77,0, TRUE} // 75 - , {doTagExpectedError, 255, 103,0, FALSE} // 76 - , {doExprCatOperator, 254, 29,0, FALSE} // 77 expr-cont-no-tag - , {doNOP, 132, 77,0, TRUE} // 78 - , {doExprCatOperator, 131, 29,0, FALSE} // 79 - , {doExprCatOperator, 91 /* [ */, 29,0, FALSE} // 80 - , {doExprCatOperator, 40 /* ( */, 29,0, FALSE} // 81 - , {doExprCatOperator, 36 /* $ */, 29,0, FALSE} // 82 - , {doExprCatOperator, 46 /* . */, 29,0, FALSE} // 83 - , {doExprCatOperator, 47 /* / */, 55,0, FALSE} // 84 - , {doExprOrOperator, 124 /* | */, 29,0, TRUE} // 85 - , {doExprRParen, 41 /* ) */, 255,0, TRUE} // 86 - , {doExprFinished, 255, 255,0, FALSE} // 87 - , {doStartVariableName, 36 /* $ */, 90,0, TRUE} // 88 scan-var-name - , {doNOP, 255, 103,0, FALSE} // 89 - , {doNOP, 130, 92,0, TRUE} // 90 scan-var-start - , {doVariableNameExpectedErr, 255, 103,0, FALSE} // 91 - , {doNOP, 129, 92,0, TRUE} // 92 scan-var-body - , {doEndVariableName, 255, 255,0, FALSE} // 93 - , {doScanUnicodeSet, 91 /* [ */, 255,0, TRUE} // 94 scan-unicode-set - , {doScanUnicodeSet, 112 /* p */, 255,0, TRUE} // 95 - , {doScanUnicodeSet, 80 /* P */, 255,0, TRUE} // 96 - , {doNOP, 255, 103,0, FALSE} // 97 - , {doNOP, 132, 98,0, TRUE} // 98 assign-or-rule - , {doStartAssign, 61 /* = */, 29, 101, TRUE} // 99 - , {doNOP, 255, 37, 9, FALSE} // 100 - , {doEndAssign, 59 /* ; */, 1,0, TRUE} // 101 assign-end - , {doRuleErrorAssignExpr, 255, 103,0, FALSE} // 102 - , {doExit, 255, 103,0, TRUE} // 103 errorDeath + {doNOP, 0, 0, 0, true} + , {doExprStart, 254, 29, 9, false} // 1 start + , {doNOP, 132, 1,0, true} // 2 + , {doNoChain, 94 /* ^ */, 12, 9, true} // 3 + , {doExprStart, 36 /* $ */, 88, 98, false} // 4 + , {doNOP, 33 /* ! */, 19,0, true} // 5 + , {doNOP, 59 /* ; */, 1,0, true} // 6 + , {doNOP, 252, 0,0, false} // 7 + , {doExprStart, 255, 29, 9, false} // 8 + , {doEndOfRule, 59 /* ; */, 1,0, true} // 9 break-rule-end + , {doNOP, 132, 9,0, true} // 10 + , {doRuleError, 255, 103,0, false} // 11 + , {doExprStart, 254, 29,0, false} // 12 start-after-caret + , {doNOP, 132, 12,0, true} // 13 + , {doRuleError, 94 /* ^ */, 103,0, false} // 14 + , {doExprStart, 36 /* $ */, 88, 37, false} // 15 + , {doRuleError, 59 /* ; */, 103,0, false} // 16 + , {doRuleError, 252, 103,0, false} // 17 + , {doExprStart, 255, 29,0, false} // 18 + , {doNOP, 33 /* ! */, 21,0, true} // 19 rev-option + , {doReverseDir, 255, 28, 9, false} // 20 + , {doOptionStart, 130, 23,0, true} // 21 option-scan1 + , {doRuleError, 255, 103,0, false} // 22 + , {doNOP, 129, 23,0, true} // 23 option-scan2 + , {doOptionEnd, 255, 25,0, false} // 24 + , {doNOP, 59 /* ; */, 1,0, true} // 25 option-scan3 + , {doNOP, 132, 25,0, true} // 26 + , {doRuleError, 255, 103,0, false} // 27 + , {doExprStart, 255, 29, 9, false} // 28 reverse-rule + , {doRuleChar, 254, 38,0, true} // 29 term + , {doNOP, 132, 29,0, true} // 30 + , {doRuleChar, 131, 38,0, true} // 31 + , {doNOP, 91 /* [ */, 94, 38, false} // 32 + , {doLParen, 40 /* ( */, 29, 38, true} // 33 + , {doNOP, 36 /* $ */, 88, 37, false} // 34 + , {doDotAny, 46 /* . */, 38,0, true} // 35 + , {doRuleError, 255, 103,0, false} // 36 + , {doCheckVarDef, 255, 38,0, false} // 37 term-var-ref + , {doNOP, 132, 38,0, true} // 38 expr-mod + , {doUnaryOpStar, 42 /* * */, 43,0, true} // 39 + , {doUnaryOpPlus, 43 /* + */, 43,0, true} // 40 + , {doUnaryOpQuestion, 63 /* ? */, 43,0, true} // 41 + , {doNOP, 255, 43,0, false} // 42 + , {doExprCatOperator, 254, 29,0, false} // 43 expr-cont + , {doNOP, 132, 43,0, true} // 44 + , {doExprCatOperator, 131, 29,0, false} // 45 + , {doExprCatOperator, 91 /* [ */, 29,0, false} // 46 + , {doExprCatOperator, 40 /* ( */, 29,0, false} // 47 + , {doExprCatOperator, 36 /* $ */, 29,0, false} // 48 + , {doExprCatOperator, 46 /* . */, 29,0, false} // 49 + , {doExprCatOperator, 47 /* / */, 55,0, false} // 50 + , {doExprCatOperator, 123 /* { */, 67,0, true} // 51 + , {doExprOrOperator, 124 /* | */, 29,0, true} // 52 + , {doExprRParen, 41 /* ) */, 255,0, true} // 53 + , {doExprFinished, 255, 255,0, false} // 54 + , {doSlash, 47 /* / */, 57,0, true} // 55 look-ahead + , {doNOP, 255, 103,0, false} // 56 + , {doExprCatOperator, 254, 29,0, false} // 57 expr-cont-no-slash + , {doNOP, 132, 43,0, true} // 58 + , {doExprCatOperator, 131, 29,0, false} // 59 + , {doExprCatOperator, 91 /* [ */, 29,0, false} // 60 + , {doExprCatOperator, 40 /* ( */, 29,0, false} // 61 + , {doExprCatOperator, 36 /* $ */, 29,0, false} // 62 + , {doExprCatOperator, 46 /* . */, 29,0, false} // 63 + , {doExprOrOperator, 124 /* | */, 29,0, true} // 64 + , {doExprRParen, 41 /* ) */, 255,0, true} // 65 + , {doExprFinished, 255, 255,0, false} // 66 + , {doNOP, 132, 67,0, true} // 67 tag-open + , {doStartTagValue, 128, 70,0, false} // 68 + , {doTagExpectedError, 255, 103,0, false} // 69 + , {doNOP, 132, 74,0, true} // 70 tag-value + , {doNOP, 125 /* } */, 74,0, false} // 71 + , {doTagDigit, 128, 70,0, true} // 72 + , {doTagExpectedError, 255, 103,0, false} // 73 + , {doNOP, 132, 74,0, true} // 74 tag-close + , {doTagValue, 125 /* } */, 77,0, true} // 75 + , {doTagExpectedError, 255, 103,0, false} // 76 + , {doExprCatOperator, 254, 29,0, false} // 77 expr-cont-no-tag + , {doNOP, 132, 77,0, true} // 78 + , {doExprCatOperator, 131, 29,0, false} // 79 + , {doExprCatOperator, 91 /* [ */, 29,0, false} // 80 + , {doExprCatOperator, 40 /* ( */, 29,0, false} // 81 + , {doExprCatOperator, 36 /* $ */, 29,0, false} // 82 + , {doExprCatOperator, 46 /* . */, 29,0, false} // 83 + , {doExprCatOperator, 47 /* / */, 55,0, false} // 84 + , {doExprOrOperator, 124 /* | */, 29,0, true} // 85 + , {doExprRParen, 41 /* ) */, 255,0, true} // 86 + , {doExprFinished, 255, 255,0, false} // 87 + , {doStartVariableName, 36 /* $ */, 90,0, true} // 88 scan-var-name + , {doNOP, 255, 103,0, false} // 89 + , {doNOP, 130, 92,0, true} // 90 scan-var-start + , {doVariableNameExpectedErr, 255, 103,0, false} // 91 + , {doNOP, 129, 92,0, true} // 92 scan-var-body + , {doEndVariableName, 255, 255,0, false} // 93 + , {doScanUnicodeSet, 91 /* [ */, 255,0, true} // 94 scan-unicode-set + , {doScanUnicodeSet, 112 /* p */, 255,0, true} // 95 + , {doScanUnicodeSet, 80 /* P */, 255,0, true} // 96 + , {doNOP, 255, 103,0, false} // 97 + , {doNOP, 132, 98,0, true} // 98 assign-or-rule + , {doStartAssign, 61 /* = */, 29, 101, true} // 99 + , {doNOP, 255, 37, 9, false} // 100 + , {doEndAssign, 59 /* ; */, 1,0, true} // 101 assign-end + , {doRuleErrorAssignExpr, 255, 103,0, false} // 102 + , {doExit, 255, 103,0, true} // 103 errorDeath }; #ifdef RBBI_DEBUG static const char * const RBBIRuleStateNames[] = { 0, diff --git a/icu4c/source/common/rbbiscan.cpp b/icu4c/source/common/rbbiscan.cpp index 1304f7e37e6..92cf77664f6 100644 --- a/icu4c/source/common/rbbiscan.cpp +++ b/icu4c/source/common/rbbiscan.cpp @@ -92,7 +92,7 @@ RBBIRuleScanner::RBBIRuleScanner(RBBIRuleBuilder *rb) fRB = rb; fScanIndex = 0; fNextIndex = 0; - fQuoteMode = FALSE; + fQuoteMode = false; fLineNum = 1; fCharNum = 0; fLastChar = 0; @@ -103,9 +103,9 @@ RBBIRuleScanner::RBBIRuleScanner(RBBIRuleBuilder *rb) fNodeStack[0] = NULL; fNodeStackPtr = 0; - fReverseRule = FALSE; - fLookAheadRule = FALSE; - fNoChainInRule = FALSE; + fReverseRule = false; + fLookAheadRule = false; + fNoChainInRule = false; fSymbolTable = NULL; fSetTable = NULL; @@ -201,7 +201,7 @@ UBool RBBIRuleScanner::doParseActions(int32_t action) { RBBINode *n = NULL; - UBool returnVal = TRUE; + UBool returnVal = true; switch (action) { @@ -213,7 +213,7 @@ UBool RBBIRuleScanner::doParseActions(int32_t action) case doNoChain: // Scanned a '^' while on the rule start state. - fNoChainInRule = TRUE; + fNoChainInRule = true; break; @@ -345,7 +345,7 @@ UBool RBBIRuleScanner::doParseActions(int32_t action) catNode->fRightChild = endNode; fNodeStack[fNodeStackPtr] = catNode; endNode->fVal = fRuleNum; - endNode->fLookAheadEnd = TRUE; + endNode->fLookAheadEnd = true; thisRule = catNode; // TODO: Disable chaining out of look-ahead (hard break) rules. @@ -354,13 +354,13 @@ UBool RBBIRuleScanner::doParseActions(int32_t action) } // Mark this node as being the root of a rule. - thisRule->fRuleRoot = TRUE; + thisRule->fRuleRoot = true; // Flag if chaining into this rule is wanted. // if (fRB->fChainRules && // If rule chaining is enabled globally via !!chain !fNoChainInRule) { // and no '^' chain-in inhibit was on this rule - thisRule->fChainIn = TRUE; + thisRule->fChainIn = true; } @@ -398,9 +398,9 @@ UBool RBBIRuleScanner::doParseActions(int32_t action) // Just move its parse tree from the stack to *destRules. *destRules = fNodeStack[fNodeStackPtr]; } - fReverseRule = FALSE; // in preparation for the next rule. - fLookAheadRule = FALSE; - fNoChainInRule = FALSE; + fReverseRule = false; // in preparation for the next rule. + fLookAheadRule = false; + fNoChainInRule = false; fNodeStackPtr = 0; } break; @@ -408,7 +408,7 @@ UBool RBBIRuleScanner::doParseActions(int32_t action) case doRuleError: error(U_BRK_RULE_SYNTAX); - returnVal = FALSE; + returnVal = false; break; @@ -484,7 +484,7 @@ UBool RBBIRuleScanner::doParseActions(int32_t action) if (U_FAILURE(*fRB->fStatus)) { break; } - findSetFor(UnicodeString(TRUE, kAny, 3), n); + findSetFor(UnicodeString(true, kAny, 3), n); n->fFirstPos = fScanIndex; n->fLastPos = fNextIndex; fRB->fRules.extractBetween(n->fFirstPos, n->fLastPos, n->fText); @@ -501,7 +501,7 @@ UBool RBBIRuleScanner::doParseActions(int32_t action) n->fFirstPos = fScanIndex; n->fLastPos = fNextIndex; fRB->fRules.extractBetween(n->fFirstPos, n->fLastPos, n->fText); - fLookAheadRule = TRUE; + fLookAheadRule = true; break; @@ -534,7 +534,7 @@ UBool RBBIRuleScanner::doParseActions(int32_t action) case doTagExpectedError: error(U_BRK_MALFORMED_RULE_TAG); - returnVal = FALSE; + returnVal = false; break; case doOptionStart: @@ -546,9 +546,9 @@ UBool RBBIRuleScanner::doParseActions(int32_t action) { UnicodeString opt(fRB->fRules, fOptionStart, fScanIndex-fOptionStart); if (opt == UNICODE_STRING("chain", 5)) { - fRB->fChainRules = TRUE; + fRB->fChainRules = true; } else if (opt == UNICODE_STRING("LBCMNoChain", 11)) { - fRB->fLBCMNoChain = TRUE; + fRB->fLBCMNoChain = true; } else if (opt == UNICODE_STRING("forward", 7)) { fRB->fDefaultTree = &fRB->fForwardTree; } else if (opt == UNICODE_STRING("reverse", 7)) { @@ -558,7 +558,7 @@ UBool RBBIRuleScanner::doParseActions(int32_t action) } else if (opt == UNICODE_STRING("safe_reverse", 12)) { fRB->fDefaultTree = &fRB->fSafeRevTree; } else if (opt == UNICODE_STRING("lookAheadHardBreak", 18)) { - fRB->fLookAheadHardBreak = TRUE; + fRB->fLookAheadHardBreak = true; } else if (opt == UNICODE_STRING("quoted_literals_only", 20)) { fRuleSets[kRuleSet_rule_char-128].clear(); } else if (opt == UNICODE_STRING("unquoted_literals", 17)) { @@ -570,7 +570,7 @@ UBool RBBIRuleScanner::doParseActions(int32_t action) break; case doReverseDir: - fReverseRule = TRUE; + fReverseRule = true; break; case doStartVariableName: @@ -600,7 +600,7 @@ UBool RBBIRuleScanner::doParseActions(int32_t action) n = fNodeStack[fNodeStackPtr]; if (n->fLeftChild == NULL) { error(U_BRK_UNDEFINED_VARIABLE); - returnVal = FALSE; + returnVal = false; } break; @@ -609,11 +609,11 @@ UBool RBBIRuleScanner::doParseActions(int32_t action) case doRuleErrorAssignExpr: error(U_BRK_ASSIGN_ERROR); - returnVal = FALSE; + returnVal = false; break; case doExit: - returnVal = FALSE; + returnVal = false; break; case doScanUnicodeSet: @@ -622,7 +622,7 @@ UBool RBBIRuleScanner::doParseActions(int32_t action) default: error(U_BRK_INTERNAL_ERROR); - returnVal = FALSE; + returnVal = false; break; } return returnVal && U_SUCCESS(*fRB->fStatus); @@ -872,7 +872,7 @@ UChar32 RBBIRuleScanner::nextCharLL() { fCharNum=0; if (fQuoteMode) { error(U_BRK_NEW_LINE_IN_QUOTED_STRING); - fQuoteMode = FALSE; + fQuoteMode = false; } } else { @@ -901,7 +901,7 @@ void RBBIRuleScanner::nextChar(RBBIRuleChar &c) { fScanIndex = fNextIndex; c.fChar = nextCharLL(); - c.fEscaped = FALSE; + c.fEscaped = false; // // check for '' sequence. @@ -910,7 +910,7 @@ void RBBIRuleScanner::nextChar(RBBIRuleChar &c) { if (c.fChar == chApos) { if (fRB->fRules.char32At(fNextIndex) == chApos) { c.fChar = nextCharLL(); // get nextChar officially so character counts - c.fEscaped = TRUE; // stay correct. + c.fEscaped = true; // stay correct. } else { @@ -918,18 +918,18 @@ void RBBIRuleScanner::nextChar(RBBIRuleChar &c) { // Toggle quoting mode. // Return either '(' or ')', because quotes cause a grouping of the quoted text. fQuoteMode = !fQuoteMode; - if (fQuoteMode == TRUE) { + if (fQuoteMode == true) { c.fChar = chLParen; } else { c.fChar = chRParen; } - c.fEscaped = FALSE; // The paren that we return is not escaped. + c.fEscaped = false; // The paren that we return is not escaped. return; } } if (fQuoteMode) { - c.fEscaped = TRUE; + c.fEscaped = true; } else { @@ -963,7 +963,7 @@ void RBBIRuleScanner::nextChar(RBBIRuleChar &c) { // Use UnicodeString::unescapeAt() to handle them. // if (c.fChar == chBackSlash) { - c.fEscaped = TRUE; + c.fEscaped = true; int32_t startX = fNextIndex; c.fChar = fRB->fRules.unescapeAt(fNextIndex); if (fNextIndex == startX) { @@ -1032,7 +1032,7 @@ void RBBIRuleScanner::parse() { #ifdef RBBI_DEBUG if (fRB->fDebugEnv && uprv_strstr(fRB->fDebugEnv, "scan")) { RBBIDebugPrintf("."); fflush(stdout);} #endif - if (tableEl->fCharClass < 127 && fC.fEscaped == FALSE && tableEl->fCharClass == fC.fChar) { + if (tableEl->fCharClass < 127 && fC.fEscaped == false && tableEl->fCharClass == fC.fChar) { // Table row specified an individual character, not a set, and // the input character is not escaped, and // the input character matched it. @@ -1057,7 +1057,7 @@ void RBBIRuleScanner::parse() { } if (tableEl->fCharClass >= 128 && tableEl->fCharClass < 240 && // Table specs a char class && - fC.fEscaped == FALSE && // char is not escaped && + fC.fEscaped == false && // char is not escaped && fC.fChar != (UChar32)-1) { // char is not EOF U_ASSERT((tableEl->fCharClass-128) < UPRV_LENGTHOF(fRuleSets)); if (fRuleSets[tableEl->fCharClass-128].contains(fC.fChar)) { @@ -1076,7 +1076,7 @@ void RBBIRuleScanner::parse() { // We've found the row of the state table that matches the current input // character from the rules string. // Perform any action specified by this row in the state table. - if (doParseActions((int32_t)tableEl->fAction) == FALSE) { + if (doParseActions((int32_t)tableEl->fAction) == false) { // Break out of the state machine loop if the // the action signalled some kind of error, or // the action was to exit, occurs on normal end-of-rules-input. @@ -1133,13 +1133,13 @@ void RBBIRuleScanner::parse() { if (fRB->fDebugEnv && uprv_strstr(fRB->fDebugEnv, "symbols")) {fSymbolTable->rbbiSymtablePrint();} if (fRB->fDebugEnv && uprv_strstr(fRB->fDebugEnv, "ptree")) { RBBIDebugPrintf("Completed Forward Rules Parse Tree...\n"); - RBBINode::printTree(fRB->fForwardTree, TRUE); + RBBINode::printTree(fRB->fForwardTree, true); RBBIDebugPrintf("\nCompleted Reverse Rules Parse Tree...\n"); - RBBINode::printTree(fRB->fReverseTree, TRUE); + RBBINode::printTree(fRB->fReverseTree, true); RBBIDebugPrintf("\nCompleted Safe Point Forward Rules Parse Tree...\n"); - RBBINode::printTree(fRB->fSafeFwdTree, TRUE); + RBBINode::printTree(fRB->fSafeFwdTree, true); RBBIDebugPrintf("\nCompleted Safe Point Reverse Rules Parse Tree...\n"); - RBBINode::printTree(fRB->fSafeRevTree, TRUE); + RBBINode::printTree(fRB->fSafeRevTree, true); } #endif } @@ -1154,7 +1154,7 @@ void RBBIRuleScanner::parse() { void RBBIRuleScanner::printNodeStack(const char *title) { int i; RBBIDebugPrintf("%s. Dumping node stack...\n", title); - for (i=fNodeStackPtr; i>0; i--) {RBBINode::printTree(fNodeStack[i], TRUE);} + for (i=fNodeStackPtr; i>0; i--) {RBBINode::printTree(fNodeStack[i], true);} } #endif diff --git a/icu4c/source/common/rbbisetb.cpp b/icu4c/source/common/rbbisetb.cpp index 29faeb8c456..11c47156d64 100644 --- a/icu4c/source/common/rbbisetb.cpp +++ b/icu4c/source/common/rbbisetb.cpp @@ -261,7 +261,7 @@ void RBBISetBuilder::buildRanges() { } if (inputSet->contains(bofString)) { addValToSet(usetNode, 2); - fSawBOF = TRUE; + fSawBOF = true; } } @@ -569,7 +569,7 @@ void RBBISetBuilder::printSets() { RBBI_DEBUG_printUnicodeString(usetNode->fText); RBBIDebugPrintf("\n"); if (usetNode->fLeftChild != NULL) { - RBBINode::printTree(usetNode->fLeftChild, TRUE); + RBBINode::printTree(usetNode->fLeftChild, true); } } RBBIDebugPrintf("\n"); diff --git a/icu4c/source/common/rbbistbl.cpp b/icu4c/source/common/rbbistbl.cpp index 627ec1827cd..554aeb793f7 100644 --- a/icu4c/source/common/rbbistbl.cpp +++ b/icu4c/source/common/rbbistbl.cpp @@ -254,8 +254,8 @@ void RBBISymbolTable::rbbiSymtablePrint() const { } RBBISymbolTableEntry *s = (RBBISymbolTableEntry *)e->value.pointer; RBBIDebugPrintf("%s\n", CStr(s->key)()); - RBBINode::printTree(s->val, TRUE); - RBBINode::printTree(s->val->fLeftChild, FALSE); + RBBINode::printTree(s->val, true); + RBBINode::printTree(s->val->fLeftChild, false); RBBIDebugPrintf("\n"); } } diff --git a/icu4c/source/common/rbbitblb.cpp b/icu4c/source/common/rbbitblb.cpp index a495f17a878..0e3ec7999f7 100644 --- a/icu4c/source/common/rbbitblb.cpp +++ b/icu4c/source/common/rbbitblb.cpp @@ -85,7 +85,7 @@ void RBBITableBuilder::buildForwardTable() { #ifdef RBBI_DEBUG if (fRB->fDebugEnv && uprv_strstr(fRB->fDebugEnv, "ftree")) { RBBIDebugPuts("\nParse tree after flattening variable references."); - RBBINode::printTree(fTree, TRUE); + RBBINode::printTree(fTree, true); } #endif @@ -143,7 +143,7 @@ void RBBITableBuilder::buildForwardTable() { #ifdef RBBI_DEBUG if (fRB->fDebugEnv && uprv_strstr(fRB->fDebugEnv, "stree")) { RBBIDebugPuts("\nParse tree after flattening Unicode Set references."); - RBBINode::printTree(fTree, TRUE); + RBBINode::printTree(fTree, true); } #endif @@ -209,14 +209,14 @@ void RBBITableBuilder::calcNullable(RBBINode *n) { if (n->fType == RBBINode::setRef || n->fType == RBBINode::endMark ) { // These are non-empty leaf node types. - n->fNullable = FALSE; + n->fNullable = false; return; } if (n->fType == RBBINode::lookAhead || n->fType == RBBINode::tag) { // Lookahead marker node. It's a leaf, so no recursion on children. // It's nullable because it does not match any literal text from the input stream. - n->fNullable = TRUE; + n->fNullable = true; return; } @@ -234,10 +234,10 @@ void RBBITableBuilder::calcNullable(RBBINode *n) { n->fNullable = n->fLeftChild->fNullable && n->fRightChild->fNullable; } else if (n->fType == RBBINode::opStar || n->fType == RBBINode::opQuestion) { - n->fNullable = TRUE; + n->fNullable = true; } else { - n->fNullable = FALSE; + n->fNullable = false; } } @@ -618,7 +618,7 @@ void RBBITableBuilder::buildStateTable() { for (tx=1; txsize(); tx++) { RBBIStateDescriptor *temp; temp = (RBBIStateDescriptor *)fDStates->elementAt(tx); - if (temp->fMarked == FALSE) { + if (temp->fMarked == false) { T = temp; break; } @@ -628,7 +628,7 @@ void RBBITableBuilder::buildStateTable() { } // mark T; - T->fMarked = TRUE; + T->fMarked = true; // for each input symbol a do begin int32_t a; @@ -655,7 +655,7 @@ void RBBITableBuilder::buildStateTable() { // if U is not empty and not in DStates then int32_t ux = 0; - UBool UinDstates = FALSE; + UBool UinDstates = false; if (U != NULL) { U_ASSERT(U->size() > 0); int ix; @@ -666,7 +666,7 @@ void RBBITableBuilder::buildStateTable() { delete U; U = temp2->fPositions; ux = ix; - UinDstates = TRUE; + UinDstates = true; break; } } @@ -1131,7 +1131,7 @@ void RBBITableBuilder::printPosSets(RBBINode *n) { printf("\n"); RBBINode::printNodeHeader(); RBBINode::printNode(n); - RBBIDebugPrintf(" Nullable: %s\n", n->fNullable?"TRUE":"FALSE"); + RBBIDebugPrintf(" Nullable: %s\n", n->fNullable?"true":"false"); RBBIDebugPrintf(" firstpos: "); printSet(n->fFirstPosSet); @@ -1773,7 +1773,7 @@ void RBBITableBuilder::printRuleStatusTable() { //----------------------------------------------------------------------------- RBBIStateDescriptor::RBBIStateDescriptor(int lastInputSymbol, UErrorCode *fStatus) { - fMarked = FALSE; + fMarked = false; fAccepting = 0; fLookAhead = 0; fTagsIdx = 0; diff --git a/icu4c/source/common/resbund.cpp b/icu4c/source/common/resbund.cpp index 47c0fe1c6ed..8591a625f95 100644 --- a/icu4c/source/common/resbund.cpp +++ b/icu4c/source/common/resbund.cpp @@ -254,7 +254,7 @@ ResourceBundle::clone() const { UnicodeString ResourceBundle::getString(UErrorCode& status) const { int32_t len = 0; const UChar *r = ures_getString(fResource, &len, &status); - return UnicodeString(TRUE, r, len); + return UnicodeString(true, r, len); } const uint8_t *ResourceBundle::getBinary(int32_t& len, UErrorCode& status) const { @@ -312,13 +312,13 @@ ResourceBundle ResourceBundle::getNext(UErrorCode& status) { UnicodeString ResourceBundle::getNextString(UErrorCode& status) { int32_t len = 0; const UChar* r = ures_getNextString(fResource, &len, 0, &status); - return UnicodeString(TRUE, r, len); + return UnicodeString(true, r, len); } UnicodeString ResourceBundle::getNextString(const char ** key, UErrorCode& status) { int32_t len = 0; const UChar* r = ures_getNextString(fResource, &len, key, &status); - return UnicodeString(TRUE, r, len); + return UnicodeString(true, r, len); } ResourceBundle ResourceBundle::get(int32_t indexR, UErrorCode& status) const { @@ -336,7 +336,7 @@ ResourceBundle ResourceBundle::get(int32_t indexR, UErrorCode& status) const { UnicodeString ResourceBundle::getStringEx(int32_t indexS, UErrorCode& status) const { int32_t len = 0; const UChar* r = ures_getStringByIndex(fResource, indexS, &len, &status); - return UnicodeString(TRUE, r, len); + return UnicodeString(true, r, len); } ResourceBundle ResourceBundle::get(const char* key, UErrorCode& status) const { @@ -364,7 +364,7 @@ ResourceBundle ResourceBundle::getWithFallback(const char* key, UErrorCode& stat UnicodeString ResourceBundle::getStringEx(const char* key, UErrorCode& status) const { int32_t len = 0; const UChar* r = ures_getStringByKey(fResource, key, &len, &status); - return UnicodeString(TRUE, r, len); + return UnicodeString(true, r, len); } const char* diff --git a/icu4c/source/common/ruleiter.cpp b/icu4c/source/common/ruleiter.cpp index 41eea23c0dc..33ffd3d8337 100644 --- a/icu4c/source/common/ruleiter.cpp +++ b/icu4c/source/common/ruleiter.cpp @@ -39,7 +39,7 @@ UChar32 RuleCharacterIterator::next(int32_t options, UBool& isEscaped, UErrorCod if (U_FAILURE(ec)) return DONE; UChar32 c = DONE; - isEscaped = FALSE; + isEscaped = false; for (;;) { c = _current(); @@ -75,7 +75,7 @@ UChar32 RuleCharacterIterator::next(int32_t options, UBool& isEscaped, UErrorCod int32_t offset = 0; c = lookahead(tempEscape, MAX_U_NOTATION_LEN).unescapeAt(offset); jumpahead(offset); - isEscaped = TRUE; + isEscaped = true; if (c < 0) { ec = U_MALFORMED_UNICODE_ESCAPE; return DONE; diff --git a/icu4c/source/common/serv.cpp b/icu4c/source/common/serv.cpp index c26dbca1a9c..9d8c04149ce 100644 --- a/icu4c/source/common/serv.cpp +++ b/icu4c/source/common/serv.cpp @@ -64,7 +64,7 @@ ICUServiceKey::currentDescriptor(UnicodeString& result) const UBool ICUServiceKey::fallback() { - return FALSE; + return false; } UBool @@ -249,7 +249,7 @@ public: } /** - * Return TRUE if there is at least one reference to this and the + * Return true if there is at least one reference to this and the * resource has not been released. */ UBool isShared() const { @@ -454,11 +454,11 @@ ICUService::getKey(ICUServiceKey& key, UnicodeString* actualReturn, const ICUSer UnicodeString currentDescriptor; LocalPointer cacheDescriptorList; - UBool putInCache = FALSE; + UBool putInCache = false; int32_t startIndex = 0; int32_t limit = factories->size(); - UBool cacheResult = TRUE; + UBool cacheResult = true; if (factory != NULL) { for (int32_t i = 0; i < limit; ++i) { @@ -472,7 +472,7 @@ ICUService::getKey(ICUServiceKey& key, UnicodeString* actualReturn, const ICUSer status = U_ILLEGAL_ARGUMENT_ERROR; return NULL; } - cacheResult = FALSE; + cacheResult = false; } do { @@ -486,7 +486,7 @@ ICUService::getKey(ICUServiceKey& key, UnicodeString* actualReturn, const ICUSer // first test of cache failed, so we'll have to update // the cache if we eventually succeed-- that is, if we're // going to update the cache at all. - putInCache = TRUE; + putInCache = true; int32_t index = startIndex; while (index < limit) { @@ -796,7 +796,7 @@ ICUService::getDisplayNames(UVector& result, URegistryKey ICUService::registerInstance(UObject* objToAdopt, const UnicodeString& id, UErrorCode& status) { - return registerInstance(objToAdopt, id, TRUE, status); + return registerInstance(objToAdopt, id, true, status); } URegistryKey @@ -864,13 +864,13 @@ UBool ICUService::unregister(URegistryKey rkey, UErrorCode& status) { ICUServiceFactory *factory = (ICUServiceFactory*)rkey; - UBool result = FALSE; + UBool result = false; if (factory != NULL && factories != NULL) { Mutex mutex(&lock); if (factories->removeElement(factory)) { clearCaches(); - result = TRUE; + result = true; } else { status = U_ILLEGAL_ARGUMENT_ERROR; delete factory; diff --git a/icu4c/source/common/servlk.cpp b/icu4c/source/common/servlk.cpp index 538982ca362..70218066595 100644 --- a/icu4c/source/common/servlk.cpp +++ b/icu4c/source/common/servlk.cpp @@ -126,24 +126,24 @@ LocaleKey::fallback() { int x = _currentID.lastIndexOf(UNDERSCORE_CHAR); if (x != -1) { _currentID.remove(x); // truncate current or fallback, whichever we're pointing to - return TRUE; + return true; } if (!_fallbackID.isBogus()) { _currentID = _fallbackID; _fallbackID.setToBogus(); - return TRUE; + return true; } if (_currentID.length() > 0) { _currentID.remove(0); // completely truncate - return TRUE; + return true; } _currentID.setToBogus(); } - return FALSE; + return false; } UBool diff --git a/icu4c/source/common/servlkf.cpp b/icu4c/source/common/servlkf.cpp index 84f2347cdde..7ccb0c72aa6 100644 --- a/icu4c/source/common/servlkf.cpp +++ b/icu4c/source/common/servlkf.cpp @@ -65,7 +65,7 @@ LocaleKeyFactory::handlesKey(const ICUServiceKey& key, UErrorCode& status) const key.currentID(id); return supported->get(id) != NULL; } - return FALSE; + return false; } void diff --git a/icu4c/source/common/servls.cpp b/icu4c/source/common/servls.cpp index 98f0a8a12b0..19481122efa 100644 --- a/icu4c/source/common/servls.cpp +++ b/icu4c/source/common/servls.cpp @@ -215,11 +215,11 @@ public: UBool upToDate(UErrorCode& status) const { if (U_SUCCESS(status)) { if (_timestamp == _service->getTimestamp()) { - return TRUE; + return true; } status = U_ENUM_OUT_OF_SYNC_ERROR; } - return FALSE; + return false; } virtual int32_t count(UErrorCode& status) const override { diff --git a/icu4c/source/common/simpleformatter.cpp b/icu4c/source/common/simpleformatter.cpp index f7f7aead617..01d3024cfc3 100644 --- a/icu4c/source/common/simpleformatter.cpp +++ b/icu4c/source/common/simpleformatter.cpp @@ -65,7 +65,7 @@ UBool SimpleFormatter::applyPatternMinMaxArguments( int32_t min, int32_t max, UErrorCode &errorCode) { if (U_FAILURE(errorCode)) { - return FALSE; + return false; } // Parse consistent with MessagePattern, but // - support only simple numbered arguments @@ -76,7 +76,7 @@ UBool SimpleFormatter::applyPatternMinMaxArguments( compiledPattern.setTo((UChar)0); int32_t textLength = 0; int32_t maxArg = -1; - UBool inQuote = FALSE; + UBool inQuote = false; for (int32_t i = 0; i < patternLength;) { UChar c = patternBuffer[i++]; if (c == APOS) { @@ -85,12 +85,12 @@ UBool SimpleFormatter::applyPatternMinMaxArguments( ++i; } else if (inQuote) { // skip the quote-ending apostrophe - inQuote = FALSE; + inQuote = false; continue; } else if (c == OPEN_BRACE || c == CLOSE_BRACE) { // Skip the quote-starting apostrophe, find the end of the quoted literal text. ++i; - inQuote = TRUE; + inQuote = true; } else { // The apostrophe is part of literal text. c = APOS; @@ -123,7 +123,7 @@ UBool SimpleFormatter::applyPatternMinMaxArguments( } if (argNumber < 0 || c != CLOSE_BRACE) { errorCode = U_ILLEGAL_ARGUMENT_ERROR; - return FALSE; + return false; } } if (argNumber > maxArg) { @@ -149,10 +149,10 @@ UBool SimpleFormatter::applyPatternMinMaxArguments( int32_t argCount = maxArg + 1; if (argCount < min || max < argCount) { errorCode = U_ILLEGAL_ARGUMENT_ERROR; - return FALSE; + return false; } compiledPattern.setCharAt(0, (UChar)argCount); - return TRUE; + return true; } UnicodeString& SimpleFormatter::format( @@ -192,7 +192,7 @@ UnicodeString& SimpleFormatter::formatAndAppend( return appendTo; } return format(compiledPattern.getBuffer(), compiledPattern.length(), values, - appendTo, NULL, TRUE, + appendTo, NULL, true, offsets, offsetsLength, errorCode); } @@ -241,7 +241,7 @@ UnicodeString &SimpleFormatter::formatAndReplace( result.remove(); } return format(cp, cpLength, values, - result, &resultCopy, FALSE, + result, &resultCopy, false, offsets, offsetsLength, errorCode); } diff --git a/icu4c/source/common/static_unicode_sets.cpp b/icu4c/source/common/static_unicode_sets.cpp index f0f222cd378..db9432f49a8 100644 --- a/icu4c/source/common/static_unicode_sets.cpp +++ b/icu4c/source/common/static_unicode_sets.cpp @@ -31,7 +31,7 @@ alignas(UnicodeSet) char gEmptyUnicodeSet[sizeof(UnicodeSet)]; // Whether the gEmptyUnicodeSet is initialized and ready to use. -UBool gEmptyUnicodeSetInitialized = FALSE; +UBool gEmptyUnicodeSetInitialized = false; inline UnicodeSet* getImpl(Key key) { UnicodeSet* candidate = gUnicodeSets[key]; @@ -118,7 +118,7 @@ class ParseDataSink : public ResourceSink { } else { // Unknown class of parse lenients // TODO(ICU-20428): Make ICU automatically accept new classes? - U_ASSERT(FALSE); + U_ASSERT(false); } if (U_FAILURE(status)) { return; } } @@ -134,14 +134,14 @@ icu::UInitOnce gNumberParseUniSetsInitOnce {}; UBool U_CALLCONV cleanupNumberParseUniSets() { if (gEmptyUnicodeSetInitialized) { reinterpret_cast(gEmptyUnicodeSet)->~UnicodeSet(); - gEmptyUnicodeSetInitialized = FALSE; + gEmptyUnicodeSetInitialized = false; } for (int32_t i = 0; i < UNISETS_KEY_COUNT; i++) { delete gUnicodeSets[i]; gUnicodeSets[i] = nullptr; } gNumberParseUniSetsInitOnce.reset(); - return TRUE; + return true; } void U_CALLCONV initNumberParseUniSets(UErrorCode& status) { @@ -150,7 +150,7 @@ void U_CALLCONV initNumberParseUniSets(UErrorCode& status) { // Initialize the empty instance for well-defined fallback behavior new(gEmptyUnicodeSet) UnicodeSet(); reinterpret_cast(gEmptyUnicodeSet)->freeze(); - gEmptyUnicodeSetInitialized = TRUE; + gEmptyUnicodeSetInitialized = true; // These sets were decided after discussion with icu-design@. See tickets #13084 and #13309. // Zs+TAB is "horizontal whitespace" according to UTS #18 (blank property). diff --git a/icu4c/source/common/stringtriebuilder.cpp b/icu4c/source/common/stringtriebuilder.cpp index 4d52a88af74..e6670d1cb71 100644 --- a/icu4c/source/common/stringtriebuilder.cpp +++ b/icu4c/source/common/stringtriebuilder.cpp @@ -85,16 +85,16 @@ StringTrieBuilder::build(UStringTrieBuildOption buildOption, int32_t elementsLen // have a common prefix of length unitIndex. int32_t StringTrieBuilder::writeNode(int32_t start, int32_t limit, int32_t unitIndex) { - UBool hasValue=FALSE; + UBool hasValue=false; int32_t value=0; int32_t type; if(unitIndex==getElementStringLength(start)) { // An intermediate or final value. value=getElementValue(start++); if(start==limit) { - return writeValueAndFinal(value, TRUE); // final-value node + return writeValueAndFinal(value, true); // final-value node } - hasValue=TRUE; + hasValue=true; } // Now all [start..limit[ strings are longer than unitIndex. int32_t minUnit=getElementUnit(start, unitIndex); @@ -209,7 +209,7 @@ StringTrieBuilder::makeNode(int32_t start, int32_t limit, int32_t unitIndex, UEr if(U_FAILURE(errorCode)) { return NULL; } - UBool hasValue=FALSE; + UBool hasValue=false; int32_t value=0; if(unitIndex==getElementStringLength(start)) { // An intermediate or final value. @@ -217,7 +217,7 @@ StringTrieBuilder::makeNode(int32_t start, int32_t limit, int32_t unitIndex, UEr if(start==limit) { return registerFinalValue(value, errorCode); } - hasValue=TRUE; + hasValue=true; } Node *node; // Now all [start..limit[ strings are longer than unitIndex. @@ -410,7 +410,7 @@ StringTrieBuilder::FinalValueNode::operator==(const Node &other) const { void StringTrieBuilder::FinalValueNode::write(StringTrieBuilder &builder) { - offset=builder.writeValueAndFinal(value, TRUE); + offset=builder.writeValueAndFinal(value, true); } bool @@ -448,7 +448,7 @@ StringTrieBuilder::IntermediateValueNode::markRightEdgesFirst(int32_t edgeNumber void StringTrieBuilder::IntermediateValueNode::write(StringTrieBuilder &builder) { next->write(builder); - offset=builder.writeValueAndFinal(value, FALSE); + offset=builder.writeValueAndFinal(value, false); } bool @@ -526,7 +526,7 @@ StringTrieBuilder::ListBranchNode::write(StringTrieBuilder &builder) { // not jump for it at all. unitNumber=length-1; if(rightEdge==NULL) { - builder.writeValueAndFinal(values[unitNumber], TRUE); + builder.writeValueAndFinal(values[unitNumber], true); } else { rightEdge->write(builder); } @@ -538,12 +538,12 @@ StringTrieBuilder::ListBranchNode::write(StringTrieBuilder &builder) { if(equal[unitNumber]==NULL) { // Write the final value for the one string ending with this unit. value=values[unitNumber]; - isFinal=TRUE; + isFinal=true; } else { // Write the delta to the start position of the sub-node. U_ASSERT(equal[unitNumber]->getOffset()>0); value=offset-equal[unitNumber]->getOffset(); - isFinal=FALSE; + isFinal=false; } builder.writeValueAndFinal(value, isFinal); offset=builder.write(units[unitNumber]); diff --git a/icu4c/source/common/uarrsort.cpp b/icu4c/source/common/uarrsort.cpp index c17dbb2e2b1..17b6964ffe0 100644 --- a/icu4c/source/common/uarrsort.cpp +++ b/icu4c/source/common/uarrsort.cpp @@ -75,7 +75,7 @@ U_CAPI int32_t U_EXPORT2 uprv_stableBinarySearch(char *array, int32_t limit, void *item, int32_t itemSize, UComparator *cmp, const void *context) { int32_t start=0; - UBool found=FALSE; + UBool found=false; /* Binary search until we get down to a tiny sub-array. */ while((limit-start)>=MIN_QSORT) { @@ -90,10 +90,10 @@ uprv_stableBinarySearch(char *array, int32_t limit, void *item, int32_t itemSize * However, if there are many equal items, then it should be * faster to continue with the binary search. * It seems likely that we either have all unique items - * (where found will never become TRUE in the insertion sort) + * (where found will never become true in the insertion sort) * or potentially many duplicates. */ - found=TRUE; + found=true; start=i+1; } else if(diff<0) { limit=i; @@ -106,7 +106,7 @@ uprv_stableBinarySearch(char *array, int32_t limit, void *item, int32_t itemSize while(startmayAllocateText=TRUE; + pBiDi->mayAllocateText=true; } if(maxRunCount>0) { @@ -171,7 +171,7 @@ ubidi_openSized(int32_t maxLength, int32_t maxRunCount, UErrorCode *pErrorCode) *pErrorCode=U_MEMORY_ALLOCATION_ERROR; } } else { - pBiDi->mayAllocateRuns=TRUE; + pBiDi->mayAllocateRuns=true; } if(U_SUCCESS(*pErrorCode)) { @@ -184,7 +184,7 @@ ubidi_openSized(int32_t maxLength, int32_t maxRunCount, UErrorCode *pErrorCode) /* * We are allowed to allocate memory if memory==NULL or - * mayAllocate==TRUE for each array that we need. + * mayAllocate==true for each array that we need. * We also try to grow memory as needed if we * allocate it. * @@ -203,18 +203,18 @@ ubidi_getMemory(BidiMemoryForAllocation *bidiMem, int32_t *pSize, UBool mayAlloc /* we need to allocate memory */ if(mayAllocate && (*pMemory=uprv_malloc(sizeNeeded))!=NULL) { *pSize=sizeNeeded; - return TRUE; + return true; } else { - return FALSE; + return false; } } else { if(sizeNeeded<=*pSize) { /* there is already enough memory */ - return TRUE; + return true; } else if(!mayAllocate) { /* not enough memory, and we must not allocate */ - return FALSE; + return false; } else { /* we try to grow */ void *memory; @@ -225,10 +225,10 @@ ubidi_getMemory(BidiMemoryForAllocation *bidiMem, int32_t *pSize, UBool mayAlloc if((memory=uprv_realloc(*pMemory, sizeNeeded))!=NULL) { *pMemory=memory; *pSize=sizeNeeded; - return TRUE; + return true; } else { /* we failed to grow */ - return FALSE; + return false; } } } @@ -280,7 +280,7 @@ ubidi_isInverse(UBiDi *pBiDi) { if(pBiDi!=NULL) { return pBiDi->isInverse; } else { - return FALSE; + return false; } } @@ -403,17 +403,17 @@ checkParaCount(UBiDi *pBiDi) { int32_t count=pBiDi->paraCount; if(pBiDi->paras==pBiDi->simpleParas) { if(count<=SIMPLE_PARAS_COUNT) - return TRUE; + return true; if(!getInitialParasMemory(pBiDi, SIMPLE_PARAS_COUNT * 2)) - return FALSE; + return false; pBiDi->paras=pBiDi->parasMemory; uprv_memcpy(pBiDi->parasMemory, pBiDi->simpleParas, SIMPLE_PARAS_COUNT * sizeof(Para)); - return TRUE; + return true; } if(!getInitialParasMemory(pBiDi, count * 2)) - return FALSE; + return false; pBiDi->paras=pBiDi->parasMemory; - return TRUE; + return true; } /* @@ -579,8 +579,8 @@ getDirProps(UBiDi *pBiDi) { } if(iparaCount++; - if(checkParaCount(pBiDi)==FALSE) /* not enough memory for a new para entry */ - return FALSE; + if(checkParaCount(pBiDi)==false) /* not enough memory for a new para entry */ + return false; if(isDefaultLevel) { pBiDi->paras[pBiDi->paraCount-1].level=defaultParaLevel; state=SEEKING_STRONG_FOR_PARA; @@ -636,7 +636,7 @@ getDirProps(UBiDi *pBiDi) { } pBiDi->flags=flags; pBiDi->lastArabicPos=lastArabicPos; - return TRUE; + return true; } /* determine the paragraph level at position index */ @@ -743,14 +743,14 @@ bracketProcessPDI(BracketData *bd) { } /* newly found opening bracket: create an openings entry */ -static UBool /* return TRUE if success */ +static UBool /* return true if success */ bracketAddOpening(BracketData *bd, UChar match, int32_t position) { IsoRun *pLastIsoRun=&bd->isoRuns[bd->isoRunLast]; Opening *pOpening; if(pLastIsoRun->limit>=bd->openingsCount) { /* no available new entry */ UBiDi *pBiDi=bd->pBiDi; if(!getInitialOpeningsMemory(pBiDi, pLastIsoRun->limit * 2)) - return FALSE; + return false; if(bd->openings==bd->simpleOpenings) uprv_memcpy(pBiDi->openingsMemory, bd->simpleOpenings, SIMPLE_OPENINGS_COUNT * sizeof(Opening)); @@ -764,7 +764,7 @@ bracketAddOpening(BracketData *bd, UChar match, int32_t position) { pOpening->contextPos=pLastIsoRun->contextPos; pOpening->flags=0; pLastIsoRun->limit++; - return TRUE; + return true; } /* change N0c1 to N0c2 when a preceding bracket is assigned the embedding level */ @@ -804,7 +804,7 @@ bracketProcessClosing(BracketData *bd, int32_t openIdx, int32_t position) { DirProp newProp; pOpening=&bd->openings[openIdx]; direction=(UBiDiDirection)(pLastIsoRun->level&1); - stable=TRUE; /* assume stable until proved otherwise */ + stable=true; /* assume stable until proved otherwise */ /* The stable flag is set when brackets are paired and their level is resolved and cannot be changed by what will be @@ -873,7 +873,7 @@ bracketProcessClosing(BracketData *bd, int32_t openIdx, int32_t position) { } /* handle strong characters, digits and candidates for closing brackets */ -static UBool /* return TRUE if success */ +static UBool /* return true if success */ bracketProcessChar(BracketData *bd, int32_t position) { IsoRun *pLastIsoRun=&bd->isoRuns[bd->isoRunLast]; DirProp *dirProps, dirProp, newProp; @@ -912,7 +912,7 @@ bracketProcessChar(BracketData *bd, int32_t position) { } /* matching brackets are not overridden by LRO/RLO */ bd->pBiDi->levels[bd->openings[idx].position]&=~UBIDI_LEVEL_OVERRIDE; - return TRUE; + return true; } /* We get here only if the ON character is not a matching closing bracket or it is a case of N0d */ @@ -927,14 +927,14 @@ bracketProcessChar(BracketData *bd, int32_t position) { create an opening entry for each synonym */ if(match==0x232A) { /* RIGHT-POINTING ANGLE BRACKET */ if(!bracketAddOpening(bd, 0x3009, position)) - return FALSE; + return false; } else if(match==0x3009) { /* RIGHT ANGLE BRACKET */ if(!bracketAddOpening(bd, 0x232A, position)) - return FALSE; + return false; } if(!bracketAddOpening(bd, match, position)) - return FALSE; + return false; } } level=bd->pBiDi->levels[position]; @@ -998,7 +998,7 @@ bracketProcessChar(BracketData *bd, int32_t position) { if(position>bd->openings[i].position) bd->openings[i].flags|=flag; } - return TRUE; + return true; } /* perform (X1)..(X9) ------------------------------------------------------- */ @@ -2432,11 +2432,11 @@ setParaRunsOnly(UBiDi *pBiDi, const UChar *text, int32_t length, * than the original text. But we don't want the levels memory to be * reallocated shorter than the original length, since we need to restore * the levels as after the first call to ubidi_setpara() before returning. - * We will force mayAllocateText to FALSE before the second call to + * We will force mayAllocateText to false before the second call to * ubidi_setpara(), and will restore it afterwards. */ saveMayAllocateText=pBiDi->mayAllocateText; - pBiDi->mayAllocateText=FALSE; + pBiDi->mayAllocateText=false; ubidi_setPara(pBiDi, visualText, visualLength, paraLevel, NULL, pErrorCode); pBiDi->mayAllocateText=saveMayAllocateText; ubidi_getRuns(pBiDi, pErrorCode); @@ -2866,7 +2866,7 @@ ubidi_isOrderParagraphsLTR(UBiDi *pBiDi) { if(pBiDi!=NULL) { return pBiDi->orderParagraphsLTR; } else { - return FALSE; + return false; } } diff --git a/icu4c/source/common/ubidi_props.cpp b/icu4c/source/common/ubidi_props.cpp index afcc4aaf4f9..3ba58f7af99 100644 --- a/icu4c/source/common/ubidi_props.cpp +++ b/icu4c/source/common/ubidi_props.cpp @@ -53,7 +53,7 @@ _enumPropertyStartsRange(const void *context, UChar32 start, UChar32 end, uint32 /* add the start code point to the USet */ const USetAdder *sa=(const USetAdder *)context; sa->add(sa->set, start); - return TRUE; + return true; } U_CFUNC void diff --git a/icu4c/source/common/ubidi_props_data.h b/icu4c/source/common/ubidi_props_data.h index b501ed4f7b0..01fcc968cb8 100644 --- a/icu4c/source/common/ubidi_props_data.h +++ b/icu4c/source/common/ubidi_props_data.h @@ -942,7 +942,7 @@ static const UBiDiProps ubidi_props_singleton={ 0x0, 0x110000, 0x32dc, - NULL, 0, FALSE, FALSE, 0, NULL + NULL, 0, false, false, 0, NULL }, { 2,2,0,0 } }; diff --git a/icu4c/source/common/ubidiln.cpp b/icu4c/source/common/ubidiln.cpp index fea239380a3..430ece39d28 100644 --- a/icu4c/source/common/ubidiln.cpp +++ b/icu4c/source/common/ubidiln.cpp @@ -101,7 +101,7 @@ setTrailingWSStart(UBiDi *pBiDi) { are already set to paragraph level. Setting trailingWSStart to pBidi->length will avoid changing the level of B chars from 0 to paraLevel in ubidi_getLevels when - orderParagraphsLTR==TRUE. + orderParagraphsLTR==true. */ if(dirProps[start-1]==B) { pBiDi->trailingWSStart=start; /* currently == pBiDi->length */ @@ -535,7 +535,7 @@ static int32_t getRunFromLogicalIndex(UBiDi *pBiDi, int32_t logicalIndex) { /* * Compute the runs array from the levels array. - * After ubidi_getRuns() returns TRUE, runCount is guaranteed to be >0 + * After ubidi_getRuns() returns true, runCount is guaranteed to be >0 * and the runs are reordered. * Odd-level runs have visualStart on their visual right edge and * they progress visually to the left. @@ -551,7 +551,7 @@ ubidi_getRuns(UBiDi *pBiDi, UErrorCode*) { * includes the case of length==0 (handled in setPara).. */ if (pBiDi->runCount>=0) { - return TRUE; + return true; } if(pBiDi->direction!=UBIDI_MIXED) { @@ -608,7 +608,7 @@ ubidi_getRuns(UBiDi *pBiDi, UErrorCode*) { if(getRunsMemory(pBiDi, runCount)) { runs=pBiDi->runsMemory; } else { - return FALSE; + return false; } /* set the runs */ @@ -703,7 +703,7 @@ ubidi_getRuns(UBiDi *pBiDi, UErrorCode*) { } } - return TRUE; + return true; } static UBool @@ -714,7 +714,7 @@ prepareReorder(const UBiDiLevel *levels, int32_t length, UBiDiLevel level, minLevel, maxLevel; if(levels==NULL || length<=0) { - return FALSE; + return false; } /* determine minLevel and maxLevel */ @@ -723,7 +723,7 @@ prepareReorder(const UBiDiLevel *levels, int32_t length, for(start=length; start>0;) { level=levels[--start]; if(level>UBIDI_MAX_EXPLICIT_LEVEL+1) { - return FALSE; + return false; } if(levelpBidi, pTransform->src, pTransform->srcLength, pTransform->pActiveScheme->baseLevel, NULL, pErrorCode); - return FALSE; + return false; } /** @@ -150,7 +150,7 @@ action_reorder(UBiDiTransform *pTransform, UErrorCode *pErrorCode) *pTransform->pDestLength = pTransform->srcLength; pTransform->reorderingOptions = UBIDI_REORDER_DEFAULT; - return TRUE; + return true; } /** @@ -166,9 +166,9 @@ static UBool action_setInverse(UBiDiTransform *pTransform, UErrorCode *pErrorCode) { (void)pErrorCode; - ubidi_setInverse(pTransform->pBidi, TRUE); + ubidi_setInverse(pTransform->pBidi, true); ubidi_setReorderingMode(pTransform->pBidi, UBIDI_REORDER_INVERSE_LIKE_DIRECT); - return FALSE; + return false; } /** @@ -186,7 +186,7 @@ action_setRunsOnly(UBiDiTransform *pTransform, UErrorCode *pErrorCode) { (void)pErrorCode; ubidi_setReorderingMode(pTransform->pBidi, UBIDI_REORDER_RUNS_ONLY); - return FALSE; + return false; } /** @@ -205,7 +205,7 @@ action_reverse(UBiDiTransform *pTransform, UErrorCode *pErrorCode) pTransform->dest, pTransform->destSize, UBIDI_REORDER_DEFAULT, pErrorCode); *pTransform->pDestLength = pTransform->srcLength; - return TRUE; + return true; } /** @@ -274,7 +274,7 @@ static UBool action_shapeArabic(UBiDiTransform *pTransform, UErrorCode *pErrorCode) { if ((pTransform->letters | pTransform->digits) == 0) { - return FALSE; + return false; } if (pTransform->pActiveScheme->lettersDir == pTransform->pActiveScheme->digitsDir) { doShape(pTransform, pTransform->letters | pTransform->digits | pTransform->pActiveScheme->lettersDir, @@ -288,7 +288,7 @@ action_shapeArabic(UBiDiTransform *pTransform, UErrorCode *pErrorCode) pErrorCode); } } - return TRUE; + return true; } /** @@ -306,11 +306,11 @@ action_mirror(UBiDiTransform *pTransform, UErrorCode *pErrorCode) UChar32 c; uint32_t i = 0, j = 0; if (0 == (pTransform->reorderingOptions & UBIDI_DO_MIRRORING)) { - return FALSE; + return false; } if (pTransform->destSize < pTransform->srcLength) { *pErrorCode = U_BUFFER_OVERFLOW_ERROR; - return FALSE; + return false; } do { UBool isOdd = ubidi_getLevelAt(pTransform->pBidi, i) & 1; @@ -320,7 +320,7 @@ action_mirror(UBiDiTransform *pTransform, UErrorCode *pErrorCode) *pTransform->pDestLength = pTransform->srcLength; pTransform->reorderingOptions = UBIDI_REORDER_DEFAULT; - return TRUE; + return true; } /** @@ -444,7 +444,7 @@ ubiditransform_transform(UBiDiTransform *pBiDiTransform, UErrorCode *pErrorCode) { uint32_t destLength = 0; - UBool textChanged = FALSE; + UBool textChanged = false; const UBiDiTransform *pOrigTransform = pBiDiTransform; const UBiDiAction *action = NULL; @@ -503,10 +503,10 @@ ubiditransform_transform(UBiDiTransform *pBiDiTransform, updateSrc(pBiDiTransform, pBiDiTransform->dest, *pBiDiTransform->pDestLength, *pBiDiTransform->pDestLength, pErrorCode); } - textChanged = TRUE; + textChanged = true; } } - ubidi_setInverse(pBiDiTransform->pBidi, FALSE); + ubidi_setInverse(pBiDiTransform->pBidi, false); if (!textChanged && U_SUCCESS(*pErrorCode)) { /* Text was not changed - just copy src to dest */ diff --git a/icu4c/source/common/ucase.cpp b/icu4c/source/common/ucase.cpp index 388c86b1bba..3d1750265b1 100644 --- a/icu4c/source/common/ucase.cpp +++ b/icu4c/source/common/ucase.cpp @@ -40,7 +40,7 @@ _enumPropertyStartsRange(const void *context, UChar32 start, UChar32 /*end*/, ui /* add the start code point to the USet */ const USetAdder *sa=(const USetAdder *)context; sa->add(sa->set, start); - return TRUE; + return true; } U_CFUNC void U_EXPORT2 @@ -354,7 +354,7 @@ ucase_addStringCaseClosure(const UChar *s, int32_t length, const USetAdder *sa) int32_t i, start, limit, result, unfoldRows, unfoldRowWidth, unfoldStringWidth; if(ucase_props_singleton.unfold==NULL || s==NULL) { - return FALSE; /* no reverse case folding data, or no string */ + return false; /* no reverse case folding data, or no string */ } if(length<=1) { /* the string is too short to find any match */ @@ -364,7 +364,7 @@ ucase_addStringCaseClosure(const UChar *s, int32_t length, const USetAdder *sa) * but this does not make much practical difference because * a single supplementary code point would just not be found */ - return FALSE; + return false; } const uint16_t *unfold=ucase_props_singleton.unfold; @@ -375,7 +375,7 @@ ucase_addStringCaseClosure(const UChar *s, int32_t length, const USetAdder *sa) if(length>unfoldStringWidth) { /* the string is too long to find any match */ - return FALSE; + return false; } /* do a binary search for the string */ @@ -395,7 +395,7 @@ ucase_addStringCaseClosure(const UChar *s, int32_t length, const USetAdder *sa) sa->add(sa->set, c); ucase_addCaseClosure(c, sa); } - return TRUE; + return true; } else if(result<0) { limit=i; } else /* result>0 */ { @@ -403,7 +403,7 @@ ucase_addStringCaseClosure(const UChar *s, int32_t length, const USetAdder *sa) } } - return FALSE; /* string not found */ + return false; /* string not found */ } U_NAMESPACE_BEGIN @@ -431,7 +431,7 @@ FullCaseFoldingIterator::next(UnicodeString &full) { // Set "full" to the NUL-terminated string in the first unfold column. int32_t length=unfoldStringWidth; while(length>0 && p[length-1]==0) { --length; } - full.setTo(FALSE, p, length); + full.setTo(false, p, length); // Return the code point. UChar32 c; U16_NEXT_UNSAFE(p, rowCpIndex, c); @@ -905,7 +905,7 @@ isFollowedByCasedLetter(UCaseContextIterator *iter, void *context, int8_t dir) { UChar32 c; if(iter==NULL) { - return FALSE; + return false; } for(/* dir!=0 sets direction */; (c=iter(context, dir))>=0; dir=0) { @@ -913,13 +913,13 @@ isFollowedByCasedLetter(UCaseContextIterator *iter, void *context, int8_t dir) { if(type&4) { /* case-ignorable, continue with the loop */ } else if(type!=UCASE_NONE) { - return TRUE; /* followed by cased letter */ + return true; /* followed by cased letter */ } else { - return FALSE; /* uncased and not case-ignorable */ + return false; /* uncased and not case-ignorable */ } } - return FALSE; /* not followed by cased letter */ + return false; /* not followed by cased letter */ } /* Is preceded by Soft_Dotted character with no intervening cc=230 ? */ @@ -930,19 +930,19 @@ isPrecededBySoftDotted(UCaseContextIterator *iter, void *context) { int8_t dir; if(iter==NULL) { - return FALSE; + return false; } for(dir=-1; (c=iter(context, dir))>=0; dir=0) { dotType=getDotType(c); if(dotType==UCASE_SOFT_DOTTED) { - return TRUE; /* preceded by TYPE_i */ + return true; /* preceded by TYPE_i */ } else if(dotType!=UCASE_OTHER_ACCENT) { - return FALSE; /* preceded by different base character (not TYPE_i), or intervening cc==230 */ + return false; /* preceded by different base character (not TYPE_i), or intervening cc==230 */ } } - return FALSE; /* not preceded by TYPE_i */ + return false; /* not preceded by TYPE_i */ } /* @@ -987,20 +987,20 @@ isPrecededBy_I(UCaseContextIterator *iter, void *context) { int8_t dir; if(iter==NULL) { - return FALSE; + return false; } for(dir=-1; (c=iter(context, dir))>=0; dir=0) { if(c==0x49) { - return TRUE; /* preceded by I */ + return true; /* preceded by I */ } dotType=getDotType(c); if(dotType!=UCASE_OTHER_ACCENT) { - return FALSE; /* preceded by different base character (not I), or intervening cc==230 */ + return false; /* preceded by different base character (not I), or intervening cc==230 */ } } - return FALSE; /* not preceded by I */ + return false; /* not preceded by I */ } /* Is followed by one or more cc==230 ? */ @@ -1011,19 +1011,19 @@ isFollowedByMoreAbove(UCaseContextIterator *iter, void *context) { int8_t dir; if(iter==NULL) { - return FALSE; + return false; } for(dir=1; (c=iter(context, dir))>=0; dir=0) { dotType=getDotType(c); if(dotType==UCASE_ABOVE) { - return TRUE; /* at least one cc==230 following */ + return true; /* at least one cc==230 following */ } else if(dotType!=UCASE_OTHER_ACCENT) { - return FALSE; /* next base character, no more cc==230 following */ + return false; /* next base character, no more cc==230 following */ } } - return FALSE; /* no more cc==230 following */ + return false; /* no more cc==230 following */ } /* Is followed by a dot above (without cc==230 in between) ? */ @@ -1034,20 +1034,20 @@ isFollowedByDotAbove(UCaseContextIterator *iter, void *context) { int8_t dir; if(iter==NULL) { - return FALSE; + return false; } for(dir=1; (c=iter(context, dir))>=0; dir=0) { if(c==0x307) { - return TRUE; + return true; } dotType=getDotType(c); if(dotType!=UCASE_OTHER_ACCENT) { - return FALSE; /* next base character or cc==230 in between */ + return false; /* next base character or cc==230 in between */ } } - return FALSE; /* no dot above following */ + return false; /* no dot above following */ } U_CAPI int32_t U_EXPORT2 @@ -1317,7 +1317,7 @@ ucase_toFullUpper(UChar32 c, UCaseContextIterator *iter, void *context, const UChar **pString, int32_t caseLocale) { - return toUpperOrTitle(c, iter, context, pString, caseLocale, TRUE); + return toUpperOrTitle(c, iter, context, pString, caseLocale, true); } U_CAPI int32_t U_EXPORT2 @@ -1325,7 +1325,7 @@ ucase_toFullTitle(UChar32 c, UCaseContextIterator *iter, void *context, const UChar **pString, int32_t caseLocale) { - return toUpperOrTitle(c, iter, context, pString, caseLocale, FALSE); + return toUpperOrTitle(c, iter, context, pString, caseLocale, false); } /* case folding ------------------------------------------------------------- */ @@ -1601,6 +1601,6 @@ ucase_hasBinaryProperty(UChar32 c, UProperty which) { ucase_toFullUpper(c, NULL, NULL, &resultString, UCASE_LOC_ROOT)>=0 || ucase_toFullTitle(c, NULL, NULL, &resultString, UCASE_LOC_ROOT)>=0); default: - return FALSE; + return false; } } diff --git a/icu4c/source/common/ucase_props_data.h b/icu4c/source/common/ucase_props_data.h index 1bd5773f24b..b7797d14d73 100644 --- a/icu4c/source/common/ucase_props_data.h +++ b/icu4c/source/common/ucase_props_data.h @@ -990,7 +990,7 @@ static const UCaseProps ucase_props_singleton={ 0x0, 0xe0800, 0x3358, - NULL, 0, FALSE, FALSE, 0, NULL + NULL, 0, false, false, 0, NULL }, { 4,0,0,0 } }; diff --git a/icu4c/source/common/ucasemap.cpp b/icu4c/source/common/ucasemap.cpp index 95b55d56a02..fc0439db0f6 100644 --- a/icu4c/source/common/ucasemap.cpp +++ b/icu4c/source/common/ucasemap.cpp @@ -157,7 +157,7 @@ appendResult(int32_t cpLength, int32_t result, const UChar *s, ByteSinkUtil::appendCodePoint(cpLength, result, sink, edits); } } - return TRUE; + return true; } // See unicode/utf8.h U8_APPEND_UNSAFE(). @@ -525,14 +525,14 @@ ucasemap_internalUTF8ToTitle( csc.p=(void *)src; csc.limit=srcLength; int32_t prev=0; - UBool isFirstIndex=TRUE; + UBool isFirstIndex=true; /* titlecasing loop */ while(prevfirst(); } else { index=iter->next(); @@ -643,12 +643,12 @@ UBool isFollowedByCasedLetter(const uint8_t *s, int32_t i, int32_t length) { if ((type & UCASE_IGNORABLE) != 0) { // Case-ignorable, continue with the loop. } else if (type != UCASE_NONE) { - return TRUE; // Followed by cased letter. + return true; // Followed by cased letter. } else { - return FALSE; // Uncased and not case-ignorable. + return false; // Uncased and not case-ignorable. } } - return FALSE; // Not followed by cased letter. + return false; // Not followed by cased letter. } // Keep this consistent with the UTF-16 version in ustrcase.cpp and the Java version in CaseMap.java. @@ -707,7 +707,7 @@ void toUpper(uint32_t options, nextState |= AFTER_VOWEL_WITH_ACCENT; } // Map according to Greek rules. - UBool addTonos = FALSE; + UBool addTonos = false; if (upper == 0x397 && (data & HAS_ACCENT) != 0 && numYpogegrammeni == 0 && @@ -718,7 +718,7 @@ void toUpper(uint32_t options, if (i == nextIndex) { upper = 0x389; // Preserve the precomposed form. } else { - addTonos = TRUE; + addTonos = true; } } else if ((data & HAS_DIALYTIKA) != 0) { // Preserve a vowel with dialytika in precomposed form if it exists. @@ -733,7 +733,7 @@ void toUpper(uint32_t options, UBool change; if (edits == nullptr && (options & U_OMIT_UNCHANGED_TEXT) == 0) { - change = TRUE; // common, simple usage + change = true; // common, simple usage } else { // Find out first whether we are changing the text. U_ASSERT(0x370 <= upper && upper <= 0x3ff); // 2-byte UTF-8, main Greek block diff --git a/icu4c/source/common/uchar.cpp b/icu4c/source/common/uchar.cpp index 61e9c3d900d..7789a3b88a6 100644 --- a/icu4c/source/common/uchar.cpp +++ b/icu4c/source/common/uchar.cpp @@ -126,7 +126,7 @@ u_isxdigit(UChar32 c) { (c<=0x66 && c>=0x41 && (c<=0x46 || c>=0x61)) || (c>=0xff21 && c<=0xff46 && (c<=0xff26 || c>=0xff41)) ) { - return TRUE; + return true; } GET_PROPS(c, props); @@ -249,7 +249,7 @@ U_CAPI UBool U_EXPORT2 u_isprint(UChar32 c) { uint32_t props; GET_PROPS(c, props); - /* comparing ==0 returns FALSE for the categories mentioned */ + /* comparing ==0 returns false for the categories mentioned */ return (UBool)((CAT_MASK(props)&U_GC_C_MASK)==0); } @@ -273,7 +273,7 @@ U_CAPI UBool U_EXPORT2 u_isgraph(UChar32 c) { uint32_t props; GET_PROPS(c, props); - /* comparing ==0 returns FALSE for the categories mentioned */ + /* comparing ==0 returns false for the categories mentioned */ return (UBool)((CAT_MASK(props)& (U_GC_CC_MASK|U_GC_CF_MASK|U_GC_CS_MASK|U_GC_CN_MASK|U_GC_Z_MASK)) ==0); @@ -291,7 +291,7 @@ u_isgraphPOSIX(UChar32 c) { uint32_t props; GET_PROPS(c, props); /* \p{space}\p{gc=Control} == \p{gc=Z}\p{Control} */ - /* comparing ==0 returns FALSE for the categories mentioned */ + /* comparing ==0 returns false for the categories mentioned */ return (UBool)((CAT_MASK(props)& (U_GC_CC_MASK|U_GC_CS_MASK|U_GC_CN_MASK|U_GC_Z_MASK)) ==0); @@ -591,7 +591,7 @@ uscript_hasScript(UChar32 c, UScriptCode sc) { uint32_t sc32=sc; if(sc32>0x7fff) { /* Guard against bogus input that would make us go past the Script_Extensions terminator. */ - return FALSE; + return false; } while(sc32>*scx) { ++scx; @@ -654,7 +654,7 @@ _enumPropertyStartsRange(const void *context, UChar32 start, UChar32 end, uint32 sa->add(sa->set, start); (void)end; (void)value; - return TRUE; + return true; } #define USET_ADD_CP_AND_NEXT(sa, cp) sa->add(sa->set, cp); sa->add(sa->set, cp+1) diff --git a/icu4c/source/common/uchar_props_data.h b/icu4c/source/common/uchar_props_data.h index aab8ae5a7bb..acbeadd249b 100644 --- a/icu4c/source/common/uchar_props_data.h +++ b/icu4c/source/common/uchar_props_data.h @@ -1465,7 +1465,7 @@ static const UTrie2 propsTrie={ 0x0, 0x110000, 0x59e4, - NULL, 0, FALSE, FALSE, 0, NULL + NULL, 0, false, false, 0, NULL }; static const uint16_t propsVectorsTrie_index[32692]={ @@ -3527,7 +3527,7 @@ static const UTrie2 propsVectorsTrie={ 0x0, 0x110000, 0x7fb0, - NULL, 0, FALSE, FALSE, 0, NULL + NULL, 0, false, false, 0, NULL }; static const uint32_t propsVectors[7230]={ diff --git a/icu4c/source/common/ucharstrie.cpp b/icu4c/source/common/ucharstrie.cpp index e0b33af5194..24ab4257779 100644 --- a/icu4c/source/common/ucharstrie.cpp +++ b/icu4c/source/common/ucharstrie.cpp @@ -308,13 +308,13 @@ UCharsTrie::findUniqueValueFromBranch(const UChar *pos, int32_t length, } } else { uniqueValue=value; - haveUniqueValue=TRUE; + haveUniqueValue=true; } } else { if(!findUniqueValue(pos+value, haveUniqueValue, uniqueValue)) { return NULL; } - haveUniqueValue=TRUE; + haveUniqueValue=true; } } while(--length>1); return pos+1; // ignore the last comparison unit @@ -330,9 +330,9 @@ UCharsTrie::findUniqueValue(const UChar *pos, UBool haveUniqueValue, int32_t &un } pos=findUniqueValueFromBranch(pos, node+1, haveUniqueValue, uniqueValue); if(pos==NULL) { - return FALSE; + return false; } - haveUniqueValue=TRUE; + haveUniqueValue=true; node=*pos++; } else if(nodeucharsCapacity) { int32_t newCapacity=ucharsCapacity; @@ -335,7 +335,7 @@ UCharsTrieBuilder::ensureCapacity(int32_t length) { uprv_free(uchars); uchars=NULL; ucharsCapacity=0; - return FALSE; + return false; } u_memcpy(newUChars+(newCapacity-ucharsLength), uchars+(ucharsCapacity-ucharsLength), ucharsLength); @@ -343,7 +343,7 @@ UCharsTrieBuilder::ensureCapacity(int32_t length) { uchars=newUChars; ucharsCapacity=newCapacity; } - return TRUE; + return true; } int32_t diff --git a/icu4c/source/common/ucharstrieiterator.cpp b/icu4c/source/common/ucharstrieiterator.cpp index b3132241fe2..2ba43692ddd 100644 --- a/icu4c/source/common/ucharstrieiterator.cpp +++ b/icu4c/source/common/ucharstrieiterator.cpp @@ -26,7 +26,7 @@ UCharsTrie::Iterator::Iterator(ConstChar16Ptr trieUChars, int32_t maxStringLengt : uchars_(trieUChars), pos_(uchars_), initialPos_(uchars_), remainingMatchLength_(-1), initialRemainingMatchLength_(-1), - skipValue_(FALSE), + skipValue_(false), maxLength_(maxStringLength), value_(0), stack_(NULL) { if(U_FAILURE(errorCode)) { return; @@ -48,7 +48,7 @@ UCharsTrie::Iterator::Iterator(const UCharsTrie &trie, int32_t maxStringLength, : uchars_(trie.uchars_), pos_(trie.pos_), initialPos_(trie.pos_), remainingMatchLength_(trie.remainingMatchLength_), initialRemainingMatchLength_(trie.remainingMatchLength_), - skipValue_(FALSE), + skipValue_(false), maxLength_(maxStringLength), value_(0), stack_(NULL) { if(U_FAILURE(errorCode)) { return; @@ -82,7 +82,7 @@ UCharsTrie::Iterator & UCharsTrie::Iterator::reset() { pos_=initialPos_; remainingMatchLength_=initialRemainingMatchLength_; - skipValue_=FALSE; + skipValue_=false; int32_t length=remainingMatchLength_+1; // Remaining match length. if(maxLength_>0 && length>maxLength_) { length=maxLength_; @@ -100,12 +100,12 @@ UCharsTrie::Iterator::hasNext() const { return pos_!=NULL || !stack_->isEmpty(); UBool UCharsTrie::Iterator::next(UErrorCode &errorCode) { if(U_FAILURE(errorCode)) { - return FALSE; + return false; } const UChar *pos=pos_; if(pos==NULL) { if(stack_->isEmpty()) { - return FALSE; + return false; } // Pop the state off the stack and continue with the next outbound edge of // the branch node. @@ -118,7 +118,7 @@ UCharsTrie::Iterator::next(UErrorCode &errorCode) { if(length>1) { pos=branchNext(pos, length, errorCode); if(pos==NULL) { - return TRUE; // Reached a final value. + return true; // Reached a final value. } } else { str_.append(*pos++); @@ -135,7 +135,7 @@ UCharsTrie::Iterator::next(UErrorCode &errorCode) { if(skipValue_) { pos=skipNodeValue(pos, node); node&=kNodeTypeMask; - skipValue_=FALSE; + skipValue_=false; } else { // Deliver value for the string so far. UBool isFinal=(UBool)(node>>15); @@ -152,9 +152,9 @@ UCharsTrie::Iterator::next(UErrorCode &errorCode) { // next time. // Instead, keep pos_ on the node lead unit itself. pos_=pos-1; - skipValue_=TRUE; + skipValue_=true; } - return TRUE; + return true; } } if(maxLength_>0 && str_.length()==maxLength_) { @@ -166,7 +166,7 @@ UCharsTrie::Iterator::next(UErrorCode &errorCode) { } pos=branchNext(pos, node+1, errorCode); if(pos==NULL) { - return TRUE; // Reached a final value. + return true; // Reached a final value. } } else { // Linear-match node, append length units to str_. diff --git a/icu4c/source/common/uchriter.cpp b/icu4c/source/common/uchriter.cpp index 2967375a6a3..f2a99538413 100644 --- a/icu4c/source/common/uchriter.cpp +++ b/icu4c/source/common/uchriter.cpp @@ -171,7 +171,7 @@ UCharCharacterIterator::nextPostInc() { UBool UCharCharacterIterator::hasNext() { - return (UBool)(pos < end ? TRUE : FALSE); + return (UBool)(pos < end ? true : false); } UChar @@ -185,7 +185,7 @@ UCharCharacterIterator::previous() { UBool UCharCharacterIterator::hasPrevious() { - return (UBool)(pos > begin ? TRUE : FALSE); + return (UBool)(pos > begin ? true : false); } UChar32 diff --git a/icu4c/source/common/ucln_cmn.cpp b/icu4c/source/common/ucln_cmn.cpp index f3e07c6b891..ea797d13449 100644 --- a/icu4c/source/common/ucln_cmn.cpp +++ b/icu4c/source/common/ucln_cmn.cpp @@ -120,5 +120,5 @@ U_CFUNC UBool ucln_lib_cleanup(void) { #if !UCLN_NO_AUTO_CLEANUP && (defined(UCLN_AUTO_ATEXIT) || defined(UCLN_AUTO_LOCAL)) ucln_unRegisterAutomaticCleanup(); #endif - return TRUE; + return true; } diff --git a/icu4c/source/common/ucnv.cpp b/icu4c/source/common/ucnv.cpp index 019bcb6a79c..26baa550c35 100644 --- a/icu4c/source/common/ucnv.cpp +++ b/icu4c/source/common/ucnv.cpp @@ -163,7 +163,7 @@ ucnv_safeClone(const UConverter* cnv, void *stackBuffer, int32_t *pBufferSize, U UErrorCode cbErr; UConverterToUnicodeArgs toUArgs = { sizeof(UConverterToUnicodeArgs), - TRUE, + true, NULL, NULL, NULL, @@ -173,7 +173,7 @@ ucnv_safeClone(const UConverter* cnv, void *stackBuffer, int32_t *pBufferSize, U }; UConverterFromUnicodeArgs fromUArgs = { sizeof(UConverterFromUnicodeArgs), - TRUE, + true, NULL, NULL, NULL, @@ -269,7 +269,7 @@ ucnv_safeClone(const UConverter* cnv, void *stackBuffer, int32_t *pBufferSize, U /* Copy initial state */ uprv_memcpy(localConverter, cnv, sizeof(UConverter)); - localConverter->isCopyLocal = localConverter->isExtraLocal = FALSE; + localConverter->isCopyLocal = localConverter->isExtraLocal = false; /* copy the substitution string */ if (cnv->subChars == (uint8_t *)cnv->subUChars) { @@ -306,7 +306,7 @@ ucnv_safeClone(const UConverter* cnv, void *stackBuffer, int32_t *pBufferSize, U if(localConverter == (UConverter*)stackBuffer) { /* we're using user provided data - set to not destroy */ - localConverter->isCopyLocal = TRUE; + localConverter->isCopyLocal = true; } /* allow callback functions to handle any memory allocation */ @@ -352,7 +352,7 @@ ucnv_close (UConverter * converter) if (converter->fromCharErrorBehaviour != UCNV_TO_U_DEFAULT_CALLBACK) { UConverterToUnicodeArgs toUArgs = { sizeof(UConverterToUnicodeArgs), - TRUE, + true, NULL, NULL, NULL, @@ -368,7 +368,7 @@ ucnv_close (UConverter * converter) if (converter->fromUCharErrorBehaviour != UCNV_FROM_U_DEFAULT_CALLBACK) { UConverterFromUnicodeArgs fromUArgs = { sizeof(UConverterFromUnicodeArgs), - TRUE, + true, NULL, NULL, NULL, @@ -580,7 +580,7 @@ static void _reset(UConverter *converter, UConverterResetChoice choice, if(choice<=UCNV_RESET_TO_UNICODE && converter->fromCharErrorBehaviour != UCNV_TO_U_DEFAULT_CALLBACK) { UConverterToUnicodeArgs toUArgs = { sizeof(UConverterToUnicodeArgs), - TRUE, + true, NULL, NULL, NULL, @@ -595,7 +595,7 @@ static void _reset(UConverter *converter, UConverterResetChoice choice, if(choice!=UCNV_RESET_TO_UNICODE && converter->fromUCharErrorBehaviour != UCNV_FROM_U_DEFAULT_CALLBACK) { UConverterFromUnicodeArgs fromUArgs = { sizeof(UConverterFromUnicodeArgs), - TRUE, + true, NULL, NULL, NULL, @@ -634,19 +634,19 @@ static void _reset(UConverter *converter, UConverterResetChoice choice, U_CAPI void U_EXPORT2 ucnv_reset(UConverter *converter) { - _reset(converter, UCNV_RESET_BOTH, TRUE); + _reset(converter, UCNV_RESET_BOTH, true); } U_CAPI void U_EXPORT2 ucnv_resetToUnicode(UConverter *converter) { - _reset(converter, UCNV_RESET_TO_UNICODE, TRUE); + _reset(converter, UCNV_RESET_TO_UNICODE, true); } U_CAPI void U_EXPORT2 ucnv_resetFromUnicode(UConverter *converter) { - _reset(converter, UCNV_RESET_FROM_UNICODE, TRUE); + _reset(converter, UCNV_RESET_FROM_UNICODE, true); } U_CAPI int8_t U_EXPORT2 @@ -871,7 +871,7 @@ _fromUnicodeWithCallback(UConverterFromUnicodeArgs *pArgs, UErrorCode *err) { /* avoid compiler warnings - not otherwise necessary, and the values do not matter */ realSourceLimit=NULL; - realFlush=FALSE; + realFlush=false; realSourceIndex=0; } else { /* @@ -887,7 +887,7 @@ _fromUnicodeWithCallback(UConverterFromUnicodeArgs *pArgs, UErrorCode *err) { uprv_memcpy(replay, cnv->preFromU, -cnv->preFromULength*U_SIZEOF_UCHAR); pArgs->source=replay; pArgs->sourceLimit=replay-cnv->preFromULength; - pArgs->flush=FALSE; + pArgs->flush=false; sourceIndex=-1; cnv->preFromULength=0; @@ -923,11 +923,11 @@ _fromUnicodeWithCallback(UConverterFromUnicodeArgs *pArgs, UErrorCode *err) { cnv->fromUChar32==0); } else { /* handle error from ucnv_convertEx() */ - converterSawEndOfInput=FALSE; + converterSawEndOfInput=false; } /* no callback called yet for this iteration */ - calledCallback=FALSE; + calledCallback=false; /* no sourceIndex adjustment for conversion, only for callback output */ errorInputLength=0; @@ -976,7 +976,7 @@ _fromUnicodeWithCallback(UConverterFromUnicodeArgs *pArgs, UErrorCode *err) { uprv_memcpy(replay, cnv->preFromU, -cnv->preFromULength*U_SIZEOF_UCHAR); pArgs->source=replay; pArgs->sourceLimit=replay-cnv->preFromULength; - pArgs->flush=FALSE; + pArgs->flush=false; if((sourceIndex+=cnv->preFromULength)<0) { sourceIndex=-1; } @@ -1017,7 +1017,7 @@ _fromUnicodeWithCallback(UConverterFromUnicodeArgs *pArgs, UErrorCode *err) { /* inject an error and continue with callback handling */ *err=U_TRUNCATED_CHAR_FOUND; - calledCallback=FALSE; /* new error condition */ + calledCallback=false; /* new error condition */ } else { /* input consumed */ if(pArgs->flush) { @@ -1033,7 +1033,7 @@ _fromUnicodeWithCallback(UConverterFromUnicodeArgs *pArgs, UErrorCode *err) { } /* reset the converter without calling the callback function */ - _reset(cnv, UCNV_RESET_FROM_UNICODE, FALSE); + _reset(cnv, UCNV_RESET_FROM_UNICODE, false); } /* done successfully */ @@ -1110,7 +1110,7 @@ _fromUnicodeWithCallback(UConverterFromUnicodeArgs *pArgs, UErrorCode *err) { * that a callback was called; * if the callback did not resolve the error, then we return */ - calledCallback=TRUE; + calledCallback=true; } } } @@ -1118,7 +1118,7 @@ _fromUnicodeWithCallback(UConverterFromUnicodeArgs *pArgs, UErrorCode *err) { /* * Output the fromUnicode overflow buffer. * Call this function if(cnv->charErrorBufferLength>0). - * @return TRUE if overflow + * @return true if overflow */ static UBool ucnv_outputOverflowFromUnicode(UConverter *cnv, @@ -1154,7 +1154,7 @@ ucnv_outputOverflowFromUnicode(UConverter *cnv, *pOffsets=offsets; } *err=U_BUFFER_OVERFLOW_ERROR; - return TRUE; + return true; } /* copy the overflow contents to the target */ @@ -1170,7 +1170,7 @@ ucnv_outputOverflowFromUnicode(UConverter *cnv, if(offsets!=NULL) { *pOffsets=offsets; } - return FALSE; + return false; } U_CAPI void U_EXPORT2 @@ -1316,7 +1316,7 @@ _toUnicodeWithCallback(UConverterToUnicodeArgs *pArgs, UErrorCode *err) { /* avoid compiler warnings - not otherwise necessary, and the values do not matter */ realSourceLimit=NULL; - realFlush=FALSE; + realFlush=false; realSourceIndex=0; } else { /* @@ -1332,7 +1332,7 @@ _toUnicodeWithCallback(UConverterToUnicodeArgs *pArgs, UErrorCode *err) { uprv_memcpy(replay, cnv->preToU, -cnv->preToULength); pArgs->source=replay; pArgs->sourceLimit=replay-cnv->preToULength; - pArgs->flush=FALSE; + pArgs->flush=false; sourceIndex=-1; cnv->preToULength=0; @@ -1368,11 +1368,11 @@ _toUnicodeWithCallback(UConverterToUnicodeArgs *pArgs, UErrorCode *err) { cnv->toULength==0); } else { /* handle error from getNextUChar() or ucnv_convertEx() */ - converterSawEndOfInput=FALSE; + converterSawEndOfInput=false; } /* no callback called yet for this iteration */ - calledCallback=FALSE; + calledCallback=false; /* no sourceIndex adjustment for conversion, only for callback output */ errorInputLength=0; @@ -1421,7 +1421,7 @@ _toUnicodeWithCallback(UConverterToUnicodeArgs *pArgs, UErrorCode *err) { uprv_memcpy(replay, cnv->preToU, -cnv->preToULength); pArgs->source=replay; pArgs->sourceLimit=replay-cnv->preToULength; - pArgs->flush=FALSE; + pArgs->flush=false; if((sourceIndex+=cnv->preToULength)<0) { sourceIndex=-1; } @@ -1462,7 +1462,7 @@ _toUnicodeWithCallback(UConverterToUnicodeArgs *pArgs, UErrorCode *err) { /* inject an error and continue with callback handling */ *err=U_TRUNCATED_CHAR_FOUND; - calledCallback=FALSE; /* new error condition */ + calledCallback=false; /* new error condition */ } else { /* input consumed */ if(pArgs->flush) { @@ -1478,7 +1478,7 @@ _toUnicodeWithCallback(UConverterToUnicodeArgs *pArgs, UErrorCode *err) { } /* reset the converter without calling the callback function */ - _reset(cnv, UCNV_RESET_TO_UNICODE, FALSE); + _reset(cnv, UCNV_RESET_TO_UNICODE, false); } /* done successfully */ @@ -1556,7 +1556,7 @@ _toUnicodeWithCallback(UConverterToUnicodeArgs *pArgs, UErrorCode *err) { * that a callback was called; * if the callback did not resolve the error, then we return */ - calledCallback=TRUE; + calledCallback=true; } } } @@ -1564,7 +1564,7 @@ _toUnicodeWithCallback(UConverterToUnicodeArgs *pArgs, UErrorCode *err) { /* * Output the toUnicode overflow buffer. * Call this function if(cnv->UCharErrorBufferLength>0). - * @return TRUE if overflow + * @return true if overflow */ static UBool ucnv_outputOverflowToUnicode(UConverter *cnv, @@ -1600,7 +1600,7 @@ ucnv_outputOverflowToUnicode(UConverter *cnv, *pOffsets=offsets; } *err=U_BUFFER_OVERFLOW_ERROR; - return TRUE; + return true; } /* copy the overflow contents to the target */ @@ -1616,7 +1616,7 @@ ucnv_outputOverflowToUnicode(UConverter *cnv, if(offsets!=NULL) { *pOffsets=offsets; } - return FALSE; + return false; } U_CAPI void U_EXPORT2 @@ -1754,7 +1754,7 @@ ucnv_fromUChars(UConverter *cnv, destLimit=dest+destCapacity; /* perform the conversion */ - ucnv_fromUnicode(cnv, &dest, destLimit, &src, srcLimit, 0, TRUE, pErrorCode); + ucnv_fromUnicode(cnv, &dest, destLimit, &src, srcLimit, 0, true, pErrorCode); destLength=(int32_t)(dest-originalDest); /* if an overflow occurs, then get the preflighting length */ @@ -1765,7 +1765,7 @@ ucnv_fromUChars(UConverter *cnv, do { dest=buffer; *pErrorCode=U_ZERO_ERROR; - ucnv_fromUnicode(cnv, &dest, destLimit, &src, srcLimit, 0, TRUE, pErrorCode); + ucnv_fromUnicode(cnv, &dest, destLimit, &src, srcLimit, 0, true, pErrorCode); destLength+=(int32_t)(dest-buffer); } while(*pErrorCode==U_BUFFER_OVERFLOW_ERROR); } @@ -1810,7 +1810,7 @@ ucnv_toUChars(UConverter *cnv, destLimit=dest+destCapacity; /* perform the conversion */ - ucnv_toUnicode(cnv, &dest, destLimit, &src, srcLimit, 0, TRUE, pErrorCode); + ucnv_toUnicode(cnv, &dest, destLimit, &src, srcLimit, 0, true, pErrorCode); destLength=(int32_t)(dest-originalDest); /* if an overflow occurs, then get the preflighting length */ @@ -1822,7 +1822,7 @@ ucnv_toUChars(UConverter *cnv, do { dest=buffer; *pErrorCode=U_ZERO_ERROR; - ucnv_toUnicode(cnv, &dest, destLimit, &src, srcLimit, 0, TRUE, pErrorCode); + ucnv_toUnicode(cnv, &dest, destLimit, &src, srcLimit, 0, true, pErrorCode); destLength+=(int32_t)(dest-buffer); } while(*pErrorCode==U_BUFFER_OVERFLOW_ERROR); @@ -1907,15 +1907,15 @@ ucnv_getNextUChar(UConverter *cnv, } /* - * flush==TRUE is implied for ucnv_getNextUChar() + * flush==true is implied for ucnv_getNextUChar() * * do not simply return even if s==sourceLimit because the converter may - * not have seen flush==TRUE before + * not have seen flush==true before */ /* prepare the converter arguments */ args.converter=cnv; - args.flush=TRUE; + args.flush=true; args.offsets=NULL; args.source=s; args.sourceLimit=sourceLimit; @@ -1937,7 +1937,7 @@ ucnv_getNextUChar(UConverter *cnv, *source=s=args.source; if(*err==U_INDEX_OUTOFBOUNDS_ERROR) { /* reset the converter without calling the callback function */ - _reset(cnv, UCNV_RESET_TO_UNICODE, FALSE); + _reset(cnv, UCNV_RESET_TO_UNICODE, false); return 0xffff; /* no output */ } else if(U_SUCCESS(*err) && c>=0) { return c; @@ -2176,7 +2176,7 @@ ucnv_convertEx(UConverter *targetCnv, UConverter *sourceCnv, /* prepare the converter arguments */ fromUArgs.converter=targetCnv; - fromUArgs.flush=FALSE; + fromUArgs.flush=false; fromUArgs.offsets=NULL; fromUArgs.target=*target; fromUArgs.targetLimit=targetLimit; @@ -2331,8 +2331,8 @@ ucnv_convertEx(UConverter *targetCnv, UConverter *sourceCnv, /* input consumed */ if(flush) { /* reset the converters without calling the callback functions */ - _reset(sourceCnv, UCNV_RESET_TO_UNICODE, FALSE); - _reset(targetCnv, UCNV_RESET_FROM_UNICODE, FALSE); + _reset(sourceCnv, UCNV_RESET_TO_UNICODE, false); + _reset(targetCnv, UCNV_RESET_FROM_UNICODE, false); } /* done successfully */ @@ -2372,7 +2372,7 @@ ucnv_convertEx(UConverter *targetCnv, UConverter *sourceCnv, sourceCnv->preToULength>=0 && sourceCnv->UCharErrorBufferLength==0 ) { - fromUArgs.flush=TRUE; + fromUArgs.flush=true; } } @@ -2436,8 +2436,8 @@ ucnv_internalConvert(UConverter *outConverter, UConverter *inConverter, &myTarget, targetLimit, &source, sourceLimit, pivotBuffer, &pivot, &pivot2, pivotBuffer+CHUNK_SIZE, - FALSE, - TRUE, + false, + true, pErrorCode); targetLength=(int32_t)(myTarget-target); } @@ -2459,8 +2459,8 @@ ucnv_internalConvert(UConverter *outConverter, UConverter *inConverter, &myTarget, targetLimit, &source, sourceLimit, pivotBuffer, &pivot, &pivot2, pivotBuffer+CHUNK_SIZE, - FALSE, - TRUE, + false, + true, pErrorCode); targetLength+=(int32_t)(myTarget-targetBuffer); } while(*pErrorCode==U_BUFFER_OVERFLOW_ERROR); @@ -2585,7 +2585,7 @@ ucnv_toAlgorithmic(UConverterType algorithmicType, char *target, int32_t targetCapacity, const char *source, int32_t sourceLength, UErrorCode *pErrorCode) { - return ucnv_convertAlgorithmic(TRUE, algorithmicType, cnv, + return ucnv_convertAlgorithmic(true, algorithmicType, cnv, target, targetCapacity, source, sourceLength, pErrorCode); @@ -2597,7 +2597,7 @@ ucnv_fromAlgorithmic(UConverter *cnv, char *target, int32_t targetCapacity, const char *source, int32_t sourceLength, UErrorCode *pErrorCode) { - return ucnv_convertAlgorithmic(FALSE, algorithmicType, cnv, + return ucnv_convertAlgorithmic(false, algorithmicType, cnv, target, targetCapacity, source, sourceLength, pErrorCode); @@ -2885,12 +2885,12 @@ ucnv_toUCountPending(const UConverter* cnv, UErrorCode* status){ U_CAPI UBool U_EXPORT2 ucnv_isFixedWidth(UConverter *cnv, UErrorCode *status){ if (U_FAILURE(*status)) { - return FALSE; + return false; } if (cnv == NULL) { *status = U_ILLEGAL_ARGUMENT_ERROR; - return FALSE; + return false; } switch (ucnv_getType(cnv)) { @@ -2900,9 +2900,9 @@ ucnv_isFixedWidth(UConverter *cnv, UErrorCode *status){ case UCNV_UTF32_LittleEndian: case UCNV_UTF32: case UCNV_US_ASCII: - return TRUE; + return true; default: - return FALSE; + return false; } } #endif diff --git a/icu4c/source/common/ucnv2022.cpp b/icu4c/source/common/ucnv2022.cpp index aa1e169c99c..ec096780e97 100644 --- a/icu4c/source/common/ucnv2022.cpp +++ b/icu4c/source/common/ucnv2022.cpp @@ -491,7 +491,7 @@ _ISO2022Open(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode){ uprv_memset(myConverterData, 0, sizeof(UConverterDataISO2022)); myConverterData->currentType = ASCII1; - cnv->fromUnicodeStatus =FALSE; + cnv->fromUnicodeStatus =false; if(pArgs->locale){ uprv_strncpy(myLocale, pArgs->locale, sizeof(myLocale)-1); } @@ -623,7 +623,7 @@ _ISO2022Open(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode){ #endif // !UCONFIG_ONLY_HTML_CONVERSION else{ #ifdef U_ENABLE_GENERIC_ISO_2022 - myConverterData->isFirstBuffer = TRUE; + myConverterData->isFirstBuffer = true; /* append the UTF-8 escape sequence */ cnv->charErrorBufferLength = 3; @@ -682,7 +682,7 @@ _ISO2022Reset(UConverter *converter, UConverterResetChoice choice) { if(choice<=UCNV_RESET_TO_UNICODE) { uprv_memset(&myConverterData->toU2022State, 0, sizeof(ISO2022State)); myConverterData->key = 0; - myConverterData->isEmptySegment = FALSE; + myConverterData->isEmptySegment = false; } if(choice!=UCNV_RESET_TO_UNICODE) { uprv_memset(&myConverterData->fromU2022State, 0, sizeof(ISO2022State)); @@ -690,7 +690,7 @@ _ISO2022Reset(UConverter *converter, UConverterResetChoice choice) { #ifdef U_ENABLE_GENERIC_ISO_2022 if(myConverterData->locale[0] == 0){ if(choice<=UCNV_RESET_TO_UNICODE) { - myConverterData->isFirstBuffer = TRUE; + myConverterData->isFirstBuffer = true; myConverterData->key = 0; if (converter->mode == UCNV_SO){ ucnv_close (myConverterData->currentConverter); @@ -1285,7 +1285,7 @@ T_UConverter_toUnicode_ISO_2022_OFFSETS_LOGIC(UConverterToUnicodeArgs* args, } /* convert to before the ESC or until the end of the buffer */ - myData->isFirstBuffer=FALSE; + myData->isFirstBuffer=false; sourceStart = args->source; myTargetStart = args->target; args->converter = myData->currentConverter; @@ -1848,7 +1848,7 @@ getTrail: len = 1; cs = cs0; g = 0; - useFallback = FALSE; + useFallback = false; } break; case JISX208: @@ -1864,7 +1864,7 @@ getTrail: len = len2; cs = cs0; g = 0; - useFallback = FALSE; + useFallback = false; } } else if(len == 0 && useFallback && (uint32_t)(sourceChar - HWKANA_START) <= (HWKANA_END - HWKANA_START)) { @@ -1872,7 +1872,7 @@ getTrail: len = -2; cs = cs0; g = 0; - useFallback = FALSE; + useFallback = false; } break; case ISO8859_7: @@ -1886,7 +1886,7 @@ getTrail: len = len2; cs = cs0; g = 2; - useFallback = FALSE; + useFallback = false; } break; default: @@ -1911,7 +1911,7 @@ getTrail: len = len2; cs = cs0; g = 0; - useFallback = FALSE; + useFallback = false; } break; } @@ -2121,7 +2121,7 @@ UConverter_toUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, continue; } else { /* only JIS7 uses SI/SO, not ISO-2022-JP-x */ - myData->isEmptySegment = FALSE; /* reset this, we have a different error */ + myData->isEmptySegment = false; /* reset this, we have a different error */ break; } @@ -2133,7 +2133,7 @@ UConverter_toUnicode_ISO_2022_JP_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, continue; } else { /* only JIS7 uses SI/SO, not ISO-2022-JP-x */ - myData->isEmptySegment = FALSE; /* reset this, we have a different error */ + myData->isEmptySegment = false; /* reset this, we have a different error */ break; } @@ -2159,12 +2159,12 @@ escape: if(U_FAILURE(*err)){ args->target = myTarget; args->source = mySource; - myData->isEmptySegment = FALSE; /* Reset to avoid future spurious errors */ + myData->isEmptySegment = false; /* Reset to avoid future spurious errors */ return; } /* If we successfully completed an escape sequence, we begin a new segment, empty so far */ if(myData->key==0) { - myData->isEmptySegment = TRUE; + myData->isEmptySegment = true; } continue; @@ -2181,7 +2181,7 @@ escape: U_FALLTHROUGH; default: /* convert one or two bytes */ - myData->isEmptySegment = FALSE; + myData->isEmptySegment = false; cs = (StateEnum)pToU2022State->cs[pToU2022State->g]; if( (uint8_t)(mySourceChar - 0xa1) <= (0xdf - 0xa1) && myData->version==4 && !IS_JP_DBCS(cs) @@ -2262,7 +2262,7 @@ getTrailByte: tempBuf[0] = (char)(tmpSourceChar >> 8); tempBuf[1] = (char)(tmpSourceChar); } - targetUniChar = ucnv_MBCSSimpleGetNextUChar(myData->myConverterArray[cs], tempBuf, 2, FALSE); + targetUniChar = ucnv_MBCSSimpleGetNextUChar(myData->myConverterArray[cs], tempBuf, 2, false); } else if (!(trailIsOk || IS_2022_CONTROL(trailByte))) { /* report a pair of illegal bytes if the second byte is not a DBCS starter */ ++mySource; @@ -2534,7 +2534,7 @@ getTrail: int32_t sourceIndex; /* we are switching to ASCII */ - isTargetByteDBCS=FALSE; + isTargetByteDBCS=false; /* get the source index of the last input character */ /* @@ -2712,7 +2712,7 @@ UConverter_toUnicode_ISO_2022_KR_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, if(mySourceChar==UCNV_SI){ myData->toU2022State.g = 0; if (myData->isEmptySegment) { - myData->isEmptySegment = FALSE; /* we are handling it, reset to avoid future spurious errors */ + myData->isEmptySegment = false; /* we are handling it, reset to avoid future spurious errors */ *err = U_ILLEGAL_ESCAPE_SEQUENCE; args->converter->toUCallbackReason = UCNV_IRREGULAR; args->converter->toUBytes[0] = (uint8_t)mySourceChar; @@ -2725,13 +2725,13 @@ UConverter_toUnicode_ISO_2022_KR_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, continue; }else if(mySourceChar==UCNV_SO){ myData->toU2022State.g = 1; - myData->isEmptySegment = TRUE; /* Begin a new segment, empty so far */ + myData->isEmptySegment = true; /* Begin a new segment, empty so far */ /*consume the source */ continue; }else if(mySourceChar==ESC_2022){ mySource--; escape: - myData->isEmptySegment = FALSE; /* Any invalid ESC sequences will be detected separately, so just reset this */ + myData->isEmptySegment = false; /* Any invalid ESC sequences will be detected separately, so just reset this */ changeState_2022(args->converter,&(mySource), mySourceLimit, ISO_2022_KR, err); if(U_FAILURE(*err)){ @@ -2742,7 +2742,7 @@ escape: continue; } - myData->isEmptySegment = FALSE; /* Any invalid char errors will be detected separately, so just reset this */ + myData->isEmptySegment = false; /* Any invalid char errors will be detected separately, so just reset this */ if(myData->toU2022State.g == 1) { if(mySource < mySourceLimit) { int leadIsOk, trailIsOk; @@ -3092,7 +3092,7 @@ getTrail: len = 2; } else { len = -2; - useFallback = FALSE; + useFallback = false; } if(cs == CNS_11643_1) { g = 1; @@ -3119,7 +3119,7 @@ getTrail: len = len2; cs = cs0; g = 1; - useFallback = FALSE; + useFallback = false; } } } @@ -3301,7 +3301,7 @@ UConverter_toUnicode_ISO_2022_CN_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, case UCNV_SI: pToU2022State->g=0; if (myData->isEmptySegment) { - myData->isEmptySegment = FALSE; /* we are handling it, reset to avoid future spurious errors */ + myData->isEmptySegment = false; /* we are handling it, reset to avoid future spurious errors */ *err = U_ILLEGAL_ESCAPE_SEQUENCE; args->converter->toUCallbackReason = UCNV_IRREGULAR; args->converter->toUBytes[0] = static_cast(mySourceChar); @@ -3315,11 +3315,11 @@ UConverter_toUnicode_ISO_2022_CN_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, case UCNV_SO: if(pToU2022State->cs[1] != 0) { pToU2022State->g=1; - myData->isEmptySegment = TRUE; /* Begin a new segment, empty so far */ + myData->isEmptySegment = true; /* Begin a new segment, empty so far */ continue; } else { /* illegal to have SO before a matching designator */ - myData->isEmptySegment = FALSE; /* Handling a different error, reset this to avoid future spurious errs */ + myData->isEmptySegment = false; /* Handling a different error, reset this to avoid future spurious errs */ break; } @@ -3345,7 +3345,7 @@ escape: if(U_FAILURE(*err)){ args->target = myTarget; args->source = mySource; - myData->isEmptySegment = FALSE; /* Reset to avoid future spurious errors */ + myData->isEmptySegment = false; /* Reset to avoid future spurious errors */ return; } continue; @@ -3358,7 +3358,7 @@ escape: U_FALLTHROUGH; default: /* convert one or two bytes */ - myData->isEmptySegment = FALSE; + myData->isEmptySegment = false; if(pToU2022State->g != 0) { if(mySource < mySourceLimit) { UConverterSharedData *cnv; @@ -3397,7 +3397,7 @@ getTrailByte: tempBuf[1] = (char) trailByte; tempBufLen = 2; } - targetUniChar = ucnv_MBCSSimpleGetNextUChar(cnv, tempBuf, tempBufLen, FALSE); + targetUniChar = ucnv_MBCSSimpleGetNextUChar(cnv, tempBuf, tempBufLen, false); mySourceChar = (mySourceChar << 8) | trailByte; } else if (!(trailIsOk || IS_2022_CONTROL(trailByte))) { /* report a pair of illegal bytes if the second byte is not a DBCS starter */ @@ -3609,7 +3609,7 @@ _ISO_2022_SafeClone( uprv_memcpy(&localClone->mydata, cnvData, sizeof(UConverterDataISO2022)); localClone->cnv.extraInfo = &localClone->mydata; /* set pointer to extra data */ - localClone->cnv.isExtraLocal = TRUE; + localClone->cnv.isExtraLocal = true; /* share the subconverters */ @@ -3808,8 +3808,8 @@ static const UConverterStaticData _ISO2022StaticData={ 3, /* max 3 bytes per UChar from UTF-8 (4 bytes from surrogate _pair_) */ { 0x1a, 0, 0, 0 }, 1, - FALSE, - FALSE, + false, + false, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */ @@ -3853,8 +3853,8 @@ static const UConverterStaticData _ISO2022JPStaticData={ 6, /* max 6 bytes per UChar: 4-byte escape sequence + DBCS */ { 0x1a, 0, 0, 0 }, 1, - FALSE, - FALSE, + false, + false, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */ @@ -3904,8 +3904,8 @@ static const UConverterStaticData _ISO2022KRStaticData={ 8, /* max 8 bytes per UChar */ { 0x1a, 0, 0, 0 }, 1, - FALSE, - FALSE, + false, + false, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */ @@ -3955,8 +3955,8 @@ static const UConverterStaticData _ISO2022CNStaticData={ 8, /* max 8 bytes per UChar: 4-byte CNS designator + 2 bytes for SS2/SS3 + DBCS */ { 0x1a, 0, 0, 0 }, 1, - FALSE, - FALSE, + false, + false, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */ diff --git a/icu4c/source/common/ucnv_bld.cpp b/icu4c/source/common/ucnv_bld.cpp index 548fae83d4e..a0fbfe2d7f5 100644 --- a/icu4c/source/common/ucnv_bld.cpp +++ b/icu4c/source/common/ucnv_bld.cpp @@ -254,7 +254,7 @@ static UBool U_CALLCONV ucnv_cleanup(void) { #if !U_CHARSET_IS_UTF8 gDefaultConverterName = NULL; gDefaultConverterNameBuffer[0] = 0; - gDefaultConverterContainsOption = FALSE; + gDefaultConverterContainsOption = false; gDefaultAlgorithmicSharedData = NULL; #endif @@ -318,7 +318,7 @@ ucnv_data_unFlattenClone(UConverterLoadArgs *pArgs, UDataMemory *pData, UErrorCo data->staticData = source; - data->sharedDataCached = FALSE; + data->sharedDataCached = false; /* fill in fields from the loaded data */ data->dataMemory = (void*)pData; /* for future use */ @@ -462,7 +462,7 @@ ucnv_shareConverterData(UConverterSharedData * data) */ /* Mark it shared */ - data->sharedDataCached = TRUE; + data->sharedDataCached = true; uhash_put(SHARED_DATA_HASHTABLE, (void*) data->staticData->name, /* Okay to cast away const as long as @@ -502,11 +502,11 @@ ucnv_getSharedConverterData(const char *name) */ /* Deletes (frees) the Shared data it's passed. first it checks the referenceCounter to * see if anyone is using it, if not it frees all the memory stemming from sharedConverterData and - * returns TRUE, - * otherwise returns FALSE + * returns true, + * otherwise returns false * @param sharedConverterData The shared data * @return if not it frees all the memory stemming from sharedConverterData and - * returns TRUE, otherwise returns FALSE + * returns true, otherwise returns false */ static UBool ucnv_deleteSharedConverterData(UConverterSharedData * deadSharedData) @@ -515,8 +515,8 @@ ucnv_deleteSharedConverterData(UConverterSharedData * deadSharedData) UTRACE_DATA2(UTRACE_OPEN_CLOSE, "unload converter %s shared data %p", deadSharedData->staticData->name, deadSharedData); if (deadSharedData->referenceCounter > 0) { - UTRACE_EXIT_VALUE((int32_t)FALSE); - return FALSE; + UTRACE_EXIT_VALUE((int32_t)false); + return false; } if (deadSharedData->impl->unload != NULL) { @@ -531,8 +531,8 @@ ucnv_deleteSharedConverterData(UConverterSharedData * deadSharedData) uprv_free(deadSharedData); - UTRACE_EXIT_VALUE((int32_t)TRUE); - return TRUE; + UTRACE_EXIT_VALUE((int32_t)true); + return true; } /** @@ -589,7 +589,7 @@ ucnv_unload(UConverterSharedData *sharedData) { sharedData->referenceCounter--; } - if((sharedData->referenceCounter <= 0)&&(sharedData->sharedDataCached == FALSE)) { + if((sharedData->referenceCounter <= 0)&&(sharedData->sharedDataCached == false)) { ucnv_deleteSharedConverterData(sharedData); } } @@ -703,10 +703,10 @@ parseConverterOptions(const char *inName, /*Logic determines if the converter is Algorithmic AND/OR cached *depending on that: - * -we either go to get data from disk and cache it (Data=TRUE, Cached=False) - * -Get it from a Hashtable (Data=X, Cached=TRUE) - * -Call dataConverter initializer (Data=TRUE, Cached=TRUE) - * -Call AlgorithmicConverter initializer (Data=FALSE, Cached=TRUE) + * -we either go to get data from disk and cache it (Data=true, Cached=false) + * -Get it from a Hashtable (Data=X, Cached=true) + * -Call dataConverter initializer (Data=true, Cached=true) + * -Call AlgorithmicConverter initializer (Data=false, Cached=true) */ U_CFUNC UConverterSharedData * ucnv_loadSharedData(const char *converterName, @@ -717,8 +717,8 @@ ucnv_loadSharedData(const char *converterName, UConverterLoadArgs stackArgs; UConverterSharedData *mySharedConverterData = NULL; UErrorCode internalErrorCode = U_ZERO_ERROR; - UBool mayContainOption = TRUE; - UBool checkForAlgorithmic = TRUE; + UBool mayContainOption = true; + UBool checkForAlgorithmic = true; if (U_FAILURE (*err)) { return NULL; @@ -762,7 +762,7 @@ ucnv_loadSharedData(const char *converterName, return NULL; } mySharedConverterData = (UConverterSharedData *)gDefaultAlgorithmicSharedData; - checkForAlgorithmic = FALSE; + checkForAlgorithmic = false; mayContainOption = gDefaultConverterContainsOption; /* the default converter name is already canonical */ #endif @@ -866,7 +866,7 @@ ucnv_canCreateConverter(const char *converterName, UErrorCode *err) { if(U_SUCCESS(*err)) { UTRACE_DATA1(UTRACE_OPEN_CLOSE, "test if can open converter %s", converterName); - stackArgs.onlyTestIsLoadable=TRUE; + stackArgs.onlyTestIsLoadable=true; mySharedConverterData = ucnv_loadSharedData(converterName, &stackPieces, &stackArgs, err); ucnv_createConverterFromSharedData( &myUConverter, mySharedConverterData, @@ -989,15 +989,15 @@ ucnv_createConverterFromSharedData(UConverter *myUConverter, ucnv_unloadSharedDataIfReady(mySharedConverterData); return NULL; } - isCopyLocal = FALSE; + isCopyLocal = false; } else { - isCopyLocal = TRUE; + isCopyLocal = true; } /* initialize the converter */ uprv_memset(myUConverter, 0, sizeof(UConverter)); myUConverter->isCopyLocal = isCopyLocal; - /*myUConverter->isExtraLocal = FALSE;*/ /* Set by the memset call */ + /*myUConverter->isExtraLocal = false;*/ /* Set by the memset call */ myUConverter->sharedData = mySharedConverterData; myUConverter->options = pArgs->options; if(!pArgs->onlyTestIsLoadable) { @@ -1083,7 +1083,7 @@ ucnv_flushCache () UCNV_DEBUG_LOG("del",mySharedData->staticData->name,mySharedData); uhash_removeElement(SHARED_DATA_HASHTABLE, e); - mySharedData->sharedDataCached = FALSE; + mySharedData->sharedDataCached = false; ucnv_deleteSharedConverterData (mySharedData); } else { ++remaining; @@ -1342,7 +1342,7 @@ ucnv_swap(const UDataSwapper *ds, _MBCSHeader *outMBCSHeader; _MBCSHeader mbcsHeader; uint32_t mbcsHeaderLength; - UBool noFromU=FALSE; + UBool noFromU=false; uint8_t outputType; diff --git a/icu4c/source/common/ucnv_cb.cpp b/icu4c/source/common/ucnv_cb.cpp index 1bb00120149..7bfde828704 100644 --- a/icu4c/source/common/ucnv_cb.cpp +++ b/icu4c/source/common/ucnv_cb.cpp @@ -86,7 +86,7 @@ ucnv_cbFromUWriteUChars(UConverterFromUnicodeArgs *args, source, sourceLimit, NULL, /* no offsets */ - FALSE, /* no flush */ + false, /* no flush */ err); if(args->offsets) @@ -141,7 +141,7 @@ ucnv_cbFromUWriteUChars(UConverterFromUnicodeArgs *args, source, sourceLimit, NULL, - FALSE, + false, &err2); /* We can go ahead and overwrite the length here. We know just how diff --git a/icu4c/source/common/ucnv_ct.cpp b/icu4c/source/common/ucnv_ct.cpp index b40e1b2c970..c12e982b88b 100644 --- a/icu4c/source/common/ucnv_ct.cpp +++ b/icu4c/source/common/ucnv_ct.cpp @@ -225,23 +225,23 @@ static COMPOUND_TEXT_CONVERTERS getState(int codepoint) { static COMPOUND_TEXT_CONVERTERS findStateFromEscSeq(const char* source, const char* sourceLimit, const uint8_t* toUBytesBuffer, int32_t toUBytesBufferLength, UErrorCode *err) { COMPOUND_TEXT_CONVERTERS state = INVALID; - UBool matchFound = FALSE; + UBool matchFound = false; int32_t i, n, offset = toUBytesBufferLength; for (i = 0; i < NUM_OF_CONVERTERS; i++) { - matchFound = TRUE; + matchFound = true; for (n = 0; escSeqCompoundText[i][n] != 0; n++) { if (n < toUBytesBufferLength) { if (toUBytesBuffer[n] != escSeqCompoundText[i][n]) { - matchFound = FALSE; + matchFound = false; break; } } else if ((source + (n - offset)) >= sourceLimit) { *err = U_TRUNCATED_CHAR_FOUND; - matchFound = FALSE; + matchFound = false; break; } else if (*(source + (n - offset)) != escSeqCompoundText[i][n]) { - matchFound = FALSE; + matchFound = false; break; } } @@ -634,8 +634,8 @@ static const UConverterStaticData _CompoundTextStaticData = { 6, { 0xef, 0, 0, 0 }, 1, - FALSE, - FALSE, + false, + false, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */ diff --git a/icu4c/source/common/ucnv_ext.cpp b/icu4c/source/common/ucnv_ext.cpp index 7dea4eef41a..ffc3c93033a 100644 --- a/icu4c/source/common/ucnv_ext.cpp +++ b/icu4c/source/common/ucnv_ext.cpp @@ -108,7 +108,7 @@ ucnv_extFindToU(const uint32_t *toUSection, int32_t length, uint8_t byte) { } /* - * TRUE if not an SI/SO stateful converter, + * true if not an SI/SO stateful converter, * or if the match length fits with the current converter state */ #define UCNV_EXT_TO_U_VERIFY_SISO_MATCH(sisoState, match) \ @@ -154,7 +154,7 @@ ucnv_extMatchToU(const int32_t *cx, int8_t sisoState, srcLength=1; } } - flush=TRUE; + flush=true; } /* we must not remember fallback matches when not using fallbacks */ @@ -302,7 +302,7 @@ ucnv_extInitialMatchToU(UConverter *cnv, const int32_t *cx, target, targetLimit, offsets, srcIndex, pErrorCode); - return TRUE; + return true; } else if(match<0) { /* save state for partial match */ const char *s; @@ -323,9 +323,9 @@ ucnv_extInitialMatchToU(UConverter *cnv, const int32_t *cx, } *src=s; /* same as *src=srcLimit; because we reached the end of input */ cnv->preToULength=(int8_t)match; - return TRUE; + return true; } else /* match==0 no match */ { - return FALSE; + return false; } } @@ -345,7 +345,7 @@ ucnv_extSimpleMatchToU(const int32_t *cx, source, length, NULL, 0, &value, - useFallback, TRUE); + useFallback, true); if(match==length) { /* write result for simple, single-character conversion */ if(UCNV_EXT_TO_U_IS_CODE_POINT(value)) { @@ -358,7 +358,7 @@ ucnv_extSimpleMatchToU(const int32_t *cx, * - match>0 && value points to string: simple conversion cannot handle multiple code points * - match>0 && match!=length: not all input consumed, forbidden for this function * - match==0: no match found in the first place - * - match<0: partial match, not supported for simple conversion (and flush==TRUE) + * - match<0: partial match, not supported for simple conversion (and flush==true) */ return 0xfffe; } @@ -516,13 +516,13 @@ ucnv_extFindFromU(const UChar *fromUSection, int32_t length, UChar u) { * @param srcLength length of src, >=0 * @param pMatchValue [out] output result value for the match from the data structure * @param useFallback "use fallback" flag, usually from cnv->useFallback - * @param flush TRUE if the end of the input stream is reached + * @param flush true if the end of the input stream is reached * @return >1: matched, return value=total match length (number of input units matched) * 1: matched, no mapping but request for * (only for the first code point) * 0: no match * <0: partial match, return value=negative total match length - * (partial matches are never returned for flush==TRUE) + * (partial matches are never returned for flush==true) * (partial matches are never returned as being longer than UCNV_EXT_MAX_UCHARS) * the matchLength is 2 if only firstCP matched, and >2 if firstCP and * further code units matched @@ -778,7 +778,7 @@ ucnv_extInitialMatchFromU(UConverter *cnv, const int32_t *cx, target, targetLimit, offsets, srcIndex, pErrorCode); - return TRUE; + return true; } else if(match<0) { /* save state for partial match */ const UChar *s; @@ -795,13 +795,13 @@ ucnv_extInitialMatchFromU(UConverter *cnv, const int32_t *cx, } *src=s; /* same as *src=srcLimit; because we reached the end of input */ cnv->preFromULength=(int8_t)match; - return TRUE; + return true; } else if(match==1) { /* matched, no mapping but request for */ - cnv->useSubChar1=TRUE; - return FALSE; + cnv->useSubChar1=true; + return false; } else /* match==0 no match */ { - return FALSE; + return false; } } @@ -822,7 +822,7 @@ ucnv_extSimpleMatchFromU(const int32_t *cx, NULL, 0, NULL, 0, &value, - useFallback, TRUE); + useFallback, true); if(match>=2) { /* write result for simple, single-character conversion */ int32_t length; @@ -854,7 +854,7 @@ ucnv_extSimpleMatchFromU(const int32_t *cx, * - match>1 && resultLength>4: result too long for simple conversion * - match==1: no match found, preferred * - match==0: no match found in the first place - * - match<0: partial match, not supported for simple conversion (and flush==TRUE) + * - match<0: partial match, not supported for simple conversion (and flush==true) */ return 0; } @@ -934,7 +934,7 @@ ucnv_extContinueMatchFromU(UConverter *cnv, if(match==1) { /* matched, no mapping but request for */ - cnv->useSubChar1=TRUE; + cnv->useSubChar1=true; } /* move the first code point to the error field */ @@ -961,12 +961,12 @@ extSetUseMapping(UConverterUnicodeSet which, int32_t minLength, uint32_t value) // Do not add entries with reserved bits set. if(((value&(UCNV_EXT_FROM_U_ROUNDTRIP_FLAG|UCNV_EXT_FROM_U_RESERVED_MASK))!= UCNV_EXT_FROM_U_ROUNDTRIP_FLAG)) { - return FALSE; + return false; } } else /* UCNV_ROUNDTRIP_AND_FALLBACK_SET */ { // Do not add entries with reserved bits set. if((value&UCNV_EXT_FROM_U_RESERVED_MASK)!=0) { - return FALSE; + return false; } } // Do not add entries or other (future?) pseudo-entries diff --git a/icu4c/source/common/ucnv_io.cpp b/icu4c/source/common/ucnv_io.cpp index 6d8258ce347..c9d20cb941b 100644 --- a/icu4c/source/common/ucnv_io.cpp +++ b/icu4c/source/common/ucnv_io.cpp @@ -226,7 +226,7 @@ static UBool U_CALLCONV ucnv_io_cleanup(void) uprv_memset(&gMainTable, 0, sizeof(gMainTable)); - return TRUE; /* Everything was cleaned up */ + return true; /* Everything was cleaned up */ } static void U_CALLCONV initAliasData(UErrorCode &errCode) { @@ -319,7 +319,7 @@ static inline UBool isAlias(const char *alias, UErrorCode *pErrorCode) { if(alias==NULL) { *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR; - return FALSE; + return false; } return (UBool)(*alias!=0); } @@ -388,13 +388,13 @@ ucnv_io_stripASCIIForCompare(char *dst, const char *name) { char *dstItr = dst; uint8_t type, nextType; char c1; - UBool afterDigit = FALSE; + UBool afterDigit = false; while ((c1 = *name++) != 0) { type = GET_ASCII_TYPE(c1); switch (type) { case UIGNORE: - afterDigit = FALSE; + afterDigit = false; continue; /* ignore all but letters and digits */ case ZERO: if (!afterDigit) { @@ -405,11 +405,11 @@ ucnv_io_stripASCIIForCompare(char *dst, const char *name) { } break; case NONZERO: - afterDigit = TRUE; + afterDigit = true; break; default: c1 = (char)type; /* lowercased letter */ - afterDigit = FALSE; + afterDigit = false; break; } *dstItr++ = c1; @@ -423,13 +423,13 @@ ucnv_io_stripEBCDICForCompare(char *dst, const char *name) { char *dstItr = dst; uint8_t type, nextType; char c1; - UBool afterDigit = FALSE; + UBool afterDigit = false; while ((c1 = *name++) != 0) { type = GET_EBCDIC_TYPE(c1); switch (type) { case UIGNORE: - afterDigit = FALSE; + afterDigit = false; continue; /* ignore all but letters and digits */ case ZERO: if (!afterDigit) { @@ -440,11 +440,11 @@ ucnv_io_stripEBCDICForCompare(char *dst, const char *name) { } break; case NONZERO: - afterDigit = TRUE; + afterDigit = true; break; default: c1 = (char)type; /* lowercased letter */ - afterDigit = FALSE; + afterDigit = false; break; } *dstItr++ = c1; @@ -479,14 +479,14 @@ ucnv_compareNames(const char *name1, const char *name2) { int rc; uint8_t type, nextType; char c1, c2; - UBool afterDigit1 = FALSE, afterDigit2 = FALSE; + UBool afterDigit1 = false, afterDigit2 = false; for (;;) { while ((c1 = *name1++) != 0) { type = GET_CHAR_TYPE(c1); switch (type) { case UIGNORE: - afterDigit1 = FALSE; + afterDigit1 = false; continue; /* ignore all but letters and digits */ case ZERO: if (!afterDigit1) { @@ -497,11 +497,11 @@ ucnv_compareNames(const char *name1, const char *name2) { } break; case NONZERO: - afterDigit1 = TRUE; + afterDigit1 = true; break; default: c1 = (char)type; /* lowercased letter */ - afterDigit1 = FALSE; + afterDigit1 = false; break; } break; /* deliver c1 */ @@ -510,7 +510,7 @@ ucnv_compareNames(const char *name1, const char *name2) { type = GET_CHAR_TYPE(c2); switch (type) { case UIGNORE: - afterDigit2 = FALSE; + afterDigit2 = false; continue; /* ignore all but letters and digits */ case ZERO: if (!afterDigit2) { @@ -521,11 +521,11 @@ ucnv_compareNames(const char *name1, const char *name2) { } break; case NONZERO: - afterDigit2 = TRUE; + afterDigit2 = true; break; default: c2 = (char)type; /* lowercased letter */ - afterDigit2 = FALSE; + afterDigit2 = false; break; } break; /* deliver c2 */ @@ -628,11 +628,11 @@ isAliasInList(const char *alias, uint32_t listOffset) { if (currList[currAlias] && ucnv_compareNames(alias, GET_STRING(currList[currAlias]))==0) { - return TRUE; + return true; } } } - return FALSE; + return false; } /* @@ -1288,7 +1288,7 @@ ucnv_swapAliases(const UDataSwapper *ds, uprv_sortArray(tempTable.rows, (int32_t)count, sizeof(TempRow), io_compareRows, &tempTable, - FALSE, pErrorCode); + false, pErrorCode); if(U_SUCCESS(*pErrorCode)) { /* copy/swap/permutate items */ diff --git a/icu4c/source/common/ucnv_lmb.cpp b/icu4c/source/common/ucnv_lmb.cpp index 6969727927e..78b8e407006 100644 --- a/icu4c/source/common/ucnv_lmb.cpp +++ b/icu4c/source/common/ucnv_lmb.cpp @@ -610,7 +610,7 @@ static const UConverterStaticData _LMBCSStaticData##n={\ sizeof(UConverterStaticData),\ "LMBCS-" #n,\ 0, UCNV_IBM, UCNV_LMBCS_##n, 1, 3,\ - { 0x3f, 0, 0, 0 },1,FALSE,FALSE,0,0,{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} \ + { 0x3f, 0, 0, 0 },1,false,false,0,0,{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} \ };\ const UConverterSharedData _LMBCSData##n= \ UCNV_IMMUTABLE_SHARED_DATA_INITIALIZER(&_LMBCSStaticData##n, &_LMBCSImpl##n); @@ -721,7 +721,7 @@ _LMBCSSafeClone(const UConverter *cnv, } newLMBCS->cnv.extraInfo = &newLMBCS->lmbcs; - newLMBCS->cnv.isExtraLocal = TRUE; + newLMBCS->cnv.isExtraLocal = true; return &newLMBCS->cnv; } @@ -763,14 +763,14 @@ LMBCSConversionWorker ( U_ASSERT(xcnv); U_ASSERT(group 0) { firstByte = (ulmbcs_byte_t)(value >> ((bytesConverted - 1) * 8)); } else { /* most common failure mode is an unassigned character */ - groups_tried[group] = TRUE; + groups_tried[group] = true; return 0; } @@ -1191,11 +1191,11 @@ _LMBCSGetNextUCharWorker(UConverterToUnicodeArgs* args, if (*args->source == group) { /* single byte */ ++args->source; - uniChar = ucnv_MBCSSimpleGetNextUChar(cnv, args->source, 1, FALSE); + uniChar = ucnv_MBCSSimpleGetNextUChar(cnv, args->source, 1, false); ++args->source; } else { /* double byte */ - uniChar = ucnv_MBCSSimpleGetNextUChar(cnv, args->source, 2, FALSE); + uniChar = ucnv_MBCSSimpleGetNextUChar(cnv, args->source, 2, false); args->source += 2; } } @@ -1220,7 +1220,7 @@ _LMBCSGetNextUCharWorker(UConverterToUnicodeArgs* args, /* Lookup value must include opt group */ bytes[0] = group; bytes[1] = CurByte; - uniChar = ucnv_MBCSSimpleGetNextUChar(cnv, bytes, 2, FALSE); + uniChar = ucnv_MBCSSimpleGetNextUChar(cnv, bytes, 2, false); } } } @@ -1236,13 +1236,13 @@ _LMBCSGetNextUCharWorker(UConverterToUnicodeArgs* args, CHECK_SOURCE_LIMIT(0); /* let the MBCS conversion consume CurByte again */ - uniChar = ucnv_MBCSSimpleGetNextUChar(cnv, args->source - 1, 1, FALSE); + uniChar = ucnv_MBCSSimpleGetNextUChar(cnv, args->source - 1, 1, false); } else { CHECK_SOURCE_LIMIT(1); /* let the MBCS conversion consume CurByte again */ - uniChar = ucnv_MBCSSimpleGetNextUChar(cnv, args->source - 1, 2, FALSE); + uniChar = ucnv_MBCSSimpleGetNextUChar(cnv, args->source - 1, 2, false); ++args->source; } } diff --git a/icu4c/source/common/ucnv_u16.cpp b/icu4c/source/common/ucnv_u16.cpp index a5e8367400a..bebdede4c44 100644 --- a/icu4c/source/common/ucnv_u16.cpp +++ b/icu4c/source/common/ucnv_u16.cpp @@ -637,7 +637,7 @@ static const UConverterStaticData _UTF16BEStaticData={ sizeof(UConverterStaticData), "UTF-16BE", 1200, UCNV_IBM, UCNV_UTF16_BigEndian, 2, 2, - { 0xff, 0xfd, 0, 0 },2,FALSE,FALSE, + { 0xff, 0xfd, 0, 0 },2,false,false, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */ @@ -1239,7 +1239,7 @@ static const UConverterStaticData _UTF16LEStaticData={ sizeof(UConverterStaticData), "UTF-16LE", 1202, UCNV_IBM, UCNV_UTF16_LittleEndian, 2, 2, - { 0xfd, 0xff, 0, 0 },2,FALSE,FALSE, + { 0xfd, 0xff, 0, 0 },2,false,false, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */ @@ -1526,7 +1526,7 @@ static const UConverterStaticData _UTF16StaticData = { #else { 0xfd, 0xff, 0, 0 }, 2, #endif - FALSE, FALSE, + false, false, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */ @@ -1567,7 +1567,7 @@ static const UConverterStaticData _UTF16v2StaticData = { 1204, /* CCSID for BOM sensitive UTF-16 */ UCNV_IBM, UCNV_UTF16, 2, 2, { 0xff, 0xfd, 0, 0 }, 2, - FALSE, FALSE, + false, false, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */ diff --git a/icu4c/source/common/ucnv_u32.cpp b/icu4c/source/common/ucnv_u32.cpp index bf6bd11dbac..bc160b71dd6 100644 --- a/icu4c/source/common/ucnv_u32.cpp +++ b/icu4c/source/common/ucnv_u32.cpp @@ -494,7 +494,7 @@ static const UConverterStaticData _UTF32BEStaticData = { "UTF-32BE", 1232, UCNV_IBM, UCNV_UTF32_BigEndian, 4, 4, - { 0, 0, 0xff, 0xfd }, 4, FALSE, FALSE, + { 0, 0, 0xff, 0xfd }, 4, false, false, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */ @@ -989,7 +989,7 @@ static const UConverterStaticData _UTF32LEStaticData = { "UTF-32LE", 1234, UCNV_IBM, UCNV_UTF32_LittleEndian, 4, 4, - { 0xfd, 0xff, 0, 0 }, 4, FALSE, FALSE, + { 0xfd, 0xff, 0, 0 }, 4, false, false, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */ @@ -1110,7 +1110,7 @@ _UTF32ToUnicodeWithOffsets(UConverterToUnicodeArgs *pArgs, /* some of the bytes are from a previous buffer, replay those first */ pArgs->source=utf32BOM+(state&4); /* select the correct BOM */ pArgs->sourceLimit=pArgs->source+((state&3)-count); /* replay previous bytes */ - pArgs->flush=FALSE; /* this sourceLimit is not the real source stream limit */ + pArgs->flush=false; /* this sourceLimit is not the real source stream limit */ /* no offsets: bytes from previous buffer, and not enough for output */ T_UConverter_toUnicode_UTF32_BE(pArgs, pErrorCode); @@ -1241,7 +1241,7 @@ static const UConverterStaticData _UTF32StaticData = { #else { 0xfd, 0xff, 0, 0 }, 4, #endif - FALSE, FALSE, + false, false, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */ diff --git a/icu4c/source/common/ucnv_u7.cpp b/icu4c/source/common/ucnv_u7.cpp index de9f3f42ec9..8964ca01de0 100644 --- a/icu4c/source/common/ucnv_u7.cpp +++ b/icu4c/source/common/ucnv_u7.cpp @@ -184,12 +184,12 @@ static void U_CALLCONV _UTF7Reset(UConverter *cnv, UConverterResetChoice choice) { if(choice<=UCNV_RESET_TO_UNICODE) { /* reset toUnicode */ - cnv->toUnicodeStatus=0x1000000; /* inDirectMode=TRUE */ + cnv->toUnicodeStatus=0x1000000; /* inDirectMode=true */ cnv->toULength=0; } if(choice!=UCNV_RESET_TO_UNICODE) { /* reset fromUnicode */ - cnv->fromUnicodeStatus=(cnv->fromUnicodeStatus&0xf0000000)|0x1000000; /* keep version, inDirectMode=TRUE */ + cnv->fromUnicodeStatus=(cnv->fromUnicodeStatus&0xf0000000)|0x1000000; /* keep version, inDirectMode=true */ } } @@ -286,7 +286,7 @@ directMode: } else /* PLUS */ { /* switch to Unicode mode */ nextSourceIndex=++sourceIndex; - inDirectMode=FALSE; + inDirectMode=false; byteIndex=0; bits=0; base64Counter=-1; @@ -329,7 +329,7 @@ unicodeMode: * It may be for example, a plus which we need to deal with in direct mode. * 2.2.2. Else if the current char is illegal, we might as well deal with it here. */ - inDirectMode=TRUE; + inDirectMode=true; if(base64Counter==-1) { /* illegal: + immediately followed by something other than base64 or minus sign */ /* include the plus sign in the reported sequence, but not the subsequent char */ @@ -411,7 +411,7 @@ unicodeMode: } } else /*base64Value==-2*/ { /* minus sign terminates the base64 sequence */ - inDirectMode=TRUE; + inDirectMode=true; if(base64Counter==-1) { /* +- i.e. a minus immediately following a plus */ *target++=PLUS; @@ -541,7 +541,7 @@ directMode: if(offsets!=NULL) { *offsets++=sourceIndex; } - inDirectMode=FALSE; + inDirectMode=false; base64Counter=0; goto unicodeMode; } @@ -558,7 +558,7 @@ unicodeMode: c=*source++; if(c<=127 && encodeDirectly[c]) { /* encode directly */ - inDirectMode=TRUE; + inDirectMode=true; /* trick: back out this character to make this easier */ --source; @@ -719,7 +719,7 @@ unicodeMode: } } /* reset the state for the next conversion */ - cnv->fromUnicodeStatus=(cnv->fromUnicodeStatus&0xf0000000)|0x1000000; /* keep version, inDirectMode=TRUE */ + cnv->fromUnicodeStatus=(cnv->fromUnicodeStatus&0xf0000000)|0x1000000; /* keep version, inDirectMode=true */ } else { /* set the converter state back into UConverter */ cnv->fromUnicodeStatus= @@ -778,7 +778,7 @@ static const UConverterStaticData _UTF7StaticData={ UCNV_IBM, UCNV_UTF7, 1, 4, { 0x3f, 0, 0, 0 }, 1, /* the subchar is not used */ - FALSE, FALSE, + false, false, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */ @@ -971,7 +971,7 @@ directMode: } else /* AMPERSAND */ { /* switch to Unicode mode */ nextSourceIndex=++sourceIndex; - inDirectMode=FALSE; + inDirectMode=false; byteIndex=0; bits=0; base64Counter=-1; @@ -1002,7 +1002,7 @@ unicodeMode: ++nextSourceIndex; if(b>0x7e) { /* illegal - test other illegal US-ASCII values by base64Value==-3 */ - inDirectMode=TRUE; + inDirectMode=true; *pErrorCode=U_ILLEGAL_CHAR_FOUND; break; } else if((base64Value=FROM_BASE64_IMAP(b))>=0) { @@ -1024,7 +1024,7 @@ unicodeMode: c=(UChar)((bits<<4)|(base64Value>>2)); if(isLegalIMAP(c)) { /* illegal */ - inDirectMode=TRUE; + inDirectMode=true; *pErrorCode=U_ILLEGAL_CHAR_FOUND; goto endloop; } @@ -1042,7 +1042,7 @@ unicodeMode: c=(UChar)((bits<<2)|(base64Value>>4)); if(isLegalIMAP(c)) { /* illegal */ - inDirectMode=TRUE; + inDirectMode=true; *pErrorCode=U_ILLEGAL_CHAR_FOUND; goto endloop; } @@ -1060,7 +1060,7 @@ unicodeMode: c=(UChar)((bits<<6)|base64Value); if(isLegalIMAP(c)) { /* illegal */ - inDirectMode=TRUE; + inDirectMode=true; *pErrorCode=U_ILLEGAL_CHAR_FOUND; goto endloop; } @@ -1079,7 +1079,7 @@ unicodeMode: } } else if(base64Value==-2) { /* minus sign terminates the base64 sequence */ - inDirectMode=TRUE; + inDirectMode=true; if(base64Counter==-1) { /* &- i.e. a minus immediately following an ampersand */ *target++=AMPERSAND; @@ -1109,7 +1109,7 @@ unicodeMode: /* base64Value==-1 for characters that are illegal only in Unicode mode */ /* base64Value==-3 for illegal characters */ /* illegal */ - inDirectMode=TRUE; + inDirectMode=true; *pErrorCode=U_ILLEGAL_CHAR_FOUND; break; } @@ -1144,7 +1144,7 @@ endloop: } /* else if(base64Counter!=-1) byteIndex remains 0 because there is no particular byte sequence */ - inDirectMode=TRUE; /* avoid looping */ + inDirectMode=true; /* avoid looping */ *pErrorCode=U_TRUNCATED_CHAR_FOUND; } @@ -1240,7 +1240,7 @@ directMode: if(offsets!=NULL) { *offsets++=sourceIndex; } - inDirectMode=FALSE; + inDirectMode=false; base64Counter=0; goto unicodeMode; } @@ -1257,7 +1257,7 @@ unicodeMode: c=*source++; if(isLegalIMAP(c)) { /* encode directly */ - inDirectMode=TRUE; + inDirectMode=true; /* trick: back out this character to make this easier */ --source; @@ -1431,7 +1431,7 @@ unicodeMode: } } /* reset the state for the next conversion */ - cnv->fromUnicodeStatus=(cnv->fromUnicodeStatus&0xf0000000)|0x1000000; /* keep version, inDirectMode=TRUE */ + cnv->fromUnicodeStatus=(cnv->fromUnicodeStatus&0xf0000000)|0x1000000; /* keep version, inDirectMode=true */ } else { /* set the converter state back into UConverter */ cnv->fromUnicodeStatus= @@ -1479,7 +1479,7 @@ static const UConverterStaticData _IMAPStaticData={ UCNV_IBM, UCNV_IMAP_MAILBOX, 1, 4, { 0x3f, 0, 0, 0 }, 1, /* the subchar is not used */ - FALSE, FALSE, + false, false, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */ diff --git a/icu4c/source/common/ucnv_u8.cpp b/icu4c/source/common/ucnv_u8.cpp index 1ef7fa2f02f..3c27f2e46e8 100644 --- a/icu4c/source/common/ucnv_u8.cpp +++ b/icu4c/source/common/ucnv_u8.cpp @@ -56,7 +56,7 @@ static const uint32_t offsetsFromUTF8[5] = {0, static UBool hasCESU8Data(const UConverter *cnv) { #if UCONFIG_ONLY_HTML_CONVERSION - return FALSE; + return false; #else return (UBool)(cnv->sharedData == &_CESU8Data); #endif @@ -888,7 +888,7 @@ static const UConverterStaticData _UTF8StaticData={ "UTF-8", 1208, UCNV_IBM, UCNV_UTF8, 1, 3, /* max 3 bytes per UChar from UTF-8 (4 bytes from surrogate _pair_) */ - { 0xef, 0xbf, 0xbd, 0 },3,FALSE,FALSE, + { 0xef, 0xbf, 0xbd, 0 },3,false,false, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */ @@ -931,7 +931,7 @@ static const UConverterStaticData _CESU8StaticData={ "CESU-8", 9400, /* CCSID for CESU-8 */ UCNV_UNKNOWN, UCNV_CESU8, 1, 3, - { 0xef, 0xbf, 0xbd, 0 },3,FALSE,FALSE, + { 0xef, 0xbf, 0xbd, 0 },3,false,false, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */ diff --git a/icu4c/source/common/ucnvbocu.cpp b/icu4c/source/common/ucnvbocu.cpp index 7c2aab56558..edb49d36a9c 100644 --- a/icu4c/source/common/ucnvbocu.cpp +++ b/icu4c/source/common/ucnvbocu.cpp @@ -195,7 +195,7 @@ bocu1TrailToByte[BOCU1_TRAIL_CONTROLS_COUNT]={ * what we need here. * This macro adjust the results so that the modulo-value m is always >=0. * - * For positive n, the if() condition is always FALSE. + * For positive n, the if() condition is always false. * * @param n Number to be split into quotient and rest. * Will be modified to contain the quotient. @@ -1401,7 +1401,7 @@ static const UConverterStaticData _Bocu1StaticData={ UCNV_IBM, UCNV_BOCU1, 1, 4, /* one UChar generates at least 1 byte and at most 4 bytes */ { 0x1a, 0, 0, 0 }, 1, /* BOCU-1 never needs to write a subchar */ - FALSE, FALSE, + false, false, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */ diff --git a/icu4c/source/common/ucnvhz.cpp b/icu4c/source/common/ucnvhz.cpp index 6b2f5faaf0a..e0d2f0775df 100644 --- a/icu4c/source/common/ucnvhz.cpp +++ b/icu4c/source/common/ucnvhz.cpp @@ -111,18 +111,18 @@ _HZReset(UConverter *cnv, UConverterResetChoice choice){ cnv->toUnicodeStatus = 0; cnv->mode=0; if(cnv->extraInfo != NULL){ - ((UConverterDataHZ*)cnv->extraInfo)->isStateDBCS = FALSE; - ((UConverterDataHZ*)cnv->extraInfo)->isEmptySegment = FALSE; + ((UConverterDataHZ*)cnv->extraInfo)->isStateDBCS = false; + ((UConverterDataHZ*)cnv->extraInfo)->isEmptySegment = false; } } if(choice!=UCNV_RESET_TO_UNICODE) { cnv->fromUnicodeStatus= 0; cnv->fromUChar32=0x0000; if(cnv->extraInfo != NULL){ - ((UConverterDataHZ*)cnv->extraInfo)->isEscapeAppended = FALSE; + ((UConverterDataHZ*)cnv->extraInfo)->isEscapeAppended = false; ((UConverterDataHZ*)cnv->extraInfo)->targetIndex = 0; ((UConverterDataHZ*)cnv->extraInfo)->sourceIndex = 0; - ((UConverterDataHZ*)cnv->extraInfo)->isTargetUCharDBCS = FALSE; + ((UConverterDataHZ*)cnv->extraInfo)->isTargetUCharDBCS = false; } } } @@ -189,13 +189,13 @@ UConverter_toUnicode_HZ_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, args->offsets[myTarget - args->target]=(int32_t)(mySource - args->source - 2); } *(myTarget++)=(UChar)mySourceChar; - myData->isEmptySegment = FALSE; + myData->isEmptySegment = false; continue; case UCNV_OPEN_BRACE: case UCNV_CLOSE_BRACE: myData->isStateDBCS = (mySourceChar == UCNV_OPEN_BRACE); if (myData->isEmptySegment) { - myData->isEmptySegment = FALSE; /* we are handling it, reset to avoid future spurious errors */ + myData->isEmptySegment = false; /* we are handling it, reset to avoid future spurious errors */ *err = U_ILLEGAL_ESCAPE_SEQUENCE; args->converter->toUCallbackReason = UCNV_IRREGULAR; args->converter->toUBytes[0] = UCNV_TILDE; @@ -205,7 +205,7 @@ UConverter_toUnicode_HZ_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, args->source = mySource; return; } - myData->isEmptySegment = TRUE; + myData->isEmptySegment = true; continue; default: /* if the first byte is equal to TILDE and the trail byte @@ -217,7 +217,7 @@ UConverter_toUnicode_HZ_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, * - If any of the non-initial bytes could be the start of a character, * we stop the illegal sequence before the first one of those. */ - myData->isEmptySegment = FALSE; /* different error here, reset this to avoid spurious future error */ + myData->isEmptySegment = false; /* different error here, reset this to avoid spurious future error */ *err = U_ILLEGAL_ESCAPE_SEQUENCE; args->converter->toUBytes[0] = UCNV_TILDE; if( myData->isStateDBCS ? @@ -244,7 +244,7 @@ UConverter_toUnicode_HZ_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, } else { /* add another bit to distinguish a 0 byte from not having seen a lead byte */ args->converter->toUnicodeStatus = (uint32_t) (mySourceChar | 0x100); - myData->isEmptySegment = FALSE; /* the segment has something, either valid or will produce a different error, so reset this */ + myData->isEmptySegment = false; /* the segment has something, either valid or will produce a different error, so reset this */ } continue; } @@ -289,10 +289,10 @@ UConverter_toUnicode_HZ_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, continue; } else if(mySourceChar <= 0x7f) { targetUniChar = (UChar)mySourceChar; /* ASCII */ - myData->isEmptySegment = FALSE; /* the segment has something valid */ + myData->isEmptySegment = false; /* the segment has something valid */ } else { targetUniChar = 0xffff; - myData->isEmptySegment = FALSE; /* different error here, reset this to avoid spurious future error */ + myData->isEmptySegment = false; /* different error here, reset this to avoid spurious future error */ } } if(targetUniChar < 0xfffe){ @@ -396,13 +396,13 @@ UConverter_fromUnicode_HZ_OFFSETS_LOGIC (UConverterFromUnicodeArgs * args, len =ESC_LEN; escSeq = SB_ESCAPE; CONCAT_ESCAPE_MACRO(args, myTargetIndex, targetLength, escSeq,err,len,mySourceIndex); - myConverterData->isEscapeAppended = TRUE; + myConverterData->isEscapeAppended = true; } else{ /* Shifting from a single byte to double byte mode*/ len =ESC_LEN; escSeq = DB_ESCAPE; CONCAT_ESCAPE_MACRO(args, myTargetIndex, targetLength, escSeq,err,len,mySourceIndex); - myConverterData->isEscapeAppended = TRUE; + myConverterData->isEscapeAppended = true; } } @@ -507,7 +507,7 @@ _HZ_WriteSub(UConverterFromUnicodeArgs *args, int32_t offsetIndex, UErrorCode *e if( convData->isTargetUCharDBCS){ *p++= UCNV_TILDE; *p++= UCNV_CLOSE_BRACE; - convData->isTargetUCharDBCS=FALSE; + convData->isTargetUCharDBCS=false; } *p++= (char)cnv->subChars[0]; @@ -550,7 +550,7 @@ _HZ_SafeClone(const UConverter *cnv, uprv_memcpy(&localClone->mydata, cnv->extraInfo, sizeof(UConverterDataHZ)); localClone->cnv.extraInfo = &localClone->mydata; - localClone->cnv.isExtraLocal = TRUE; + localClone->cnv.isExtraLocal = true; /* deep-clone the sub-converter */ size = (int32_t)sizeof(UConverter); @@ -611,8 +611,8 @@ static const UConverterStaticData _HZStaticData={ 4, { 0x1a, 0, 0, 0 }, 1, - FALSE, - FALSE, + false, + false, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }, /* reserved */ diff --git a/icu4c/source/common/ucnvisci.cpp b/icu4c/source/common/ucnvisci.cpp index f303e7e24fc..4d747e1ff84 100644 --- a/icu4c/source/common/ucnvisci.cpp +++ b/icu4c/source/common/ucnvisci.cpp @@ -172,7 +172,7 @@ static const uint8_t pnjMap[80] = { static UBool isPNJConsonant(UChar32 c) { if (c < 0xa00 || 0xa50 <= c) { - return FALSE; + return false; } else { return (UBool)(pnjMap[c - 0xa00] & 1); } @@ -181,7 +181,7 @@ isPNJConsonant(UChar32 c) { static UBool isPNJBindiTippi(UChar32 c) { if (c < 0xa00 || 0xa50 <= c) { - return FALSE; + return false; } else { return (UBool)(pnjMap[c - 0xa00] >> 1); } @@ -202,7 +202,7 @@ _ISCIIOpen(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode) { converterData->contextCharToUnicode=NO_CHAR_MARKER; cnv->toUnicodeStatus = missingCharMarker; converterData->contextCharFromUnicode=0x0000; - converterData->resetToDefaultToUnicode=FALSE; + converterData->resetToDefaultToUnicode=false; /* check if the version requested is supported */ if ((pArgs->options & UCNV_OPTIONS_VERSION_MASK) < 9) { /* initialize state variables */ @@ -214,7 +214,7 @@ _ISCIIOpen(UConverter *cnv, UConverterLoadArgs *pArgs, UErrorCode *errorCode) { = converterData->currentMaskToUnicode = converterData->defMaskToUnicode = lookupInitialData[pArgs->options & UCNV_OPTIONS_VERSION_MASK].maskEnum; - converterData->isFirstBuffer=TRUE; + converterData->isFirstBuffer=true; (void)uprv_strcpy(converterData->name, ISCII_CNV_PREFIX); len = (int32_t)uprv_strlen(converterData->name); converterData->name[len]= (char)((pArgs->options & UCNV_OPTIONS_VERSION_MASK) + '0'); @@ -267,8 +267,8 @@ _ISCIIReset(UConverter *cnv, UConverterResetChoice choice) { data->contextCharFromUnicode=0x00; data->currentMaskFromUnicode=data->defMaskToUnicode; data->currentDeltaFromUnicode=data->defDeltaToUnicode; - data->isFirstBuffer=TRUE; - data->resetToDefaultToUnicode=FALSE; + data->isFirstBuffer=true; + data->resetToDefaultToUnicode=false; } } @@ -906,7 +906,7 @@ UConverter_fromUnicode_ISCII_OFFSETS_LOGIC( UConverterDataISCII *converterData; uint16_t newDelta=0; uint16_t range = 0; - UBool deltaChanged = FALSE; + UBool deltaChanged = false; if ((args->converter == NULL) || (args->targetLimit < args->target) || (args->sourceLimit < args->source)) { *err = U_ILLEGAL_ARGUMENT_ERROR; @@ -986,8 +986,8 @@ UConverter_fromUnicode_ISCII_OFFSETS_LOGIC( if (newDelta!= converterData->currentDeltaFromUnicode || converterData->isFirstBuffer) { converterData->currentDeltaFromUnicode = newDelta; converterData->currentMaskFromUnicode = lookupInitialData[range].maskEnum; - deltaChanged =TRUE; - converterData->isFirstBuffer=FALSE; + deltaChanged =true; + converterData->isFirstBuffer=false; } if (converterData->currentDeltaFromUnicode == PNJ_DELTA) { @@ -1024,7 +1024,7 @@ UConverter_fromUnicode_ISCII_OFFSETS_LOGIC( temp =(uint16_t)(ATR<<8); temp += (uint16_t)((uint8_t) lookupInitialData[range].isciiLang); /* reset */ - deltaChanged=FALSE; + deltaChanged=false; /* now append ATR and language code */ WRITE_TO_TARGET_FROM_U(args,offsets,source,target,targetLimit,temp,err); if (U_FAILURE(*err)) { @@ -1330,7 +1330,7 @@ UConverter_toUnicode_ISCII_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, UErrorCo break; case 0x0A: case 0x0D: - data->resetToDefaultToUnicode = TRUE; + data->resetToDefaultToUnicode = true; GET_MAPPING(sourceChar,targetUniChar,data) ; *contextCharToUnicode = sourceChar; @@ -1338,12 +1338,12 @@ UConverter_toUnicode_ISCII_OFFSETS_LOGIC(UConverterToUnicodeArgs *args, UErrorCo case ISCII_VOWEL_SIGN_E: i=1; - found=FALSE; + found=false; for (; i + ISCII_NUKTA special mappings */ i=1; - found =FALSE; + found =false; for (; iresetToDefaultToUnicode==TRUE) { + if (data->resetToDefaultToUnicode==true) { data->currentDeltaToUnicode = data->defDeltaToUnicode; data->currentMaskToUnicode = data->defMaskToUnicode; - data->resetToDefaultToUnicode=FALSE; + data->resetToDefaultToUnicode=false; } } else { @@ -1550,7 +1550,7 @@ _ISCII_SafeClone(const UConverter *cnv, uprv_memcpy(&localClone->mydata, cnv->extraInfo, sizeof(UConverterDataISCII)); localClone->cnv.extraInfo = &localClone->mydata; - localClone->cnv.isExtraLocal = TRUE; + localClone->cnv.isExtraLocal = true; return &localClone->cnv; } @@ -1621,8 +1621,8 @@ static const UConverterStaticData _ISCIIStaticData={ 4, { 0x1a, 0, 0, 0 }, 0x1, - FALSE, - FALSE, + false, + false, 0x0, 0x0, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }, /* reserved */ diff --git a/icu4c/source/common/ucnvlat1.cpp b/icu4c/source/common/ucnvlat1.cpp index 358bc0caa25..05aad6a0e03 100644 --- a/icu4c/source/common/ucnvlat1.cpp +++ b/icu4c/source/common/ucnvlat1.cpp @@ -465,7 +465,7 @@ static const UConverterStaticData _Latin1StaticData={ sizeof(UConverterStaticData), "ISO-8859-1", 819, UCNV_IBM, UCNV_LATIN_1, 1, 1, - { 0x1a, 0, 0, 0 }, 1, FALSE, FALSE, + { 0x1a, 0, 0, 0 }, 1, false, false, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */ @@ -744,7 +744,7 @@ static const UConverterStaticData _ASCIIStaticData={ sizeof(UConverterStaticData), "US-ASCII", 367, UCNV_IBM, UCNV_US_ASCII, 1, 1, - { 0x1a, 0, 0, 0 }, 1, FALSE, FALSE, + { 0x1a, 0, 0, 0 }, 1, false, false, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */ diff --git a/icu4c/source/common/ucnvmbcs.cpp b/icu4c/source/common/ucnvmbcs.cpp index 420aa02af5b..0e753c8ffbf 100644 --- a/icu4c/source/common/ucnvmbcs.cpp +++ b/icu4c/source/common/ucnvmbcs.cpp @@ -373,7 +373,7 @@ * @param value contains 1..4 bytes of the first byte sequence, right-aligned * @param codePoints resulting Unicode code points, or negative if a byte sequence does * not map to anything - * @return TRUE to continue enumeration, FALSE to stop + * @return true to continue enumeration, false to stop */ typedef UBool U_CALLCONV UConverterEnumToUCallback(const void *context, uint32_t value, UChar32 codePoints[32]); @@ -514,7 +514,7 @@ static const UConverterImpl _MBCSImpl={ const UConverterSharedData _MBCSData={ sizeof(UConverterSharedData), 1, - NULL, NULL, FALSE, TRUE, &_MBCSImpl, + NULL, NULL, false, true, &_MBCSImpl, 0, UCNV_MBCS_TABLE_INITIALIZER }; @@ -668,7 +668,7 @@ enumToU(UConverterMBCSTable *mbcsTable, int8_t stateProps[], value|(uint32_t)b, callback, context, pErrorCode)) { - return FALSE; + return false; } } codePoints[b&0x1f]=U_SENTINEL; @@ -719,13 +719,13 @@ enumToU(UConverterMBCSTable *mbcsTable, int8_t stateProps[], if(((++b)&0x1f)==0) { if(anyCodePoints>=0) { if(!callback(context, value|(uint32_t)(b-0x20), codePoints)) { - return FALSE; + return false; } anyCodePoints=-1; } } } - return TRUE; + return true; } /* @@ -1111,7 +1111,7 @@ _extFromU(UConverter *cnv, const UConverterSharedData *sharedData, UErrorCode *pErrorCode) { const int32_t *cx; - cnv->useSubChar1=FALSE; + cnv->useSubChar1=false; if( (cx=sharedData->mbcs.extIndexes)!=NULL && ucnv_extInitialMatchFromU( @@ -1286,7 +1286,7 @@ _EBCDICSwapLFNL(UConverterSharedData *sharedData, UErrorCode *pErrorCode) { mbcsTable->stateTable[0][EBCDIC_LF]==MBCS_ENTRY_FINAL(0, MBCS_STATE_VALID_DIRECT_16, U_LF) && mbcsTable->stateTable[0][EBCDIC_NL]==MBCS_ENTRY_FINAL(0, MBCS_STATE_VALID_DIRECT_16, U_NL) )) { - return FALSE; + return false; } if(mbcsTable->outputType==MBCS_OUTPUT_1) { @@ -1294,7 +1294,7 @@ _EBCDICSwapLFNL(UConverterSharedData *sharedData, UErrorCode *pErrorCode) { EBCDIC_RT_LF==MBCS_SINGLE_RESULT_FROM_U(table, results, U_LF) && EBCDIC_RT_NL==MBCS_SINGLE_RESULT_FROM_U(table, results, U_NL) )) { - return FALSE; + return false; } } else /* MBCS_OUTPUT_2_SISO */ { stage2Entry=MBCS_STAGE_2_FROM_U(table, U_LF); @@ -1302,7 +1302,7 @@ _EBCDICSwapLFNL(UConverterSharedData *sharedData, UErrorCode *pErrorCode) { MBCS_FROM_U_IS_ROUNDTRIP(stage2Entry, U_LF)!=0 && EBCDIC_LF==MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, U_LF) )) { - return FALSE; + return false; } stage2Entry=MBCS_STAGE_2_FROM_U(table, U_NL); @@ -1310,7 +1310,7 @@ _EBCDICSwapLFNL(UConverterSharedData *sharedData, UErrorCode *pErrorCode) { MBCS_FROM_U_IS_ROUNDTRIP(stage2Entry, U_NL)!=0 && EBCDIC_NL==MBCS_VALUE_2_FROM_STAGE_2(bytes, stage2Entry, U_NL) )) { - return FALSE; + return false; } } @@ -1334,7 +1334,7 @@ _EBCDICSwapLFNL(UConverterSharedData *sharedData, UErrorCode *pErrorCode) { * ucnv_MBCSSizeofFromUBytes() function. */ *pErrorCode=U_INVALID_FORMAT_ERROR; - return FALSE; + return false; } /* @@ -1351,7 +1351,7 @@ _EBCDICSwapLFNL(UConverterSharedData *sharedData, UErrorCode *pErrorCode) { p=(uint8_t *)uprv_malloc(size); if(p==NULL) { *pErrorCode=U_MEMORY_ALLOCATION_ERROR; - return FALSE; + return false; } /* copy and modify the to-Unicode state table */ @@ -1397,7 +1397,7 @@ _EBCDICSwapLFNL(UConverterSharedData *sharedData, UErrorCode *pErrorCode) { if(newStateTable!=NULL) { uprv_free(newStateTable); } - return TRUE; + return true; } /* reconstitute omitted fromUnicode data ------------------------------------ */ @@ -1477,7 +1477,7 @@ writeStage3Roundtrip(const void *context, uint32_t value, UChar32 codePoints[32] /* set the roundtrip flag */ *stage2|=(1UL<<(16+(c&0xf))); } - return TRUE; + return true; } static void @@ -1561,7 +1561,7 @@ ucnv_MBCSLoad(UConverterSharedData *sharedData, _MBCSHeader *header=(_MBCSHeader *)raw; uint32_t offset; uint32_t headerLength; - UBool noFromU=FALSE; + UBool noFromU=false; if(header->version[0]==4) { headerLength=MBCS_HEADER_V4_LENGTH; @@ -1726,7 +1726,7 @@ ucnv_MBCSLoad(UConverterSharedData *sharedData, } mbcsTable->stateTable=(const int32_t (*)[256])newStateTable; mbcsTable->countStates=(uint8_t)(count+1); - mbcsTable->stateTableOwned=TRUE; + mbcsTable->stateTableOwned=true; mbcsTable->outputType=MBCS_OUTPUT_DBCS_ONLY; } @@ -1805,7 +1805,7 @@ ucnv_MBCSLoad(UConverterSharedData *sharedData, (header->version[2]>=(MBCS_FAST_MAX>>8)) ) ) { - mbcsTable->utf8Friendly=TRUE; + mbcsTable->utf8Friendly=true; if(mbcsTable->countStates==1) { /* @@ -2411,13 +2411,13 @@ hasValidTrailBytes(const int32_t (*stateTable)[256], uint8_t state) { if( !MBCS_ENTRY_IS_TRANSITION(entry) && MBCS_ENTRY_FINAL_ACTION(entry)!=MBCS_STATE_ILLEGAL ) { - return TRUE; + return true; } entry=row[0x41]; if( !MBCS_ENTRY_IS_TRANSITION(entry) && MBCS_ENTRY_FINAL_ACTION(entry)!=MBCS_STATE_ILLEGAL ) { - return TRUE; + return true; } /* Then test for final entries in this state. */ for(b=0; b<=0xff; ++b) { @@ -2425,7 +2425,7 @@ hasValidTrailBytes(const int32_t (*stateTable)[256], uint8_t state) { if( !MBCS_ENTRY_IS_TRANSITION(entry) && MBCS_ENTRY_FINAL_ACTION(entry)!=MBCS_STATE_ILLEGAL ) { - return TRUE; + return true; } } /* Then recurse for transition entries. */ @@ -2434,10 +2434,10 @@ hasValidTrailBytes(const int32_t (*stateTable)[256], uint8_t state) { if( MBCS_ENTRY_IS_TRANSITION(entry) && hasValidTrailBytes(stateTable, (uint8_t)MBCS_ENTRY_TRANSITION_STATE(entry)) ) { - return TRUE; + return true; } } - return FALSE; + return false; } /* @@ -2454,7 +2454,7 @@ isSingleOrLead(const int32_t (*stateTable)[256], uint8_t state, UBool isDBCSOnly } else { uint8_t action=(uint8_t)(MBCS_ENTRY_FINAL_ACTION(entry)); if(action==MBCS_STATE_CHANGE_ONLY && isDBCSOnly) { - return FALSE; /* SI/SO are illegal for DBCS-only conversion */ + return false; /* SI/SO are illegal for DBCS-only conversion */ } else { return action!=MBCS_STATE_ILLEGAL; } @@ -5672,7 +5672,7 @@ ucnv_MBCSWriteSub(UConverterFromUnicodeArgs *pArgs, } /* reset the selector for the next code point */ - cnv->useSubChar1=FALSE; + cnv->useSubChar1=false; if (cnv->sharedData->mbcs.outputType == MBCS_OUTPUT_2_SISO) { p=buffer; diff --git a/icu4c/source/common/ucnvscsu.cpp b/icu4c/source/common/ucnvscsu.cpp index 7b580291e1d..86e850a998a 100644 --- a/icu4c/source/common/ucnvscsu.cpp +++ b/icu4c/source/common/ucnvscsu.cpp @@ -163,7 +163,7 @@ _SCSUReset(UConverter *cnv, UConverterResetChoice choice) { /* reset toUnicode */ uprv_memcpy(scsu->toUDynamicOffsets, initialDynamicOffsets, 32); - scsu->toUIsSingleByteMode=TRUE; + scsu->toUIsSingleByteMode=true; scsu->toUState=readCommand; scsu->toUQuoteWindow=scsu->toUDynamicWindow=0; scsu->toUByteOne=0; @@ -174,7 +174,7 @@ _SCSUReset(UConverter *cnv, UConverterResetChoice choice) { /* reset fromUnicode */ uprv_memcpy(scsu->fromUDynamicOffsets, initialDynamicOffsets, 32); - scsu->fromUIsSingleByteMode=TRUE; + scsu->fromUIsSingleByteMode=true; scsu->fromUDynamicWindow=0; scsu->nextWindowUseIndex=0; @@ -371,7 +371,7 @@ singleByteMode: state=quotePairOne; } else if(b==SCU) { sourceIndex=nextSourceIndex; - isSingleByteMode=FALSE; + isSingleByteMode=false; goto fastUnicode; } else /* Srs */ { /* callback(illegal) */ @@ -508,17 +508,17 @@ fastUnicode: } else if(/* UC0<=b && */ b<=UC7) { dynamicWindow=(int8_t)(b-UC0); sourceIndex=nextSourceIndex; - isSingleByteMode=TRUE; + isSingleByteMode=true; goto fastSingle; } else if(/* UD0<=b && */ b<=UD7) { dynamicWindow=(int8_t)(b-UD0); - isSingleByteMode=TRUE; + isSingleByteMode=true; cnv->toUBytes[0]=b; cnv->toULength=1; state=defineOne; goto singleByteMode; } else if(b==UDX) { - isSingleByteMode=TRUE; + isSingleByteMode=true; cnv->toUBytes[0]=b; cnv->toULength=1; state=definePairOne; @@ -695,7 +695,7 @@ singleByteMode: } else if(b==SQU) { state=quotePairOne; } else if(b==SCU) { - isSingleByteMode=FALSE; + isSingleByteMode=false; goto fastUnicode; } else /* Srs */ { /* callback(illegal) */ @@ -805,17 +805,17 @@ fastUnicode: state=quotePairTwo; } else if(/* UC0<=b && */ b<=UC7) { dynamicWindow=(int8_t)(b-UC0); - isSingleByteMode=TRUE; + isSingleByteMode=true; goto fastSingle; } else if(/* UD0<=b && */ b<=UD7) { dynamicWindow=(int8_t)(b-UD0); - isSingleByteMode=TRUE; + isSingleByteMode=true; cnv->toUBytes[0]=b; cnv->toULength=1; state=defineOne; goto singleByteMode; } else if(b==UDX) { - isSingleByteMode=TRUE; + isSingleByteMode=true; cnv->toUBytes[0]=b; cnv->toULength=1; state=definePairOne; @@ -1159,7 +1159,7 @@ getTrailSingle: goto outputBytes; } else { /* change to Unicode mode and output this (lead, trail) pair */ - isSingleByteMode=FALSE; + isSingleByteMode=false; *target++=(uint8_t)SCU; if(offsets!=NULL) { *offsets++=sourceIndex; @@ -1218,7 +1218,7 @@ getTrailSingle: * switch to Unicode mode if this is the last character in the block * or there is at least one more ideograph following immediately */ - isSingleByteMode=FALSE; + isSingleByteMode=false; c|=SCU<<16; length=3; goto outputBytes; @@ -1269,13 +1269,13 @@ getTrailSingle: if(!(sourcefromUDynamicOffsets, c))>=0) { /* there is a dynamic window that contains this character, change to it */ - isSingleByteMode=TRUE; + isSingleByteMode=true; dynamicWindow=window; currentOffset=scsu->fromUDynamicOffsets[dynamicWindow]; useDynamicWindow(scsu, dynamicWindow); @@ -1284,7 +1284,7 @@ getTrailSingle: goto outputBytes; } else if((code=getDynamicOffset(c, &offset))>=0) { /* define a dynamic window with this character */ - isSingleByteMode=TRUE; + isSingleByteMode=true; dynamicWindow=getNextDynamicWindow(scsu); currentOffset=scsu->fromUDynamicOffsets[dynamicWindow]=offset; useDynamicWindow(scsu, dynamicWindow); @@ -1337,7 +1337,7 @@ getTrailUnicode: * the following character is not uncompressible, * change to the window */ - isSingleByteMode=TRUE; + isSingleByteMode=true; dynamicWindow=window; currentOffset=scsu->fromUDynamicOffsets[dynamicWindow]; useDynamicWindow(scsu, dynamicWindow); @@ -1348,7 +1348,7 @@ getTrailUnicode: (code=getDynamicOffset(c, &offset))>=0 ) { /* two supplementary characters in (probably) the same window - define an extended one */ - isSingleByteMode=TRUE; + isSingleByteMode=true; code-=0x200; dynamicWindow=getNextDynamicWindow(scsu); currentOffset=scsu->fromUDynamicOffsets[dynamicWindow]=offset; @@ -1645,7 +1645,7 @@ getTrailSingle: goto outputBytes; } else { /* change to Unicode mode and output this (lead, trail) pair */ - isSingleByteMode=FALSE; + isSingleByteMode=false; *target++=(uint8_t)SCU; --targetCapacity; c=((uint32_t)lead<<16)|trail; @@ -1701,7 +1701,7 @@ getTrailSingle: * switch to Unicode mode if this is the last character in the block * or there is at least one more ideograph following immediately */ - isSingleByteMode=FALSE; + isSingleByteMode=false; c|=SCU<<16; length=3; goto outputBytes; @@ -1746,13 +1746,13 @@ getTrailSingle: if(!(sourcefromUDynamicOffsets, c))>=0) { /* there is a dynamic window that contains this character, change to it */ - isSingleByteMode=TRUE; + isSingleByteMode=true; dynamicWindow=window; currentOffset=scsu->fromUDynamicOffsets[dynamicWindow]; useDynamicWindow(scsu, dynamicWindow); @@ -1761,7 +1761,7 @@ getTrailSingle: goto outputBytes; } else if((code=getDynamicOffset(c, &offset))>=0) { /* define a dynamic window with this character */ - isSingleByteMode=TRUE; + isSingleByteMode=true; dynamicWindow=getNextDynamicWindow(scsu); currentOffset=scsu->fromUDynamicOffsets[dynamicWindow]=offset; useDynamicWindow(scsu, dynamicWindow); @@ -1813,7 +1813,7 @@ getTrailUnicode: * the following character is not uncompressible, * change to the window */ - isSingleByteMode=TRUE; + isSingleByteMode=true; dynamicWindow=window; currentOffset=scsu->fromUDynamicOffsets[dynamicWindow]; useDynamicWindow(scsu, dynamicWindow); @@ -1824,7 +1824,7 @@ getTrailUnicode: (code=getDynamicOffset(c, &offset))>=0 ) { /* two supplementary characters in (probably) the same window - define an extended one */ - isSingleByteMode=TRUE; + isSingleByteMode=true; code-=0x200; dynamicWindow=getNextDynamicWindow(scsu); currentOffset=scsu->fromUDynamicOffsets[dynamicWindow]=offset; @@ -1991,7 +1991,7 @@ _SCSUSafeClone(const UConverter *cnv, uprv_memcpy(&localClone->mydata, cnv->extraInfo, sizeof(SCSUData)); localClone->cnv.extraInfo = &localClone->mydata; - localClone->cnv.isExtraLocal = TRUE; + localClone->cnv.isExtraLocal = true; return &localClone->cnv; } @@ -2033,7 +2033,7 @@ static const UConverterStaticData _SCSUStaticData={ * substitution string. */ { 0x0e, 0xff, 0xfd, 0 }, 3, - FALSE, FALSE, + false, false, 0, 0, { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */ diff --git a/icu4c/source/common/ucnvsel.cpp b/icu4c/source/common/ucnvsel.cpp index 2dff5ac1bc8..15ee596a23c 100644 --- a/icu4c/source/common/ucnvsel.cpp +++ b/icu4c/source/common/ucnvsel.cpp @@ -142,7 +142,7 @@ static void generateSelectorData(UConverterSelector* result, result->trie = upvec_compactToUTrie2WithRowIndexes(upvec, status); result->pv = upvec_cloneArray(upvec, &result->pvCount, NULL, status); result->pvCount *= columns; // number of uint32_t = rows * columns - result->ownPv = TRUE; + result->ownPv = true; } /* open a selector. If converterListSize is 0, build for all converters. @@ -212,7 +212,7 @@ ucnvsel_open(const char* const* converterList, int32_t converterListSize, --encodingStrPadding; } - newSelector->ownEncodingStrings = TRUE; + newSelector->ownEncodingStrings = true; newSelector->encodingsCount = converterListSize; UPropsVectors *upvec = upvec_open((converterListSize+31)/32, status); generateSelectorData(newSelector.getAlias(), upvec, excludedCodePoints, whichSet, status); diff --git a/icu4c/source/common/ucol_swp.cpp b/icu4c/source/common/ucol_swp.cpp index 1af19863fa8..59704ff8f67 100644 --- a/icu4c/source/common/ucol_swp.cpp +++ b/icu4c/source/common/ucol_swp.cpp @@ -34,7 +34,7 @@ U_CAPI UBool U_EXPORT2 ucol_looksLikeCollationBinary(const UDataSwapper *ds, const void *inData, int32_t length) { if(ds==NULL || inData==NULL || length<-1) { - return FALSE; + return false; } // First check for format version 4+ which has a standard data header. @@ -46,7 +46,7 @@ ucol_looksLikeCollationBinary(const UDataSwapper *ds, info.dataFormat[1]==0x43 && info.dataFormat[2]==0x6f && info.dataFormat[3]==0x6c) { - return TRUE; + return true; } } @@ -64,7 +64,7 @@ ucol_looksLikeCollationBinary(const UDataSwapper *ds, if(length<0) { header.size=udata_readInt32(ds, inHeader->size); } else if((length<(42*4) || length<(header.size=udata_readInt32(ds, inHeader->size)))) { - return FALSE; + return false; } header.magic=ds->readUInt32(inHeader->magic); @@ -73,14 +73,14 @@ ucol_looksLikeCollationBinary(const UDataSwapper *ds, inHeader->formatVersion[0]==3 /*&& inHeader->formatVersion[1]>=0*/ )) { - return FALSE; + return false; } if(inHeader->isBigEndian!=ds->inIsBigEndian || inHeader->charSetFamily!=ds->inCharset) { - return FALSE; + return false; } - return TRUE; + return true; } namespace { diff --git a/icu4c/source/common/ucurr.cpp b/icu4c/source/common/ucurr.cpp index 8e71f4afb36..30c48b15bc4 100644 --- a/icu4c/source/common/ucurr.cpp +++ b/icu4c/source/common/ucurr.cpp @@ -238,7 +238,7 @@ isoCodes_cleanup(void) gIsoCodes = NULL; } gIsoCodesInitOnce.reset(); - return TRUE; + return true; } /** @@ -250,7 +250,7 @@ currSymbolsEquiv_cleanup(void) delete const_cast(gCurrSymbolsEquiv); gCurrSymbolsEquiv = NULL; gCurrSymbolsEquivInitOnce.reset(); - return TRUE; + return true; } /** @@ -349,7 +349,7 @@ _findMetaData(const UChar* currency, UErrorCode& ec) { static void idForLocale(const char* locale, char* countryAndVariant, int capacity, UErrorCode* ec) { - ulocimp_getRegionForSupplementalData(locale, FALSE, countryAndVariant, capacity, ec); + ulocimp_getRegionForSupplementalData(locale, false, countryAndVariant, capacity, ec); } // ------------------------------------------ @@ -409,7 +409,7 @@ struct CReg : public icu::UMemory { } static UBool unreg(UCurrRegistryKey key) { - UBool found = FALSE; + UBool found = false; umtx_lock(&gCRegLock); CReg** p = &gCRegHead; @@ -417,7 +417,7 @@ struct CReg : public icu::UMemory { if (*p == key) { *p = ((CReg*)key)->next; delete (CReg*)key; - found = TRUE; + found = true; break; } p = &((*p)->next); @@ -476,7 +476,7 @@ ucurr_unregister(UCurrRegistryKey key, UErrorCode* status) if (status && U_SUCCESS(*status)) { return CReg::unreg(key); } - return FALSE; + return false; } #endif /* UCONFIG_NO_SERVICE */ @@ -503,7 +503,7 @@ static UBool U_CALLCONV currency_cleanup(void) { isoCodes_cleanup(); currSymbolsEquiv_cleanup(); - return TRUE; + return true; } U_CDECL_END @@ -621,12 +621,12 @@ ucurr_forLocale(const char* locale, * Modify the given locale name by removing the rightmost _-delimited * element. If there is none, empty the string ("" == root). * NOTE: The string "root" is not recognized; do not use it. - * @return TRUE if the fallback happened; FALSE if locale is already + * @return true if the fallback happened; false if locale is already * root (""). */ static UBool fallback(char *loc) { if (!*loc) { - return FALSE; + return false; } UErrorCode status = U_ZERO_ERROR; if (uprv_strcmp(loc, "en_GB") == 0) { @@ -646,7 +646,7 @@ static UBool fallback(char *loc) { } *i = 0; */ - return TRUE; + return true; } @@ -752,7 +752,7 @@ ucurr_getName(const UChar* currency, // We no longer support choice format data in names. Data should not contain // choice patterns. if (isChoiceFormat != NULL) { - *isChoiceFormat = FALSE; + *isChoiceFormat = false; } if (U_SUCCESS(ec2)) { U_ASSERT(s != NULL); @@ -919,7 +919,7 @@ getCurrencyNameCount(const char* loc, int32_t* total_currency_name_count, int32_ s = ures_getStringByIndex(names, UCURR_SYMBOL_NAME, &len, &ec2); ++(*total_currency_symbol_count); // currency symbol if (currencySymbolsEquiv != NULL) { - *total_currency_symbol_count += countEquivalent(*currencySymbolsEquiv, UnicodeString(TRUE, s, len)); + *total_currency_symbol_count += countEquivalent(*currencySymbolsEquiv, UnicodeString(true, s, len)); } ++(*total_currency_symbol_count); // iso code ++(*total_currency_name_count); // long name @@ -1040,7 +1040,7 @@ collectCurrencyNames(const char* locale, (*currencySymbols)[(*total_currency_symbol_count)++].currencyNameLen = len; // Add equivalent symbols if (currencySymbolsEquiv != NULL) { - UnicodeString str(TRUE, s, len); + UnicodeString str(true, s, len); icu::EquivIterator iter(*currencySymbolsEquiv, str); const UnicodeString *symbol; while ((symbol = iter.next()) != NULL) { @@ -1424,7 +1424,7 @@ currency_cache_cleanup(void) { currCache[i] = 0; } } - return TRUE; + return true; } @@ -2243,19 +2243,19 @@ U_CAPI UBool U_EXPORT2 ucurr_isAvailable(const UChar* isoCode, UDate from, UDate to, UErrorCode* eErrorCode) { umtx_initOnce(gIsoCodesInitOnce, &initIsoCodes, *eErrorCode); if (U_FAILURE(*eErrorCode)) { - return FALSE; + return false; } IsoCodeEntry* result = (IsoCodeEntry *) uhash_get(gIsoCodes, isoCode); if (result == NULL) { - return FALSE; + return false; } else if (from > to) { *eErrorCode = U_ILLEGAL_ARGUMENT_ERROR; - return FALSE; + return false; } else if ((from > result->to) || (to < result->from)) { - return FALSE; + return false; } - return TRUE; + return true; } static const icu::Hashtable* getCurrSymbolsEquiv() { @@ -2560,7 +2560,7 @@ static const UEnumeration defaultKeywordValues = { U_CAPI UEnumeration *U_EXPORT2 ucurr_getKeywordValuesForLocale(const char *key, const char *locale, UBool commonlyUsed, UErrorCode* status) { // Resolve region char prefRegion[ULOC_COUNTRY_CAPACITY]; - ulocimp_getRegionForSupplementalData(locale, TRUE, prefRegion, sizeof(prefRegion), status); + ulocimp_getRegionForSupplementalData(locale, true, prefRegion, sizeof(prefRegion), status); // Read value from supplementalData UList *values = ulist_createEmptyList(status); @@ -2593,7 +2593,7 @@ U_CAPI UEnumeration *U_EXPORT2 ucurr_getKeywordValuesForLocale(const char *key, break; } const char *region = ures_getKey(&bundlekey); - UBool isPrefRegion = uprv_strcmp(region, prefRegion) == 0 ? TRUE : FALSE; + UBool isPrefRegion = uprv_strcmp(region, prefRegion) == 0 ? true : false; if (!isPrefRegion && commonlyUsed) { // With commonlyUsed=true, we do not put // currencies for other regions in the @@ -2618,7 +2618,7 @@ U_CAPI UEnumeration *U_EXPORT2 ucurr_getKeywordValuesForLocale(const char *key, } #if U_CHARSET_FAMILY==U_ASCII_FAMILY - ures_getUTF8StringByKey(&curbndl, "id", curID, &curIDLength, TRUE, status); + ures_getUTF8StringByKey(&curbndl, "id", curID, &curIDLength, true, status); /* optimize - use the utf-8 string */ #else { @@ -2636,19 +2636,19 @@ U_CAPI UEnumeration *U_EXPORT2 ucurr_getKeywordValuesForLocale(const char *key, if (U_FAILURE(*status)) { break; } - UBool hasTo = FALSE; + UBool hasTo = false; ures_getByKey(&curbndl, "to", &to, status); if (U_FAILURE(*status)) { // Do nothing here... *status = U_ZERO_ERROR; } else { - hasTo = TRUE; + hasTo = true; } if (isPrefRegion && !hasTo && !ulist_containsString(values, curID, (int32_t)uprv_strlen(curID))) { // Currently active currency for the target country - ulist_addItemEndList(values, curID, TRUE, status); + ulist_addItemEndList(values, curID, true, status); } else if (!ulist_containsString(otherValues, curID, (int32_t)uprv_strlen(curID)) && !commonlyUsed) { - ulist_addItemEndList(otherValues, curID, TRUE, status); + ulist_addItemEndList(otherValues, curID, true, status); } else { uprv_free(curID); } @@ -2661,7 +2661,7 @@ U_CAPI UEnumeration *U_EXPORT2 ucurr_getKeywordValuesForLocale(const char *key, // This could happen if no valid region is supplied in the input // locale. In this case, we use the CLDR's default. uenum_close(en); - en = ucurr_getKeywordValuesForLocale(key, "und", TRUE, status); + en = ucurr_getKeywordValuesForLocale(key, "und", true, status); } } else { // Consolidate the list @@ -2671,7 +2671,7 @@ U_CAPI UEnumeration *U_EXPORT2 ucurr_getKeywordValuesForLocale(const char *key, if (!ulist_containsString(values, value, (int32_t)uprv_strlen(value))) { char *tmpValue = (char *)uprv_malloc(sizeof(char) * ULOC_KEYWORDS_CAPACITY); uprv_memcpy(tmpValue, value, uprv_strlen(value) + 1); - ulist_addItemEndList(values, tmpValue, TRUE, status); + ulist_addItemEndList(values, tmpValue, true, status); if (U_FAILURE(*status)) { break; } diff --git a/icu4c/source/common/udata.cpp b/icu4c/source/common/udata.cpp index 87bb855dda0..2bc74c97898 100644 --- a/icu4c/source/common/udata.cpp +++ b/icu4c/source/common/udata.cpp @@ -136,25 +136,25 @@ udata_cleanup(void) } gHaveTriedToLoadCommonData = 0; - return TRUE; /* Everything was cleaned up */ + return true; /* Everything was cleaned up */ } static UBool U_CALLCONV findCommonICUDataByName(const char *inBasename, UErrorCode &err) { - UBool found = FALSE; + UBool found = false; int32_t i; UDataMemory *pData = udata_findCachedData(inBasename, err); if (U_FAILURE(err) || pData == NULL) - return FALSE; + return false; { Mutex lock; for (i = 0; i < UPRV_LENGTHOF(gCommonICUDataArray); ++i) { if ((gCommonICUDataArray[i] != NULL) && (gCommonICUDataArray[i]->pHeader == pData->pHeader)) { /* The data pointer is already in the array. */ - found = TRUE; + found = true; break; } } @@ -174,9 +174,9 @@ setCommonICUData(UDataMemory *pData, /* The new common data. Belongs to ca { UDataMemory *newCommonData = UDataMemory_createNewInstance(pErr); int32_t i; - UBool didUpdate = FALSE; + UBool didUpdate = false; if (U_FAILURE(*pErr)) { - return FALSE; + return false; } /* For the assignment, other threads must cleanly see either the old */ @@ -188,7 +188,7 @@ setCommonICUData(UDataMemory *pData, /* The new common data. Belongs to ca for (i = 0; i < UPRV_LENGTHOF(gCommonICUDataArray); ++i) { if (gCommonICUDataArray[i] == NULL) { gCommonICUDataArray[i] = newCommonData; - didUpdate = TRUE; + didUpdate = true; break; } else if (gCommonICUDataArray[i]->pHeader == pData->pHeader) { /* The same data pointer is already in the array. */ @@ -216,7 +216,7 @@ setCommonICUDataPointer(const void *pData, UBool /*warn*/, UErrorCode *pErrorCod UDataMemory_init(&tData); UDataMemory_setData(&tData, pData); udata_checkCommonData(&tData, pErrorCode); - return setCommonICUData(&tData, FALSE, pErrorCode); + return setCommonICUData(&tData, false, pErrorCode); } #endif @@ -429,7 +429,7 @@ private: CharString pathBuffer; /* output path for this it'ion */ CharString packageStub; /* example: "/icudt28b". Will ignore that leaf in set paths. */ - UBool checkLastFour; /* if TRUE then allow paths such as '/foo/myapp.dat' + UBool checkLastFour; /* if true then allow paths such as '/foo/myapp.dat' * to match, checks last 4 chars of suffix with * last 4 of path, then previous chars. */ }; @@ -501,7 +501,7 @@ UDataPathIterator::UDataPathIterator(const char *inPath, const char *pkg, suffix.data(), itemPath.data(), nextPath, - checkLastFour?"TRUE":"false"); + checkLastFour?"true":"false"); #endif } @@ -568,7 +568,7 @@ const char *UDataPathIterator::next(UErrorCode *pErrorCode) /* check for .dat files */ pathBasename = findBasename(pathBuffer.data()); - if(checkLastFour == TRUE && + if(checkLastFour == true && (pathLen>=4) && uprv_strncmp(pathBuffer.data() +(pathLen-4), suffix.data(), 4)==0 && /* suffix matches */ uprv_strncmp(findBasename(pathBuffer.data()), basename, basenameLen)==0 && /* base matches */ @@ -711,15 +711,15 @@ openCommonData(const char *path, /* Path from OpenChoice? */ */ /* if (uprv_getICUData_collation) { - setCommonICUDataPointer(uprv_getICUData_collation(), FALSE, pErrorCode); + setCommonICUDataPointer(uprv_getICUData_collation(), false, pErrorCode); } if (uprv_getICUData_conversion) { - setCommonICUDataPointer(uprv_getICUData_conversion(), FALSE, pErrorCode); + setCommonICUDataPointer(uprv_getICUData_conversion(), false, pErrorCode); } */ #if !defined(ICU_DATA_DIR_WINDOWS) // When using the Windows system data, we expect only a single data file. - setCommonICUDataPointer(&U_ICUDATA_ENTRY_POINT, FALSE, pErrorCode); + setCommonICUDataPointer(&U_ICUDATA_ENTRY_POINT, false, pErrorCode); { Mutex lock; return gCommonICUDataArray[commonDataIndex]; @@ -761,9 +761,9 @@ openCommonData(const char *path, /* Path from OpenChoice? */ * Hunt it down, trying all the path locations */ - UDataPathIterator iter(u_getDataDirectory(), inBasename, path, ".dat", TRUE, pErrorCode); + UDataPathIterator iter(u_getDataDirectory(), inBasename, path, ".dat", true, pErrorCode); - while ((UDataMemory_isLoaded(&tData)==FALSE) && (pathBuffer = iter.next(pErrorCode)) != NULL) + while ((UDataMemory_isLoaded(&tData)==false) && (pathBuffer = iter.next(pErrorCode)) != NULL) { #ifdef UDATA_DEBUG fprintf(stderr, "ocd: trying path %s - ", pathBuffer); @@ -822,7 +822,7 @@ static UBool extendICUData(UErrorCode *pErr) { UDataMemory *pData; UDataMemory copyPData; - UBool didUpdate = FALSE; + UBool didUpdate = false; /* * There is a chance for a race condition here. @@ -859,7 +859,7 @@ static UBool extendICUData(UErrorCode *pErr) didUpdate = /* no longer using this result */ setCommonICUData(©PData,/* The new common data. */ - FALSE, /* No warnings if write didn't happen */ + false, /* No warnings if write didn't happen */ pErr); /* setCommonICUData honors errors; NOP if error set */ } @@ -906,7 +906,7 @@ udata_setCommonData(const void *data, UErrorCode *pErrorCode) { /* we have good data */ /* Set it up as the ICU Common Data. */ - setCommonICUData(&dataMemory, TRUE, pErrorCode); + setCommonICUData(&dataMemory, true, pErrorCode); } /*--------------------------------------------------------------------------- @@ -999,7 +999,7 @@ static UDataMemory *doLoadFromIndividualFiles(const char *pkgName, /* look in ind. files: package\nam.typ ========================= */ /* init path iterator for individual files */ - UDataPathIterator iter(dataPath, pkgName, path, tocEntryPathSuffix, FALSE, pErrorCode); + UDataPathIterator iter(dataPath, pkgName, path, tocEntryPathSuffix, false, pErrorCode); while ((pathBuffer = iter.next(pErrorCode)) != NULL) { @@ -1055,7 +1055,7 @@ static UDataMemory *doLoadFromCommonData(UBool isICUData, const char * /*pkgName const DataHeader *pHeader; UDataMemory *pCommonData; int32_t commonDataIndex; - UBool checkedExtendedICUData = FALSE; + UBool checkedExtendedICUData = false; /* try to get common data. The loop is for platforms such as the 390 that do * not initially load the full set of ICU data. If the lookup of an ICU data item * fails, the full (but slower to load) set is loaded, the and the loop repeats, @@ -1104,7 +1104,7 @@ static UDataMemory *doLoadFromCommonData(UBool isICUData, const char * /*pkgName } else if (pCommonData != NULL) { ++commonDataIndex; /* try the next data package */ } else if ((!checkedExtendedICUData) && extendICUData(subErrorCode)) { - checkedExtendedICUData = TRUE; + checkedExtendedICUData = true; /* try this data package slot again: it changed from NULL to non-NULL */ } else { return NULL; @@ -1169,7 +1169,7 @@ doOpenChoice(const char *path, const char *type, const char *name, UErrorCode subErrorCode=U_ZERO_ERROR; const char *treeChar; - UBool isICUData = FALSE; + UBool isICUData = false; FileTracer::traceOpen(path, type, name); @@ -1182,7 +1182,7 @@ doOpenChoice(const char *path, const char *type, const char *name, uprv_strlen(U_ICUDATA_NAME U_TREE_SEPARATOR_STRING)) || !uprv_strncmp(path, U_ICUDATA_ALIAS U_TREE_SEPARATOR_STRING, /* "ICUDATA-" */ uprv_strlen(U_ICUDATA_ALIAS U_TREE_SEPARATOR_STRING))) { - isICUData = TRUE; + isICUData = true; } #if (U_FILE_SEP_CHAR != U_FILE_ALT_SEP_CHAR) /* Windows: try "foo\bar" and "foo/bar" */ diff --git a/icu4c/source/common/udatamem.cpp b/icu4c/source/common/udatamem.cpp index 6bf7c01235c..0f80de28eb8 100644 --- a/icu4c/source/common/udatamem.cpp +++ b/icu4c/source/common/udatamem.cpp @@ -49,7 +49,7 @@ U_CFUNC UDataMemory *UDataMemory_createNewInstance(UErrorCode *pErr) { *pErr = U_MEMORY_ALLOCATION_ERROR; } else { UDataMemory_init(This); - This->heapAllocated = TRUE; + This->heapAllocated = true; } return This; } diff --git a/icu4c/source/common/uhash.cpp b/icu4c/source/common/uhash.cpp index 2e331b71722..a04f9606c57 100644 --- a/icu4c/source/common/uhash.cpp +++ b/icu4c/source/common/uhash.cpp @@ -265,7 +265,7 @@ _uhash_init(UHashtable *result, result->valueComparator = valueComp; result->keyDeleter = NULL; result->valueDeleter = NULL; - result->allocated = FALSE; + result->allocated = false; _uhash_internalSetResizePolicy(result, U_GROW); _uhash_allocate(result, primeIndex, status); @@ -294,7 +294,7 @@ _uhash_create(UHashFunction *keyHash, } _uhash_init(result, keyHash, keyComp, valueComp, primeIndex, status); - result->allocated = TRUE; + result->allocated = true; if (U_FAILURE(*status)) { uprv_free(result); @@ -949,7 +949,7 @@ uhash_equals(const UHashtable* hash1, const UHashtable* hash2){ int32_t count1, count2, pos, i; if(hash1==hash2){ - return TRUE; + return true; } /* @@ -967,15 +967,15 @@ uhash_equals(const UHashtable* hash1, const UHashtable* hash2){ { /* Normally we would return an error here about incompatible hash tables, - but we return FALSE instead. + but we return false instead. */ - return FALSE; + return false; } count1 = uhash_count(hash1); count2 = uhash_count(hash2); if(count1!=count2){ - return FALSE; + return false; } pos=UHASH_FIRST; @@ -989,11 +989,11 @@ uhash_equals(const UHashtable* hash1, const UHashtable* hash2){ */ const UHashElement* elem2 = _uhash_find(hash2, key1, hash2->keyHasher(key1)); const UHashTok val2 = elem2->value; - if(hash1->valueComparator(val1, val2)==FALSE){ - return FALSE; + if(hash1->valueComparator(val1, val2)==false){ + return false; } } - return TRUE; + return true; } /******************************************************************** @@ -1005,10 +1005,10 @@ uhash_compareUChars(const UHashTok key1, const UHashTok key2) { const UChar *p1 = (const UChar*) key1.pointer; const UChar *p2 = (const UChar*) key2.pointer; if (p1 == p2) { - return TRUE; + return true; } if (p1 == NULL || p2 == NULL) { - return FALSE; + return false; } while (*p1 != 0 && *p1 == *p2) { ++p1; @@ -1022,10 +1022,10 @@ uhash_compareChars(const UHashTok key1, const UHashTok key2) { const char *p1 = (const char*) key1.pointer; const char *p2 = (const char*) key2.pointer; if (p1 == p2) { - return TRUE; + return true; } if (p1 == NULL || p2 == NULL) { - return FALSE; + return false; } while (*p1 != 0 && *p1 == *p2) { ++p1; @@ -1039,10 +1039,10 @@ uhash_compareIChars(const UHashTok key1, const UHashTok key2) { const char *p1 = (const char*) key1.pointer; const char *p2 = (const char*) key2.pointer; if (p1 == p2) { - return TRUE; + return true; } if (p1 == NULL || p2 == NULL) { - return FALSE; + return false; } while (*p1 != 0 && uprv_tolower(*p1) == uprv_tolower(*p2)) { ++p1; diff --git a/icu4c/source/common/uidna.cpp b/icu4c/source/common/uidna.cpp index ac2f9c3c8cd..1cbdeec3272 100644 --- a/icu4c/source/common/uidna.cpp +++ b/icu4c/source/common/uidna.cpp @@ -58,15 +58,15 @@ toASCIILower(UChar ch){ inline static UBool startsWithPrefix(const UChar* src , int32_t srcLength){ if(srcLength < ACE_PREFIX_LENGTH){ - return FALSE; + return false; } for(int8_t i=0; i< ACE_PREFIX_LENGTH; i++){ if(toASCIILower(src[i]) != ACE_PREFIX[i]){ - return FALSE; + return false; } } - return TRUE; + return true; } @@ -132,9 +132,9 @@ static inline UBool isLabelSeparator(UChar ch){ case 0x3002: case 0xFF0E: case 0xFF61: - return TRUE; + return true; default: - return FALSE; + return false; } } @@ -149,7 +149,7 @@ getNextSeparator(UChar *src, int32_t srcLength, for(i=0 ; ;i++){ if(src[i] == 0){ *limit = src + i; // point to null - *done = TRUE; + *done = true; return i; } if(isLabelSeparator(src[i])){ @@ -169,7 +169,7 @@ getNextSeparator(UChar *src, int32_t srcLength, // we have not found the delimiter // if(i==srcLength) *limit = src+srcLength; - *done = TRUE; + *done = true; return i; } @@ -177,7 +177,7 @@ getNextSeparator(UChar *src, int32_t srcLength, static inline UBool isLDHChar(UChar ch){ // high runner case if(ch>0x007A){ - return FALSE; + return false; } //[\\u002D \\u0030-\\u0039 \\u0041-\\u005A \\u0061-\\u007A] if( (ch==0x002D) || @@ -185,9 +185,9 @@ static inline UBool isLDHChar(UChar ch){ (0x0041 <= ch && ch <= 0x005A) || (0x0061 <= ch && ch <= 0x007A) ){ - return TRUE; + return true; } - return FALSE; + return false; } static int32_t @@ -212,9 +212,9 @@ _internal_toASCII(const UChar* src, int32_t srcLength, UBool* caseFlags = NULL; // the source contains all ascii codepoints - UBool srcIsASCII = TRUE; + UBool srcIsASCII = true; // assume the source contains all LDH codepoints - UBool srcIsLDH = TRUE; + UBool srcIsLDH = true; int32_t j=0; @@ -239,13 +239,13 @@ _internal_toASCII(const UChar* src, int32_t srcLength, // step 1 for( j=0;j 0x7F){ - srcIsASCII = FALSE; + srcIsASCII = false; } b1[b1Len++] = src[j]; } // step 2 is performed only if the source contains non ASCII - if(srcIsASCII == FALSE){ + if(srcIsASCII == false){ // step 2 b1Len = usprep_prepare(nameprep, src, srcLength, b1, b1Capacity, namePrepOptions, parseError, status); @@ -277,29 +277,29 @@ _internal_toASCII(const UChar* src, int32_t srcLength, } // for step 3 & 4 - srcIsASCII = TRUE; + srcIsASCII = true; for( j=0;j 0x7F){ - srcIsASCII = FALSE; - }else if(isLDHChar(b1[j])==FALSE){ // if the char is in ASCII range verify that it is an LDH character - srcIsLDH = FALSE; + srcIsASCII = false; + }else if(isLDHChar(b1[j])==false){ // if the char is in ASCII range verify that it is an LDH character + srcIsLDH = false; failPos = j; } } - if(useSTD3ASCIIRules == TRUE){ + if(useSTD3ASCIIRules == true){ // verify 3a and 3b // 3(a) Verify the absence of non-LDH ASCII code points; that is, the // absence of 0..2C, 2E..2F, 3A..40, 5B..60, and 7B..7F. // 3(b) Verify the absence of leading and trailing hyphen-minus; that // is, the absence of U+002D at the beginning and end of the // sequence. - if( srcIsLDH == FALSE /* source at this point should not contain anyLDH characters */ + if( srcIsLDH == false /* source at this point should not contain anyLDH characters */ || b1[0] == HYPHEN || b1[b1Len-1] == HYPHEN){ *status = U_IDNA_STD3_ASCII_RULES_ERROR; /* populate the parseError struct */ - if(srcIsLDH==FALSE){ + if(srcIsLDH==false){ // failPos is always set the index of failure uprv_syntaxError(b1,failPos, b1Len,parseError); }else if(b1[0] == HYPHEN){ @@ -331,7 +331,7 @@ _internal_toASCII(const UChar* src, int32_t srcLength, // do not preserve the case flags for now! // TODO: Preserve the case while implementing the RFE // caseFlags = (UBool*) uprv_malloc(b1Len * sizeof(UBool)); - // uprv_memset(caseFlags,TRUE,b1Len); + // uprv_memset(caseFlags,true,b1Len); b2Len = u_strToPunycode(b1,b1Len,b2,b2Capacity,caseFlags, status); @@ -416,8 +416,8 @@ _internal_toUnicode(const UChar* src, int32_t srcLength, UBool* caseFlags = NULL; - UBool srcIsASCII = TRUE; - /*UBool srcIsLDH = TRUE; + UBool srcIsASCII = true; + /*UBool srcIsLDH = true; int32_t failPos =0;*/ // step 1: find out if all the codepoints in src are ASCII @@ -425,12 +425,12 @@ _internal_toUnicode(const UChar* src, int32_t srcLength, srcLength = 0; for(;src[srcLength]!=0;){ if(src[srcLength]> 0x7f){ - srcIsASCII = FALSE; - }/*else if(isLDHChar(src[srcLength])==FALSE){ + srcIsASCII = false; + }/*else if(isLDHChar(src[srcLength])==false){ // here we do not assemble surrogates // since we know that LDH code points // are in the ASCII range only - srcIsLDH = FALSE; + srcIsLDH = false; failPos = srcLength; }*/ srcLength++; @@ -438,13 +438,13 @@ _internal_toUnicode(const UChar* src, int32_t srcLength, }else if(srcLength > 0){ for(int32_t j=0; j 0x7f){ - srcIsASCII = FALSE; + srcIsASCII = false; break; - }/*else if(isLDHChar(src[j])==FALSE){ + }/*else if(isLDHChar(src[j])==false){ // here we do not assemble surrogates // since we know that LDH code points // are in the ASCII range only - srcIsLDH = FALSE; + srcIsLDH = false; failPos = j; }*/ } @@ -452,7 +452,7 @@ _internal_toUnicode(const UChar* src, int32_t srcLength, return 0; } - if(srcIsASCII == FALSE){ + if(srcIsASCII == false){ // step 2: process the string b1Len = usprep_prepare(nameprep, src, srcLength, b1, b1Capacity, namePrepOptions, parseError, status); if(*status == U_BUFFER_OVERFLOW_ERROR){ @@ -548,13 +548,13 @@ _internal_toUnicode(const UChar* src, int32_t srcLength, else{ // See the start of this if statement for why this is commented out. // verify that STD3 ASCII rules are satisfied - /*if(useSTD3ASCIIRules == TRUE){ - if( srcIsLDH == FALSE // source contains some non-LDH characters + /*if(useSTD3ASCIIRules == true){ + if( srcIsLDH == false // source contains some non-LDH characters || src[0] == HYPHEN || src[srcLength-1] == HYPHEN){ *status = U_IDNA_STD3_ASCII_RULES_ERROR; // populate the parseError struct - if(srcIsLDH==FALSE){ + if(srcIsLDH==false){ // failPos is always set the index of failure uprv_syntaxError(src,failPos, srcLength,parseError); }else if(src[0] == HYPHEN){ @@ -695,7 +695,7 @@ uidna_IDNToASCII( const UChar *src, int32_t srcLength, int32_t remainingLen = srcLength; int32_t remainingDestCapacity = destCapacity; int32_t labelLen = 0, labelReqLength = 0; - UBool done = FALSE; + UBool done = false; for(;;){ @@ -731,7 +731,7 @@ uidna_IDNToASCII( const UChar *src, int32_t srcLength, remainingDestCapacity = 0; } - if(done == TRUE){ + if(done == true){ break; } @@ -788,7 +788,7 @@ uidna_IDNToUnicode( const UChar* src, int32_t srcLength, int32_t remainingLen = srcLength; int32_t remainingDestCapacity = destCapacity; int32_t labelLen = 0, labelReqLength = 0; - UBool done = FALSE; + UBool done = false; for(;;){ @@ -800,7 +800,7 @@ uidna_IDNToUnicode( const UChar* src, int32_t srcLength, // is returned immediately in that step. // // _internal_toUnicode will copy the label. - /*if(labelLen==0 && done==FALSE){ + /*if(labelLen==0 && done==false){ *status = U_IDNA_ZERO_LENGTH_LABEL_ERROR; break; }*/ @@ -829,7 +829,7 @@ uidna_IDNToUnicode( const UChar* src, int32_t srcLength, remainingDestCapacity = 0; } - if(done == TRUE){ + if(done == true){ break; } diff --git a/icu4c/source/common/uinit.cpp b/icu4c/source/common/uinit.cpp index fa534e92c61..dc3867b17e5 100644 --- a/icu4c/source/common/uinit.cpp +++ b/icu4c/source/common/uinit.cpp @@ -30,7 +30,7 @@ static UInitOnce gICUInitOnce {}; static UBool U_CALLCONV uinit_cleanup() { gICUInitOnce.reset(); - return TRUE; + return true; } static void U_CALLCONV diff --git a/icu4c/source/common/uinvchar.cpp b/icu4c/source/common/uinvchar.cpp index 52b89065685..ffce3ec158d 100644 --- a/icu4c/source/common/uinvchar.cpp +++ b/icu4c/source/common/uinvchar.cpp @@ -207,7 +207,7 @@ u_UCharsToChars(const UChar *us, char *cs, int32_t length) { while(length>0) { u=*us++; if(!UCHAR_IS_INVARIANT(u)) { - U_ASSERT(FALSE); /* Variant characters were used. These are not portable in ICU. */ + U_ASSERT(false); /* Variant characters were used. These are not portable in ICU. */ u=0; } *cs++=(char)UCHAR_TO_CHAR(u); @@ -245,18 +245,18 @@ uprv_isInvariantString(const char *s, int32_t length) { */ #if U_CHARSET_FAMILY==U_ASCII_FAMILY if(!UCHAR_IS_INVARIANT(c)) { - return FALSE; /* found a variant char */ + return false; /* found a variant char */ } #elif U_CHARSET_FAMILY==U_EBCDIC_FAMILY c=CHAR_TO_UCHAR(c); if(c==0 || !UCHAR_IS_INVARIANT(c)) { - return FALSE; /* found a variant char */ + return false; /* found a variant char */ } #else # error U_CHARSET_FAMILY is not valid #endif } - return TRUE; + return true; } U_CAPI UBool U_EXPORT2 @@ -284,10 +284,10 @@ uprv_isInvariantUString(const UChar *s, int32_t length) { * for strings with variant characters */ if(!UCHAR_IS_INVARIANT(c)) { - return FALSE; /* found a variant char */ + return false; /* found a variant char */ } } - return TRUE; + return true; } /* UDataSwapFn implementations used in udataswp.c ------- */ diff --git a/icu4c/source/common/uiter.cpp b/icu4c/source/common/uiter.cpp index b9252d81c2d..c4ab7d6d565 100644 --- a/icu4c/source/common/uiter.cpp +++ b/icu4c/source/common/uiter.cpp @@ -47,7 +47,7 @@ noopMove(UCharIterator * /*iter*/, int32_t /*delta*/, UCharIteratorOrigin /*orig static UBool U_CALLCONV noopHasNext(UCharIterator * /*iter*/) { - return FALSE; + return false; } static UChar32 U_CALLCONV @@ -678,24 +678,24 @@ utf8IteratorMove(UCharIterator *iter, int32_t delta, UCharIteratorOrigin origin) case UITER_ZERO: case UITER_START: pos=delta; - havePos=TRUE; + havePos=true; /* iter->index<0 (unknown) is possible */ break; case UITER_CURRENT: if(iter->index>=0) { pos=iter->index+delta; - havePos=TRUE; + havePos=true; } else { /* the current UTF-16 index is unknown after setState(), use only delta */ pos=0; - havePos=FALSE; + havePos=false; } break; case UITER_LIMIT: case UITER_LENGTH: if(iter->length>=0) { pos=iter->length+delta; - havePos=TRUE; + havePos=true; } else { /* pin to the end, avoid counting the length */ iter->index=-1; @@ -706,7 +706,7 @@ utf8IteratorMove(UCharIterator *iter, int32_t delta, UCharIteratorOrigin origin) } else { /* the current UTF-16 index is unknown, use only delta */ pos=0; - havePos=FALSE; + havePos=false; } } break; diff --git a/icu4c/source/common/ulist.cpp b/icu4c/source/common/ulist.cpp index c5180431c31..57344715de5 100644 --- a/icu4c/source/common/ulist.cpp +++ b/icu4c/source/common/ulist.cpp @@ -160,12 +160,12 @@ U_CAPI UBool U_EXPORT2 ulist_containsString(const UList *list, const char *data, for (pointer = list->head; pointer != NULL; pointer = pointer->next) { if (length == (int32_t)uprv_strlen((const char *)pointer->data)) { if (uprv_memcmp(data, pointer->data, length) == 0) { - return TRUE; + return true; } } } } - return FALSE; + return false; } U_CAPI UBool U_EXPORT2 ulist_removeString(UList *list, const char *data) { @@ -175,11 +175,11 @@ U_CAPI UBool U_EXPORT2 ulist_removeString(UList *list, const char *data) { if (uprv_strcmp(data, (const char *)pointer->data) == 0) { ulist_removeItem(list, pointer); // Remove only the first occurrence, like Java LinkedList.remove(Object). - return TRUE; + return true; } } } - return FALSE; + return false; } U_CAPI void *U_EXPORT2 ulist_getNext(UList *list) { diff --git a/icu4c/source/common/uloc.cpp b/icu4c/source/common/uloc.cpp index f8d945a2a97..1da2abc361d 100644 --- a/icu4c/source/common/uloc.cpp +++ b/icu4c/source/common/uloc.cpp @@ -502,20 +502,20 @@ static int32_t getShortestSubtagLength(const char *localeID) { int32_t length = localeIDLength; int32_t tmpLength = 0; int32_t i; - UBool reset = TRUE; + UBool reset = true; for (i = 0; i < localeIDLength; i++) { if (localeID[i] != '_' && localeID[i] != '-') { if (reset) { tmpLength = 0; - reset = FALSE; + reset = false; } tmpLength++; } else { if (tmpLength != 0 && tmpLength < length) { length = tmpLength; } - reset = TRUE; + reset = true; } } @@ -620,7 +620,7 @@ ulocimp_getKeywords(const char *localeID, if(prev == '@') { /* start of keyword definition */ /* we will grab pairs, trim spaces, lowercase keywords, sort and return */ do { - UBool duplicate = FALSE; + UBool duplicate = false; /* skip leading spaces */ while(*pos == ' ') { pos++; @@ -693,7 +693,7 @@ ulocimp_getKeywords(const char *localeID, /* If this is a duplicate keyword, then ignore it */ for (j=0; j 0 && !handledInputKeyAndValue) { @@ -1030,7 +1030,7 @@ uloc_setKeywordValue(const char* keywordName, updatedKeysAndValues.append(keywordNameBuffer, keywordNameLen, *status); updatedKeysAndValues.append('=', *status); updatedKeysAndValues.append(keywordValueBuffer, keywordValueLen, *status); - handledInputKeyAndValue = TRUE; + handledInputKeyAndValue = true; } /* copy the current entry */ updatedKeysAndValues.append(keyValuePrefix, *status); @@ -1046,7 +1046,7 @@ uloc_setKeywordValue(const char* keywordName, updatedKeysAndValues.append(keywordNameBuffer, keywordNameLen, *status); updatedKeysAndValues.append('=', *status); updatedKeysAndValues.append(keywordValueBuffer, keywordValueLen, *status); - handledInputKeyAndValue = TRUE; + handledInputKeyAndValue = true; } keywordStart = nextSeparator; } /* end loop searching */ @@ -1089,7 +1089,7 @@ uloc_setKeywordValue(const char* keywordName, #define _isPrefixLetter(a) ((a=='x')||(a=='X')||(a=='i')||(a=='I')) -/*returns TRUE if one of the special prefixes is here (s=string) +/*returns true if one of the special prefixes is here (s=string) 'x-' or 'i-' */ #define _isIDPrefix(s) (_isPrefixLetter(s[0])&&_isIDSeparator(s[1])) @@ -1270,7 +1270,7 @@ _getVariant(const char *localeID, char prev, ByteSink& sink, UBool needSeparator) { - UBool hasVariant = FALSE; + UBool hasVariant = false; /* get one or more variant tags and separate them with '_' */ if(_isIDSeparator(prev)) { @@ -1278,12 +1278,12 @@ _getVariant(const char *localeID, while(!_isTerminator(*localeID)) { if (needSeparator) { sink.Append("_", 1); - needSeparator = FALSE; + needSeparator = false; } char c = (char)uprv_toupper(*localeID); if (c == '-') c = '_'; sink.Append(&c, 1); - hasVariant = TRUE; + hasVariant = true; localeID++; } } @@ -1300,7 +1300,7 @@ _getVariant(const char *localeID, while(!_isTerminator(*localeID)) { if (needSeparator) { sink.Append("_", 1); - needSeparator = FALSE; + needSeparator = false; } char c = (char)uprv_toupper(*localeID); if (c == '-' || c == ',') c = '_'; @@ -1453,7 +1453,7 @@ uloc_openKeywords(const char* localeID, if((tmpLocaleID = locale_getKeywordsStart(tmpLocaleID)) != NULL) { CharString keywords; CharStringByteSink sink(&keywords); - ulocimp_getKeywords(tmpLocaleID+1, '@', sink, FALSE, status); + ulocimp_getKeywords(tmpLocaleID+1, '@', sink, false, status); if (U_FAILURE(*status)) { return NULL; } @@ -1573,7 +1573,7 @@ _canonicalize(const char* localeID, variantSize = -tag.length(); { CharStringByteSink s(&tag); - _getVariant(tmpLocaleID+1, *tmpLocaleID, s, FALSE); + _getVariant(tmpLocaleID+1, *tmpLocaleID, s, false); } variantSize += tag.length(); if (variantSize > 0) { @@ -1585,13 +1585,13 @@ _canonicalize(const char* localeID, /* Copy POSIX-style charset specifier, if any [mr.utf8] */ if (!OPTION_SET(options, _ULOC_CANONICALIZE) && *tmpLocaleID == '.') { - UBool done = FALSE; + UBool done = false; do { char c = *tmpLocaleID; switch (c) { case 0: case '@': - done = TRUE; + done = true; break; default: tag.append(c, *err); @@ -1664,7 +1664,7 @@ _canonicalize(const char* localeID, (!separatorIndicator || separatorIndicator > keywordAssign)) { sink.Append("@", 1); ++fieldCount; - ulocimp_getKeywords(tmpLocaleID+1, '@', sink, TRUE, err); + ulocimp_getKeywords(tmpLocaleID+1, '@', sink, true, err); } } } @@ -1847,7 +1847,7 @@ uloc_getVariant(const char* localeID, } CheckedArrayByteSink sink(variant, variantCapacity); - _getVariant(tmpLocaleID+1, *tmpLocaleID, sink, FALSE); + _getVariant(tmpLocaleID+1, *tmpLocaleID, sink, false); i = sink.NumberOfBytesAppended(); @@ -2158,11 +2158,11 @@ isWellFormedLegacyKey(const char* legacyKey) const char* p = legacyKey; while (*p) { if (!UPRV_ISALPHANUM(*p)) { - return FALSE; + return false; } p++; } - return TRUE; + return true; } static UBool @@ -2173,13 +2173,13 @@ isWellFormedLegacyType(const char* legacyType) while (*p) { if (*p == '_' || *p == '/' || *p == '-') { if (alphaNumLen == 0) { - return FALSE; + return false; } alphaNumLen = 0; } else if (UPRV_ISALPHANUM(*p)) { alphaNumLen++; } else { - return FALSE; + return false; } p++; } diff --git a/icu4c/source/common/uloc_keytype.cpp b/icu4c/source/common/uloc_keytype.cpp index ea9b90301fe..12dc3004924 100644 --- a/icu4c/source/common/uloc_keytype.cpp +++ b/icu4c/source/common/uloc_keytype.cpp @@ -69,7 +69,7 @@ uloc_key_type_cleanup(void) { gKeyTypeStringPool = NULL; gLocExtKeyMapInitOnce.reset(); - return TRUE; + return true; } U_CDECL_END @@ -356,9 +356,9 @@ init() { UErrorCode sts = U_ZERO_ERROR; umtx_initOnce(gLocExtKeyMapInitOnce, &initFromResourceBundle, sts); if (U_FAILURE(sts)) { - return FALSE; + return false; } - return TRUE; + return true; } static UBool @@ -368,7 +368,7 @@ isSpecialTypeCodepoints(const char* val) { while (*p) { if (*p == '-') { if (subtagLen < 4 || subtagLen > 6) { - return FALSE; + return false; } subtagLen = 0; } else if ((*p >= '0' && *p <= '9') || @@ -376,7 +376,7 @@ isSpecialTypeCodepoints(const char* val) { (*p >= 'a' && *p <= 'f')) { // also in EBCDIC subtagLen++; } else { - return FALSE; + return false; } p++; } @@ -390,13 +390,13 @@ isSpecialTypeReorderCode(const char* val) { while (*p) { if (*p == '-') { if (subtagLen < 3 || subtagLen > 8) { - return FALSE; + return false; } subtagLen = 0; } else if (uprv_isASCIILetter(*p)) { subtagLen++; } else { - return FALSE; + return false; } p++; } @@ -412,7 +412,7 @@ isSpecialTypeRgKeyValue(const char* val) { (subtagLen >= 2 && (*p == 'Z' || *p == 'z')) ) { subtagLen++; } else { - return FALSE; + return false; } p++; } @@ -448,10 +448,10 @@ ulocimp_toLegacyKey(const char* key) { U_CFUNC const char* ulocimp_toBcpType(const char* key, const char* type, UBool* isKnownKey, UBool* isSpecialType) { if (isKnownKey != NULL) { - *isKnownKey = FALSE; + *isKnownKey = false; } if (isSpecialType != NULL) { - *isSpecialType = FALSE; + *isSpecialType = false; } if (!init()) { @@ -461,14 +461,14 @@ ulocimp_toBcpType(const char* key, const char* type, UBool* isKnownKey, UBool* i LocExtKeyData* keyData = (LocExtKeyData*)uhash_get(gLocExtKeyMap, key); if (keyData != NULL) { if (isKnownKey != NULL) { - *isKnownKey = TRUE; + *isKnownKey = true; } LocExtType* t = (LocExtType*)uhash_get(keyData->typeMap.getAlias(), type); if (t != NULL) { return t->bcpId; } if (keyData->specialTypes != SPECIALTYPE_NONE) { - UBool matched = FALSE; + UBool matched = false; if (keyData->specialTypes & SPECIALTYPE_CODEPOINTS) { matched = isSpecialTypeCodepoints(type); } @@ -480,7 +480,7 @@ ulocimp_toBcpType(const char* key, const char* type, UBool* isKnownKey, UBool* i } if (matched) { if (isSpecialType != NULL) { - *isSpecialType = TRUE; + *isSpecialType = true; } return type; } @@ -493,10 +493,10 @@ ulocimp_toBcpType(const char* key, const char* type, UBool* isKnownKey, UBool* i U_CFUNC const char* ulocimp_toLegacyType(const char* key, const char* type, UBool* isKnownKey, UBool* isSpecialType) { if (isKnownKey != NULL) { - *isKnownKey = FALSE; + *isKnownKey = false; } if (isSpecialType != NULL) { - *isSpecialType = FALSE; + *isSpecialType = false; } if (!init()) { @@ -506,14 +506,14 @@ ulocimp_toLegacyType(const char* key, const char* type, UBool* isKnownKey, UBool LocExtKeyData* keyData = (LocExtKeyData*)uhash_get(gLocExtKeyMap, key); if (keyData != NULL) { if (isKnownKey != NULL) { - *isKnownKey = TRUE; + *isKnownKey = true; } LocExtType* t = (LocExtType*)uhash_get(keyData->typeMap.getAlias(), type); if (t != NULL) { return t->legacyId; } if (keyData->specialTypes != SPECIALTYPE_NONE) { - UBool matched = FALSE; + UBool matched = false; if (keyData->specialTypes & SPECIALTYPE_CODEPOINTS) { matched = isSpecialTypeCodepoints(type); } @@ -525,7 +525,7 @@ ulocimp_toLegacyType(const char* key, const char* type, UBool* isKnownKey, UBool } if (matched) { if (isSpecialType != NULL) { - *isSpecialType = TRUE; + *isSpecialType = true; } return type; } diff --git a/icu4c/source/common/uloc_tag.cpp b/icu4c/source/common/uloc_tag.cpp index 0150e94cefd..73ff2b67166 100644 --- a/icu4c/source/common/uloc_tag.cpp +++ b/icu4c/source/common/uloc_tag.cpp @@ -378,10 +378,10 @@ _isAlphaString(const char* s, int32_t len) { int32_t i; for (i = 0; i < len; i++) { if (!ISALPHA(*(s + i))) { - return FALSE; + return false; } } - return TRUE; + return true; } static UBool @@ -389,10 +389,10 @@ _isNumericString(const char* s, int32_t len) { int32_t i; for (i = 0; i < len; i++) { if (!ISNUMERIC(*(s + i))) { - return FALSE; + return false; } } - return TRUE; + return true; } static UBool @@ -400,10 +400,10 @@ _isAlphaNumericString(const char* s, int32_t len) { int32_t i; for (i = 0; i < len; i++) { if (!ISALPHA(*(s + i)) && !ISNUMERIC(*(s + i))) { - return FALSE; + return false; } } - return TRUE; + return true; } static UBool @@ -412,9 +412,9 @@ _isAlphaNumericStringLimitedLength(const char* s, int32_t len, int32_t min, int3 len = (int32_t)uprv_strlen(s); } if (len >= min && len <= max && _isAlphaNumericString(s, len)) { - return TRUE; + return true; } - return FALSE; + return false; } U_CFUNC UBool @@ -428,9 +428,9 @@ ultag_isLanguageSubtag(const char* s, int32_t len) { len = (int32_t)uprv_strlen(s); } if (len >= 2 && len <= 8 && _isAlphaString(s, len)) { - return TRUE; + return true; } - return FALSE; + return false; } static UBool @@ -443,9 +443,9 @@ _isExtlangSubtag(const char* s, int32_t len) { len = (int32_t)uprv_strlen(s); } if (len == 3 && _isAlphaString(s, len)) { - return TRUE; + return true; } - return FALSE; + return false; } U_CFUNC UBool @@ -457,9 +457,9 @@ ultag_isScriptSubtag(const char* s, int32_t len) { len = (int32_t)uprv_strlen(s); } if (len == 4 && _isAlphaString(s, len)) { - return TRUE; + return true; } - return FALSE; + return false; } U_CFUNC UBool @@ -472,12 +472,12 @@ ultag_isRegionSubtag(const char* s, int32_t len) { len = (int32_t)uprv_strlen(s); } if (len == 2 && _isAlphaString(s, len)) { - return TRUE; + return true; } if (len == 3 && _isNumericString(s, len)) { - return TRUE; + return true; } - return FALSE; + return false; } static UBool @@ -490,12 +490,12 @@ _isVariantSubtag(const char* s, int32_t len) { len = (int32_t)uprv_strlen(s); } if (_isAlphaNumericStringLimitedLength(s, len, 5, 8)) { - return TRUE; + return true; } if (len == 4 && ISNUMERIC(*s) && _isAlphaNumericString(s + 1, 3)) { - return TRUE; + return true; } - return FALSE; + return false; } static UBool @@ -510,10 +510,10 @@ _isSepListOf(UBool (*test)(const char*, int32_t), const char* s, int32_t len) { while ((p - s) < len) { if (*p == SEP) { if (pSubtag == NULL) { - return FALSE; + return false; } if (!test(pSubtag, (int32_t)(p - pSubtag))) { - return FALSE; + return false; } pSubtag = NULL; } else if (pSubtag == NULL) { @@ -522,7 +522,7 @@ _isSepListOf(UBool (*test)(const char*, int32_t), const char* s, int32_t len) { p++; } if (pSubtag == NULL) { - return FALSE; + return false; } return test(pSubtag, (int32_t)(p - pSubtag)); } @@ -557,9 +557,9 @@ _isExtensionSingleton(const char* s, int32_t len) { len = (int32_t)uprv_strlen(s); } if (len == 1 && (ISALPHA(*s) || ISNUMERIC(*s)) && (uprv_tolower(*s) != PRIVATEUSE)) { - return TRUE; + return true; } - return FALSE; + return false; } static UBool @@ -610,9 +610,9 @@ ultag_isUnicodeLocaleKey(const char* s, int32_t len) { len = (int32_t)uprv_strlen(s); } if (len == 2 && (ISALPHA(*s) || ISNUMERIC(*s)) && ISALPHA(s[1])) { - return TRUE; + return true; } - return FALSE; + return false; } U_CFUNC UBool @@ -641,9 +641,9 @@ _isTKey(const char* s, int32_t len) len = (int32_t)uprv_strlen(s); } if (len == 2 && ISALPHA(*s) && ISNUMERIC(*(s + 1))) { - return TRUE; + return true; } - return FALSE; + return false; } U_CAPI const char * U_EXPORT2 @@ -694,23 +694,23 @@ _isTransformedExtensionSubtag(int32_t& state, const char* s, int32_t len) case kStart: if (ultag_isLanguageSubtag(s, len) && len != 4) { state = kGotLanguage; - return TRUE; + return true; } if (_isTKey(s, len)) { state = kGotTKey; - return TRUE; + return true; } - return FALSE; + return false; case kGotLanguage: if (ultag_isScriptSubtag(s, len)) { state = kGotScript; - return TRUE; + return true; } U_FALLTHROUGH; case kGotScript: if (ultag_isRegionSubtag(s, len)) { state = kGotRegion; - return TRUE; + return true; } U_FALLTHROUGH; case kGotRegion: @@ -718,30 +718,30 @@ _isTransformedExtensionSubtag(int32_t& state, const char* s, int32_t len) case kGotVariant: if (_isVariantSubtag(s, len)) { state = kGotVariant; - return TRUE; + return true; } if (_isTKey(s, len)) { state = kGotTKey; - return TRUE; + return true; } - return FALSE; + return false; case kGotTKey: if (_isTValue(s, len)) { state = kGotTValue; - return TRUE; + return true; } - return FALSE; + return false; case kGotTValue: if (_isTKey(s, len)) { state = kGotTKey; - return TRUE; + return true; } if (_isTValue(s, len)) { - return TRUE; + return true; } - return FALSE; + return false; } - return FALSE; + return false; } static UBool @@ -755,32 +755,32 @@ _isUnicodeExtensionSubtag(int32_t& state, const char* s, int32_t len) case kStart: if (ultag_isUnicodeLocaleKey(s, len)) { state = kGotKey; - return TRUE; + return true; } if (ultag_isUnicodeLocaleAttribute(s, len)) { - return TRUE; + return true; } - return FALSE; + return false; case kGotKey: if (ultag_isUnicodeLocaleKey(s, len)) { - return TRUE; + return true; } if (_isUnicodeLocaleTypeSubtag(s, len)) { state = kGotType; - return TRUE; + return true; } - return FALSE; + return false; case kGotType: if (ultag_isUnicodeLocaleKey(s, len)) { state = kGotKey; - return TRUE; + return true; } if (_isUnicodeLocaleTypeSubtag(s, len)) { - return TRUE; + return true; } - return FALSE; + return false; } - return FALSE; + return false; } static UBool @@ -798,7 +798,7 @@ _isStatefulSepListOf(UBool (*test)(int32_t&, const char*, int32_t), const char* for (p = s; len > 0; p++, len--) { if (*p == SEP) { if (!test(state, start, subtagLen)) { - return FALSE; + return false; } subtagLen = 0; start = p + 1; @@ -808,9 +808,9 @@ _isStatefulSepListOf(UBool (*test)(int32_t&, const char*, int32_t), const char* } if (test(state, start, subtagLen) && state >= 0) { - return TRUE; + return true; } - return FALSE; + return false; } U_CFUNC UBool @@ -835,7 +835,7 @@ ultag_isUnicodeExtensionSubtags(const char* s, int32_t len) { static UBool _addVariantToList(VariantListEntry **first, VariantListEntry *var) { - UBool bAdded = TRUE; + UBool bAdded = true; if (*first == NULL) { var->next = NULL; @@ -847,7 +847,7 @@ _addVariantToList(VariantListEntry **first, VariantListEntry *var) { /* variants order should be preserved */ prev = NULL; cur = *first; - while (TRUE) { + while (true) { if (cur == NULL) { prev->next = var; var->next = NULL; @@ -858,7 +858,7 @@ _addVariantToList(VariantListEntry **first, VariantListEntry *var) { cmp = uprv_compareInvCharsAsAscii(var->variant, cur->variant); if (cmp == 0) { /* duplicated variant */ - bAdded = FALSE; + bAdded = false; break; } prev = cur; @@ -871,7 +871,7 @@ _addVariantToList(VariantListEntry **first, VariantListEntry *var) { static UBool _addAttributeToList(AttributeListEntry **first, AttributeListEntry *attr) { - UBool bAdded = TRUE; + UBool bAdded = true; if (*first == NULL) { attr->next = NULL; @@ -883,7 +883,7 @@ _addAttributeToList(AttributeListEntry **first, AttributeListEntry *attr) { /* reorder variants in alphabetical order */ prev = NULL; cur = *first; - while (TRUE) { + while (true) { if (cur == NULL) { prev->next = attr; attr->next = NULL; @@ -901,7 +901,7 @@ _addAttributeToList(AttributeListEntry **first, AttributeListEntry *attr) { } if (cmp == 0) { /* duplicated variant */ - bAdded = FALSE; + bAdded = false; break; } prev = cur; @@ -915,7 +915,7 @@ _addAttributeToList(AttributeListEntry **first, AttributeListEntry *attr) { static UBool _addExtensionToList(ExtensionListEntry **first, ExtensionListEntry *ext, UBool localeToBCP) { - UBool bAdded = TRUE; + UBool bAdded = true; if (*first == NULL) { ext->next = NULL; @@ -927,7 +927,7 @@ _addExtensionToList(ExtensionListEntry **first, ExtensionListEntry *ext, UBool l /* reorder variants in alphabetical order */ prev = NULL; cur = *first; - while (TRUE) { + while (true) { if (cur == NULL) { prev->next = ext; ext->next = NULL; @@ -979,7 +979,7 @@ _addExtensionToList(ExtensionListEntry **first, ExtensionListEntry *ext, UBool l } if (cmp == 0) { /* duplicated extension key */ - bAdded = FALSE; + bAdded = false; break; } prev = cur; @@ -1164,7 +1164,7 @@ _appendVariantsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st if (len > 0) { char *p, *pVar; - UBool bNext = TRUE; + UBool bNext = true; VariantListEntry *var; VariantListEntry *varFirst = NULL; @@ -1173,7 +1173,7 @@ _appendVariantsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st while (bNext) { if (*p == SEP || *p == LOCALE_SEP || *p == 0) { if (*p == 0) { - bNext = FALSE; + bNext = false; } else { *p = 0; /* terminate */ } @@ -1211,7 +1211,7 @@ _appendVariantsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st } else { /* Special handling for POSIX variant, need to remember that we had it and then */ /* treat it like an extension later. */ - *hadPosix = TRUE; + *hadPosix = true; } } else if (strict) { *status = U_ILLEGAL_ARGUMENT_ERROR; @@ -1288,7 +1288,7 @@ _appendKeywordsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st int32_t keylen; UBool isBcpUExt; - while (TRUE) { + while (true) { key = uenum_next(keywordEnum.getAlias(), NULL, status); if (key == NULL) { break; @@ -1322,7 +1322,7 @@ _appendKeywordsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st if (uprv_strcmp(key, LOCALE_ATTRIBUTE_KEY) == 0) { if (len > 0) { int32_t i = 0; - while (TRUE) { + while (true) { attrBufLength = 0; for (; i < len; i++) { if (buf[i] != '-') { @@ -1448,7 +1448,7 @@ _appendKeywordsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st ext->key = bcpKey; ext->value = bcpValue; - if (!_addExtensionToList(&firstExt, ext, TRUE)) { + if (!_addExtensionToList(&firstExt, ext, true)) { if (strict) { *status = U_ILLEGAL_ARGUMENT_ERROR; break; @@ -1467,18 +1467,18 @@ _appendKeywordsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st ext->key = POSIX_KEY; ext->value = POSIX_VALUE; - if (!_addExtensionToList(&firstExt, ext, TRUE)) { + if (!_addExtensionToList(&firstExt, ext, true)) { // Silently ignore errors. } } if (U_SUCCESS(*status) && (firstExt != NULL || firstAttr != NULL)) { - UBool startLDMLExtension = FALSE; + UBool startLDMLExtension = false; for (ext = firstExt; ext; ext = ext->next) { if (!startLDMLExtension && uprv_strlen(ext->key) > 1) { /* first LDML u singlton extension */ sink.Append("-u", 2); - startLDMLExtension = TRUE; + startLDMLExtension = true; } /* write out the sorted BCP47 attributes, extensions and private use */ @@ -1520,7 +1520,7 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT int32_t len; /* Reset the posixVariant value */ - *posixVariant = FALSE; + *posixVariant = false; pTag = ldmlext; pKwds = NULL; @@ -1604,7 +1604,7 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT kwd->key = LOCALE_ATTRIBUTE_KEY; kwd->value = value->data(); - if (!_addExtensionToList(&kwdFirst, kwd, FALSE)) { + if (!_addExtensionToList(&kwdFirst, kwd, false)) { *status = U_ILLEGAL_ARGUMENT_ERROR; return; } @@ -1616,14 +1616,14 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT const char *pBcpType = NULL; /* beginning of u extension type subtag(s) */ int32_t bcpKeyLen = 0; int32_t bcpTypeLen = 0; - UBool isDone = FALSE; + UBool isDone = false; pTag = pKwds; /* BCP47 representation of LDML key/type pairs */ while (!isDone) { const char *pNextBcpKey = NULL; int32_t nextBcpKeyLen = 0; - UBool emitKeyword = FALSE; + UBool emitKeyword = false; if (*pTag) { /* locate next separator char */ @@ -1631,7 +1631,7 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT if (ultag_isUnicodeLocaleKey(pTag, len)) { if (pBcpKey) { - emitKeyword = TRUE; + emitKeyword = true; pNextBcpKey = pTag; nextBcpKeyLen = len; } else { @@ -1657,8 +1657,8 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT } } else { /* processing last one */ - emitKeyword = TRUE; - isDone = TRUE; + emitKeyword = true; + isDone = true; } if (emitKeyword) { @@ -1744,7 +1744,7 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT /* Special handling for u-va-posix, since we want to treat this as a variant, not as a keyword */ if (!variantExists && !uprv_strcmp(pKey, POSIX_KEY) && !uprv_strcmp(pType, POSIX_VALUE) ) { - *posixVariant = TRUE; + *posixVariant = true; } else { /* create an ExtensionListEntry for this keyword */ kwd = extPool.create(); @@ -1756,7 +1756,7 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT kwd->key = pKey; kwd->value = pType; - if (!_addExtensionToList(&kwdFirst, kwd, FALSE)) { + if (!_addExtensionToList(&kwdFirst, kwd, false)) { // duplicate keyword is allowed, Only the first // is honored. } @@ -1773,7 +1773,7 @@ _appendLDMLExtensionAsKeywords(const char* ldmlext, ExtensionListEntry** appendT kwd = kwdFirst; while (kwd != NULL) { nextKwd = kwd->next; - _addExtensionToList(appendTo, kwd, FALSE); + _addExtensionToList(appendTo, kwd, false); kwd = nextKwd; } } @@ -1788,7 +1788,7 @@ _appendKeywords(ULanguageTag* langtag, icu::ByteSink& sink, UErrorCode* status) const char *key, *type; icu::MemoryPool extPool; icu::MemoryPool kwdBuf; - UBool posixVariant = FALSE; + UBool posixVariant = false; if (U_FAILURE(*status)) { return; @@ -1803,7 +1803,7 @@ _appendKeywords(ULanguageTag* langtag, icu::ByteSink& sink, UErrorCode* status) if (*key == LDMLEXT) { /* Determine if variants already exists */ if (ultag_getVariantsSize(langtag)) { - posixVariant = TRUE; + posixVariant = true; } _appendLDMLExtensionAsKeywords(type, &kwdFirst, extPool, kwdBuf, &posixVariant, status); @@ -1818,7 +1818,7 @@ _appendKeywords(ULanguageTag* langtag, icu::ByteSink& sink, UErrorCode* status) } kwd->key = key; kwd->value = type; - if (!_addExtensionToList(&kwdFirst, kwd, FALSE)) { + if (!_addExtensionToList(&kwdFirst, kwd, false)) { *status = U_ILLEGAL_ARGUMENT_ERROR; break; } @@ -1835,7 +1835,7 @@ _appendKeywords(ULanguageTag* langtag, icu::ByteSink& sink, UErrorCode* status) } else { kwd->key = PRIVATEUSE_KEY; kwd->value = type; - if (!_addExtensionToList(&kwdFirst, kwd, FALSE)) { + if (!_addExtensionToList(&kwdFirst, kwd, false)) { *status = U_ILLEGAL_ARGUMENT_ERROR; } } @@ -1851,12 +1851,12 @@ _appendKeywords(ULanguageTag* langtag, icu::ByteSink& sink, UErrorCode* status) if (U_SUCCESS(*status) && kwdFirst != NULL) { /* write out the sorted keywords */ - UBool firstValue = TRUE; + UBool firstValue = true; kwd = kwdFirst; do { if (firstValue) { sink.Append("@", 1); - firstValue = FALSE; + firstValue = false; } else { sink.Append(";", 1); } @@ -1899,17 +1899,17 @@ _appendPrivateuseToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool if (len > 0) { char *p, *pPriv; - UBool bNext = TRUE; - UBool firstValue = TRUE; + UBool bNext = true; + UBool firstValue = true; UBool writeValue; pPriv = NULL; p = buf; while (bNext) { - writeValue = FALSE; + writeValue = false; if (*p == SEP || *p == LOCALE_SEP || *p == 0) { if (*p == 0) { - bNext = FALSE; + bNext = false; } else { *p = 0; /* terminate */ } @@ -1923,10 +1923,10 @@ _appendPrivateuseToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool if (_isPrivateuseValueSubtag(pPriv, -1)) { if (firstValue) { if (!_isVariantSubtag(pPriv, -1)) { - writeValue = TRUE; + writeValue = true; } } else { - writeValue = TRUE; + writeValue = true; } } else if (strict) { *status = U_ILLEGAL_ARGUMENT_ERROR; @@ -1959,7 +1959,7 @@ _appendPrivateuseToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool tmpAppend[reslen++] = SEP; } - firstValue = FALSE; + firstValue = false; } len = (int32_t)uprv_strlen(pPriv); @@ -2026,7 +2026,7 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta ExtensionListEntry *pExtension; char *pExtValueSubtag, *pExtValueSubtagEnd; int32_t i; - UBool privateuseVar = FALSE; + UBool privateuseVar = false; int32_t legacyLen = 0; if (parsedLen != NULL) { @@ -2276,7 +2276,7 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta pExtension->value = T_CString_toLowerCase(pExtValueSubtag); /* insert the extension to the list */ - if (_addExtensionToList(&(t->extensions), pExtension, FALSE)) { + if (_addExtensionToList(&(t->extensions), pExtension, false)) { pLastGoodPosition = pExtValueSubtagEnd; } else { /* stop parsing here */ @@ -2339,7 +2339,7 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta pExtension->value = T_CString_toLowerCase(pExtValueSubtag); /* insert the extension to the list */ - if (_addExtensionToList(&(t->extensions), pExtension, FALSE)) { + if (_addExtensionToList(&(t->extensions), pExtension, false)) { pLastGoodPosition = pExtValueSubtagEnd; pExtension = NULL; } else { @@ -2380,7 +2380,7 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta if (uprv_strncmp(pSubtag, PRIVUSE_VARIANT_PREFIX, uprv_strlen(PRIVUSE_VARIANT_PREFIX)) == 0) { *pSep = 0; next = VART; - privateuseVar = TRUE; + privateuseVar = true; break; } else if (_isPrivateuseValueSubtag(pSubtag, subtagLen)) { pLastGoodPosition = pSep; @@ -2417,7 +2417,7 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta *pExtValueSubtagEnd = 0; pExtension->value = T_CString_toLowerCase(pExtValueSubtag); /* insert the extension to the list */ - if (_addExtensionToList(&(t->extensions), pExtension, FALSE)) { + if (_addExtensionToList(&(t->extensions), pExtension, false)) { pLastGoodPosition = pExtValueSubtagEnd; } else { uprv_free(pExtension); @@ -2535,7 +2535,7 @@ static int32_t ultag_getVariantsSize(const ULanguageTag* langtag) { int32_t size = 0; VariantListEntry *cur = langtag->variants; - while (TRUE) { + while (true) { if (cur == NULL) { break; } @@ -2581,7 +2581,7 @@ static int32_t ultag_getExtensionsSize(const ULanguageTag* langtag) { int32_t size = 0; ExtensionListEntry *cur = langtag->extensions; - while (TRUE) { + while (true) { if (cur == NULL) { break; } @@ -2648,7 +2648,7 @@ ulocimp_toLanguageTag(const char* localeID, icu::CharString canonical; int32_t reslen; UErrorCode tmpStatus = U_ZERO_ERROR; - UBool hadPosix = FALSE; + UBool hadPosix = false; const char* pKeywordStart; /* Note: uloc_canonicalize returns "en_US_POSIX" for input locale ID "". See #6835 */ @@ -2699,7 +2699,7 @@ ulocimp_toLanguageTag(const char* localeID, pKeywordStart = locale_getKeywordsStart(canonical.data()); if (pKeywordStart == canonical.data()) { int kwdCnt = 0; - UBool done = FALSE; + UBool done = false; icu::LocalUEnumerationPointer kwdEnum(uloc_openKeywords(canonical.data(), &tmpStatus)); if (U_SUCCESS(tmpStatus)) { @@ -2720,15 +2720,15 @@ ulocimp_toLanguageTag(const char* localeID, /* return private use only tag */ sink.Append("und-x-", 6); sink.Append(buf.data(), buf.length()); - done = TRUE; + done = true; } else if (strict) { *status = U_ILLEGAL_ARGUMENT_ERROR; - done = TRUE; + done = true; } /* if not strict mode, then "und" will be returned */ } else { *status = U_ILLEGAL_ARGUMENT_ERROR; - done = TRUE; + done = true; } } } @@ -2782,11 +2782,11 @@ ulocimp_forLanguageTag(const char* langtag, icu::ByteSink& sink, int32_t* parsedLength, UErrorCode* status) { - UBool isEmpty = TRUE; + UBool isEmpty = true; const char *subtag, *p; int32_t len; int32_t i, n; - UBool noRegion = TRUE; + UBool noRegion = true; icu::LocalULanguageTagPointer lt(ultag_parse(langtag, tagLen, parsedLength, status)); if (U_FAILURE(*status)) { @@ -2799,7 +2799,7 @@ ulocimp_forLanguageTag(const char* langtag, len = (int32_t)uprv_strlen(subtag); if (len > 0) { sink.Append(subtag, len); - isEmpty = FALSE; + isEmpty = false; } } @@ -2808,7 +2808,7 @@ ulocimp_forLanguageTag(const char* langtag, len = (int32_t)uprv_strlen(subtag); if (len > 0) { sink.Append("_", 1); - isEmpty = FALSE; + isEmpty = false; /* write out the script in title case */ char c = uprv_toupper(*subtag); @@ -2821,7 +2821,7 @@ ulocimp_forLanguageTag(const char* langtag, len = (int32_t)uprv_strlen(subtag); if (len > 0) { sink.Append("_", 1); - isEmpty = FALSE; + isEmpty = false; /* write out the region in upper case */ p = subtag; @@ -2830,7 +2830,7 @@ ulocimp_forLanguageTag(const char* langtag, sink.Append(&c, 1); p++; } - noRegion = FALSE; + noRegion = false; } /* variants */ @@ -2839,7 +2839,7 @@ ulocimp_forLanguageTag(const char* langtag, if (n > 0) { if (noRegion) { sink.Append("_", 1); - isEmpty = FALSE; + isEmpty = false; } for (i = 0; i < n; i++) { diff --git a/icu4c/source/common/umapfile.cpp b/icu4c/source/common/umapfile.cpp index 3e714876a4d..145582ea97a 100644 --- a/icu4c/source/common/umapfile.cpp +++ b/icu4c/source/common/umapfile.cpp @@ -107,10 +107,10 @@ typedef HANDLE MemoryMap; U_CFUNC UBool uprv_mapFile(UDataMemory *pData, const char *path, UErrorCode *status) { if (U_FAILURE(*status)) { - return FALSE; + return false; } UDataMemory_init(pData); /* Clear the output struct. */ - return FALSE; /* no file access */ + return false; /* no file access */ } U_CFUNC void uprv_unmapFile(UDataMemory *pData) { @@ -126,7 +126,7 @@ typedef HANDLE MemoryMap; ) { if (U_FAILURE(*status)) { - return FALSE; + return false; } HANDLE map = nullptr; @@ -150,12 +150,12 @@ typedef HANDLE MemoryMap; u_strFromUTF8(reinterpret_cast(utf16Path), static_cast(UPRV_LENGTHOF(utf16Path)), &pathUtf16Len, path, -1, status); if (U_FAILURE(*status)) { - return FALSE; + return false; } if (*status == U_STRING_NOT_TERMINATED_WARNING) { // Report back an error instead of a warning. *status = U_BUFFER_OVERFLOW_ERROR; - return FALSE; + return false; } file = CreateFileW(utf16Path, GENERIC_READ, FILE_SHARE_READ, nullptr, @@ -168,7 +168,7 @@ typedef HANDLE MemoryMap; if (HRESULT_FROM_WIN32(GetLastError()) == E_OUTOFMEMORY) { *status = U_MEMORY_ALLOCATION_ERROR; } - return FALSE; + return false; } // Note: We use NULL/nullptr for lpAttributes parameter below. @@ -183,17 +183,17 @@ typedef HANDLE MemoryMap; if (HRESULT_FROM_WIN32(GetLastError()) == E_OUTOFMEMORY) { *status = U_MEMORY_ALLOCATION_ERROR; } - return FALSE; + return false; } /* map a view of the file into our address space */ pData->pHeader = reinterpret_cast(MapViewOfFile(map, FILE_MAP_READ, 0, 0, 0)); if (pData->pHeader == nullptr) { CloseHandle(map); - return FALSE; + return false; } pData->map = map; - return TRUE; + return true; } U_CFUNC void @@ -217,21 +217,21 @@ typedef HANDLE MemoryMap; void *data; if (U_FAILURE(*status)) { - return FALSE; + return false; } UDataMemory_init(pData); /* Clear the output struct. */ /* determine the length of the file */ if(stat(path, &mystat)!=0 || mystat.st_size<=0) { - return FALSE; + return false; } length=mystat.st_size; /* open the file */ fd=open(path, O_RDONLY); if(fd==-1) { - return FALSE; + return false; } /* get a view of the mapping */ @@ -243,7 +243,7 @@ typedef HANDLE MemoryMap; close(fd); /* no longer needed */ if(data==MAP_FAILED) { // Possibly check the errno value for ENOMEM, and report U_MEMORY_ALLOCATION_ERROR? - return FALSE; + return false; } pData->map = (char *)data + length; @@ -252,7 +252,7 @@ typedef HANDLE MemoryMap; #if U_PLATFORM == U_PF_IPHONE posix_madvise(data, length, POSIX_MADV_RANDOM); #endif - return TRUE; + return true; } U_CFUNC void @@ -291,21 +291,21 @@ typedef HANDLE MemoryMap; void *p; if (U_FAILURE(*status)) { - return FALSE; + return false; } UDataMemory_init(pData); /* Clear the output struct. */ /* open the input file */ file=fopen(path, "rb"); if(file==nullptr) { - return FALSE; + return false; } /* get the file length */ fileLength=umap_fsize(file); if(ferror(file) || fileLength<=20) { fclose(file); - return FALSE; + return false; } /* allocate the memory to hold the file data */ @@ -313,21 +313,21 @@ typedef HANDLE MemoryMap; if(p==nullptr) { fclose(file); *status = U_MEMORY_ALLOCATION_ERROR; - return FALSE; + return false; } /* read the file */ if(fileLength!=fread(p, 1, fileLength, file)) { uprv_free(p); fclose(file); - return FALSE; + return false; } fclose(file); pData->map=p; pData->pHeader=(const DataHeader *)p; pData->mapAddr=p; - return TRUE; + return true; } U_CFUNC void @@ -427,7 +427,7 @@ typedef HANDLE MemoryMap; void *val=0; if (U_FAILURE(*status)) { - return FALSE; + return false; } inBasename=uprv_strrchr(path, U_FILE_SEP_CHAR); @@ -447,14 +447,14 @@ typedef HANDLE MemoryMap; /* determine the length of the file */ if(stat(path, &mystat)!=0 || mystat.st_size<=0) { - return FALSE; + return false; } length=mystat.st_size; /* open the file */ fd=open(path, O_RDONLY); if(fd==-1) { - return FALSE; + return false; } /* get a view of the mapping */ @@ -462,12 +462,12 @@ typedef HANDLE MemoryMap; close(fd); /* no longer needed */ if(data==MAP_FAILED) { // Possibly check the errorno value for ENOMEM, and report U_MEMORY_ALLOCATION_ERROR? - return FALSE; + return false; } pData->map = (char *)data + length; pData->pHeader=(const DataHeader *)data; pData->mapAddr = data; - return TRUE; + return true; } # ifdef OS390BATCH @@ -503,16 +503,16 @@ typedef HANDLE MemoryMap; val=dllqueryvar((dllhandle*)handle, U_ICUDATA_ENTRY_NAME); if(val == 0) { /* failed... so keep looking */ - return FALSE; + return false; } # ifdef UDATA_DEBUG fprintf(stderr, "dllqueryvar(%08X, %s) -> %08X\n", handle, U_ICUDATA_ENTRY_NAME, val); # endif pData->pHeader=(const DataHeader *)val; - return TRUE; + return true; } else { - return FALSE; /* no handle */ + return false; /* no handle */ } } diff --git a/icu4c/source/common/unames.cpp b/icu4c/source/common/unames.cpp index e5233b8518e..b0ac991e1ba 100644 --- a/icu4c/source/common/unames.cpp +++ b/icu4c/source/common/unames.cpp @@ -173,7 +173,7 @@ static UBool U_CALLCONV unames_cleanup(void) } gCharNamesInitOnce.reset(); gMaxNameLength=0; - return TRUE; + return true; } static UBool U_CALLCONV @@ -371,7 +371,7 @@ compareName(UCharNames *names, if(c!=';') { /* implicit letter */ if((char)c!=*otherName++) { - return FALSE; + return false; } } else { /* finished */ @@ -388,7 +388,7 @@ compareName(UCharNames *names, if(c!=';') { /* explicit letter */ if((char)c!=*otherName++) { - return FALSE; + return false; } } else { /* stop, but skip the semicolon if we are seeking @@ -407,7 +407,7 @@ compareName(UCharNames *names, uint8_t *tokenString=tokenStrings+token; while((c=*tokenString++)!=0) { if((char)c!=*otherName++) { - return FALSE; + return false; } } } @@ -616,7 +616,7 @@ enumGroupNames(UCharNames *names, const uint16_t *group, /* here, we assume that the buffer is large enough */ if(length>0) { if(!fn(context, start, nameChoice, buffer, length)) { - return FALSE; + return false; } } ++start; @@ -626,12 +626,12 @@ enumGroupNames(UCharNames *names, const uint16_t *group, while(start<=end) { if(compareName(names, s+offsets[start&GROUP_MASK], lengths[start&GROUP_MASK], nameChoice, otherName)) { ((FindName *)context)->code=start; - return FALSE; + return false; } ++start; } } - return TRUE; + return true; } /* @@ -653,14 +653,14 @@ enumExtNames(UChar32 start, UChar32 end, /* here, we assume that the buffer is large enough */ if(length>0) { if(!fn(context, start, U_EXTENDED_CHAR_NAME, buffer, length)) { - return FALSE; + return false; } } ++start; } } - return TRUE; + return true; } static UBool @@ -684,7 +684,7 @@ enumNames(UCharNames *names, extLimit=limit; } if(!enumExtNames(start, extLimit-1, fn, context)) { - return FALSE; + return false; } start=extLimit; } @@ -705,7 +705,7 @@ enumNames(UCharNames *names, if(!enumGroupNames(names, group, start, ((UChar32)startGroupMSB< group[GROUP_MSB] + 1 && nameChoice == U_EXTENDED_CHAR_NAME) { @@ -738,7 +738,7 @@ enumNames(UCharNames *names, end = limit; } if (!enumExtNames((group[GROUP_MSB] + 1) << GROUP_SHIFT, end - 1, fn, context)) { - return FALSE; + return false; } } group=nextGroup; @@ -753,7 +753,7 @@ enumNames(UCharNames *names, start = next; } } else { - return TRUE; + return true; } } @@ -766,7 +766,7 @@ enumNames(UCharNames *names, return enumExtNames(start, limit - 1, fn, context); } - return TRUE; + return true; } static uint16_t @@ -941,7 +941,7 @@ enumAlgNames(AlgorithmicRange *range, uint16_t length; if(nameChoice!=U_UNICODE_CHAR_NAME && nameChoice!=U_EXTENDED_CHAR_NAME) { - return TRUE; + return true; } switch(range->type) { @@ -952,12 +952,12 @@ enumAlgNames(AlgorithmicRange *range, /* get the full name of the start character */ length=getAlgName(range, (uint32_t)start, nameChoice, buffer, sizeof(buffer)); if(length<=0) { - return TRUE; + return true; } /* call the enumerator function with this first character */ if(!fn(context, start, nameChoice, buffer, length)) { - return FALSE; + return false; } /* go to the end of the name; all these names have the same length */ @@ -984,7 +984,7 @@ enumAlgNames(AlgorithmicRange *range, } if(!fn(context, start, nameChoice, buffer, length)) { - return FALSE; + return false; } } break; @@ -1018,7 +1018,7 @@ enumAlgNames(AlgorithmicRange *range, /* call the enumerator function with this first character */ if(!fn(context, start, nameChoice, buffer, length)) { - return FALSE; + return false; } /* enumerate the rest of the names */ @@ -1056,7 +1056,7 @@ enumAlgNames(AlgorithmicRange *range, *t=0; if(!fn(context, start, nameChoice, buffer, length)) { - return FALSE; + return false; } } break; @@ -1066,7 +1066,7 @@ enumAlgNames(AlgorithmicRange *range, break; } - return TRUE; + return true; } /* @@ -1416,11 +1416,11 @@ calcNameSetsLengths(UErrorCode *pErrorCode) { int32_t i, maxNameLength; if(gMaxNameLength!=0) { - return TRUE; + return true; } if(!isDataLoaded(pErrorCode)) { - return FALSE; + return false; } /* set hex digits, used in various names, and <>-, used in extended names */ @@ -1437,7 +1437,7 @@ calcNameSetsLengths(UErrorCode *pErrorCode) { /* set sets and lengths from group names, set global maximum values */ calcGroupNameSetsLengths(maxNameLength); - return TRUE; + return true; } U_NAMESPACE_END @@ -1809,7 +1809,7 @@ makeTokenMap(const UDataSwapper *ds, /* enter the converted character into the map and mark it used */ map[c1]=c2; - usedOutChar[c2]=TRUE; + usedOutChar[c2]=true; } } diff --git a/icu4c/source/common/unicode/umachine.h b/icu4c/source/common/unicode/umachine.h index 09c887c80ef..66406062726 100644 --- a/icu4c/source/common/unicode/umachine.h +++ b/icu4c/source/common/unicode/umachine.h @@ -282,14 +282,8 @@ typedef int8_t UBool; */ #ifdef U_DEFINE_FALSE_AND_TRUE // Use the predefined value. -#elif defined(U_COMBINED_IMPLEMENTATION) || \ - defined(U_COMMON_IMPLEMENTATION) || defined(U_I18N_IMPLEMENTATION) || \ - defined(U_IO_IMPLEMENTATION) || defined(U_LAYOUTEX_IMPLEMENTATION) || \ - defined(U_TOOLUTIL_IMPLEMENTATION) - // Inside ICU: Keep FALSE & TRUE available. -# define U_DEFINE_FALSE_AND_TRUE 1 #else - // Outside ICU: Avoid collision with non-macro definitions of FALSE & TRUE. + // Default to avoiding collision with non-macro definitions of FALSE & TRUE. # define U_DEFINE_FALSE_AND_TRUE 0 #endif diff --git a/icu4c/source/common/unifiedcache.cpp b/icu4c/source/common/unifiedcache.cpp index bf83e97554f..3e94bca31dc 100644 --- a/icu4c/source/common/unifiedcache.cpp +++ b/icu4c/source/common/unifiedcache.cpp @@ -38,7 +38,7 @@ static UBool U_CALLCONV unifiedcache_cleanup() { gCacheMutex = nullptr; gInProgressValueAddedCond->~condition_variable(); gInProgressValueAddedCond = nullptr; - return TRUE; + return true; } U_CDECL_END @@ -161,7 +161,7 @@ void UnifiedCache::flush() const { // Use a loop in case cache items that are flushed held hard references to // other cache items making those additional cache items eligible for // flushing. - while (_flush(FALSE)); + while (_flush(false)); } void UnifiedCache::handleUnreferencedObject() const { @@ -225,7 +225,7 @@ UnifiedCache::~UnifiedCache() { // each other and entries with hard references from outside the cache. // Nothing we can do about these so proceed to wipe out the cache. std::lock_guard lock(*gCacheMutex); - _flush(TRUE); + _flush(true); } uhash_close(fHashtable); fHashtable = nullptr; @@ -244,7 +244,7 @@ UnifiedCache::_nextElement() const { } UBool UnifiedCache::_flush(UBool all) const { - UBool result = FALSE; + UBool result = false; int32_t origSize = uhash_count(fHashtable); for (int32_t i = 0; i < origSize; ++i) { const UHashElement *element = _nextElement(); @@ -257,7 +257,7 @@ UBool UnifiedCache::_flush(UBool all) const { U_ASSERT(sharedObject->cachePtr == this); uhash_removeElement(fHashtable, element); removeSoftRef(sharedObject); // Deletes the sharedObject when softRefCount goes to zero. - result = TRUE; + result = true; } } return result; @@ -365,14 +365,14 @@ UBool UnifiedCache::_poll( // fetch out the contents and return them. if (element != NULL) { _fetch(element, value, status); - return TRUE; + return true; } // The hash table contained nothing for this key. // Insert an inProgress place holder value. // Our caller will create the final value and update the hash table. _putNew(key, fNoValue, U_ZERO_ERROR, status); - return FALSE; + return false; } void UnifiedCache::_get( @@ -471,7 +471,7 @@ UBool UnifiedCache::_isEvictable(const UHashElement *element) const // Entries that are under construction are never evictable if (_inProgress(theValue, theKey->fCreationStatus)) { - return FALSE; + return false; } // We can evict entries that are either not a primary or have just diff --git a/icu4c/source/common/uniset.cpp b/icu4c/source/common/uniset.cpp index 92a81a1a02d..4faace525c5 100644 --- a/icu4c/source/common/uniset.cpp +++ b/icu4c/source/common/uniset.cpp @@ -82,7 +82,7 @@ static int32_t _dbgCount = 0; static inline void _dbgct(UnicodeSet* set) { UnicodeString str; - set->toPattern(str, TRUE); + set->toPattern(str, true); char buf[40]; str.extract(0, 39, buf, ""); printf("DEBUG UnicodeSet: ct 0x%08X; %d %s\n", set, ++_dbgCount, buf); @@ -90,7 +90,7 @@ static inline void _dbgct(UnicodeSet* set) { static inline void _dbgdt(UnicodeSet* set) { UnicodeString str; - set->toPattern(str, TRUE); + set->toPattern(str, true); char buf[40]; str.extract(0, 39, buf, ""); printf("DEBUG UnicodeSet: dt 0x%08X; %d %s\n", set, --_dbgCount, buf); @@ -204,7 +204,7 @@ UnicodeSet::~UnicodeSet() { * Assigns this object to be a copy of another. */ UnicodeSet& UnicodeSet::operator=(const UnicodeSet& o) { - return copyFrom(o, FALSE); + return copyFrom(o, false); } UnicodeSet& UnicodeSet::copyFrom(const UnicodeSet& o, UBool asThawed) { @@ -265,7 +265,7 @@ UnicodeSet* UnicodeSet::clone() const { } UnicodeSet *UnicodeSet::cloneAsThawed() const { - return new UnicodeSet(*this, TRUE); + return new UnicodeSet(*this, true); } /** @@ -352,7 +352,7 @@ UBool UnicodeSet::contains(UChar32 c) const { return stringSpan->contains(c); } if (c >= UNICODESET_HIGH) { // Don't need to check LOW bound - return FALSE; + return false; } int32_t i = findCodePoint(c); return (UBool)(i & 1); // return true if odd @@ -447,7 +447,7 @@ UBool UnicodeSet::containsAll(const UnicodeSet& c) const { int32_t n = c.getRangeCount(); for (int i=0; icontainsAll(*c.strings)); @@ -493,7 +493,7 @@ UBool UnicodeSet::containsNone(const UnicodeSet& c) const { int32_t n = c.getRangeCount(); for (int32_t i=0; icontainsNone(*c.strings); @@ -531,10 +531,10 @@ UBool UnicodeSet::matchesIndexValue(uint8_t v) const { UChar32 high = getRangeEnd(i); if ((low & ~0xFF) == (high & ~0xFF)) { if ((low & 0xFF) <= v && v <= (high & 0xFF)) { - return TRUE; + return true; } } else if ((low & 0xFF) <= v || v <= (high & 0xFF)) { - return TRUE; + return true; } } if (hasStrings()) { @@ -545,11 +545,11 @@ UBool UnicodeSet::matchesIndexValue(uint8_t v) const { } UChar32 c = s.char32At(0); if ((c & 0xFF) == v) { - return TRUE; + return true; } } } - return FALSE; + return false; } /** @@ -1603,24 +1603,24 @@ int32_t UnicodeSet::serialize(uint16_t *dest, int32_t destCapacity, UErrorCode& //---------------------------------------------------------------- /** - * Allocate our strings vector and return TRUE if successful. + * Allocate our strings vector and return true if successful. */ UBool UnicodeSet::allocateStrings(UErrorCode &status) { if (U_FAILURE(status)) { - return FALSE; + return false; } strings = new UVector(uprv_deleteUObject, uhash_compareUnicodeString, 1, status); if (strings == NULL) { // Check for memory allocation error. status = U_MEMORY_ALLOCATION_ERROR; - return FALSE; + return false; } if (U_FAILURE(status)) { delete strings; strings = NULL; - return FALSE; + return false; } - return TRUE; + return true; } int32_t UnicodeSet::nextCapacity(int32_t minCapacity) { diff --git a/icu4c/source/common/uniset_closure.cpp b/icu4c/source/common/uniset_closure.cpp index 882231ba1a5..d7dab2a17b7 100644 --- a/icu4c/source/common/uniset_closure.cpp +++ b/icu4c/source/common/uniset_closure.cpp @@ -74,7 +74,7 @@ UnicodeSet& UnicodeSet::applyPattern(const UnicodeString& pattern, if (options & USET_IGNORE_SPACE) { // Skip over trailing whitespace - ICU_Utility::skipWhitespace(pattern, i, TRUE); + ICU_Utility::skipWhitespace(pattern, i, true); } if (i != pattern.length()) { @@ -141,7 +141,7 @@ addCaseMapping(UnicodeSet &set, int32_t result, const UChar *full, UnicodeString set.add(result); } else { // add a string case mapping from full with length result - str.setTo((UBool)FALSE, full, result); + str.setTo((UBool)false, full, result); set.add(str); } } diff --git a/icu4c/source/common/uniset_props.cpp b/icu4c/source/common/uniset_props.cpp index 80f8e0f8501..48c0a26a710 100644 --- a/icu4c/source/common/uniset_props.cpp +++ b/icu4c/source/common/uniset_props.cpp @@ -71,7 +71,7 @@ static UBool U_CALLCONV uset_cleanup(void) { delete uni32Singleton; uni32Singleton = NULL; uni32InitOnce.reset(); - return TRUE; + return true; } U_CDECL_END @@ -170,7 +170,7 @@ UnicodeSet& UnicodeSet::applyPattern(const UnicodeString& pattern, int32_t i = pos.getIndex(); // Skip over trailing whitespace - ICU_Utility::skipWhitespace(pattern, i, TRUE); + ICU_Utility::skipWhitespace(pattern, i, true); if (i != pattern.length()) { status = U_ILLEGAL_ARGUMENT_ERROR; } @@ -279,7 +279,7 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars, } UnicodeString patLocal, buf; - UBool usePat = FALSE; + UBool usePat = false; UnicodeSetPointer scratch; RuleCharacterIterator::Pos backup; @@ -289,7 +289,7 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars, UChar32 lastChar = 0; UChar op = 0; - UBool invert = FALSE; + UBool invert = false; clear(); @@ -299,7 +299,7 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars, (lastItem == 2 && (op == 0 || op == u'-' || op == u'&'))); UChar32 c = 0; - UBool literal = FALSE; + UBool literal = false; UnicodeSet* nested = 0; // alias - do not delete // -------- Check for property pattern @@ -336,7 +336,7 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars, c = chars.next(opts, literal, ec); if (U_FAILURE(ec)) return; if (c == u'^' && !literal) { - invert = TRUE; + invert = true; patLocal.append(u'^'); chars.getPos(backup); // prepare to backup c = chars.next(opts, literal, ec); @@ -345,7 +345,7 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars, // Fall through to handle special leading '-'; // otherwise restart loop for nested [], \p{}, etc. if (c == u'-') { - literal = TRUE; + literal = true; // Fall through to handle literal '-' below } else { chars.setPos(backup); // backup @@ -381,7 +381,7 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars, return; } add(lastChar, lastChar); - _appendToPat(patLocal, lastChar, FALSE); + _appendToPat(patLocal, lastChar, false); lastItem = 0; op = 0; } @@ -408,11 +408,11 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars, if (U_FAILURE(ec)) return; break; case 3: // `nested' already parsed - nested->_toPattern(patLocal, FALSE); + nested->_toPattern(patLocal, false); break; } - usePat = TRUE; + usePat = true; if (mode == 0) { // Entire pattern is a category; leave parse loop @@ -454,7 +454,7 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars, case u']': if (lastItem == 1) { add(lastChar, lastChar); - _appendToPat(patLocal, lastChar, FALSE); + _appendToPat(patLocal, lastChar, false); } // Treat final trailing '-' as a literal if (op == u'-') { @@ -508,17 +508,17 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars, } if (lastItem == 1) { add(lastChar, lastChar); - _appendToPat(patLocal, lastChar, FALSE); + _appendToPat(patLocal, lastChar, false); } lastItem = 0; buf.truncate(0); { - UBool ok = FALSE; + UBool ok = false; while (!chars.atEnd()) { c = chars.next(opts, literal, ec); if (U_FAILURE(ec)) return; if (c == u'}' && !literal) { - ok = TRUE; + ok = true; break; } buf.append(c); @@ -534,7 +534,7 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars, // processing add(buf); patLocal.append(u'{'); - _appendToPat(patLocal, buf, FALSE); + _appendToPat(patLocal, buf, false); patLocal.append(u'}'); continue; case SymbolTable::SYMBOL_REF: @@ -557,10 +557,10 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars, if (anchor && op == 0) { if (lastItem == 1) { add(lastChar, lastChar); - _appendToPat(patLocal, lastChar, FALSE); + _appendToPat(patLocal, lastChar, false); } add(U_ETHER); - usePat = TRUE; + usePat = true; patLocal.append((UChar) SymbolTable::SYMBOL_REF); patLocal.append(u']'); mode = 2; @@ -594,14 +594,14 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars, return; } add(lastChar, c); - _appendToPat(patLocal, lastChar, FALSE); + _appendToPat(patLocal, lastChar, false); patLocal.append(op); - _appendToPat(patLocal, c, FALSE); + _appendToPat(patLocal, c, false); lastItem = 0; op = 0; } else { add(lastChar, lastChar); - _appendToPat(patLocal, lastChar, FALSE); + _appendToPat(patLocal, lastChar, false); lastChar = c; } break; @@ -646,7 +646,7 @@ void UnicodeSet::applyPattern(RuleCharacterIterator& chars, if (usePat) { rebuiltPat.append(patLocal); } else { - _generatePattern(rebuiltPat, FALSE); + _generatePattern(rebuiltPat, false); } if (isBogus() && U_SUCCESS(ec)) { // We likely ran out of memory. AHHH! @@ -756,12 +756,12 @@ static UBool mungeCharName(char* dst, const char* src, int32_t dstCapacity) { if (ch == ' ' && (j==0 || (j>0 && dst[j-1]==' '))) { continue; } - if (j >= dstCapacity) return FALSE; + if (j >= dstCapacity) return false; dst[j++] = ch; } if (j > 0 && dst[j-1] == ' ') --j; dst[j] = 0; - return TRUE; + return true; } } // namespace @@ -789,7 +789,7 @@ UnicodeSet::applyIntPropertyValue(UProperty prop, int32_t value, UErrorCode& ec) if (value == 0 || value == 1) { const USet *set = u_getBinaryPropertySet(prop, &ec); if (U_FAILURE(ec)) { return *this; } - copyFrom(*UnicodeSet::fromUSet(set), TRUE); + copyFrom(*UnicodeSet::fromUSet(set), true); if (value == 0) { complement().removeAllStrings(); // code point complement } @@ -830,7 +830,7 @@ UnicodeSet::applyPropertyAlias(const UnicodeString& prop, UProperty p; int32_t v; - UBool invert = FALSE; + UBool invert = false; if (value.length() > 0) { p = u_getPropertyEnum(pname.data()); @@ -948,7 +948,7 @@ UnicodeSet::applyPropertyAlias(const UnicodeString& prop, // [:Assigned:]=[:^Cn:] p = UCHAR_GENERAL_CATEGORY_MASK; v = U_GC_CN_MASK; - invert = TRUE; + invert = true; } else { FAIL(ec); } @@ -980,7 +980,7 @@ UBool UnicodeSet::resemblesPropertyPattern(const UnicodeString& pattern, int32_t pos) { // Patterns are at least 5 characters long if ((pos+5) > pattern.length()) { - return FALSE; + return false; } // Look for an opening [:, [:^, \p, or \P @@ -997,8 +997,8 @@ UBool UnicodeSet::resemblesPropertyPattern(const UnicodeString& pattern, */ UBool UnicodeSet::resemblesPropertyPattern(RuleCharacterIterator& chars, int32_t iterOpts) { - // NOTE: literal will always be FALSE, because we don't parse escapes. - UBool result = FALSE, literal; + // NOTE: literal will always be false, because we don't parse escapes. + UBool result = false, literal; UErrorCode ec = U_ZERO_ERROR; iterOpts &= ~RuleCharacterIterator::PARSE_ESCAPES; RuleCharacterIterator::Pos pos; @@ -1022,9 +1022,9 @@ UnicodeSet& UnicodeSet::applyPropertyPattern(const UnicodeString& pattern, UErrorCode &ec) { int32_t pos = ppos.getIndex(); - UBool posix = FALSE; // true for [:pat:], false for \p{pat} \P{pat} \N{pat} - UBool isName = FALSE; // true for \N{pat}, o/w false - UBool invert = FALSE; + UBool posix = false; // true for [:pat:], false for \p{pat} \P{pat} \N{pat} + UBool isName = false; // true for \N{pat}, o/w false + UBool invert = false; if (U_FAILURE(ec)) return *this; @@ -1036,12 +1036,12 @@ UnicodeSet& UnicodeSet::applyPropertyPattern(const UnicodeString& pattern, // On entry, ppos should point to one of the following locations: // Look for an opening [:, [:^, \p, or \P if (isPOSIXOpen(pattern, pos)) { - posix = TRUE; + posix = true; pos += 2; pos = ICU_Utility::skipWhitespace(pattern, pos); if (pos < pattern.length() && pattern.charAt(pos) == u'^') { ++pos; - invert = TRUE; + invert = true; } } else if (isPerlOpen(pattern, pos) || isNameOpen(pattern, pos)) { UChar c = pattern.charAt(pos+1); diff --git a/icu4c/source/common/unisetspan.cpp b/icu4c/source/common/unisetspan.cpp index fe0d74f5b28..e4277c5be60 100644 --- a/icu4c/source/common/unisetspan.cpp +++ b/icu4c/source/common/unisetspan.cpp @@ -98,7 +98,7 @@ public: i-=capacity; } if(list[i]) { - list[i]=FALSE; + list[i]=false; --length; } start=i; @@ -111,7 +111,7 @@ public: if(i>=capacity) { i-=capacity; } - list[i]=TRUE; + list[i]=true; ++length; } @@ -132,7 +132,7 @@ public: int32_t i=start, result; while(++imaxLength16) { maxLength16=length16; @@ -284,7 +284,7 @@ UnicodeSetStringSpan::UnicodeSetStringSpan(const UnicodeSet &set, } else { utf8Lengths=(int32_t *)uprv_malloc(allocSize); if(utf8Lengths==NULL) { - maxLength16=maxLength8=0; // Prevent usage by making needsStringSpanUTF16/8() return FALSE. + maxLength16=maxLength8=0; // Prevent usage by making needsStringSpanUTF16/8() return false. return; // Out of memory. } } @@ -399,7 +399,7 @@ UnicodeSetStringSpan::UnicodeSetStringSpan(const UnicodeSetStringSpan &otherStri utf8Lengths(NULL), spanLengths(NULL), utf8(NULL), utf8Length(otherStringSpan.utf8Length), maxLength16(otherStringSpan.maxLength16), maxLength8(otherStringSpan.maxLength8), - all(TRUE) { + all(true) { if(otherStringSpan.pSpanNotSet==&otherStringSpan.spanSet) { pSpanNotSet=&spanSet; } else { @@ -415,7 +415,7 @@ UnicodeSetStringSpan::UnicodeSetStringSpan(const UnicodeSetStringSpan &otherStri } else { utf8Lengths=(int32_t *)uprv_malloc(allocSize); if(utf8Lengths==NULL) { - maxLength16=maxLength8=0; // Prevent usage by making needsStringSpanUTF16/8() return FALSE. + maxLength16=maxLength8=0; // Prevent usage by making needsStringSpanUTF16/8() return false. return; // Out of memory. } } @@ -454,20 +454,20 @@ static inline UBool matches16(const UChar *s, const UChar *t, int32_t length) { do { if(*s++!=*t++) { - return FALSE; + return false; } } while(--length>0); - return TRUE; + return true; } static inline UBool matches8(const uint8_t *s, const uint8_t *t, int32_t length) { do { if(*s++!=*t++) { - return FALSE; + return false; } } while(--length>0); - return TRUE; + return true; } // Compare 16-bit Unicode strings (which may be malformed UTF-16) diff --git a/icu4c/source/common/unistr.cpp b/icu4c/source/common/unistr.cpp index c18665928d8..4125d194724 100644 --- a/icu4c/source/common/unistr.cpp +++ b/icu4c/source/common/unistr.cpp @@ -197,7 +197,7 @@ UnicodeString::UnicodeString(UChar ch) { UnicodeString::UnicodeString(UChar32 ch) { fUnion.fFields.fLengthAndFlags = kShortString; int32_t i = 0; - UBool isError = FALSE; + UBool isError = false; U16_APPEND(fUnion.fStackFields.fBuffer, i, US_STACKBUF_SIZE, ch, isError); // We test isError so that the compiler does not complain that we don't. // If isError then i==0 which is what we want anyway. @@ -270,7 +270,7 @@ UnicodeString::UnicodeString(const char *src, int32_t length, EInvariant) { if(length<0) { length=(int32_t)uprv_strlen(src); } - if(cloneArrayIfNeeded(length, length, FALSE)) { + if(cloneArrayIfNeeded(length, length, false)) { u_charsToUChars(src, getArrayStart(), length); setLength(length); } else { @@ -309,7 +309,7 @@ UnicodeString::UnicodeString(const UnicodeString& that) { } UnicodeString::UnicodeString(UnicodeString &&src) U_NOEXCEPT { - copyFieldsFrom(src, TRUE); + copyFieldsFrom(src, true); } UnicodeString::UnicodeString(const UnicodeString& that, @@ -370,7 +370,7 @@ UBool UnicodeString::allocate(int32_t capacity) { if(capacity <= US_STACKBUF_SIZE) { fUnion.fFields.fLengthAndFlags = kShortString; - return TRUE; + return true; } if(capacity <= kMaxCapacity) { ++capacity; // for the NUL @@ -389,13 +389,13 @@ UnicodeString::allocate(int32_t capacity) { fUnion.fFields.fArray = (UChar *)array; fUnion.fFields.fCapacity = (int32_t)(numBytes / U_SIZEOF_UCHAR); fUnion.fFields.fLengthAndFlags = kLongString; - return TRUE; + return true; } } fUnion.fFields.fLengthAndFlags = kIsBogus; fUnion.fFields.fArray = 0; fUnion.fFields.fCapacity = 0; - return FALSE; + return false; } //======================================== @@ -476,7 +476,7 @@ UnicodeString UnicodeString::fromUTF32(const UChar32 *utf32, int32_t length) { result.setToBogus(); } break; - } while(TRUE); + } while(true); return result; } @@ -491,7 +491,7 @@ UnicodeString::operator=(const UnicodeString &src) { UnicodeString & UnicodeString::fastCopyFrom(const UnicodeString &src) { - return copyFrom(src, TRUE); + return copyFrom(src, true); } UnicodeString & @@ -576,7 +576,7 @@ UnicodeString &UnicodeString::operator=(UnicodeString &&src) U_NOEXCEPT { // No explicit check for self move assignment, consistent with standard library. // Self move assignment causes no crash nor leak but might make the object bogus. releaseArray(); - copyFieldsFrom(src, TRUE); + copyFieldsFrom(src, true); return *this; } @@ -610,9 +610,9 @@ void UnicodeString::copyFieldsFrom(UnicodeString &src, UBool setSrcToBogus) U_NO void UnicodeString::swap(UnicodeString &other) U_NOEXCEPT { UnicodeString temp; // Empty short string: Known not to need releaseArray(). // Copy fields without resetting source values in between. - temp.copyFieldsFrom(*this, FALSE); - this->copyFieldsFrom(other, FALSE); - other.copyFieldsFrom(temp, FALSE); + temp.copyFieldsFrom(*this, false); + this->copyFieldsFrom(other, false); + other.copyFieldsFrom(temp, false); // Set temp to an empty string so that other's memory is not released twice. temp.fUnion.fFields.fLengthAndFlags = kShortString; } @@ -761,7 +761,7 @@ UnicodeString::doCompareCodePointOrder(int32_t start, srcStart = srcLength = 0; } - int32_t diff = uprv_strCompare(getArrayStart() + start, length, (srcChars!=NULL)?(srcChars + srcStart):NULL, srcLength, FALSE, TRUE); + int32_t diff = uprv_strCompare(getArrayStart() + start, length, (srcChars!=NULL)?(srcChars + srcStart):NULL, srcLength, false, true); /* translate the 32-bit result into an 8-bit one */ if(diff!=0) { return (int8_t)(diff >> 15 | 1); @@ -921,7 +921,7 @@ UnicodeString::tempSubString(int32_t start, int32_t len) const { array=fUnion.fStackFields.fBuffer; // anything not NULL because that would make an empty string len=-2; // bogus result string } - return UnicodeString(FALSE, array + start, len); + return UnicodeString(false, array + start, len); } int32_t @@ -972,7 +972,7 @@ UnicodeString::toUTF8(ByteSink &sink) const { if(length16 != 0) { char stackBuffer[1024]; int32_t capacity = (int32_t)sizeof(stackBuffer); - UBool utf8IsOwned = FALSE; + UBool utf8IsOwned = false; char *utf8 = sink.GetAppendBuffer(length16 < capacity ? length16 : capacity, 3*length16, stackBuffer, capacity, @@ -987,7 +987,7 @@ UnicodeString::toUTF8(ByteSink &sink) const { if(errorCode == U_BUFFER_OVERFLOW_ERROR) { utf8 = (char *)uprv_malloc(length8); if(utf8 != NULL) { - utf8IsOwned = TRUE; + utf8IsOwned = true; errorCode = U_ZERO_ERROR; u_strToUTF8WithSub(utf8, length8, &length8, getBuffer(), length16, @@ -1225,7 +1225,7 @@ UnicodeString::getTerminatedBuffer() { if(len < getCapacity()) { if(fUnion.fFields.fLengthAndFlags & kBufferIsReadonly) { // If len US_STACKBUF_SIZE)) { @@ -1497,7 +1497,7 @@ UnicodeString::doReplace(int32_t start, // clone our array and allocate a bigger array if needed int32_t *bufferToDelete = 0; if(!cloneArrayIfNeeded(newLength, getGrowCapacity(newLength), - FALSE, &bufferToDelete) + false, &bufferToDelete) ) { return *this; } @@ -1637,14 +1637,14 @@ UnicodeString::copy(int32_t start, int32_t limit, int32_t dest) { * so we implement this function here. */ UBool Replaceable::hasMetaData() const { - return TRUE; + return true; } /** * Replaceable API */ UBool UnicodeString::hasMetaData() const { - return FALSE; + return false; } UnicodeString& @@ -1662,7 +1662,7 @@ UnicodeString::doReverse(int32_t start, int32_t length) { UChar *left = getArrayStart() + start; UChar *right = left + length - 1; // -1 for inclusive boundary (length>=2) UChar swap; - UBool hasSupplementary = FALSE; + UBool hasSupplementary = false; // Before the loop we know left=2. do { @@ -1699,7 +1699,7 @@ UnicodeString::padLeading(int32_t targetLength, { int32_t oldLength = length(); if(oldLength >= targetLength || !cloneArrayIfNeeded(targetLength)) { - return FALSE; + return false; } else { // move contents up by padding width UChar *array = getArrayStart(); @@ -1711,7 +1711,7 @@ UnicodeString::padLeading(int32_t targetLength, array[start] = padChar; } setLength(targetLength); - return TRUE; + return true; } } @@ -1721,7 +1721,7 @@ UnicodeString::padTrailing(int32_t targetLength, { int32_t oldLength = length(); if(oldLength >= targetLength || !cloneArrayIfNeeded(targetLength)) { - return FALSE; + return false; } else { // fill in padding character UChar *array = getArrayStart(); @@ -1730,7 +1730,7 @@ UnicodeString::padTrailing(int32_t targetLength, array[length] = padChar; } setLength(targetLength); - return TRUE; + return true; } } @@ -1800,10 +1800,10 @@ UnicodeString::cloneArrayIfNeeded(int32_t newCapacity, } // while a getBuffer(minCapacity) is "open", - // prevent any modifications of the string by returning FALSE here + // prevent any modifications of the string by returning false here // if the string is bogus, then only an assignment or similar can revive it if(!isWritable()) { - return FALSE; + return false; } /* @@ -1811,7 +1811,7 @@ UnicodeString::cloneArrayIfNeeded(int32_t newCapacity, * the buffer is read-only, or * the buffer is refCounted (shared), and refCount>1, or * the buffer is too small. - * Return FALSE if memory could not be allocated. + * Return false if memory could not be allocated. */ if(forceClone || fUnion.fFields.fLengthAndFlags & kBufferIsReadonly || @@ -1890,10 +1890,10 @@ UnicodeString::cloneArrayIfNeeded(int32_t newCapacity, } fUnion.fFields.fLengthAndFlags = flags; setToBogus(); - return FALSE; + return false; } } - return TRUE; + return true; } // UnicodeStringAppendable ------------------------------------------------- *** @@ -1909,7 +1909,7 @@ UBool UnicodeStringAppendable::appendCodePoint(UChar32 c) { UChar buffer[U16_MAX_LENGTH]; int32_t cLength = 0; - UBool isError = FALSE; + UBool isError = false; U16_APPEND(buffer, cLength, U16_MAX_LENGTH, c, isError); return !isError && str.doAppend(buffer, 0, cLength).isWritable(); } @@ -1961,10 +1961,10 @@ uhash_compareUnicodeString(const UElement key1, const UElement key2) { const UnicodeString *str1 = (const UnicodeString*) key1.pointer; const UnicodeString *str2 = (const UnicodeString*) key2.pointer; if (str1 == str2) { - return TRUE; + return true; } if (str1 == NULL || str2 == NULL) { - return FALSE; + return false; } return *str1 == *str2; } diff --git a/icu4c/source/common/unistr_case.cpp b/icu4c/source/common/unistr_case.cpp index 2138d60c01c..f4c43b4889f 100644 --- a/icu4c/source/common/unistr_case.cpp +++ b/icu4c/source/common/unistr_case.cpp @@ -123,7 +123,7 @@ UnicodeString::caseMap(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITER capacity = getCapacity(); } else { // Switch from the read-only alias or shared heap buffer to the stack buffer. - if (!cloneArrayIfNeeded(US_STACKBUF_SIZE, US_STACKBUF_SIZE, /* doCopyArray= */ FALSE)) { + if (!cloneArrayIfNeeded(US_STACKBUF_SIZE, US_STACKBUF_SIZE, /* doCopyArray= */ false)) { return *this; } U_ASSERT(fUnion.fFields.fLengthAndFlags & kUsingStackBuffer); @@ -132,7 +132,7 @@ UnicodeString::caseMap(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITER } #if !UCONFIG_NO_BREAK_ITERATION if (iter != nullptr) { - oldString.setTo(FALSE, oldArray, oldLength); + oldString.setTo(false, oldArray, oldLength); iter->setText(oldString); } #endif @@ -158,7 +158,7 @@ UnicodeString::caseMap(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITER UChar replacementChars[200]; #if !UCONFIG_NO_BREAK_ITERATION if (iter != nullptr) { - oldString.setTo(FALSE, oldArray, oldLength); + oldString.setTo(false, oldArray, oldLength); iter->setText(oldString); } #endif @@ -194,7 +194,7 @@ UnicodeString::caseMap(int32_t caseLocale, uint32_t options, UCASEMAP_BREAK_ITER // and deletes the old array itself after it is done. // In addition, we are forcing cloneArrayIfNeeded() to always allocate a new array. int32_t *bufferToDelete = 0; - if (!cloneArrayIfNeeded(newLength, newLength, FALSE, &bufferToDelete, TRUE)) { + if (!cloneArrayIfNeeded(newLength, newLength, false, &bufferToDelete, true)) { return *this; } errorCode = U_ZERO_ERROR; @@ -241,10 +241,10 @@ uhash_compareCaselessUnicodeString(const UElement key1, const UElement key2) { const UnicodeString *str1 = (const UnicodeString*) key1.pointer; const UnicodeString *str2 = (const UnicodeString*) key2.pointer; if (str1 == str2) { - return TRUE; + return true; } if (str1 == NULL || str2 == NULL) { - return FALSE; + return false; } return str1->caseCompare(*str2, U_FOLD_CASE_DEFAULT) == 0; } diff --git a/icu4c/source/common/unistr_cnv.cpp b/icu4c/source/common/unistr_cnv.cpp index 64d3c16801c..e1f60d4487a 100644 --- a/icu4c/source/common/unistr_cnv.cpp +++ b/icu4c/source/common/unistr_cnv.cpp @@ -225,13 +225,13 @@ UnicodeString::extract(char *dest, int32_t destCapacity, // get the converter UBool isDefaultConverter; if(cnv==0) { - isDefaultConverter=TRUE; + isDefaultConverter=true; cnv=u_getDefaultConverter(&errorCode); if(U_FAILURE(errorCode)) { return 0; } } else { - isDefaultConverter=FALSE; + isDefaultConverter=false; ucnv_resetFromUnicode(cnv); } @@ -275,7 +275,7 @@ UnicodeString::doExtract(int32_t start, int32_t length, } // perform the conversion - ucnv_fromUnicode(cnv, &dest, destLimit, &src, srcLimit, 0, TRUE, &errorCode); + ucnv_fromUnicode(cnv, &dest, destLimit, &src, srcLimit, 0, true, &errorCode); length=(int32_t)(dest-originalDest); // if an overflow occurs, then get the preflighting length @@ -286,7 +286,7 @@ UnicodeString::doExtract(int32_t start, int32_t length, do { dest=buffer; errorCode=U_ZERO_ERROR; - ucnv_fromUnicode(cnv, &dest, destLimit, &src, srcLimit, 0, TRUE, &errorCode); + ucnv_fromUnicode(cnv, &dest, destLimit, &src, srcLimit, 0, true, &errorCode); length+=(int32_t)(dest-buffer); } while(errorCode==U_BUFFER_OVERFLOW_ERROR); } @@ -322,7 +322,7 @@ UnicodeString::doCodepageCreate(const char *codepageData, converter = u_getDefaultConverter(&status); } else if(*codepage == 0) { // use the "invariant characters" conversion - if(cloneArrayIfNeeded(dataLength, dataLength, FALSE)) { + if(cloneArrayIfNeeded(dataLength, dataLength, false)) { u_charsToUChars(codepageData, getArrayStart(), dataLength); setLength(dataLength); } else { @@ -379,7 +379,7 @@ UnicodeString::doCodepageCreate(const char *codepageData, } // we do not care about the current contents - UBool doCopyArray = FALSE; + UBool doCopyArray = false; for(;;) { if(!cloneArrayIfNeeded(arraySize, arraySize, doCopyArray)) { setToBogus(); @@ -390,7 +390,7 @@ UnicodeString::doCodepageCreate(const char *codepageData, array = getArrayStart(); myTarget = array + length(); ucnv_toUnicode(converter, &myTarget, array + getCapacity(), - &mySource, mySourceEnd, 0, TRUE, &status); + &mySource, mySourceEnd, 0, true, &status); // update the conversion parameters setLength((int32_t)(myTarget - array)); @@ -401,7 +401,7 @@ UnicodeString::doCodepageCreate(const char *codepageData, status = U_ZERO_ERROR; // keep the previous conversion results - doCopyArray = TRUE; + doCopyArray = true; // estimate the new size needed, larger than before // try 2 UChar's per remaining source byte diff --git a/icu4c/source/common/unorm.cpp b/icu4c/source/common/unorm.cpp index 2d9f46052ff..cf3915c27f3 100644 --- a/icu4c/source/common/unorm.cpp +++ b/icu4c/source/common/unorm.cpp @@ -128,7 +128,7 @@ _iterate(UCharIterator *src, UBool forward, } if(pNeededToNormalize!=NULL) { - *pNeededToNormalize=FALSE; + *pNeededToNormalize=false; } if(!(forward ? src->hasNext(src) : src->hasPrevious(src))) { return u_terminateUChars(dest, destCapacity, 0, pErrorCode); @@ -199,7 +199,7 @@ unorm_previous(UCharIterator *src, UNormalizationMode mode, int32_t options, UBool doNormalize, UBool *pNeededToNormalize, UErrorCode *pErrorCode) { - return unorm_iterate(src, FALSE, + return unorm_iterate(src, false, dest, destCapacity, mode, options, doNormalize, pNeededToNormalize, @@ -212,7 +212,7 @@ unorm_next(UCharIterator *src, UNormalizationMode mode, int32_t options, UBool doNormalize, UBool *pNeededToNormalize, UErrorCode *pErrorCode) { - return unorm_iterate(src, TRUE, + return unorm_iterate(src, true, dest, destCapacity, mode, options, doNormalize, pNeededToNormalize, diff --git a/icu4c/source/common/unormcmp.cpp b/icu4c/source/common/unormcmp.cpp index 689b0b53b2d..e2241909725 100644 --- a/icu4c/source/common/unormcmp.cpp +++ b/icu4c/source/common/unormcmp.cpp @@ -536,7 +536,7 @@ UBool _normalize(const Normalizer2 *n2, const UChar *s, int32_t length, // check if s fulfill the conditions int32_t spanQCYes=n2->spanQuickCheckYes(str, *pErrorCode); if (U_FAILURE(*pErrorCode)) { - return FALSE; + return false; } /* * ICU 2.4 had a further optimization: @@ -548,13 +548,13 @@ UBool _normalize(const Normalizer2 *n2, const UChar *s, int32_t length, */ if(spanQCYesnormalizeSecondAndAppend(normalized, unnormalized, *pErrorCode); if (U_SUCCESS(*pErrorCode)) { - return TRUE; + return true; } } - return FALSE; + return false; } U_CAPI int32_t U_EXPORT2 diff --git a/icu4c/source/common/uprops.cpp b/icu4c/source/common/uprops.cpp index a878a9c5367..26e950b876b 100644 --- a/icu4c/source/common/uprops.cpp +++ b/icu4c/source/common/uprops.cpp @@ -76,7 +76,7 @@ UBool U_CALLCONV uprops_cleanup() { gMaxVoValue = 0; gLayoutInitOnce.reset(); - return TRUE; + return true; } UBool U_CALLCONV @@ -141,7 +141,7 @@ void U_CALLCONV ulayout_load(UErrorCode &errorCode) { } UBool ulayout_ensureData(UErrorCode &errorCode) { - if (U_FAILURE(errorCode)) { return FALSE; } + if (U_FAILURE(errorCode)) { return false; } umtx_initOnce(gLayoutInitOnce, &ulayout_load, errorCode); return U_SUCCESS(errorCode); } @@ -188,7 +188,7 @@ static UBool isJoinControl(const BinaryProperty &/*prop*/, UChar32 c, UProperty #if UCONFIG_NO_NORMALIZATION static UBool hasFullCompositionExclusion(const BinaryProperty &, UChar32, UProperty) { - return FALSE; + return false; } #else static UBool hasFullCompositionExclusion(const BinaryProperty &/*prop*/, UChar32 c, UProperty /*which*/) { @@ -202,7 +202,7 @@ static UBool hasFullCompositionExclusion(const BinaryProperty &/*prop*/, UChar32 // UCHAR_NF*_INERT properties #if UCONFIG_NO_NORMALIZATION static UBool isNormInert(const BinaryProperty &, UChar32, UProperty) { - return FALSE; + return false; } #else static UBool isNormInert(const BinaryProperty &/*prop*/, UChar32 c, UProperty which) { @@ -215,7 +215,7 @@ static UBool isNormInert(const BinaryProperty &/*prop*/, UChar32 c, UProperty wh #if UCONFIG_NO_NORMALIZATION static UBool changesWhenCasefolded(const BinaryProperty &, UChar32, UProperty) { - return FALSE; + return false; } #else static UBool changesWhenCasefolded(const BinaryProperty &/*prop*/, UChar32 c, UProperty /*which*/) { @@ -223,7 +223,7 @@ static UBool changesWhenCasefolded(const BinaryProperty &/*prop*/, UChar32 c, UP UErrorCode errorCode=U_ZERO_ERROR; const Normalizer2 *nfcNorm2=Normalizer2::getNFCInstance(errorCode); if(U_FAILURE(errorCode)) { - return FALSE; + return false; } if(nfcNorm2->getDecomposition(c, nfd)) { /* c has a decomposition */ @@ -237,7 +237,7 @@ static UBool changesWhenCasefolded(const BinaryProperty &/*prop*/, UChar32 c, UP c=U_SENTINEL; } } else if(c<0) { - return FALSE; /* protect against bad input */ + return false; /* protect against bad input */ } if(c>=0) { /* single code point */ @@ -252,21 +252,21 @@ static UBool changesWhenCasefolded(const BinaryProperty &/*prop*/, UChar32 c, UP U_FOLD_CASE_DEFAULT, &errorCode); return (UBool)(U_SUCCESS(errorCode) && 0!=u_strCompare(nfd.getBuffer(), nfd.length(), - dest, destLength, FALSE)); + dest, destLength, false)); } } #endif #if UCONFIG_NO_NORMALIZATION static UBool changesWhenNFKC_Casefolded(const BinaryProperty &, UChar32, UProperty) { - return FALSE; + return false; } #else static UBool changesWhenNFKC_Casefolded(const BinaryProperty &/*prop*/, UChar32 c, UProperty /*which*/) { UErrorCode errorCode=U_ZERO_ERROR; const Normalizer2Impl *kcf=Normalizer2Factory::getNFKC_CFImpl(errorCode); if(U_FAILURE(errorCode)) { - return FALSE; + return false; } UnicodeString src(c); UnicodeString dest; @@ -277,8 +277,8 @@ static UBool changesWhenNFKC_Casefolded(const BinaryProperty &/*prop*/, UChar32 // Small destCapacity for NFKC_CF(c). if(buffer.init(5, errorCode)) { const UChar *srcArray=src.getBuffer(); - kcf->compose(srcArray, srcArray+src.length(), FALSE, - TRUE, buffer, errorCode); + kcf->compose(srcArray, srcArray+src.length(), false, + true, buffer, errorCode); } } return U_SUCCESS(errorCode) && dest!=src; @@ -287,7 +287,7 @@ static UBool changesWhenNFKC_Casefolded(const BinaryProperty &/*prop*/, UChar32 #if UCONFIG_NO_NORMALIZATION static UBool isCanonSegmentStarter(const BinaryProperty &, UChar32, UProperty) { - return FALSE; + return false; } #else static UBool isCanonSegmentStarter(const BinaryProperty &/*prop*/, UChar32 c, UProperty /*which*/) { @@ -416,7 +416,7 @@ u_hasBinaryProperty(UChar32 c, UProperty which) { /* c is range-checked in the functions that are called from here */ if(whichUCASE_MAX_STRING_LENGTH) { folded1String.setTo(folded1Length); } else { - folded1String.setTo(FALSE, folded1, folded1Length); + folded1String.setTo(false, folded1, folded1Length); } } UnicodeString kc1=nfkc->normalize(folded1String, *pErrorCode); diff --git a/icu4c/source/common/uresbund.cpp b/icu4c/source/common/uresbund.cpp index bbf45538d87..272418679ae 100644 --- a/icu4c/source/common/uresbund.cpp +++ b/icu4c/source/common/uresbund.cpp @@ -85,10 +85,10 @@ static UBool chopLocale(char *name) { if(i != NULL) { *i = '\0'; - return TRUE; + return true; } - return FALSE; + return false; } /** @@ -199,7 +199,7 @@ static int32_t ures_flushCache() } do { - deletedMore = FALSE; + deletedMore = false; /*creates an enumeration to iterate through every element in the table */ pos = UHASH_FIRST; while ((e = uhash_nextElement(cache, &pos)) != NULL) @@ -216,7 +216,7 @@ static int32_t ures_flushCache() if (resB->fCountExisting == 0) { rbDeletedNum++; - deletedMore = TRUE; + deletedMore = true; uhash_removeElement(cache, e); free_entry(resB); } @@ -234,7 +234,7 @@ static int32_t ures_flushCache() #include U_CAPI UBool U_EXPORT2 ures_dumpCacheContents(void) { - UBool cacheNotEmpty = FALSE; + UBool cacheNotEmpty = false; int32_t pos = UHASH_FIRST; const UHashElement *e; UResourceDataEntry *resB; @@ -242,11 +242,11 @@ U_CAPI UBool U_EXPORT2 ures_dumpCacheContents(void) { Mutex lock(&resbMutex); if (cache == NULL) { fprintf(stderr,"%s:%d: RB Cache is NULL.\n", __FILE__, __LINE__); - return FALSE; + return false; } while ((e = uhash_nextElement(cache, &pos)) != NULL) { - cacheNotEmpty=TRUE; + cacheNotEmpty=true; resB = (UResourceDataEntry *) e->value.pointer; fprintf(stderr,"%s:%d: RB Cache: Entry @0x%p, refcount %d, name %s:%s. Pool 0x%p, alias 0x%p, parent 0x%p\n", __FILE__, __LINE__, @@ -272,7 +272,7 @@ static UBool U_CALLCONV ures_cleanup(void) cache = NULL; } gCacheInitOnce.reset(); - return TRUE; + return true; } /** INTERNAL: Initializes the cache for resources */ @@ -320,7 +320,7 @@ static UResourceDataEntry *init_entry(const char *localeID, const char *path, UE const char *name; char aliasName[100] = { 0 }; int32_t aliasLen = 0; - /*UBool isAlias = FALSE;*/ + /*UBool isAlias = false;*/ /*UHashTok hashkey; */ if(U_FAILURE(*status)) { @@ -466,8 +466,8 @@ static UResourceDataEntry * findFirstExisting(const char* path, char* name, const char* defaultLocale, UBool *isRoot, UBool *hasChopped, UBool *isDefault, UErrorCode* status) { UResourceDataEntry *r = NULL; - UBool hasRealData = FALSE; - *hasChopped = TRUE; /* we're starting with a fresh name */ + UBool hasRealData = false; + *hasChopped = true; /* we're starting with a fresh name */ while(*hasChopped && !hasRealData) { r = init_entry(name, path, status); @@ -513,13 +513,13 @@ static void ures_setIsStackObject( UResourceBundle* resB, UBool state) { } static UBool ures_isStackObject(const UResourceBundle* resB) { - return((resB->fMagic1 == MAGIC1 && resB->fMagic2 == MAGIC2)?FALSE:TRUE); + return((resB->fMagic1 == MAGIC1 && resB->fMagic2 == MAGIC2)?false:true); } U_CFUNC void ures_initStackObject(UResourceBundle* resB) { uprv_memset(resB, 0, sizeof(UResourceBundle)); - ures_setIsStackObject(resB, TRUE); + ures_setIsStackObject(resB, true); } U_NAMESPACE_BEGIN @@ -538,8 +538,8 @@ static UBool // returns U_SUCCESS(*status) loadParentsExceptRoot(UResourceDataEntry *&t1, char name[], int32_t nameCapacity, UBool usingUSRData, char usrDataPath[], UErrorCode *status) { - if (U_FAILURE(*status)) { return FALSE; } - UBool checkParent = TRUE; + if (U_FAILURE(*status)) { return false; } + UBool checkParent = true; while (checkParent && t1->fParent == NULL && !t1->fData.noFallback && res_getResource(&t1->fData,"%%ParentIsRoot") == RES_BOGUS) { Resource parentRes = res_getResource(&t1->fData, "%%Parent"); @@ -550,7 +550,7 @@ loadParentsExceptRoot(UResourceDataEntry *&t1, if(parentLocaleName != NULL && 0 < parentLocaleLen && parentLocaleLen < nameCapacity) { u_UCharsToChars(parentLocaleName, name, parentLocaleLen + 1); if (uprv_strcmp(name, kRootLocaleName) == 0) { - return TRUE; + return true; } } } @@ -559,7 +559,7 @@ loadParentsExceptRoot(UResourceDataEntry *&t1, UResourceDataEntry *t2 = init_entry(name, t1->fPath, &parentStatus); if (U_FAILURE(parentStatus)) { *status = parentStatus; - return FALSE; + return false; } UResourceDataEntry *u2 = NULL; UErrorCode usrStatus = U_ZERO_ERROR; @@ -568,7 +568,7 @@ loadParentsExceptRoot(UResourceDataEntry *&t1, // If we failed due to out-of-memory, report that to the caller and exit early. if (usrStatus == U_MEMORY_ALLOCATION_ERROR) { *status = usrStatus; - return FALSE; + return false; } } @@ -585,21 +585,21 @@ loadParentsExceptRoot(UResourceDataEntry *&t1, t1 = t2; checkParent = chopLocale(name) || mayHaveParent(name); } - return TRUE; + return true; } static UBool // returns U_SUCCESS(*status) insertRootBundle(UResourceDataEntry *&t1, UErrorCode *status) { - if (U_FAILURE(*status)) { return FALSE; } + if (U_FAILURE(*status)) { return false; } UErrorCode parentStatus = U_ZERO_ERROR; UResourceDataEntry *t2 = init_entry(kRootLocaleName, t1->fPath, &parentStatus); if (U_FAILURE(parentStatus)) { *status = parentStatus; - return FALSE; + return false; } t1->fParent = t2; t1 = t2; - return TRUE; + return true; } enum UResOpenType { @@ -640,10 +640,10 @@ static UResourceDataEntry *entryOpen(const char* path, const char* localeID, UErrorCode intStatus = U_ZERO_ERROR; UResourceDataEntry *r = NULL; UResourceDataEntry *t1 = NULL; - UBool isDefault = FALSE; - UBool isRoot = FALSE; - UBool hasRealData = FALSE; - UBool hasChopped = TRUE; + UBool isDefault = false; + UBool isRoot = false; + UBool hasRealData = false; + UBool hasChopped = true; UBool usingUSRData = U_USE_USRDATA && ( path == NULL || uprv_strncmp(path,U_ICUDATA_NAME,8) == 0); char name[ULOC_FULLNAME_CAPACITY]; @@ -686,7 +686,7 @@ static UResourceDataEntry *entryOpen(const char* path, const char* localeID, if(r != NULL) { /* if there is one real locale, we can look for parents. */ t1 = r; - hasRealData = TRUE; + hasRealData = true; if ( usingUSRData ) { /* This code inserts user override data into the inheritance chain */ UErrorCode usrStatus = U_ZERO_ERROR; UResourceDataEntry *u1 = init_entry(t1->fName, usrDataPath, &usrStatus); @@ -726,8 +726,8 @@ static UResourceDataEntry *entryOpen(const char* path, const char* localeID, intStatus = U_USING_DEFAULT_WARNING; if(r != NULL) { /* the default locale exists */ t1 = r; - hasRealData = TRUE; - isDefault = TRUE; + hasRealData = true; + isDefault = true; // TODO: Why not if (usingUSRData) { ... } like in the non-default-locale code path? if ((hasChopped || mayHaveParent(name)) && !isRoot) { if (!loadParentsExceptRoot(t1, name, UPRV_LENGTHOF(name), usingUSRData, usrDataPath, status)) { @@ -750,7 +750,7 @@ static UResourceDataEntry *entryOpen(const char* path, const char* localeID, if(r != NULL) { t1 = r; intStatus = U_USING_DEFAULT_WARNING; - hasRealData = TRUE; + hasRealData = true; } else { /* we don't even have the root locale */ *status = U_MISSING_RESOURCE_ERROR; goto finish; @@ -826,7 +826,7 @@ entryOpenDirect(const char* path, const char* localeID, UErrorCode* status) { char name[ULOC_FULLNAME_CAPACITY]; uprv_strcpy(name, localeID); if(!chopLocale(name) || uprv_strcmp(name, kRootLocaleName) == 0 || - loadParentsExceptRoot(t1, name, UPRV_LENGTHOF(name), FALSE, NULL, status)) { + loadParentsExceptRoot(t1, name, UPRV_LENGTHOF(name), false, NULL, status)) { if(uprv_strcmp(t1->fName, kRootLocaleName) != 0 && t1->fParent == NULL) { insertRootBundle(t1, status); } @@ -956,7 +956,7 @@ ures_closeBundle(UResourceBundle* resB, UBool freeBundleObj) } ures_freeResPath(resB); - if(ures_isStackObject(resB) == FALSE && freeBundleObj) { + if(ures_isStackObject(resB) == false && freeBundleObj) { uprv_free(resB); } #if 0 /*U_DEBUG*/ @@ -971,7 +971,7 @@ ures_closeBundle(UResourceBundle* resB, UBool freeBundleObj) U_CAPI void U_EXPORT2 ures_close(UResourceBundle* resB) { - ures_closeBundle(resB, TRUE); + ures_closeBundle(resB, true); } namespace { @@ -1237,7 +1237,7 @@ UResourceBundle *init_resb_result( *status = U_MEMORY_ALLOCATION_ERROR; return NULL; } - ures_setIsStackObject(resB, FALSE); + ures_setIsStackObject(resB, false); resB->fResPath = NULL; resB->fResPathLen = 0; } else { @@ -1254,7 +1254,7 @@ UResourceBundle *init_resb_result( treated the same */ /* - if(ures_isStackObject(resB) != FALSE) { + if(ures_isStackObject(resB) != false) { ures_initStackObject(resB); } */ @@ -1264,8 +1264,8 @@ UResourceBundle *init_resb_result( } resB->fData = dataEntry; entryIncrease(resB->fData); - resB->fHasFallback = FALSE; - resB->fIsTopLevel = FALSE; + resB->fHasFallback = false; + resB->fIsTopLevel = false; resB->fIndex = -1; resB->fKey = key; resB->fValidLocaleDataEntry = validLocaleDataEntry; @@ -1318,7 +1318,7 @@ UResourceBundle *ures_copyResb(UResourceBundle *r, const UResourceBundle *origin } if(original != NULL) { if(r == NULL) { - isStackObject = FALSE; + isStackObject = false; r = (UResourceBundle *)uprv_malloc(sizeof(UResourceBundle)); /* test for NULL */ if (r == NULL) { @@ -1327,7 +1327,7 @@ UResourceBundle *ures_copyResb(UResourceBundle *r, const UResourceBundle *origin } } else { isStackObject = ures_isStackObject(r); - ures_closeBundle(r, FALSE); + ures_closeBundle(r, false); } uprv_memcpy(r, original, sizeof(UResourceBundle)); r->fResPath = NULL; @@ -1409,7 +1409,7 @@ ures_toUTF8String(const UChar *s16, int32_t length16, * may store UTF-8 natively. * (In which case dest would not be used at all.) * - * We do not do this if forceCopy=TRUE because then the caller + * We do not do this if forceCopy=true because then the caller * expects the string to start exactly at dest. * * The test above for <= 0x2aaaaaaa prevents overflows. @@ -1553,7 +1553,7 @@ U_CAPI void U_EXPORT2 ures_resetIterator(UResourceBundle *resB){ U_CAPI UBool U_EXPORT2 ures_hasNext(const UResourceBundle *resB) { if(resB == NULL) { - return FALSE; + return false; } return (UBool)(resB->fIndex < resB->fSize-1); } @@ -2133,7 +2133,7 @@ void getAllItemsWithFallback( parentRef.fData = parentEntry; parentRef.fValidLocaleDataEntry = bundle->fValidLocaleDataEntry; parentRef.fHasFallback = !parentRef.getResData().noFallback; - parentRef.fIsTopLevel = TRUE; + parentRef.fIsTopLevel = true; parentRef.fRes = parentRef.getResData().rootRes; parentRef.fSize = res_countArrayItems(&parentRef.getResData(), parentRef.fRes); parentRef.fIndex = -1; @@ -2276,7 +2276,7 @@ U_CAPI UResourceBundle* U_EXPORT2 ures_getByKey(const UResourceBundle *resB, con res = res_getTableItemByKey(&resB->getResData(), resB->fRes, &t, &key); if(res == RES_BOGUS) { key = inKey; - if(resB->fHasFallback == TRUE) { + if(resB->fHasFallback == true) { dataEntry = getFallbackData(resB, &key, &res, status); if(U_SUCCESS(*status)) { /* check if resB->fResPath gives the right name here */ @@ -2294,7 +2294,7 @@ U_CAPI UResourceBundle* U_EXPORT2 ures_getByKey(const UResourceBundle *resB, con #if 0 /* this is a kind of TODO item. If we have an array with an index table, we could do this. */ /* not currently */ - else if(RES_GET_TYPE(resB->fRes) == URES_ARRAY && resB->fHasFallback == TRUE) { + else if(RES_GET_TYPE(resB->fRes) == URES_ARRAY && resB->fHasFallback == true) { /* here should go a first attempt to locate the key using index table */ dataEntry = getFallbackData(resB, &key, &res, status); if(U_SUCCESS(*status)) { @@ -2331,7 +2331,7 @@ U_CAPI const UChar* U_EXPORT2 ures_getStringByKey(const UResourceBundle *resB, c if(res == RES_BOGUS) { key = inKey; - if(resB->fHasFallback == TRUE) { + if(resB->fHasFallback == true) { dataEntry = getFallbackData(resB, &key, &res, status); if(U_SUCCESS(*status)) { switch (RES_GET_TYPE(res)) { @@ -2376,7 +2376,7 @@ U_CAPI const UChar* U_EXPORT2 ures_getStringByKey(const UResourceBundle *resB, c #if 0 /* this is a kind of TODO item. If we have an array with an index table, we could do this. */ /* not currently */ - else if(RES_GET_TYPE(resB->fRes) == URES_ARRAY && resB->fHasFallback == TRUE) { + else if(RES_GET_TYPE(resB->fRes) == URES_ARRAY && resB->fHasFallback == true) { /* here should go a first attempt to locate the key using index table */ dataEntry = getFallbackData(resB, &key, &res, status); if(U_SUCCESS(*status)) { @@ -2510,17 +2510,17 @@ ures_openWithType(UResourceBundle *r, const char* path, const char* localeID, *status = U_MEMORY_ALLOCATION_ERROR; return NULL; } - isStackObject = FALSE; + isStackObject = false; } else { // fill-in isStackObject = ures_isStackObject(r); - ures_closeBundle(r, FALSE); + ures_closeBundle(r, false); } uprv_memset(r, 0, sizeof(UResourceBundle)); ures_setIsStackObject(r, isStackObject); r->fValidLocaleDataEntry = r->fData = entry; r->fHasFallback = openType != URES_OPEN_DIRECT && !r->getResData().noFallback; - r->fIsTopLevel = TRUE; + r->fIsTopLevel = true; r->fRes = r->getResData().rootRes; r->fSize = res_countArrayItems(&r->getResData(), r->fRes); r->fIndex = -1; @@ -2795,10 +2795,10 @@ static UBool isLocaleInList(UEnumeration *locEnum, const char *locToSearch, UErr const char *loc; while ((loc = uenum_next(locEnum, NULL, status)) != NULL) { if (uprv_strcmp(loc, locToSearch) == 0) { - return TRUE; + return true; } } - return FALSE; + return false; } U_CAPI int32_t U_EXPORT2 @@ -2836,7 +2836,7 @@ ures_getFunctionalEquivalent(char *result, int32_t resultCapacity, if(isAvailable) { UEnumeration *locEnum = ures_openAvailableLocales(path, &subStatus); - *isAvailable = TRUE; + *isAvailable = true; if (U_SUCCESS(subStatus)) { *isAvailable = isLocaleInList(locEnum, parent, &subStatus); } @@ -2854,7 +2854,7 @@ ures_getFunctionalEquivalent(char *result, int32_t resultCapacity, if(((subStatus == U_USING_FALLBACK_WARNING) || (subStatus == U_USING_DEFAULT_WARNING)) && isAvailable) { - *isAvailable = FALSE; + *isAvailable = false; } isAvailable = NULL; /* only want to set this the first time around */ @@ -2910,7 +2910,7 @@ ures_getFunctionalEquivalent(char *result, int32_t resultCapacity, subStatus = U_ZERO_ERROR; res = ures_open(path, parent, &subStatus); if((subStatus == U_USING_FALLBACK_WARNING) && isAvailable) { - *isAvailable = FALSE; + *isAvailable = false; } isAvailable = NULL; /* only want to set this the first time around */ @@ -2991,7 +2991,7 @@ ures_getFunctionalEquivalent(char *result, int32_t resultCapacity, subStatus = U_ZERO_ERROR; res = ures_open(path, parent, &subStatus); if((subStatus == U_USING_FALLBACK_WARNING) && isAvailable) { - *isAvailable = FALSE; + *isAvailable = false; } isAvailable = NULL; /* only want to set this the first time around */ @@ -3224,32 +3224,32 @@ ures_equal(const UResourceBundle* res1, const UResourceBundle* res2){ return (res1->fKey==res2->fKey); }else{ if(uprv_strcmp(res1->fKey, res2->fKey)!=0){ - return FALSE; + return false; } } if(uprv_strcmp(res1->fData->fName, res2->fData->fName)!=0){ - return FALSE; + return false; } if(res1->fData->fPath == NULL|| res2->fData->fPath==NULL){ return (res1->fData->fPath == res2->fData->fPath); }else{ if(uprv_strcmp(res1->fData->fPath, res2->fData->fPath)!=0){ - return FALSE; + return false; } } if(uprv_strcmp(res1->fData->fParent->fName, res2->fData->fParent->fName)!=0){ - return FALSE; + return false; } if(uprv_strcmp(res1->fData->fParent->fPath, res2->fData->fParent->fPath)!=0){ - return FALSE; + return false; } if(uprv_strncmp(res1->fResPath, res2->fResPath, res1->fResPathLen)!=0){ - return FALSE; + return false; } if(res1->fRes != res2->fRes){ - return FALSE; + return false; } - return TRUE; + return true; } U_CAPI UResourceBundle* U_EXPORT2 ures_clone(const UResourceBundle* res, UErrorCode* status){ diff --git a/icu4c/source/common/uresdata.cpp b/icu4c/source/common/uresdata.cpp index 9af081be408..a1222d415ce 100644 --- a/icu4c/source/common/uresdata.cpp +++ b/icu4c/source/common/uresdata.cpp @@ -234,7 +234,7 @@ res_init(ResourceData *pResData, * formatVersion 1: compare key strings in native-charset order * formatVersion 2 and up: compare key strings in ASCII order */ - pResData->useNativeStrcmp=TRUE; + pResData->useNativeStrcmp=true; } } @@ -377,10 +377,10 @@ UBool isNoInheritanceMarker(const ResourceData *pResData, Resource res) { return p[1] == 0x2205 && p[2] == 0x2205 && p[3] == 0x2205; } else { // Assume that the string has not been stored with more length units than necessary. - return FALSE; + return false; } } - return FALSE; + return false; } int32_t getStringArray(const ResourceData *pResData, const icu::ResourceArray &array, @@ -409,7 +409,7 @@ int32_t getStringArray(const ResourceData *pResData, const icu::ResourceArray &a errorCode = U_RESOURCE_TYPE_MISMATCH; return 0; } - dest[i].setTo(TRUE, s, sLength); + dest[i].setTo(true, s, sLength); } return length; } @@ -660,7 +660,7 @@ int32_t ResourceDataValue::getStringArrayOrStringAsArray(UnicodeString *dest, in int32_t sLength; const UChar *s = res_getString(fTraceInfo, &getData(), res, &sLength); if(s != NULL) { - dest[0].setTo(TRUE, s, sLength); + dest[0].setTo(true, s, sLength); return 1; } errorCode = U_RESOURCE_TYPE_MISMATCH; @@ -675,7 +675,7 @@ UnicodeString ResourceDataValue::getStringOrFirstOfArray(UErrorCode &errorCode) int32_t sLength; const UChar *s = res_getString(fTraceInfo, &getData(), res, &sLength); if(s != NULL) { - us.setTo(TRUE, s, sLength); + us.setTo(true, s, sLength); return us; } ResourceArray array = getArray(errorCode); @@ -686,7 +686,7 @@ UnicodeString ResourceDataValue::getStringOrFirstOfArray(UErrorCode &errorCode) // Tracing is already performed above (unimportant for trace that this is an array) s = res_getStringNoTrace(&getData(), array.internalGetResource(&getData(), 0), &sLength); if(s != NULL) { - us.setTo(TRUE, s, sLength); + us.setTo(true, s, sLength); return us; } } @@ -837,9 +837,9 @@ UBool icu::ResourceTable::getKeyAndValue(int32_t i, // alive for the duration that fields are being read from it // (including nested fields). rdValue.setResource(res, ResourceTracer(fTraceInfo, key)); - return TRUE; + return true; } - return FALSE; + return false; } UBool icu::ResourceTable::findValue(const char *key, ResourceValue &value) const { @@ -860,9 +860,9 @@ UBool icu::ResourceTable::findValue(const char *key, ResourceValue &value) const } // Same note about lifetime as in getKeyAndValue(). rdValue.setResource(res, ResourceTracer(fTraceInfo, key)); - return TRUE; + return true; } - return FALSE; + return false; } U_CAPI Resource U_EXPORT2 @@ -912,9 +912,9 @@ UBool icu::ResourceArray::getValue(int32_t i, icu::ResourceValue &value) const { rdValue.setResource( internalGetResource(&rdValue.getData(), i), ResourceTracer(fTraceInfo, i)); - return TRUE; + return true; } - return FALSE; + return false; } U_CFUNC Resource @@ -1222,7 +1222,7 @@ ures_swapResource(const UDataSwapper *ds, } uprv_sortArray(pTempTable->rows, count, sizeof(Row), ures_compareRows, pTempTable->keyChars, - FALSE, pErrorCode); + false, pErrorCode); if(U_FAILURE(*pErrorCode)) { udata_printError(ds, "ures_swapResource(table res=%08x).uprv_sortArray(%d items) failed\n", res, count); diff --git a/icu4c/source/common/usc_impl.cpp b/icu4c/source/common/usc_impl.cpp index 111029b9749..a4e2fc6069a 100644 --- a/icu4c/source/common/usc_impl.cpp +++ b/icu4c/source/common/usc_impl.cpp @@ -261,7 +261,7 @@ uscript_nextRun(UScriptRun *scriptRun, int32_t *pRunStart, int32_t *pRunLimit, U /* if we've fallen off the end of the text, we're done */ if (scriptRun == NULL || scriptRun->scriptLimit >= scriptRun->textLength) { - return FALSE; + return false; } SYNC_FIXUP(scriptRun); @@ -357,5 +357,5 @@ uscript_nextRun(UScriptRun *scriptRun, int32_t *pRunStart, int32_t *pRunLimit, U *pRunScript = scriptRun->scriptCode; } - return TRUE; + return true; } diff --git a/icu4c/source/common/uscript.cpp b/icu4c/source/common/uscript.cpp index f8bd7e7fdd1..1ededbb268a 100644 --- a/icu4c/source/common/uscript.cpp +++ b/icu4c/source/common/uscript.cpp @@ -113,14 +113,14 @@ uscript_getCode(const char* nameOrAbbrOrLocale, return 0; } - triedCode = FALSE; + triedCode = false; if(uprv_strchr(nameOrAbbrOrLocale, '-')==NULL && uprv_strchr(nameOrAbbrOrLocale, '_')==NULL ){ /* try long and abbreviated script names first */ UScriptCode code = (UScriptCode) u_getPropertyValueEnum(UCHAR_SCRIPT, nameOrAbbrOrLocale); if(code!=USCRIPT_INVALID_CODE) { return setOneCode(code, fillIn, capacity, err); } - triedCode = TRUE; + triedCode = true; } internalErrorCode = U_ZERO_ERROR; length = getCodesFromLocale(nameOrAbbrOrLocale, fillIn, capacity, err); diff --git a/icu4c/source/common/uset.cpp b/icu4c/source/common/uset.cpp index 871a5d8986f..2152693560b 100644 --- a/icu4c/source/common/uset.cpp +++ b/icu4c/source/common/uset.cpp @@ -344,12 +344,12 @@ uset_getItem(const USet* uset, int32_t itemIndex, //uset_getRange(const USet* set, int32_t rangeIndex, // UChar32* pStart, UChar32* pEnd) { // if ((uint32_t) rangeIndex >= (uint32_t) uset_getRangeCount(set)) { -// return FALSE; +// return false; // } // const UnicodeSet* us = (const UnicodeSet*) set; // *pStart = us->getRangeStart(rangeIndex); // *pEnd = us->getRangeEnd(rangeIndex); -// return TRUE; +// return true; //} /* @@ -384,11 +384,11 @@ uset_getSerializedSet(USerializedSet* fillSet, const uint16_t* src, int32_t srcL int32_t length; if(fillSet==NULL) { - return FALSE; + return false; } if(src==NULL || srcLength<=0) { fillSet->length=fillSet->bmpLength=0; - return FALSE; + return false; } length=*src++; @@ -397,20 +397,20 @@ uset_getSerializedSet(USerializedSet* fillSet, const uint16_t* src, int32_t srcL length&=0x7fff; if(srcLength<(2+length)) { fillSet->length=fillSet->bmpLength=0; - return FALSE; + return false; } fillSet->bmpLength=*src++; } else { /* only BMP values */ if(srcLength<(1+length)) { fillSet->length=fillSet->bmpLength=0; - return FALSE; + return false; } fillSet->bmpLength=length; } fillSet->array=src; fillSet->length=length; - return TRUE; + return true; } U_CAPI void U_EXPORT2 @@ -451,7 +451,7 @@ uset_serializedContains(const USerializedSet* set, UChar32 c) { const uint16_t* array; if(set==NULL || (uint32_t)c>0x10ffff) { - return FALSE; + return false; } array=set->array; @@ -520,7 +520,7 @@ uset_getSerializedRange(const USerializedSet* set, int32_t rangeIndex, int32_t bmpLength, length; if(set==NULL || rangeIndex<0 || pStart==NULL || pEnd==NULL) { - return FALSE; + return false; } array=set->array; @@ -537,7 +537,7 @@ uset_getSerializedRange(const USerializedSet* set, int32_t rangeIndex, } else { *pEnd=0x10ffff; } - return TRUE; + return true; } else { rangeIndex-=bmpLength; rangeIndex*=2; /* address pairs of pairs of units */ @@ -551,9 +551,9 @@ uset_getSerializedRange(const USerializedSet* set, int32_t rangeIndex, } else { *pEnd=0x10ffff; } - return TRUE; + return true; } else { - return FALSE; + return false; } } } @@ -591,14 +591,14 @@ uset_getSerializedRange(const USerializedSet* set, int32_t rangeIndex, // int32_t i, length, more; // // if(set==NULL || (uint32_t)c>0x10ffff) { -// return FALSE; +// return false; // } // // length=set->length; // i=findChar(set->array, length, c); // if((i&1)^doRemove) { // /* c is already in the set */ -// return TRUE; +// return true; // } // // /* how many more array items do we need? */ @@ -615,7 +615,7 @@ uset_getSerializedRange(const USerializedSet* set, int32_t rangeIndex, // } // } // } -// return TRUE; +// return true; // } else if(i>0 && c==set->array[i-1]) { // /* c is just after the previous range, extend that in-place by one */ // if(++c<=0x10ffff) { @@ -632,7 +632,7 @@ uset_getSerializedRange(const USerializedSet* set, int32_t rangeIndex, // /* extend the previous range (had limit 0x10ffff) to the end of Unicode */ // set->length=i-1; // } -// return TRUE; +// return true; // } else if(i==length && c==0x10ffff) { // /* insert one range limit c */ // more=1; @@ -647,7 +647,7 @@ uset_getSerializedRange(const USerializedSet* set, int32_t rangeIndex, // int32_t newCapacity=set->capacity+set->capacity/2+USET_GROW_DELTA; // UChar32* newArray=(UChar32* )uprv_malloc(newCapacity*4); // if(newArray==NULL) { -// return FALSE; +// return false; // } // set->capacity=newCapacity; // uprv_memcpy(newArray, set->array, length*4); @@ -667,7 +667,7 @@ uset_getSerializedRange(const USerializedSet* set, int32_t rangeIndex, // } // set->length+=more; // -// return TRUE; +// return true; // } // // U_CAPI UBool U_EXPORT2 diff --git a/icu4c/source/common/usetiter.cpp b/icu4c/source/common/usetiter.cpp index 79151690494..3cdece5500b 100644 --- a/icu4c/source/common/usetiter.cpp +++ b/icu4c/source/common/usetiter.cpp @@ -50,19 +50,19 @@ UBool UnicodeSetIterator::next() { if (nextElement <= endElement) { codepoint = codepointEnd = nextElement++; string = NULL; - return TRUE; + return true; } if (range < endRange) { loadRange(++range); codepoint = codepointEnd = nextElement++; string = NULL; - return TRUE; + return true; } - if (nextString >= stringCount) return FALSE; + if (nextString >= stringCount) return false; codepoint = (UChar32)IS_STRING; // signal that value is actually a string string = (const UnicodeString*) set->strings->elementAt(nextString++); - return TRUE; + return true; } /** @@ -82,20 +82,20 @@ UBool UnicodeSetIterator::nextRange() { codepointEnd = endElement; codepoint = nextElement; nextElement = endElement+1; - return TRUE; + return true; } if (range < endRange) { loadRange(++range); codepointEnd = endElement; codepoint = nextElement; nextElement = endElement+1; - return TRUE; + return true; } - if (nextString >= stringCount) return FALSE; + if (nextString >= stringCount) return false; codepoint = (UChar32)IS_STRING; // signal that value is actually a string string = (const UnicodeString*) set->strings->elementAt(nextString++); - return TRUE; + return true; } /** diff --git a/icu4c/source/common/ushape.cpp b/icu4c/source/common/ushape.cpp index ae13b5c1183..babbbe52a83 100644 --- a/icu4c/source/common/ushape.cpp +++ b/icu4c/source/common/ushape.cpp @@ -354,10 +354,10 @@ _shapeToArabicDigitsWithContext(UChar *s, int32_t length, switch(ubidi_getClass(c)) { case U_LEFT_TO_RIGHT: /* L */ case U_RIGHT_TO_LEFT: /* R */ - lastStrongWasAL=FALSE; + lastStrongWasAL=false; break; case U_RIGHT_TO_LEFT_ARABIC: /* AL */ - lastStrongWasAL=TRUE; + lastStrongWasAL=true; break; case U_EUROPEAN_NUMBER: /* EN */ if(lastStrongWasAL && (uint32_t)(c-0x30)<10) { @@ -374,10 +374,10 @@ _shapeToArabicDigitsWithContext(UChar *s, int32_t length, switch(ubidi_getClass(c)) { case U_LEFT_TO_RIGHT: /* L */ case U_RIGHT_TO_LEFT: /* R */ - lastStrongWasAL=FALSE; + lastStrongWasAL=false; break; case U_RIGHT_TO_LEFT_ARABIC: /* AL */ - lastStrongWasAL=TRUE; + lastStrongWasAL=true; break; case U_EUROPEAN_NUMBER: /* EN */ if(lastStrongWasAL && (uint32_t)(c-0x30)<10) { @@ -1710,13 +1710,13 @@ u_shapeArabic(const UChar *source, int32_t sourceLength, _shapeToArabicDigitsWithContext(dest, destLength, digitBase, (UBool)((options&U_SHAPE_TEXT_DIRECTION_MASK)==U_SHAPE_TEXT_DIRECTION_LOGICAL), - FALSE); + false); break; case U_SHAPE_DIGITS_ALEN2AN_INIT_AL: _shapeToArabicDigitsWithContext(dest, destLength, digitBase, (UBool)((options&U_SHAPE_TEXT_DIRECTION_MASK)==U_SHAPE_TEXT_DIRECTION_LOGICAL), - TRUE); + true); break; default: /* will never occur because of validity checks above */ diff --git a/icu4c/source/common/usprep.cpp b/icu4c/source/common/usprep.cpp index bdb352dac94..50d16081d1d 100644 --- a/icu4c/source/common/usprep.cpp +++ b/icu4c/source/common/usprep.cpp @@ -91,9 +91,9 @@ isSPrepAcceptable(void * /* context */, ) { //uprv_memcpy(formatVersion, pInfo->formatVersion, 4); uprv_memcpy(dataVersion, pInfo->dataVersion, 4); - return TRUE; + return true; } else { - return FALSE; + return false; } } @@ -159,8 +159,8 @@ usprep_internal_flushCache(UBool noRefCount){ profile = (UStringPrepProfile *) e->value.pointer; key = (UStringPrepKey *) e->key.pointer; - if ((noRefCount== FALSE && profile->refCount == 0) || - noRefCount== TRUE) { + if ((noRefCount== false && profile->refCount == 0) || + noRefCount== true) { deletedNum++; uhash_removeElement(SHARED_DATA_HASHTABLE, e); @@ -188,13 +188,13 @@ usprep_internal_flushCache(UBool noRefCount){ /* Works just like ucnv_flushCache() static int32_t usprep_flushCache(){ - return usprep_internal_flushCache(FALSE); + return usprep_internal_flushCache(false); } */ static UBool U_CALLCONV usprep_cleanup(void){ if (SHARED_DATA_HASHTABLE != NULL) { - usprep_internal_flushCache(TRUE); + usprep_internal_flushCache(true); if (SHARED_DATA_HASHTABLE != NULL && uhash_count(SHARED_DATA_HASHTABLE) == 0) { uhash_close(SHARED_DATA_HASHTABLE); SHARED_DATA_HASHTABLE = NULL; @@ -243,7 +243,7 @@ loadData(UStringPrepProfile* profile, //TODO: change the path dataMemory=udata_openChoice(path, type, name, isSPrepAcceptable, NULL, errorCode); if(U_FAILURE(*errorCode)) { - return FALSE; + return false; } p=(const int32_t *)udata_getMemory(dataMemory); @@ -254,7 +254,7 @@ loadData(UStringPrepProfile* profile, if(U_FAILURE(*errorCode)) { udata_close(dataMemory); - return FALSE; + return false; } /* in the mutex block, set the data for this process */ @@ -280,7 +280,7 @@ loadData(UStringPrepProfile* profile, if(U_FAILURE(*errorCode)){ udata_close(dataMemory); - return FALSE; + return false; } if( normUniVer < sprepUniVer && /* the Unicode version of SPREP file must be less than the Unicode Version of the normalization data */ normUniVer < normCorrVer && /* the Unicode version of the NormalizationCorrections.txt file should be less than the Unicode Version of the normalization data */ @@ -288,9 +288,9 @@ loadData(UStringPrepProfile* profile, ){ *errorCode = U_INVALID_FORMAT_ERROR; udata_close(dataMemory); - return FALSE; + return false; } - profile->isDataLoaded = TRUE; + profile->isDataLoaded = true; /* if a different thread set it first, then close the extra data */ if(dataMemory!=NULL) { @@ -474,28 +474,28 @@ getValues(uint16_t trieWord, int16_t& value, UBool& isIndex){ * the source codepoint is copied to the destination */ type = USPREP_TYPE_LIMIT; - isIndex =FALSE; + isIndex =false; value = 0; }else if(trieWord >= _SPREP_TYPE_THRESHOLD){ type = (UStringPrepType) (trieWord - _SPREP_TYPE_THRESHOLD); - isIndex =FALSE; + isIndex =false; value = 0; }else{ /* get the type */ type = USPREP_MAP; /* ascertain if the value is index or delta */ if(trieWord & 0x02){ - isIndex = TRUE; + isIndex = true; value = trieWord >> 2; //mask off the lower 2 bits and shift }else{ - isIndex = FALSE; + isIndex = false; value = (int16_t)trieWord; value = (value >> 2); } if((trieWord>>2) == _SPREP_MAX_INDEX_VALUE){ type = USPREP_DELETE; - isIndex =FALSE; + isIndex =false; value = 0; } } @@ -535,7 +535,7 @@ usprep_map( const UStringPrepProfile* profile, type = getValues(result, value, isIndex); // check if the source codepoint is unassigned - if(type == USPREP_UNASSIGNED && allowUnassigned == FALSE){ + if(type == USPREP_UNASSIGNED && allowUnassigned == false){ uprv_syntaxError(src,srcIndex-U16_LENGTH(ch), srcLength,parseError); *status = U_STRINGPREP_UNASSIGNED_ERROR; @@ -709,7 +709,7 @@ usprep_prepare( const UStringPrepProfile* profile, const UChar *b2 = s2.getBuffer(); int32_t b2Len = s2.length(); UCharDirection direction=U_CHAR_DIRECTION_COUNT, firstCharDir=U_CHAR_DIRECTION_COUNT; - UBool leftToRight=FALSE, rightToLeft=FALSE; + UBool leftToRight=false, rightToLeft=false; int32_t rtlPos =-1, ltrPos =-1; for(int32_t b2Index=0; b2IndexcheckBiDi == TRUE){ + if(profile->checkBiDi == true){ // satisfy 2 - if( leftToRight == TRUE && rightToLeft == TRUE){ + if( leftToRight == true && rightToLeft == true){ *status = U_STRINGPREP_CHECK_BIDI_ERROR; uprv_syntaxError(b2,(rtlPos>ltrPos) ? rtlPos : ltrPos, b2Len, parseError); return 0; } //satisfy 3 - if( rightToLeft == TRUE && + if( rightToLeft == true && !((firstCharDir == U_RIGHT_TO_LEFT || firstCharDir == U_RIGHT_TO_LEFT_ARABIC) && (direction == U_RIGHT_TO_LEFT || direction == U_RIGHT_TO_LEFT_ARABIC)) ){ *status = U_STRINGPREP_CHECK_BIDI_ERROR; uprv_syntaxError(b2, rtlPos, b2Len, parseError); - return FALSE; + return false; } } return s2.extract(dest, destCapacity, *status); diff --git a/icu4c/source/common/ustr_cnv.cpp b/icu4c/source/common/ustr_cnv.cpp index 9a25a9905a2..97fbc527a37 100644 --- a/icu4c/source/common/ustr_cnv.cpp +++ b/icu4c/source/common/ustr_cnv.cpp @@ -144,7 +144,7 @@ u_uastrncpy(UChar *ucs1, &s2, s2+u_astrnlen(s2, n), NULL, - TRUE, + true, &err); ucnv_reset(cnv); /* be good citizens */ u_releaseDefaultConverter(cnv); @@ -216,7 +216,7 @@ u_austrncpy(char *s1, &ucs2, ucs2+u_ustrnlen(ucs2, n), NULL, - TRUE, + true, &err); ucnv_reset(cnv); /* be good citizens */ u_releaseDefaultConverter(cnv); diff --git a/icu4c/source/common/ustr_titlecase_brkiter.cpp b/icu4c/source/common/ustr_titlecase_brkiter.cpp index 3002d64e34f..85dfa0decb4 100644 --- a/icu4c/source/common/ustr_titlecase_brkiter.cpp +++ b/icu4c/source/common/ustr_titlecase_brkiter.cpp @@ -110,7 +110,7 @@ int32_t WholeStringBreakIterator::next() { return length; } int32_t WholeStringBreakIterator::current() const { return 0; } int32_t WholeStringBreakIterator::following(int32_t /*offset*/) { return length; } int32_t WholeStringBreakIterator::preceding(int32_t /*offset*/) { return 0; } -UBool WholeStringBreakIterator::isBoundary(int32_t /*offset*/) { return FALSE; } +UBool WholeStringBreakIterator::isBoundary(int32_t /*offset*/) { return false; } int32_t WholeStringBreakIterator::next(int32_t /*n*/) { return length; } WholeStringBreakIterator *WholeStringBreakIterator::createBufferClone( diff --git a/icu4c/source/common/ustrcase.cpp b/icu4c/source/common/ustrcase.cpp index 43910ea5209..8037c09b4f0 100644 --- a/icu4c/source/common/ustrcase.cpp +++ b/icu4c/source/common/ustrcase.cpp @@ -107,7 +107,7 @@ appendResult(UChar *dest, int32_t destIndex, int32_t destCapacity, /* append the result */ if(c>=0) { /* code point */ - UBool isError=FALSE; + UBool isError=false; U16_APPEND(dest, destIndex, destCapacity, c, isError); if(isError) { /* overflow, nothing written */ @@ -1087,12 +1087,12 @@ UBool isFollowedByCasedLetter(const UChar *s, int32_t i, int32_t length) { if ((type & UCASE_IGNORABLE) != 0) { // Case-ignorable, continue with the loop. } else if (type != UCASE_NONE) { - return TRUE; // Followed by cased letter. + return true; // Followed by cased letter. } else { - return FALSE; // Uncased and not case-ignorable. + return false; // Uncased and not case-ignorable. } } - return FALSE; // Not followed by cased letter. + return false; // Not followed by cased letter. } /** @@ -1155,7 +1155,7 @@ int32_t toUpper(uint32_t options, nextState |= AFTER_VOWEL_WITH_ACCENT; } // Map according to Greek rules. - UBool addTonos = FALSE; + UBool addTonos = false; if (upper == 0x397 && (data & HAS_ACCENT) != 0 && numYpogegrammeni == 0 && @@ -1166,7 +1166,7 @@ int32_t toUpper(uint32_t options, if (i == nextIndex) { upper = 0x389; // Preserve the precomposed form. } else { - addTonos = TRUE; + addTonos = true; } } else if ((data & HAS_DIALYTIKA) != 0) { // Preserve a vowel with dialytika in precomposed form if it exists. @@ -1181,7 +1181,7 @@ int32_t toUpper(uint32_t options, UBool change; if (edits == nullptr && (options & U_OMIT_UNCHANGED_TEXT) == 0) { - change = TRUE; // common, simple usage + change = true; // common, simple usage } else { // Find out first whether we are changing the text. change = src[i] != upper || numYpogegrammeni > 0; diff --git a/icu4c/source/common/ustring.cpp b/icu4c/source/common/ustring.cpp index 84772563891..5804976ef97 100644 --- a/icu4c/source/common/ustring.cpp +++ b/icu4c/source/common/ustring.cpp @@ -43,13 +43,13 @@ static inline UBool isMatchAtCPBoundary(const UChar *start, const UChar *match, const UChar *matchLimit, const UChar *limit) { if(U16_IS_TRAIL(*match) && start!=match && U16_IS_LEAD(*(match-1))) { /* the leading edge of the match is in the middle of a surrogate pair */ - return FALSE; + return false; } if(U16_IS_LEAD(*(matchLimit-1)) && matchLimit!=limit && U16_IS_TRAIL(*matchLimit)) { /* the trailing edge of the match is in the middle of a surrogate pair */ - return FALSE; + return false; } - return TRUE; + return true; } U_CAPI UChar * U_EXPORT2 @@ -461,7 +461,7 @@ u_memrchr32(const UChar *s, UChar32 c, int32_t count) { /* * Match each code point in a string against each code point in the matchSet. * Return the index of the first string code point that - * is (polarity==TRUE) or is not (FALSE) contained in the matchSet. + * is (polarity==true) or is not (false) contained in the matchSet. * Return -(string length)-1 if there is no such code point. */ static int32_t @@ -540,7 +540,7 @@ endloop: U_CAPI UChar * U_EXPORT2 u_strpbrk(const UChar *string, const UChar *matchSet) { - int32_t idx = _matchFromSet(string, matchSet, TRUE); + int32_t idx = _matchFromSet(string, matchSet, true); if(idx >= 0) { return (UChar *)string + idx; } else { @@ -552,7 +552,7 @@ u_strpbrk(const UChar *string, const UChar *matchSet) U_CAPI int32_t U_EXPORT2 u_strcspn(const UChar *string, const UChar *matchSet) { - int32_t idx = _matchFromSet(string, matchSet, TRUE); + int32_t idx = _matchFromSet(string, matchSet, true); if(idx >= 0) { return idx; } else { @@ -564,7 +564,7 @@ u_strcspn(const UChar *string, const UChar *matchSet) U_CAPI int32_t U_EXPORT2 u_strspn(const UChar *string, const UChar *matchSet) { - int32_t idx = _matchFromSet(string, matchSet, FALSE); + int32_t idx = _matchFromSet(string, matchSet, false); if(idx >= 0) { return idx; } else { @@ -929,13 +929,13 @@ u_strCompare(const UChar *s1, int32_t length1, if(s1==NULL || length1<-1 || s2==NULL || length2<-1) { return 0; } - return uprv_strCompare(s1, length1, s2, length2, FALSE, codePointOrder); + return uprv_strCompare(s1, length1, s2, length2, false, codePointOrder); } /* String compare in code point order - u_strcmp() compares in code unit order. */ U_CAPI int32_t U_EXPORT2 u_strcmpCodePointOrder(const UChar *s1, const UChar *s2) { - return uprv_strCompare(s1, -1, s2, -1, FALSE, TRUE); + return uprv_strCompare(s1, -1, s2, -1, false, true); } U_CAPI int32_t U_EXPORT2 @@ -960,7 +960,7 @@ u_strncmp(const UChar *s1, U_CAPI int32_t U_EXPORT2 u_strncmpCodePointOrder(const UChar *s1, const UChar *s2, int32_t n) { - return uprv_strCompare(s1, n, s2, n, TRUE, TRUE); + return uprv_strCompare(s1, n, s2, n, true, true); } U_CAPI UChar* U_EXPORT2 @@ -1049,10 +1049,10 @@ U_CAPI UBool U_EXPORT2 u_strHasMoreChar32Than(const UChar *s, int32_t length, int32_t number) { if(number<0) { - return TRUE; + return true; } if(s==NULL || length<-1) { - return FALSE; + return false; } if(length==-1) { @@ -1062,10 +1062,10 @@ u_strHasMoreChar32Than(const UChar *s, int32_t length, int32_t number) { /* count code points until they exceed */ for(;;) { if((c=*s++)==0) { - return FALSE; + return false; } if(number==0) { - return TRUE; + return true; } if(U16_IS_LEAD(c) && U16_IS_TRAIL(*s)) { ++s; @@ -1079,13 +1079,13 @@ u_strHasMoreChar32Than(const UChar *s, int32_t length, int32_t number) { /* s contains at least (length+1)/2 code points: <=2 UChars per cp */ if(((length+1)/2)>number) { - return TRUE; + return true; } /* check if s does not even contain enough UChars */ maxSupplementary=length-number; if(maxSupplementary<=0) { - return FALSE; + return false; } /* there are maxSupplementary=length-number more UChars than asked-for code points */ @@ -1096,16 +1096,16 @@ u_strHasMoreChar32Than(const UChar *s, int32_t length, int32_t number) { limit=s+length; for(;;) { if(s==limit) { - return FALSE; + return false; } if(number==0) { - return TRUE; + return true; } if(U16_IS_LEAD(*s++) && s!=limit && U16_IS_TRAIL(*s)) { ++s; if(--maxSupplementary<=0) { /* too many pairs - too few code points */ - return FALSE; + return false; } } --number; @@ -1162,7 +1162,7 @@ u_memcmp(const UChar *buf1, const UChar *buf2, int32_t count) { U_CAPI int32_t U_EXPORT2 u_memcmpCodePointOrder(const UChar *s1, const UChar *s2, int32_t count) { - return uprv_strCompare(s1, count, s2, count, FALSE, TRUE); + return uprv_strCompare(s1, count, s2, count, false, true); } /* u_unescape & support fns ------------------------------------------------- */ @@ -1223,7 +1223,7 @@ u_unescapeAt(UNESCAPE_CHAR_AT charAt, int8_t maxDig = 0; int8_t bitsPerDigit = 4; int32_t dig; - UBool braces = FALSE; + UBool braces = false; /* Check that offset is in range */ if (*offset < 0 || *offset >= length) { @@ -1245,7 +1245,7 @@ u_unescapeAt(UNESCAPE_CHAR_AT charAt, minDig = 1; if (*offset < length && charAt(*offset, context) == u'{') { ++(*offset); - braces = TRUE; + braces = true; maxDig = 8; } else { maxDig = 2; diff --git a/icu4c/source/common/ustrtrns.cpp b/icu4c/source/common/ustrtrns.cpp index 5dc032c02fb..dcb9dc58783 100644 --- a/icu4c/source/common/ustrtrns.cpp +++ b/icu4c/source/common/ustrtrns.cpp @@ -119,7 +119,7 @@ u_strFromUTF32WithSub(UChar *dest, } else { ++numSubstitutions; } - } while(TRUE); + } while(true); } reqLength += (int32_t)(pDest - dest); diff --git a/icu4c/source/common/utext.cpp b/icu4c/source/common/utext.cpp index ec79700ca81..548e6a60f31 100644 --- a/icu4c/source/common/utext.cpp +++ b/icu4c/source/common/utext.cpp @@ -49,14 +49,14 @@ utext_moveIndex32(UText *ut, int32_t delta) { UChar32 c; if (delta > 0) { do { - if(ut->chunkOffset>=ut->chunkLength && !utext_access(ut, ut->chunkNativeLimit, TRUE)) { - return FALSE; + if(ut->chunkOffset>=ut->chunkLength && !utext_access(ut, ut->chunkNativeLimit, true)) { + return false; } c = ut->chunkContents[ut->chunkOffset]; if (U16_IS_SURROGATE(c)) { c = utext_next32(ut); if (c == U_SENTINEL) { - return FALSE; + return false; } } else { ut->chunkOffset++; @@ -65,14 +65,14 @@ utext_moveIndex32(UText *ut, int32_t delta) { } else if (delta<0) { do { - if(ut->chunkOffset<=0 && !utext_access(ut, ut->chunkNativeStart, FALSE)) { - return FALSE; + if(ut->chunkOffset<=0 && !utext_access(ut, ut->chunkNativeStart, false)) { + return false; } c = ut->chunkContents[ut->chunkOffset-1]; if (U16_IS_SURROGATE(c)) { c = utext_previous32(ut); if (c == U_SENTINEL) { - return FALSE; + return false; } } else { ut->chunkOffset--; @@ -80,7 +80,7 @@ utext_moveIndex32(UText *ut, int32_t delta) { } while(++delta<0); } - return TRUE; + return true; } @@ -114,7 +114,7 @@ utext_setNativeIndex(UText *ut, int64_t index) { // Access the new position. Assume a forward iteration from here, // which will also be optimimum for a single random access. // Reverse iterations may suffer slightly. - ut->pFuncs->access(ut, index, TRUE); + ut->pFuncs->access(ut, index, true); } else if((int32_t)(index - ut->chunkNativeStart) <= ut->nativeIndexingLimit) { // utf-16 indexing. ut->chunkOffset=(int32_t)(index-ut->chunkNativeStart); @@ -127,7 +127,7 @@ utext_setNativeIndex(UText *ut, int64_t index) { UChar c= ut->chunkContents[ut->chunkOffset]; if (U16_IS_TRAIL(c)) { if (ut->chunkOffset==0) { - ut->pFuncs->access(ut, ut->chunkNativeStart, FALSE); + ut->pFuncs->access(ut, ut->chunkNativeStart, false); } if (ut->chunkOffset>0) { UChar lead = ut->chunkContents[ut->chunkOffset-1]; @@ -152,7 +152,7 @@ utext_getPreviousNativeIndex(UText *ut) { int64_t result; if (i >= 0) { UChar c = ut->chunkContents[i]; - if (U16_IS_TRAIL(c) == FALSE) { + if (U16_IS_TRAIL(c) == false) { if (i <= ut->nativeIndexingLimit) { result = ut->chunkNativeStart + i; } else { @@ -189,14 +189,14 @@ utext_current32(UText *ut) { UChar32 c; if (ut->chunkOffset==ut->chunkLength) { // Current position is just off the end of the chunk. - if (ut->pFuncs->access(ut, ut->chunkNativeLimit, TRUE) == FALSE) { + if (ut->pFuncs->access(ut, ut->chunkNativeLimit, true) == false) { // Off the end of the text. return U_SENTINEL; } } c = ut->chunkContents[ut->chunkOffset]; - if (U16_IS_LEAD(c) == FALSE) { + if (U16_IS_LEAD(c) == false) { // Normal, non-supplementary case. return c; } @@ -219,11 +219,11 @@ utext_current32(UText *ut) { // the original position before the unpaired lead still needs to be restored. int64_t nativePosition = ut->chunkNativeLimit; int32_t originalOffset = ut->chunkOffset; - if (ut->pFuncs->access(ut, nativePosition, TRUE)) { + if (ut->pFuncs->access(ut, nativePosition, true)) { trail = ut->chunkContents[ut->chunkOffset]; } - UBool r = ut->pFuncs->access(ut, nativePosition, FALSE); // reverse iteration flag loads preceding chunk - U_ASSERT(r==TRUE); + UBool r = ut->pFuncs->access(ut, nativePosition, false); // reverse iteration flag loads preceding chunk + U_ASSERT(r==true); ut->chunkOffset = originalOffset; if(!r) { return U_SENTINEL; @@ -246,7 +246,7 @@ utext_char32At(UText *ut, int64_t nativeIndex) { if (nativeIndex>=ut->chunkNativeStart && nativeIndex < ut->chunkNativeStart + ut->nativeIndexingLimit) { ut->chunkOffset = (int32_t)(nativeIndex - ut->chunkNativeStart); c = ut->chunkContents[ut->chunkOffset]; - if (U16_IS_SURROGATE(c) == FALSE) { + if (U16_IS_SURROGATE(c) == false) { return c; } } @@ -270,13 +270,13 @@ utext_next32(UText *ut) { UChar32 c; if (ut->chunkOffset >= ut->chunkLength) { - if (ut->pFuncs->access(ut, ut->chunkNativeLimit, TRUE) == FALSE) { + if (ut->pFuncs->access(ut, ut->chunkNativeLimit, true) == false) { return U_SENTINEL; } } c = ut->chunkContents[ut->chunkOffset++]; - if (U16_IS_LEAD(c) == FALSE) { + if (U16_IS_LEAD(c) == false) { // Normal case, not supplementary. // (A trail surrogate seen here is just returned as is, as a surrogate value. // It cannot be part of a pair.) @@ -284,14 +284,14 @@ utext_next32(UText *ut) { } if (ut->chunkOffset >= ut->chunkLength) { - if (ut->pFuncs->access(ut, ut->chunkNativeLimit, TRUE) == FALSE) { + if (ut->pFuncs->access(ut, ut->chunkNativeLimit, true) == false) { // c is an unpaired lead surrogate at the end of the text. // return it as it is. return c; } } UChar32 trail = ut->chunkContents[ut->chunkOffset]; - if (U16_IS_TRAIL(trail) == FALSE) { + if (U16_IS_TRAIL(trail) == false) { // c was an unpaired lead surrogate, not at the end of the text. // return it as it is (unpaired). Iteration position is on the // following character, possibly in the next chunk, where the @@ -310,13 +310,13 @@ utext_previous32(UText *ut) { UChar32 c; if (ut->chunkOffset <= 0) { - if (ut->pFuncs->access(ut, ut->chunkNativeStart, FALSE) == FALSE) { + if (ut->pFuncs->access(ut, ut->chunkNativeStart, false) == false) { return U_SENTINEL; } } ut->chunkOffset--; c = ut->chunkContents[ut->chunkOffset]; - if (U16_IS_TRAIL(c) == FALSE) { + if (U16_IS_TRAIL(c) == false) { // Normal case, not supplementary. // (A lead surrogate seen here is just returned as is, as a surrogate value. // It cannot be part of a pair.) @@ -324,7 +324,7 @@ utext_previous32(UText *ut) { } if (ut->chunkOffset <= 0) { - if (ut->pFuncs->access(ut, ut->chunkNativeStart, FALSE) == FALSE) { + if (ut->pFuncs->access(ut, ut->chunkNativeStart, false) == false) { // c is an unpaired trail surrogate at the start of the text. // return it as it is. return c; @@ -332,7 +332,7 @@ utext_previous32(UText *ut) { } UChar32 lead = ut->chunkContents[ut->chunkOffset-1]; - if (U16_IS_LEAD(lead) == FALSE) { + if (U16_IS_LEAD(lead) == false) { // c was an unpaired trail surrogate, not at the end of the text. // return it as it is (unpaired). Iteration position is at c return c; @@ -351,7 +351,7 @@ utext_next32From(UText *ut, int64_t index) { if(indexchunkNativeStart || index>=ut->chunkNativeLimit) { // Desired position is outside of the current chunk. - if(!ut->pFuncs->access(ut, index, TRUE)) { + if(!ut->pFuncs->access(ut, index, true)) { // no chunk available here return U_SENTINEL; } @@ -391,7 +391,7 @@ utext_previous32From(UText *ut, int64_t index) { // if(index<=ut->chunkNativeStart || index>ut->chunkNativeLimit) { // Requested native index is outside of the current chunk. - if(!ut->pFuncs->access(ut, index, FALSE)) { + if(!ut->pFuncs->access(ut, index, false)) { // no chunk available here return U_SENTINEL; } @@ -400,7 +400,7 @@ utext_previous32From(UText *ut, int64_t index) { ut->chunkOffset = (int32_t)(index - ut->chunkNativeStart); } else { ut->chunkOffset=ut->pFuncs->mapNativeIndexToUTF16(ut, index); - if (ut->chunkOffset==0 && !ut->pFuncs->access(ut, index, FALSE)) { + if (ut->chunkOffset==0 && !ut->pFuncs->access(ut, index, false)) { // no chunk available here return U_SENTINEL; } @@ -438,24 +438,24 @@ utext_equals(const UText *a, const UText *b) { a->magic != UTEXT_MAGIC || b->magic != UTEXT_MAGIC) { // Null or invalid arguments don't compare equal to anything. - return FALSE; + return false; } if (a->pFuncs != b->pFuncs) { // Different types of text providers. - return FALSE; + return false; } if (a->context != b->context) { // Different sources (different strings) - return FALSE; + return false; } if (utext_getNativeIndex(a) != utext_getNativeIndex(b)) { // Different current position in the string. - return FALSE; + return false; } - return TRUE; + return true; } U_CAPI UBool U_EXPORT2 @@ -987,7 +987,7 @@ utf8TextAccess(UText *ut, int64_t index, UBool forward) { // Don't swap buffers, but do set the // current buffer position. ut->chunkOffset = ut->chunkLength; - return FALSE; + return false; } else { // End of current buffer. // check whether other buffer already has what we need. @@ -1016,7 +1016,7 @@ utf8TextAccess(UText *ut, int64_t index, UBool forward) { // Current buffer extends up to the end of the string. // Leave it as the current buffer. ut->chunkOffset = ut->chunkLength; - return FALSE; + return false; } if (ix == u8b->bufNativeLimit) { // Alternate buffer extends to the end of string. @@ -1038,7 +1038,7 @@ utf8TextAccess(UText *ut, int64_t index, UBool forward) { mapIndex = ix - u8b->toUCharsMapStart; U_ASSERT(mapIndex < (int32_t)sizeof(UTF8Buf::mapToUChars)); ut->chunkOffset = u8b->mapToUChars[mapIndex] - u8b->bufStartIdx; - return TRUE; + return true; } } @@ -1055,7 +1055,7 @@ utf8TextAccess(UText *ut, int64_t index, UBool forward) { // Don't swap buffers, but do set the // current buffer position. ut->chunkOffset = 0; - return FALSE; + return false; } else { // Start of current buffer. // check whether other buffer already has what we need. @@ -1108,9 +1108,9 @@ utf8TextAccess(UText *ut, int64_t index, UBool forward) { // one of the trailing bytes. Because there is no preceding , // character, this access fails. We can't pick up on the // situation sooner because the requested index is not zero. - return FALSE; + return false; } else { - return TRUE; + return true; } @@ -1139,7 +1139,7 @@ swapBuffers: U_ASSERT(mapIndex<(int32_t)sizeof(u8b->mapToUChars)); ut->chunkOffset = u8b->mapToUChars[mapIndex] - u8b->bufStartIdx; - return TRUE; + return true; } @@ -1170,7 +1170,7 @@ swapBuffers: ut->chunkOffset = 0; U_ASSERT(ix == u8b->bufNativeStart); } - return FALSE; + return false; makeStubBuffer: // The user has done a seek/access past the start or end @@ -1203,10 +1203,10 @@ fillForward: ut->p = u8b_swap; int32_t strLen = ut->b; - UBool nulTerminated = FALSE; + UBool nulTerminated = false; if (strLen < 0) { strLen = 0x7fffffff; - nulTerminated = TRUE; + nulTerminated = true; } UChar *buf = u8b_swap->buf; @@ -1214,7 +1214,7 @@ fillForward: uint8_t *mapToUChars = u8b_swap->mapToUChars; int32_t destIx = 0; int32_t srcIx = ix; - UBool seenNonAscii = FALSE; + UBool seenNonAscii = false; UChar32 c = 0; // Fill the chunk buffer and mapping arrays. @@ -1230,8 +1230,8 @@ fillForward: destIx++; } else { // General case, handle everything. - if (seenNonAscii == FALSE) { - seenNonAscii = TRUE; + if (seenNonAscii == false) { + seenNonAscii = true; u8b_swap->bufNILimit = destIx; } @@ -1269,7 +1269,7 @@ fillForward: u8b_swap->bufNativeLimit = srcIx; u8b_swap->bufStartIdx = 0; u8b_swap->bufLimitIdx = destIx; - if (seenNonAscii == FALSE) { + if (seenNonAscii == false) { u8b_swap->bufNILimit = destIx; } u8b_swap->toUCharsMapStart = u8b_swap->bufNativeStart; @@ -1293,7 +1293,7 @@ fillForward: ut->providerProperties &= ~I32_FLAG(UTEXT_PROVIDER_LENGTH_IS_EXPENSIVE); } } - return TRUE; + return true; } @@ -1402,7 +1402,7 @@ fillReverse: ut->chunkNativeStart = u8b_swap->bufNativeStart; ut->chunkNativeLimit = u8b_swap->bufNativeLimit; ut->nativeIndexingLimit = u8b_swap->bufNILimit; - return TRUE; + return true; } } @@ -1526,7 +1526,7 @@ utf8TextExtract(UText *ut, utext_strFromUTF8(dest, destCapacity, &destLength, (const char *)ut->context+start32, limit32-start32, pErrorCode); - utf8TextAccess(ut, limit32, TRUE); + utf8TextAccess(ut, limit32, true); return destLength; } @@ -1760,13 +1760,13 @@ repTextAccess(UText *ut, int64_t index, UBool forward) { if (index32>=ut->chunkNativeStart && index32chunkNativeLimit) { // Buffer already contains the requested position. ut->chunkOffset = (int32_t)(index - ut->chunkNativeStart); - return TRUE; + return true; } if (index32>=length && ut->chunkNativeLimit==length) { // Request for end of string, and buffer already extends up to it. // Can't get the data, but don't change the buffer. ut->chunkOffset = length - (int32_t)ut->chunkNativeStart; - return FALSE; + return false; } ut->chunkNativeLimit = index + REP_TEXT_CHUNK_SIZE - 1; @@ -1787,13 +1787,13 @@ repTextAccess(UText *ut, int64_t index, UBool forward) { if (index32>ut->chunkNativeStart && index32<=ut->chunkNativeLimit) { // Requested position already in buffer. ut->chunkOffset = index32 - (int32_t)ut->chunkNativeStart; - return TRUE; + return true; } if (index32==0 && ut->chunkNativeStart==0) { // Request for start, buffer already begins at start. // No data, but keep the buffer as is. ut->chunkOffset = 0; - return FALSE; + return false; } // Figure out the bounds of the chunk to extract for reverse iteration. @@ -1849,7 +1849,7 @@ repTextAccess(UText *ut, int64_t index, UBool forward) { // Use fast indexing for get/setNativeIndex() ut->nativeIndexingLimit = ut->chunkLength; - return TRUE; + return true; } @@ -1892,7 +1892,7 @@ repTextExtract(UText *ut, } UnicodeString buffer(dest, 0, destCapacity); // writable alias rep->extractBetween(start32, limit32, buffer); - repTextAccess(ut, limit32, TRUE); + repTextAccess(ut, limit32, true); return u_terminateUChars(dest, destCapacity, length, status); } @@ -1948,7 +1948,7 @@ repTextReplace(UText *ut, // set the iteration position to the end of the newly inserted replacement text. int32_t newIndexPos = limit32 + lengthDelta; - repTextAccess(ut, newIndexPos, TRUE); + repTextAccess(ut, newIndexPos, true); return lengthDelta; } @@ -2012,7 +2012,7 @@ repTextCopy(UText *ut, } // Set position, reload chunk if needed. - repTextAccess(ut, nativeIterIndex, TRUE); + repTextAccess(ut, nativeIterIndex, true); } static const struct UTextFuncs repFuncs = @@ -2254,7 +2254,7 @@ unistrTextCopy(UText *ut, // update chunk description, set iteration position. ut->chunkContents = us->getBuffer(); - if (move==FALSE) { + if (move==false) { // copy operation, string length grows ut->chunkLength += limit32-start32; ut->chunkNativeLimit = ut->chunkLength; @@ -2525,7 +2525,7 @@ ucstrTextExtract(UText *ut, // Access the start. Does two things we need: // Pins 'start' to the length of the string, if it came in out-of-bounds. // Snaps 'start' to the beginning of a code point. - ucstrTextAccess(ut, start, TRUE); + ucstrTextAccess(ut, start, true); const UChar *s=ut->chunkContents; start32 = ut->chunkOffset; @@ -2579,7 +2579,7 @@ ucstrTextExtract(UText *ut, if (si <= ut->chunkNativeLimit) { ut->chunkOffset = si; } else { - ucstrTextAccess(ut, si, TRUE); + ucstrTextAccess(ut, si, true); } // Add a terminating NUL if space in the buffer permits, @@ -2698,11 +2698,11 @@ charIterTextAccess(UText *ut, int64_t index, UBool forward) { neededIndex -= neededIndex % CIBufSize; UChar *buf = NULL; - UBool needChunkSetup = TRUE; + UBool needChunkSetup = true; int i; if (ut->chunkNativeStart == neededIndex) { // The buffer we want is already the current chunk. - needChunkSetup = FALSE; + needChunkSetup = false; } else if (ut->b == neededIndex) { // The first buffer (buffer p) has what we need. buf = (UChar *)ut->p; @@ -2809,7 +2809,7 @@ charIterTextExtract(UText *ut, srci += len; } - charIterTextAccess(ut, copyLimit, TRUE); + charIterTextAccess(ut, copyLimit, true); u_terminateUChars(dest, destCapacity, desti, status); return desti; diff --git a/icu4c/source/common/utf_impl.cpp b/icu4c/source/common/utf_impl.cpp index 9dd241a12bf..3d11d9ee9e6 100644 --- a/icu4c/source/common/utf_impl.cpp +++ b/icu4c/source/common/utf_impl.cpp @@ -117,11 +117,11 @@ errorValue(int32_t count, int8_t strict) { * Unicode 16-bit strings that are not well-formed UTF-16, that is, they * contain unpaired surrogates. * -3: All illegal byte sequences yield U+FFFD. - * 0 Obsolete "safe" behavior of UTF8_NEXT_CHAR_SAFE(..., FALSE): + * 0 Obsolete "safe" behavior of UTF8_NEXT_CHAR_SAFE(..., false): * All illegal byte sequences yield a positive code point such that this * result code point would be encoded with the same number of bytes as * the illegal sequence. - * >0 Obsolete "strict" behavior of UTF8_NEXT_CHAR_SAFE(..., TRUE): + * >0 Obsolete "strict" behavior of UTF8_NEXT_CHAR_SAFE(..., true): * Same as the obsolete "safe" behavior, but non-characters are also treated * like illegal sequences. * @@ -214,7 +214,7 @@ utf8_appendCharSafeBody(uint8_t *s, int32_t i, int32_t length, UChar32 c, UBool } /* c>0x10ffff or not enough space, write an error value */ if(pIsError!=NULL) { - *pIsError=TRUE; + *pIsError=true; } else { length-=i; if(length>0) { diff --git a/icu4c/source/common/util.cpp b/icu4c/source/common/util.cpp index f3421722599..3dcc05578b7 100644 --- a/icu4c/source/common/util.cpp +++ b/icu4c/source/common/util.cpp @@ -214,14 +214,14 @@ int32_t ICU_Utility::skipWhitespace(const UnicodeString& str, int32_t& pos, */ UBool ICU_Utility::parseChar(const UnicodeString& id, int32_t& pos, UChar ch) { int32_t start = pos; - skipWhitespace(id, pos, TRUE); + skipWhitespace(id, pos, true); if (pos == id.length() || id.charAt(pos) != ch) { pos = start; - return FALSE; + return false; } ++pos; - return TRUE; + return true; } /** @@ -302,7 +302,7 @@ int32_t ICU_Utility::parseAsciiInteger(const UnicodeString& str, int32_t& pos) { /** * Append a character to a rule that is being built up. To flush - * the quoteBuf to rule, make one final call with isLiteral == TRUE. + * the quoteBuf to rule, make one final call with isLiteral == true. * If there is no final character, pass in (UChar32)-1 as c. * @param rule the string to append the character to * @param c the character to append, or (UChar32)-1 if none. @@ -428,7 +428,7 @@ void ICU_Utility::appendToRule(UnicodeString& rule, if (matcher != NULL) { UnicodeString pat; appendToRule(rule, matcher->toPattern(pat, escapeUnprintable), - TRUE, escapeUnprintable, quoteBuf); + true, escapeUnprintable, quoteBuf); } } diff --git a/icu4c/source/common/utrace.cpp b/icu4c/source/common/utrace.cpp index dfd2062f31b..f7b8ade6743 100644 --- a/icu4c/source/common/utrace.cpp +++ b/icu4c/source/common/utrace.cpp @@ -436,7 +436,7 @@ utrace_cleanup() { pTraceDataFunc = NULL; utrace_level = UTRACE_OFF; gTraceContext = NULL; - return TRUE; + return true; } diff --git a/icu4c/source/common/utrie.cpp b/icu4c/source/common/utrie.cpp index ecf9b1cba72..96f2397ca13 100644 --- a/icu4c/source/common/utrie.cpp +++ b/icu4c/source/common/utrie.cpp @@ -72,14 +72,14 @@ utrie_open(UNewTrie *fillIn, if(aliasData!=NULL) { trie->data=aliasData; - trie->isDataAllocated=FALSE; + trie->isDataAllocated=false; } else { trie->data=(uint32_t *)uprv_malloc(maxDataLength*4); if(trie->data==NULL) { uprv_free(trie); return NULL; } - trie->isDataAllocated=TRUE; + trie->isDataAllocated=true; } /* preallocate and reset the first data block (block index 0) */ @@ -108,7 +108,7 @@ utrie_open(UNewTrie *fillIn, trie->indexLength=UTRIE_MAX_INDEX_LENGTH; trie->dataCapacity=maxDataLength; trie->isLatin1Linear=latin1Linear; - trie->isCompacted=FALSE; + trie->isCompacted=false; return trie; } @@ -124,14 +124,14 @@ utrie_clone(UNewTrie *fillIn, const UNewTrie *other, uint32_t *aliasData, int32_ /* clone data */ if(aliasData!=NULL && aliasDataCapacity>=other->dataCapacity) { - isDataAllocated=FALSE; + isDataAllocated=false; } else { aliasDataCapacity=other->dataCapacity; aliasData=(uint32_t *)uprv_malloc(other->dataCapacity*4); if(aliasData==NULL) { return NULL; } - isDataAllocated=TRUE; + isDataAllocated=true; } trie=utrie_open(fillIn, aliasData, aliasDataCapacity, @@ -216,7 +216,7 @@ utrie_getDataBlock(UNewTrie *trie, UChar32 c) { } /** - * @return TRUE if the value was successfully set + * @return true if the value was successfully set */ U_CAPI UBool U_EXPORT2 utrie_set32(UNewTrie *trie, UChar32 c, uint32_t value) { @@ -224,16 +224,16 @@ utrie_set32(UNewTrie *trie, UChar32 c, uint32_t value) { /* valid, uncompacted trie and valid c? */ if(trie==NULL || trie->isCompacted || (uint32_t)c>0x10ffff) { - return FALSE; + return false; } block=utrie_getDataBlock(trie, c); if(block<0) { - return FALSE; + return false; } trie->data[block+(c&UTRIE_MASK)]=value; - return TRUE; + return true; } U_CAPI uint32_t U_EXPORT2 @@ -243,7 +243,7 @@ utrie_get32(UNewTrie *trie, UChar32 c, UBool *pInBlockZero) { /* valid, uncompacted trie and valid c? */ if(trie==NULL || trie->isCompacted || (uint32_t)c>0x10ffff) { if(pInBlockZero!=NULL) { - *pInBlockZero=TRUE; + *pInBlockZero=true; } return 0; } @@ -294,10 +294,10 @@ utrie_setRange32(UNewTrie *trie, UChar32 start, UChar32 limit, uint32_t value, U if( trie==NULL || trie->isCompacted || (uint32_t)start>0x10ffff || (uint32_t)limit>0x110000 || start>limit ) { - return FALSE; + return false; } if(start==limit) { - return TRUE; /* nothing to do */ + return true; /* nothing to do */ } initialValue=trie->data[0]; @@ -307,7 +307,7 @@ utrie_setRange32(UNewTrie *trie, UChar32 start, UChar32 limit, uint32_t value, U /* set partial block at [start..following block boundary[ */ block=utrie_getDataBlock(trie, start); if(block<0) { - return FALSE; + return false; } nextStart=(start+UTRIE_DATA_BLOCK_LENGTH)&~UTRIE_MASK; @@ -318,7 +318,7 @@ utrie_setRange32(UNewTrie *trie, UChar32 start, UChar32 limit, uint32_t value, U } else { utrie_fillBlock(trie->data+block, start&UTRIE_MASK, limit&UTRIE_MASK, value, initialValue, overwrite); - return TRUE; + return true; } } @@ -348,12 +348,12 @@ utrie_setRange32(UNewTrie *trie, UChar32 start, UChar32 limit, uint32_t value, U /* create and set and fill the repeatBlock */ repeatBlock=utrie_getDataBlock(trie, start); if(repeatBlock<0) { - return FALSE; + return false; } /* set the negative block number to indicate that it is a repeat block */ trie->index[start>>UTRIE_SHIFT]=-repeatBlock; - utrie_fillBlock(trie->data+repeatBlock, 0, UTRIE_DATA_BLOCK_LENGTH, value, initialValue, TRUE); + utrie_fillBlock(trie->data+repeatBlock, 0, UTRIE_DATA_BLOCK_LENGTH, value, initialValue, true); } } @@ -364,13 +364,13 @@ utrie_setRange32(UNewTrie *trie, UChar32 start, UChar32 limit, uint32_t value, U /* set partial block at [last block boundary..limit[ */ block=utrie_getDataBlock(trie, start); if(block<0) { - return FALSE; + return false; } utrie_fillBlock(trie->data+block, 0, rest, value, initialValue, overwrite); } - return TRUE; + return true; } static int32_t @@ -437,7 +437,7 @@ utrie_fold(UNewTrie *trie, UNewTrieGetFoldedValue *getFoldedValue, UErrorCode *p *pErrorCode=U_MEMORY_ALLOCATION_ERROR; return; } - utrie_fillBlock(trie->data+block, 0, UTRIE_DATA_BLOCK_LENGTH, trie->leadUnitValue, trie->data[0], TRUE); + utrie_fillBlock(trie->data+block, 0, UTRIE_DATA_BLOCK_LENGTH, trie->leadUnitValue, trie->data[0], true); block=-block; /* negative block number to indicate that it is a repeat block */ } for(c=(0xd800>>UTRIE_SHIFT); c<(0xdc00>>UTRIE_SHIFT); ++c) { @@ -579,7 +579,7 @@ _findSameDataBlock(const uint32_t *data, int32_t dataLength, * * The compaction * - removes blocks that are identical with earlier ones - * - overlaps adjacent blocks as much as possible (if overlap==TRUE) + * - overlaps adjacent blocks as much as possible (if overlap==true) * - moves blocks in steps of the data granularity * - moves and overlaps blocks that overlap with multiple values in the overlap region * @@ -766,15 +766,15 @@ utrie_serialize(UNewTrie *trie, void *dt, int32_t capacity, /* fold and compact if necessary, also checks that indexLength is within limits */ if(!trie->isCompacted) { /* compact once without overlap to improve folding */ - utrie_compact(trie, FALSE, pErrorCode); + utrie_compact(trie, false, pErrorCode); /* fold the supplementary part of the index array */ utrie_fold(trie, getFoldedValue, pErrorCode); /* compact again with overlap for minimum data array length */ - utrie_compact(trie, TRUE, pErrorCode); + utrie_compact(trie, true, pErrorCode); - trie->isCompacted=TRUE; + trie->isCompacted=true; if(U_FAILURE(*pErrorCode)) { return 0; } @@ -966,7 +966,7 @@ utrie_unserializeDummy(UTrie *trie, return actualLength; } - trie->isLatin1Linear=TRUE; + trie->isLatin1Linear=true; trie->initialValue=initialValue; /* fill the index and data arrays */ diff --git a/icu4c/source/common/utrie2.cpp b/icu4c/source/common/utrie2.cpp index 24ef5782c90..0fb74ba1c36 100644 --- a/icu4c/source/common/utrie2.cpp +++ b/icu4c/source/common/utrie2.cpp @@ -66,7 +66,7 @@ utrie2_get32(const UTrie2 *trie, UChar32 c) { } else if((uint32_t)c>0x10ffff) { return trie->errorValue; } else { - return get32(trie->newTrie, c, TRUE); + return get32(trie->newTrie, c, true); } } @@ -80,7 +80,7 @@ utrie2_get32FromLeadSurrogateCodeUnit(const UTrie2 *trie, UChar32 c) { } else if(trie->data32!=NULL) { return UTRIE2_GET32_FROM_U16_SINGLE_LEAD(trie, c); } else { - return get32(trie->newTrie, c, FALSE); + return get32(trie->newTrie, c, false); } } @@ -200,7 +200,7 @@ utrie2_openFromSerialized(UTrie2ValueBits valueBits, uprv_memcpy(trie, &tempTrie, sizeof(tempTrie)); trie->memory=(uint32_t *)data; trie->length=actualLength; - trie->isMemoryOwned=FALSE; + trie->isMemoryOwned=false; #ifdef UTRIE2_DEBUG trie->name="fromSerialized"; #endif @@ -279,7 +279,7 @@ utrie2_openDummy(UTrie2ValueBits valueBits, return 0; } trie->length=length; - trie->isMemoryOwned=TRUE; + trie->isMemoryOwned=true; /* set the UTrie2 fields */ if(valueBits==UTRIE2_16_VALUE_BITS) { diff --git a/icu4c/source/common/utrie2_builder.cpp b/icu4c/source/common/utrie2_builder.cpp index 8de824cc3d4..2513332b80a 100644 --- a/icu4c/source/common/utrie2_builder.cpp +++ b/icu4c/source/common/utrie2_builder.cpp @@ -152,7 +152,7 @@ utrie2_open(uint32_t initialValue, uint32_t errorValue, UErrorCode *pErrorCode) newTrie->errorValue=errorValue; newTrie->highStart=0x110000; newTrie->firstFreeBlock=0; /* no free block in the list */ - newTrie->isCompacted=FALSE; + newTrie->isCompacted=false; /* * preallocate and reset @@ -317,7 +317,7 @@ utrie2_clone(const UTrie2 *other, UErrorCode *pErrorCode) { if(other->memory!=NULL) { trie->memory=uprv_malloc(other->length); if(trie->memory!=NULL) { - trie->isMemoryOwned=TRUE; + trie->isMemoryOwned=true; uprv_memcpy(trie->memory, other->memory, other->length); /* make the clone's pointers point to its own memory */ @@ -357,11 +357,11 @@ copyEnumRange(const void *context, UChar32 start, UChar32 end, uint32_t value) { if(start==end) { utrie2_set32(nt->trie, start, value, &nt->errorCode); } else { - utrie2_setRange32(nt->trie, start, end, value, TRUE, &nt->errorCode); + utrie2_setRange32(nt->trie, start, end, value, true, &nt->errorCode); } return U_SUCCESS(nt->errorCode); } else { - return TRUE; + return true; } } @@ -422,7 +422,7 @@ utrie2_cloneAsThawed(const UTrie2 *other, UErrorCode *pErrorCode) { if(U_FAILURE(*pErrorCode)) { return NULL; } - context.exclusiveLimit=FALSE; + context.exclusiveLimit=false; context.errorCode=*pErrorCode; utrie2_enum(other, NULL, copyEnumRange, &context); *pErrorCode=context.errorCode; @@ -461,7 +461,7 @@ utrie2_fromUTrie(const UTrie *trie1, uint32_t errorValue, UErrorCode *pErrorCode if(U_FAILURE(*pErrorCode)) { return NULL; } - context.exclusiveLimit=TRUE; + context.exclusiveLimit=true; context.errorCode=*pErrorCode; utrie_enum(trie1, NULL, copyEnumRange, &context); *pErrorCode=context.errorCode; @@ -649,7 +649,7 @@ getDataBlock(UNewTrie2 *trie, UChar32 c, UBool forLSCP) { } /** - * @return TRUE if the value was successfully set + * @return true if the value was successfully set */ static void set32(UNewTrie2 *trie, @@ -683,7 +683,7 @@ utrie2_set32(UTrie2 *trie, UChar32 c, uint32_t value, UErrorCode *pErrorCode) { *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR; return; } - set32(trie->newTrie, c, TRUE, value, pErrorCode); + set32(trie->newTrie, c, true, value, pErrorCode); } U_CAPI void U_EXPORT2 @@ -697,7 +697,7 @@ utrie2_set32ForLeadSurrogateCodeUnit(UTrie2 *trie, *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR; return; } - set32(trie->newTrie, c, FALSE, value, pErrorCode); + set32(trie->newTrie, c, false, value, pErrorCode); } static void @@ -709,7 +709,7 @@ writeBlock(uint32_t *block, uint32_t value) { } /** - * initialValue is ignored if overwrite=TRUE + * initialValue is ignored if overwrite=true * @internal */ static void @@ -771,7 +771,7 @@ utrie2_setRange32(UTrie2 *trie, UChar32 nextStart; /* set partial block at [start..following block boundary[ */ - block=getDataBlock(newTrie, start, TRUE); + block=getDataBlock(newTrie, start, true); if(block<0) { *pErrorCode=U_MEMORY_ALLOCATION_ERROR; return; @@ -804,15 +804,15 @@ utrie2_setRange32(UTrie2 *trie, while(startinitialValue && isInNullBlock(newTrie, start, TRUE)) { + if(value==newTrie->initialValue && isInNullBlock(newTrie, start, true)) { start+=UTRIE2_DATA_BLOCK_LENGTH; /* nothing to do */ continue; } /* get index value */ - i2=getIndex2Block(newTrie, start, TRUE); + i2=getIndex2Block(newTrie, start, true); if(i2<0) { *pErrorCode=U_INTERNAL_PROGRAM_ERROR; return; @@ -827,7 +827,7 @@ utrie2_setRange32(UTrie2 *trie, * protected (ASCII-linear or 2-byte UTF-8) block: * replace with the repeatBlock. */ - setRepeatBlock=TRUE; + setRepeatBlock=true; } else { /* !overwrite, or protected block: just write the values into this block */ fillBlock(newTrie->data+block, @@ -851,14 +851,14 @@ utrie2_setRange32(UTrie2 *trie, * and if we overwrite any data or if the data is all initial values * (which is the same as the block being the null block, see above). */ - setRepeatBlock=TRUE; + setRepeatBlock=true; } if(setRepeatBlock) { if(repeatBlock>=0) { setIndex2Entry(newTrie, i2, repeatBlock); } else { /* create and set and fill the repeatBlock */ - repeatBlock=getDataBlock(newTrie, start, TRUE); + repeatBlock=getDataBlock(newTrie, start, true); if(repeatBlock<0) { *pErrorCode=U_MEMORY_ALLOCATION_ERROR; return; @@ -872,7 +872,7 @@ utrie2_setRange32(UTrie2 *trie, if(rest>0) { /* set partial block at [last block boundary..limit[ */ - block=getDataBlock(newTrie, start, TRUE); + block=getDataBlock(newTrie, start, true); if(block<0) { *pErrorCode=U_MEMORY_ALLOCATION_ERROR; return; @@ -1019,7 +1019,7 @@ findHighStart(UNewTrie2 *trie, uint32_t highValue) { * * The compaction * - removes blocks that are identical with earlier ones - * - overlaps adjacent blocks as much as possible (if overlap==TRUE) + * - overlaps adjacent blocks as much as possible (if overlap==true) * - moves blocks in steps of the data granularity * - moves and overlaps blocks that overlap with multiple values in the overlap region * @@ -1255,7 +1255,7 @@ compactTrie(UTrie2 *trie, UErrorCode *pErrorCode) { if(highStart<0x110000) { /* Blank out [highStart..10ffff] to release associated data blocks. */ suppHighStart= highStart<=0x10000 ? 0x10000 : highStart; - utrie2_setRange32(trie, suppHighStart, 0x10ffff, trie->initialValue, TRUE, pErrorCode); + utrie2_setRange32(trie, suppHighStart, 0x10ffff, trie->initialValue, true, pErrorCode); if(U_FAILURE(*pErrorCode)) { return; } @@ -1281,7 +1281,7 @@ compactTrie(UTrie2 *trie, UErrorCode *pErrorCode) { newTrie->data[newTrie->dataLength++]=trie->initialValue; } - newTrie->isCompacted=TRUE; + newTrie->isCompacted=true; } /* serialization ------------------------------------------------------------ */ @@ -1382,7 +1382,7 @@ utrie2_freeze(UTrie2 *trie, UTrie2ValueBits valueBits, UErrorCode *pErrorCode) { return; } trie->length=length; - trie->isMemoryOwned=TRUE; + trie->isMemoryOwned=true; trie->indexLength=allIndexesLength; trie->dataLength=newTrie->dataLength; diff --git a/icu4c/source/common/utrie_swap.cpp b/icu4c/source/common/utrie_swap.cpp index 6e8b1383945..b01b94601e4 100644 --- a/icu4c/source/common/utrie_swap.cpp +++ b/icu4c/source/common/utrie_swap.cpp @@ -294,8 +294,8 @@ namespace { * @param data a pointer to 32-bit-aligned memory containing the serialized form of a trie * @param length the number of bytes available at data; * can be more than necessary (see return value) - * @param anyEndianOk If FALSE, only platform-endian serialized forms are recognized. - * If TRUE, opposite-endian serialized forms are recognized as well. + * @param anyEndianOk If false, only platform-endian serialized forms are recognized. + * If true, opposite-endian serialized forms are recognized as well. * @return the trie version of the serialized form, or 0 if it is not * recognized as a serialized trie */ @@ -334,7 +334,7 @@ utrie_swapAnyVersion(const UDataSwapper *ds, const void *inData, int32_t length, void *outData, UErrorCode *pErrorCode) { if(U_FAILURE(*pErrorCode)) { return 0; } - switch(getVersion(inData, length, TRUE)) { + switch(getVersion(inData, length, true)) { case 1: return utrie_swap(ds, inData, length, outData, pErrorCode); case 2: diff --git a/icu4c/source/common/uts46.cpp b/icu4c/source/common/uts46.cpp index 6f930703390..10a4f565973 100644 --- a/icu4c/source/common/uts46.cpp +++ b/icu4c/source/common/uts46.cpp @@ -53,10 +53,10 @@ isASCIIString(const UnicodeString &dest) { const UChar *limit=s+dest.length(); while(s0x7f) { - return FALSE; + return false; } } - return TRUE; + return true; } static UBool @@ -224,19 +224,19 @@ UTS46::~UTS46() {} UnicodeString & UTS46::labelToASCII(const UnicodeString &label, UnicodeString &dest, IDNAInfo &info, UErrorCode &errorCode) const { - return process(label, TRUE, TRUE, dest, info, errorCode); + return process(label, true, true, dest, info, errorCode); } UnicodeString & UTS46::labelToUnicode(const UnicodeString &label, UnicodeString &dest, IDNAInfo &info, UErrorCode &errorCode) const { - return process(label, TRUE, FALSE, dest, info, errorCode); + return process(label, true, false, dest, info, errorCode); } UnicodeString & UTS46::nameToASCII(const UnicodeString &name, UnicodeString &dest, IDNAInfo &info, UErrorCode &errorCode) const { - process(name, FALSE, TRUE, dest, info, errorCode); + process(name, false, true, dest, info, errorCode); if( dest.length()>=254 && (info.errors&UIDNA_ERROR_DOMAIN_NAME_TOO_LONG)==0 && isASCIIString(dest) && (dest.length()>254 || dest[253]!=0x2e) @@ -249,31 +249,31 @@ UTS46::nameToASCII(const UnicodeString &name, UnicodeString &dest, UnicodeString & UTS46::nameToUnicode(const UnicodeString &name, UnicodeString &dest, IDNAInfo &info, UErrorCode &errorCode) const { - return process(name, FALSE, FALSE, dest, info, errorCode); + return process(name, false, false, dest, info, errorCode); } void UTS46::labelToASCII_UTF8(StringPiece label, ByteSink &dest, IDNAInfo &info, UErrorCode &errorCode) const { - processUTF8(label, TRUE, TRUE, dest, info, errorCode); + processUTF8(label, true, true, dest, info, errorCode); } void UTS46::labelToUnicodeUTF8(StringPiece label, ByteSink &dest, IDNAInfo &info, UErrorCode &errorCode) const { - processUTF8(label, TRUE, FALSE, dest, info, errorCode); + processUTF8(label, true, false, dest, info, errorCode); } void UTS46::nameToASCII_UTF8(StringPiece name, ByteSink &dest, IDNAInfo &info, UErrorCode &errorCode) const { - processUTF8(name, FALSE, TRUE, dest, info, errorCode); + processUTF8(name, false, true, dest, info, errorCode); } void UTS46::nameToUnicodeUTF8(StringPiece name, ByteSink &dest, IDNAInfo &info, UErrorCode &errorCode) const { - processUTF8(name, FALSE, FALSE, dest, info, errorCode); + processUTF8(name, false, false, dest, info, errorCode); } // UTS #46 data for ASCII characters. @@ -561,7 +561,7 @@ UTS46::processUnicode(const UnicodeString &src, } else if(c<0xdf) { // pass } else if(c<=0x200d && (c==0xdf || c==0x3c2 || c>=0x200c)) { - info.isTransDiff=TRUE; + info.isTransDiff=true; if(doMapDevChars) { destLength=mapDevChars(dest, labelStart, labelLimit, errorCode); if(U_FAILURE(errorCode)) { @@ -569,7 +569,7 @@ UTS46::processUnicode(const UnicodeString &src, } destArray=dest.getBuffer(); // All deviation characters have been mapped, no need to check for them again. - doMapDevChars=FALSE; + doMapDevChars=false; // Do not increment labelLimit in case c was removed. continue; } @@ -610,14 +610,14 @@ UTS46::mapDevChars(UnicodeString &dest, int32_t labelStart, int32_t mappingStart return length; } int32_t capacity=dest.getCapacity(); - UBool didMapDevChars=FALSE; + UBool didMapDevChars=false; int32_t readIndex=mappingStart, writeIndex=mappingStart; do { UChar c=s[readIndex++]; switch(c) { case 0xdf: // Map sharp s to ss. - didMapDevChars=TRUE; + didMapDevChars=true; s[writeIndex++]=0x73; // Replace sharp s with first s. // Insert second s and account for possible buffer reallocation. if(writeIndex==readIndex) { @@ -637,12 +637,12 @@ UTS46::mapDevChars(UnicodeString &dest, int32_t labelStart, int32_t mappingStart ++length; break; case 0x3c2: // Map final sigma to nonfinal sigma. - didMapDevChars=TRUE; + didMapDevChars=true; s[writeIndex++]=0x3c3; break; case 0x200c: // Ignore/remove ZWNJ. case 0x200d: // Ignore/remove ZWJ. - didMapDevChars=TRUE; + didMapDevChars=true; --length; break; default: @@ -724,7 +724,7 @@ UTS46::processLabel(UnicodeString &dest, info.labelErrors|=UIDNA_ERROR_INVALID_ACE_LABEL; return markBadACELabel(dest, labelStart, labelLength, toASCII, info, errorCode); } - wasPunycode=TRUE; + wasPunycode=true; UChar *unicodeBuffer=fromPunycode.getBuffer(-1); // capacity==-1: most labels should fit if(unicodeBuffer==NULL) { // Should never occur if we used capacity==-1 which uses the internal buffer. @@ -772,7 +772,7 @@ UTS46::processLabel(UnicodeString &dest, labelStart=0; labelLength=fromPunycode.length(); } else { - wasPunycode=FALSE; + wasPunycode=false; labelString=&dest; } // Validity check @@ -932,8 +932,8 @@ UTS46::markBadACELabel(UnicodeString &dest, return 0; } UBool disallowNonLDHDot=(options&UIDNA_USE_STD3_RULES)!=0; - UBool isASCII=TRUE; - UBool onlyLDH=TRUE; + UBool isASCII=true; + UBool onlyLDH=true; const UChar *label=dest.getBuffer()+labelStart; const UChar *limit=label+labelLength; // Start after the initial "xn--". @@ -944,16 +944,16 @@ UTS46::markBadACELabel(UnicodeString &dest, if(c==0x2e) { info.labelErrors|=UIDNA_ERROR_LABEL_HAS_DOT; *s=0xfffd; - isASCII=onlyLDH=FALSE; + isASCII=onlyLDH=false; } else if(asciiData[c]<0) { - onlyLDH=FALSE; + onlyLDH=false; if(disallowNonLDHDot) { *s=0xfffd; - isASCII=FALSE; + isASCII=false; } } } else { - isASCII=onlyLDH=FALSE; + isASCII=onlyLDH=false; } } if(onlyLDH) { @@ -1008,7 +1008,7 @@ UTS46::checkLabelBiDi(const UChar *label, int32_t labelLength, IDNAInfo &info) c // or AL. If it has the R or AL property, it is an RTL label; if it // has the L property, it is an LTR label. if((firstMask&~L_R_AL_MASK)!=0) { - info.isOkBiDi=FALSE; + info.isOkBiDi=false; } // Get the directionality of the last non-NSM character. uint32_t lastMask; @@ -1034,7 +1034,7 @@ UTS46::checkLabelBiDi(const UChar *label, int32_t labelLength, IDNAInfo &info) c (lastMask&~L_EN_MASK)!=0 : (lastMask&~R_AL_EN_AN_MASK)!=0 ) { - info.isOkBiDi=FALSE; + info.isOkBiDi=false; } // Add the directionalities of the intervening characters. uint32_t mask=firstMask|lastMask; @@ -1046,18 +1046,18 @@ UTS46::checkLabelBiDi(const UChar *label, int32_t labelLength, IDNAInfo &info) c // 5. In an LTR label, only characters with the BIDI properties L, EN, // ES, CS, ET, ON, BN and NSM are allowed. if((mask&~L_EN_ES_CS_ET_ON_BN_NSM_MASK)!=0) { - info.isOkBiDi=FALSE; + info.isOkBiDi=false; } } else { // 2. In an RTL label, only characters with the BIDI properties R, AL, // AN, EN, ES, CS, ET, ON, BN and NSM are allowed. if((mask&~R_AL_AN_EN_ES_CS_ET_ON_BN_NSM_MASK)!=0) { - info.isOkBiDi=FALSE; + info.isOkBiDi=false; } // 4. In an RTL label, if an EN is present, no AN may be present, and // vice versa. if((mask&EN_AN_MASK)==EN_AN_MASK) { - info.isOkBiDi=FALSE; + info.isOkBiDi=false; } } // An RTL label is a label that contains at least one character of type @@ -1067,7 +1067,7 @@ UTS46::checkLabelBiDi(const UChar *label, int32_t labelLength, IDNAInfo &info) c // The following rule, consisting of six conditions, applies to labels // in BIDI domain names. if((mask&R_AL_AN_MASK)!=0) { - info.isBiDi=TRUE; + info.isBiDi=true; } } @@ -1094,23 +1094,23 @@ isASCIIOkBiDi(const UChar *s, int32_t length) { c=s[i-1]; if(!(0x61<=c && c<=0x7a) && !(0x30<=c && c<=0x39)) { // Last character in the label is not an L or EN. - return FALSE; + return false; } } labelStart=i+1; } else if(i==labelStart) { if(!(0x61<=c && c<=0x7a)) { // First character in the label is not an L. - return FALSE; + return false; } } else { if(c<=0x20 && (c>=0x1c || (9<=c && c<=0xd))) { // Intermediate character in the label is a B, S or WS. - return FALSE; + return false; } } } - return TRUE; + return true; } // UTF-8 version, called for source ASCII prefix. @@ -1126,23 +1126,23 @@ isASCIIOkBiDi(const char *s, int32_t length) { c=s[i-1]; if(!(0x61<=c && c<=0x7a) && !(0x41<=c && c<=0x5a) && !(0x30<=c && c<=0x39)) { // Last character in the label is not an L or EN. - return FALSE; + return false; } } labelStart=i+1; } else if(i==labelStart) { if(!(0x61<=c && c<=0x7a) && !(0x41<=c && c<=0x5a)) { // First character in the label is not an L. - return FALSE; + return false; } } else { if(c<=0x20 && (c>=0x1c || (9<=c && c<=0xd))) { // Intermediate character in the label is a B, S or WS. - return FALSE; + return false; } } } - return TRUE; + return true; } UBool @@ -1158,7 +1158,7 @@ UTS46::isLabelOkContextJ(const UChar *label, int32_t labelLength) const { // If RegExpMatch((Joining_Type:{L,D})(Joining_Type:T)*\u200C // (Joining_Type:T)*(Joining_Type:{R,D})) Then True; if(i==0) { - return FALSE; + return false; } UChar32 c; int32_t j=i; @@ -1171,19 +1171,19 @@ UTS46::isLabelOkContextJ(const UChar *label, int32_t labelLength) const { UJoiningType type=ubidi_getJoiningType(c); if(type==U_JT_TRANSPARENT) { if(j==0) { - return FALSE; + return false; } U16_PREV_UNSAFE(label, j, c); } else if(type==U_JT_LEFT_JOINING || type==U_JT_DUAL_JOINING) { break; // precontext fulfilled } else { - return FALSE; + return false; } } // check postcontext (Joining_Type:T)*(Joining_Type:{R,D}) for(j=i+1;;) { if(j==labelLength) { - return FALSE; + return false; } U16_NEXT_UNSAFE(label, j, c); UJoiningType type=ubidi_getJoiningType(c); @@ -1192,7 +1192,7 @@ UTS46::isLabelOkContextJ(const UChar *label, int32_t labelLength) const { } else if(type==U_JT_RIGHT_JOINING || type==U_JT_DUAL_JOINING) { break; // postcontext fulfilled } else { - return FALSE; + return false; } } } else if(label[i]==0x200d) { @@ -1201,17 +1201,17 @@ UTS46::isLabelOkContextJ(const UChar *label, int32_t labelLength) const { // False; // If Canonical_Combining_Class(Before(cp)) .eq. Virama Then True; if(i==0) { - return FALSE; + return false; } UChar32 c; int32_t j=i; U16_PREV_UNSAFE(label, j, c); if(uts46Norm2.getCombiningClass(c)!=9) { - return FALSE; + return false; } } } - return TRUE; + return true; } void @@ -1338,23 +1338,23 @@ checkArgs(const void *label, int32_t length, void *dest, int32_t capacity, UIDNAInfo *pInfo, UErrorCode *pErrorCode) { if(U_FAILURE(*pErrorCode)) { - return FALSE; + return false; } // sizeof(UIDNAInfo)=16 in the first API version. if(pInfo==NULL || pInfo->size<16) { *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR; - return FALSE; + return false; } if( (label==NULL ? length!=0 : length<-1) || (dest==NULL ? capacity!=0 : capacity<0) || (dest==label && label!=NULL) ) { *pErrorCode=U_ILLEGAL_ARGUMENT_ERROR; - return FALSE; + return false; } // Set all *pInfo bytes to 0 except for the size field itself. uprv_memset(&pInfo->size+1, 0, pInfo->size-sizeof(pInfo->size)); - return TRUE; + return true; } static void diff --git a/icu4c/source/common/uvector.cpp b/icu4c/source/common/uvector.cpp index 844463921ef..729314ae95d 100644 --- a/icu4c/source/common/uvector.cpp +++ b/icu4c/source/common/uvector.cpp @@ -193,40 +193,40 @@ int32_t UVector::elementAti(int32_t index) const { UBool UVector::containsAll(const UVector& other) const { for (int32_t i=0; i= 0) { - return FALSE; + return false; } } - return TRUE; + return true; } UBool UVector::removeAll(const UVector& other) { - UBool changed = FALSE; + UBool changed = false; for (int32_t i=0; i= 0) { removeElementAt(j); - changed = TRUE; + changed = true; } } return changed; } UBool UVector::retainAll(const UVector& other) { - UBool changed = FALSE; + UBool changed = false; for (int32_t j=size()-1; j>=0; --j) { int32_t i = other.indexOf(elements[j]); if (i < 0) { removeElementAt(j); - changed = TRUE; + changed = true; } } return changed; @@ -243,9 +243,9 @@ UBool UVector::removeElement(void* obj) { int32_t i = indexOf(obj); if (i >= 0) { removeElementAt(i); - return TRUE; + return true; } - return FALSE; + return false; } void UVector::removeAllElements(void) { @@ -263,12 +263,12 @@ UBool UVector::equals(const UVector &other) const { int i; if (this->count != other.count) { - return FALSE; + return false; } if (comparer == nullptr) { for (i=0; i= 0) { - return FALSE; + return false; } } - return TRUE; + return true; } UBool UVector32::removeAll(const UVector32& other) { - UBool changed = FALSE; + UBool changed = false; for (int32_t i=0; i= 0) { removeElementAt(j); - changed = TRUE; + changed = true; } } return changed; } UBool UVector32::retainAll(const UVector32& other) { - UBool changed = FALSE; + UBool changed = false; for (int32_t j=size()-1; j>=0; --j) { int32_t i = other.indexOf(elements[j]); if (i < 0) { removeElementAt(j); - changed = TRUE; + changed = true; } } return changed; @@ -173,14 +173,14 @@ UBool UVector32::equals(const UVector32 &other) const { int i; if (this->count != other.count) { - return FALSE; + return false; } for (i=0; i= minimumCapacity) { - return TRUE; + return true; } if (maxCapacity>0 && minimumCapacity>maxCapacity) { status = U_BUFFER_OVERFLOW_ERROR; - return FALSE; + return false; } if (capacity > (INT32_MAX - 1) / 2) { // integer overflow check status = U_ILLEGAL_ARGUMENT_ERROR; - return FALSE; + return false; } int32_t newCap = capacity * 2; if (newCap < minimumCapacity) { @@ -226,17 +226,17 @@ UBool UVector32::expandCapacity(int32_t minimumCapacity, UErrorCode &status) { if (newCap > (int32_t)(INT32_MAX / sizeof(int32_t))) { // integer overflow check // We keep the original memory contents on bad minimumCapacity/maxCapacity. status = U_ILLEGAL_ARGUMENT_ERROR; - return FALSE; + return false; } int32_t* newElems = (int32_t *)uprv_realloc(elements, sizeof(int32_t)*newCap); if (newElems == NULL) { // We keep the original contents on the memory failure on realloc. status = U_MEMORY_ALLOCATION_ERROR; - return FALSE; + return false; } elements = newElems; capacity = newCap; - return TRUE; + return true; } void UVector32::setMaxCapacity(int32_t limit) { diff --git a/icu4c/source/common/uvectr64.cpp b/icu4c/source/common/uvectr64.cpp index 57315c00ff5..8bd5cd78393 100644 --- a/icu4c/source/common/uvectr64.cpp +++ b/icu4c/source/common/uvectr64.cpp @@ -117,22 +117,22 @@ void UVector64::removeAllElements(void) { UBool UVector64::expandCapacity(int32_t minimumCapacity, UErrorCode &status) { if (U_FAILURE(status)) { - return FALSE; + return false; } if (minimumCapacity < 0) { status = U_ILLEGAL_ARGUMENT_ERROR; - return FALSE; + return false; } if (capacity >= minimumCapacity) { - return TRUE; + return true; } if (maxCapacity>0 && minimumCapacity>maxCapacity) { status = U_BUFFER_OVERFLOW_ERROR; - return FALSE; + return false; } if (capacity > (INT32_MAX - 1) / 2) { // integer overflow check status = U_ILLEGAL_ARGUMENT_ERROR; - return FALSE; + return false; } int32_t newCap = capacity * 2; if (newCap < minimumCapacity) { @@ -144,17 +144,17 @@ UBool UVector64::expandCapacity(int32_t minimumCapacity, UErrorCode &status) { if (newCap > (int32_t)(INT32_MAX / sizeof(int64_t))) { // integer overflow check // We keep the original memory contents on bad minimumCapacity/maxCapacity. status = U_ILLEGAL_ARGUMENT_ERROR; - return FALSE; + return false; } int64_t* newElems = (int64_t *)uprv_realloc(elements, sizeof(int64_t)*newCap); if (newElems == NULL) { // We keep the original contents on the memory failure on realloc. status = U_MEMORY_ALLOCATION_ERROR; - return FALSE; + return false; } elements = newElems; capacity = newCap; - return TRUE; + return true; } void UVector64::setMaxCapacity(int32_t limit) { diff --git a/icu4c/source/common/wintz.cpp b/icu4c/source/common/wintz.cpp index 84a29b8d36a..1bc08ae6548 100644 --- a/icu4c/source/common/wintz.cpp +++ b/icu4c/source/common/wintz.cpp @@ -274,7 +274,7 @@ uprv_detectWindowsTimeZone() CharString winTZ; UErrorCode status = U_ZERO_ERROR; - winTZ.appendInvariantChars(UnicodeString(TRUE, windowsTimeZoneName, -1), status); + winTZ.appendInvariantChars(UnicodeString(true, windowsTimeZoneName, -1), status); // Map Windows Timezone name (non-localized) to ICU timezone ID (~ Olson timezone id). StackUResourceBundle winTZBundle; diff --git a/icu4c/source/i18n/alphaindex.cpp b/icu4c/source/i18n/alphaindex.cpp index 88d63675a7c..16b9d99395b 100644 --- a/icu4c/source/i18n/alphaindex.cpp +++ b/icu4c/source/i18n/alphaindex.cpp @@ -312,7 +312,7 @@ void AlphabeticIndex::initLabels(UVector &indexCharacters, UErrorCode &errorCode UBool checkDistinct; int32_t itemLength = item->length(); if (!item->hasMoreChar32Than(0, itemLength, 1)) { - checkDistinct = FALSE; + checkDistinct = false; } else if(item->charAt(itemLength - 1) == 0x2a && // '*' item->charAt(itemLength - 2) != 0x2a) { // Use a label if it is marked with one trailing star, @@ -323,9 +323,9 @@ void AlphabeticIndex::initLabels(UVector &indexCharacters, UErrorCode &errorCode errorCode = U_MEMORY_ALLOCATION_ERROR; return; } - checkDistinct = FALSE; + checkDistinct = false; } else { - checkDistinct = TRUE; + checkDistinct = true; } if (collatorPrimaryOnly_->compare(*item, firstScriptBoundary, errorCode) < 0) { // Ignore a primary-ignorable or non-alphabetic index character. @@ -398,20 +398,20 @@ UBool hasMultiplePrimaryWeights( const UnicodeString &s, UVector64 &ces, UErrorCode &errorCode) { ces.removeAllElements(); coll.internalGetCEs(s, ces, errorCode); - if (U_FAILURE(errorCode)) { return FALSE; } - UBool seenPrimary = FALSE; + if (U_FAILURE(errorCode)) { return false; } + UBool seenPrimary = false; for (int32_t i = 0; i < ces.size(); ++i) { int64_t ce = ces.elementAti(i); uint32_t p = (uint32_t)(ce >> 32); if (p > variableTop) { // not primary ignorable if (seenPrimary) { - return TRUE; + return true; } - seenPrimary = TRUE; + seenPrimary = true; } } - return FALSE; + return false; } } // namespace @@ -431,7 +431,7 @@ BucketList *AlphabeticIndex::createBucketList(UErrorCode &errorCode) const { } else { variableTop = 0; } - UBool hasInvisibleBuckets = FALSE; + UBool hasInvisibleBuckets = false; // Helper arrays for Chinese Pinyin collation. Bucket *asciiBuckets[26] = { @@ -442,7 +442,7 @@ BucketList *AlphabeticIndex::createBucketList(UErrorCode &errorCode) const { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }; - UBool hasPinyin = FALSE; + UBool hasPinyin = false; LocalPointer bucketList(new UVector(errorCode), errorCode); if (U_FAILURE(errorCode)) { @@ -469,13 +469,13 @@ BucketList *AlphabeticIndex::createBucketList(UErrorCode &errorCode) const { if (collatorPrimaryOnly_->compare(current, *scriptUpperBoundary, errorCode) >= 0) { // We crossed the script boundary into a new script. const UnicodeString &inflowBoundary = *scriptUpperBoundary; - UBool skippedScript = FALSE; + UBool skippedScript = false; for (;;) { scriptUpperBoundary = getString(*firstCharsInScripts_, ++scriptIndex); if (collatorPrimaryOnly_->compare(current, *scriptUpperBoundary, errorCode) < 0) { break; } - skippedScript = TRUE; + skippedScript = true; } if (skippedScript && bucketList->size() > 1) { // We are skipping one or more scripts, @@ -498,7 +498,7 @@ BucketList *AlphabeticIndex::createBucketList(UErrorCode &errorCode) const { } else if (current.length() == BASE_LENGTH + 1 && current.startsWith(BASE, BASE_LENGTH) && 0x41 <= (c = current.charAt(BASE_LENGTH)) && c <= 0x5A) { pinyinBuckets[c - 0x41] = (Bucket *)bucketList->lastElement(); - hasPinyin = TRUE; + hasPinyin = true; } // Check for multiple primary weights. if (!current.startsWith(BASE, BASE_LENGTH) && @@ -531,7 +531,7 @@ BucketList *AlphabeticIndex::createBucketList(UErrorCode &errorCode) const { bucket->displayBucket_ = singleBucket; bucketList->adoptElement(bucket.orphan(), errorCode); if (U_FAILURE(errorCode)) { return nullptr; } - hasInvisibleBuckets = TRUE; + hasInvisibleBuckets = true; break; } } @@ -563,7 +563,7 @@ BucketList *AlphabeticIndex::createBucketList(UErrorCode &errorCode) const { } if (pinyinBuckets[i] != NULL && asciiBucket != NULL) { pinyinBuckets[i]->displayBucket_ = asciiBucket; - hasInvisibleBuckets = TRUE; + hasInvisibleBuckets = true; } } } @@ -754,7 +754,7 @@ void AlphabeticIndex::addIndexExemplars(const Locale &locale, UErrorCode &status UBool AlphabeticIndex::addChineseIndexCharacters(UErrorCode &errorCode) { UnicodeSet contractions; collatorPrimaryOnly_->internalAddContractions(BASE[0], contractions, errorCode); - if (U_FAILURE(errorCode) || contractions.isEmpty()) { return FALSE; } + if (U_FAILURE(errorCode) || contractions.isEmpty()) { return false; } initialLabels_->addAll(contractions); UnicodeSetIterator iter(contractions); while (iter.next()) { @@ -767,7 +767,7 @@ UBool AlphabeticIndex::addChineseIndexCharacters(UErrorCode &errorCode) { break; } } - return TRUE; + return true; } @@ -1028,7 +1028,7 @@ UBool isOneLabelBetterThanOther(const Normalizer2 &nfkdNormalizer, UErrorCode status = U_ZERO_ERROR; UnicodeString n1 = nfkdNormalizer.normalize(one, status); UnicodeString n2 = nfkdNormalizer.normalize(other, status); - if (U_FAILURE(status)) { return FALSE; } + if (U_FAILURE(status)) { return false; } int32_t result = n1.countChar32() - n2.countChar32(); if (result != 0) { return result < 0; @@ -1105,24 +1105,24 @@ int32_t AlphabeticIndex::getBucketIndex() const { UBool AlphabeticIndex::nextBucket(UErrorCode &status) { if (U_FAILURE(status)) { - return FALSE; + return false; } if (buckets_ == NULL && currentBucket_ != NULL) { status = U_ENUM_OUT_OF_SYNC_ERROR; - return FALSE; + return false; } initBuckets(status); if (U_FAILURE(status)) { - return FALSE; + return false; } ++labelsIterIndex_; if (labelsIterIndex_ >= buckets_->getBucketCount()) { labelsIterIndex_ = buckets_->getBucketCount(); - return FALSE; + return false; } currentBucket_ = getBucket(*buckets_->immutableVisibleList_, labelsIterIndex_); resetRecordIterator(); - return TRUE; + return true; } const UnicodeString &AlphabeticIndex::getBucketLabel() const { @@ -1163,27 +1163,27 @@ AlphabeticIndex &AlphabeticIndex::resetBucketIterator(UErrorCode &status) { UBool AlphabeticIndex::nextRecord(UErrorCode &status) { if (U_FAILURE(status)) { - return FALSE; + return false; } if (currentBucket_ == NULL) { // We are trying to iterate over the items in a bucket, but there is no // current bucket from the enumeration of buckets. status = U_INVALID_STATE_ERROR; - return FALSE; + return false; } if (buckets_ == NULL) { status = U_ENUM_OUT_OF_SYNC_ERROR; - return FALSE; + return false; } if (currentBucket_->records_ == NULL) { - return FALSE; + return false; } ++itemsIterIndex_; if (itemsIterIndex_ >= currentBucket_->records_->size()) { itemsIterIndex_ = currentBucket_->records_->size(); - return FALSE; + return false; } - return TRUE; + return true; } diff --git a/icu4c/source/i18n/anytrans.cpp b/icu4c/source/i18n/anytrans.cpp index 167b0185285..e10ff479ddd 100644 --- a/icu4c/source/i18n/anytrans.cpp +++ b/icu4c/source/i18n/anytrans.cpp @@ -101,7 +101,7 @@ public: ScriptRunIterator(const Replaceable& text, int32_t start, int32_t limit); /** - * Returns TRUE if there are any more runs. TRUE is always + * Returns true if there are any more runs. true is always * returned at least once. Upon return, the caller should * examine scriptCode, start, and limit. */ @@ -137,7 +137,7 @@ UBool ScriptRunIterator::next() { // Are we done? if (start == textLimit) { - return FALSE; + return false; } // Move start back to include adjacent COMMON or INHERITED @@ -167,9 +167,9 @@ UBool ScriptRunIterator::next() { ++limit; } - // Return TRUE even if the entire text is COMMON / INHERITED, in + // Return true even if the entire text is COMMON / INHERITED, in // which case scriptCode will be USCRIPT_INVALID_CODE. - return TRUE; + return true; } void ScriptRunIterator::adjustLimit(int32_t delta) { @@ -358,7 +358,7 @@ static UScriptCode scriptNameToCode(const UnicodeString& name) { void AnyTransliterator::registerIDs() { UErrorCode ec = U_ZERO_ERROR; - Hashtable seen(TRUE, ec); + Hashtable seen(true, ec); int32_t sourceCount = Transliterator::_countAvailableSources(); for (int32_t s=0; sgetOffset(localMillis, TRUE, rawOffset, dstOffset, status); + tz->getOffset(localMillis, true, rawOffset, dstOffset, status); delete tz; return localMillis - rawOffset; }*/ diff --git a/icu4c/source/i18n/basictz.cpp b/icu4c/source/i18n/basictz.cpp index 7b5449f4167..dfc3aea6cbc 100644 --- a/icu4c/source/i18n/basictz.cpp +++ b/icu4c/source/i18n/basictz.cpp @@ -39,59 +39,59 @@ UBool BasicTimeZone::hasEquivalentTransitions(const BasicTimeZone& tz, UDate start, UDate end, UBool ignoreDstAmount, UErrorCode& status) const { if (U_FAILURE(status)) { - return FALSE; + return false; } if (hasSameRules(tz)) { - return TRUE; + return true; } // Check the offsets at the start time int32_t raw1, raw2, dst1, dst2; - getOffset(start, FALSE, raw1, dst1, status); + getOffset(start, false, raw1, dst1, status); if (U_FAILURE(status)) { - return FALSE; + return false; } - tz.getOffset(start, FALSE, raw2, dst2, status); + tz.getOffset(start, false, raw2, dst2, status); if (U_FAILURE(status)) { - return FALSE; + return false; } if (ignoreDstAmount) { if ((raw1 + dst1 != raw2 + dst2) || (dst1 != 0 && dst2 == 0) || (dst1 == 0 && dst2 != 0)) { - return FALSE; + return false; } } else { if (raw1 != raw2 || dst1 != dst2) { - return FALSE; + return false; } } // Check transitions in the range UDate time = start; TimeZoneTransition tr1, tr2; - while (TRUE) { - UBool avail1 = getNextTransition(time, FALSE, tr1); - UBool avail2 = tz.getNextTransition(time, FALSE, tr2); + while (true) { + UBool avail1 = getNextTransition(time, false, tr1); + UBool avail2 = tz.getNextTransition(time, false, tr2); if (ignoreDstAmount) { // Skip a transition which only differ the amount of DST savings - while (TRUE) { + while (true) { if (avail1 && tr1.getTime() <= end && (tr1.getFrom()->getRawOffset() + tr1.getFrom()->getDSTSavings() == tr1.getTo()->getRawOffset() + tr1.getTo()->getDSTSavings()) && (tr1.getFrom()->getDSTSavings() != 0 && tr1.getTo()->getDSTSavings() != 0)) { - getNextTransition(tr1.getTime(), FALSE, tr1); + getNextTransition(tr1.getTime(), false, tr1); } else { break; } } - while (TRUE) { + while (true) { if (avail2 && tr2.getTime() <= end && (tr2.getFrom()->getRawOffset() + tr2.getFrom()->getDSTSavings() == tr2.getTo()->getRawOffset() + tr2.getTo()->getDSTSavings()) && (tr2.getFrom()->getDSTSavings() != 0 && tr2.getTo()->getDSTSavings() != 0)) { - tz.getNextTransition(tr2.getTime(), FALSE, tr2); + tz.getNextTransition(tr2.getTime(), false, tr2); } else { break; } @@ -105,27 +105,27 @@ BasicTimeZone::hasEquivalentTransitions(const BasicTimeZone& tz, UDate start, UD break; } if (!inRange1 || !inRange2) { - return FALSE; + return false; } if (tr1.getTime() != tr2.getTime()) { - return FALSE; + return false; } if (ignoreDstAmount) { if (tr1.getTo()->getRawOffset() + tr1.getTo()->getDSTSavings() != tr2.getTo()->getRawOffset() + tr2.getTo()->getDSTSavings() || (tr1.getTo()->getDSTSavings() != 0 && tr2.getTo()->getDSTSavings() == 0) || (tr1.getTo()->getDSTSavings() == 0 && tr2.getTo()->getDSTSavings() != 0)) { - return FALSE; + return false; } } else { if (tr1.getTo()->getRawOffset() != tr2.getTo()->getRawOffset() || tr1.getTo()->getDSTSavings() != tr2.getTo()->getDSTSavings()) { - return FALSE; + return false; } } time = tr1.getTime(); } - return TRUE; + return true; } void @@ -147,7 +147,7 @@ BasicTimeZone::getSimpleRulesNear(UDate date, InitialTimeZoneRule*& initial, UBool avail; TimeZoneTransition tr; // Get the next transition - avail = getNextTransition(date, FALSE, tr); + avail = getNextTransition(date, false, tr); if (avail) { tr.getFrom()->getName(initialName); initialRaw = tr.getFrom()->getRawOffset(); @@ -182,7 +182,7 @@ BasicTimeZone::getSimpleRulesNear(UDate date, InitialTimeZoneRule*& initial, if (tr.getTo()->getRawOffset() == initialRaw) { // Get the next next transition - avail = getNextTransition(nextTransitionTime, FALSE, tr); + avail = getNextTransition(nextTransitionTime, false, tr); if (avail) { // Check if the next next transition is either DST->STD or STD->DST // and within roughly 1 year from the next transition @@ -201,7 +201,7 @@ BasicTimeZone::getSimpleRulesNear(UDate date, InitialTimeZoneRule*& initial, dtr, year - 1, AnnualTimeZoneRule::MAX_YEAR); // Make sure this rule can be applied to the specified date - avail = ar2->getPreviousStart(date, tr.getFrom()->getRawOffset(), tr.getFrom()->getDSTSavings(), TRUE, d); + avail = ar2->getPreviousStart(date, tr.getFrom()->getRawOffset(), tr.getFrom()->getDSTSavings(), true, d); if (!avail || d > date || initialRaw != tr.getTo()->getRawOffset() || initialDst != tr.getTo()->getDSTSavings()) { @@ -214,7 +214,7 @@ BasicTimeZone::getSimpleRulesNear(UDate date, InitialTimeZoneRule*& initial, } if (ar2 == NULL) { // Try previous transition - avail = getPreviousTransition(date, TRUE, tr); + avail = getPreviousTransition(date, true, tr); if (avail) { // Check if the previous transition is either DST->STD or STD->DST. // The actual transition time does not matter here. @@ -234,7 +234,7 @@ BasicTimeZone::getSimpleRulesNear(UDate date, InitialTimeZoneRule*& initial, dtr, ar1->getStartYear() - 1, AnnualTimeZoneRule::MAX_YEAR); // Check if this rule start after the first rule after the specified date - avail = ar2->getNextStart(date, tr.getFrom()->getRawOffset(), tr.getFrom()->getDSTSavings(), FALSE, d); + avail = ar2->getNextStart(date, tr.getFrom()->getRawOffset(), tr.getFrom()->getDSTSavings(), false, d); if (!avail || d <= nextTransitionTime) { // We cannot use this rule as the second transition rule delete ar2; @@ -257,14 +257,14 @@ BasicTimeZone::getSimpleRulesNear(UDate date, InitialTimeZoneRule*& initial, } else { // Try the previous one - avail = getPreviousTransition(date, TRUE, tr); + avail = getPreviousTransition(date, true, tr); if (avail) { tr.getTo()->getName(initialName); initialRaw = tr.getTo()->getRawOffset(); initialDst = tr.getTo()->getDSTSavings(); } else { // No transitions in the past. Just use the current offsets - getOffset(date, FALSE, initialRaw, initialDst, status); + getOffset(date, false, initialRaw, initialDst, status); if (U_FAILURE(status)) { return; } @@ -334,7 +334,7 @@ BasicTimeZone::getTimeZoneRulesAfter(UDate start, InitialTimeZoneRule*& initial, } } - avail = getPreviousTransition(start, TRUE, tzt); + avail = getPreviousTransition(start, true, tzt); if (!avail) { // No need to filter out rules only applicable to time before the start initial = orgini->clone(); @@ -368,13 +368,13 @@ BasicTimeZone::getTimeZoneRulesAfter(UDate start, InitialTimeZoneRule*& initial, // Mark rules which does not need to be processed for (i = 0; i < ruleCount; i++) { r = (TimeZoneRule*)orgRules->elementAt(i); - avail = r->getNextStart(start, res_initial->getRawOffset(), res_initial->getDSTSavings(), FALSE, time); + avail = r->getNextStart(start, res_initial->getRawOffset(), res_initial->getDSTSavings(), false, time); done[i] = !avail; } time = start; while (!bFinalStd || !bFinalDst) { - avail = getNextTransition(time, FALSE, tzt); + avail = getNextTransition(time, false, tzt); if (!avail) { break; } @@ -409,8 +409,8 @@ BasicTimeZone::getTimeZoneRulesAfter(UDate start, InitialTimeZoneRule*& initial, // Get the previous raw offset and DST savings before the very first start time TimeZoneTransition tzt0; t = start; - while (TRUE) { - avail = getNextTransition(t, FALSE, tzt0); + while (true) { + avail = getNextTransition(t, false, tzt0); if (!avail) { break; } @@ -499,9 +499,9 @@ BasicTimeZone::getTimeZoneRulesAfter(UDate start, InitialTimeZoneRule*& initial, // After bot final standard and dst rules are processed, // exit this while loop. if (ar->getDSTSavings() == 0) { - bFinalStd = TRUE; + bFinalStd = true; } else { - bFinalDst = TRUE; + bFinalDst = true; } } } diff --git a/icu4c/source/i18n/buddhcal.cpp b/icu4c/source/i18n/buddhcal.cpp index 4b75b5e02cb..de304129cb4 100644 --- a/icu4c/source/i18n/buddhcal.cpp +++ b/icu4c/source/i18n/buddhcal.cpp @@ -138,7 +138,7 @@ static icu::UInitOnce gBCInitOnce {}; UBool BuddhistCalendar::haveDefaultCentury() const { - return TRUE; + return true; } static void U_CALLCONV diff --git a/icu4c/source/i18n/calendar.cpp b/icu4c/source/i18n/calendar.cpp index 1b31814f05b..7b8b929990f 100644 --- a/icu4c/source/i18n/calendar.cpp +++ b/icu4c/source/i18n/calendar.cpp @@ -22,7 +22,7 @@ * 07/28/98 stephen Sync up with JDK 1.2 * 09/02/98 stephen Sync with JDK 1.2 8/31 build (getActualMin/Max) * 03/17/99 stephen Changed adoptTimeZone() - now fAreFieldsSet is -* set to FALSE to force update of time. +* set to false to force update of time. ******************************************************************************* */ @@ -77,7 +77,7 @@ static UBool calendar_cleanup(void) { } gServiceInitOnce.reset(); #endif - return TRUE; + return true; } U_CDECL_END #endif @@ -240,7 +240,7 @@ static ECalType getCalendarType(const char *s) { // Only used with service registration. static UBool isStandardSupportedKeyword(const char *keyword, UErrorCode& status) { if(U_FAILURE(status)) { - return FALSE; + return false; } ECalType calType = getCalendarType(keyword); return (calType != CALTYPE_UNKNOWN); @@ -295,7 +295,7 @@ static ECalType getCalendarTypeForLocale(const char *locid) { // when calendar keyword is not available or not supported, read supplementalData // to get the default calendar type for the locale's region char region[ULOC_COUNTRY_CAPACITY]; - (void)ulocimp_getRegionForSupplementalData(canonicalName, TRUE, region, sizeof(region), &status); + (void)ulocimp_getRegionForSupplementalData(canonicalName, true, region, sizeof(region), &status); if (U_FAILURE(status)) { return CALTYPE_GREGORIAN; } @@ -423,7 +423,7 @@ public: protected: //virtual UBool isSupportedID( const UnicodeString& id, UErrorCode& status) const { // if(U_FAILURE(status)) { - // return FALSE; + // return false; // } // char keyword[ULOC_FULLNAME_CAPACITY]; // getCalendarKeyword(id, keyword, (int32_t)sizeof(keyword)); @@ -723,13 +723,13 @@ static const char gGregorian[] = "gregorian"; Calendar::Calendar(UErrorCode& success) : UObject(), -fIsTimeSet(FALSE), -fAreFieldsSet(FALSE), -fAreAllFieldsSet(FALSE), -fAreFieldsVirtuallySet(FALSE), +fIsTimeSet(false), +fAreFieldsSet(false), +fAreAllFieldsSet(false), +fAreFieldsVirtuallySet(false), fNextStamp((int32_t)kMinimumUserStamp), fTime(0), -fLenient(TRUE), +fLenient(true), fZone(NULL), fRepeatedWallTime(UCAL_WALLTIME_LAST), fSkippedWallTime(UCAL_WALLTIME_LAST) @@ -751,13 +751,13 @@ fSkippedWallTime(UCAL_WALLTIME_LAST) Calendar::Calendar(TimeZone* zone, const Locale& aLocale, UErrorCode& success) : UObject(), -fIsTimeSet(FALSE), -fAreFieldsSet(FALSE), -fAreAllFieldsSet(FALSE), -fAreFieldsVirtuallySet(FALSE), +fIsTimeSet(false), +fAreFieldsSet(false), +fAreAllFieldsSet(false), +fAreFieldsVirtuallySet(false), fNextStamp((int32_t)kMinimumUserStamp), fTime(0), -fLenient(TRUE), +fLenient(true), fZone(NULL), fRepeatedWallTime(UCAL_WALLTIME_LAST), fSkippedWallTime(UCAL_WALLTIME_LAST) @@ -786,13 +786,13 @@ fSkippedWallTime(UCAL_WALLTIME_LAST) Calendar::Calendar(const TimeZone& zone, const Locale& aLocale, UErrorCode& success) : UObject(), -fIsTimeSet(FALSE), -fAreFieldsSet(FALSE), -fAreAllFieldsSet(FALSE), -fAreFieldsVirtuallySet(FALSE), +fIsTimeSet(false), +fAreFieldsSet(false), +fAreAllFieldsSet(false), +fAreFieldsVirtuallySet(false), fNextStamp((int32_t)kMinimumUserStamp), fTime(0), -fLenient(TRUE), +fLenient(true), fZone(NULL), fRepeatedWallTime(UCAL_WALLTIME_LAST), fSkippedWallTime(UCAL_WALLTIME_LAST) @@ -1188,13 +1188,13 @@ Calendar::setTimeInMillis( double millis, UErrorCode& status ) { } fTime = millis; - fAreFieldsSet = fAreAllFieldsSet = FALSE; - fIsTimeSet = fAreFieldsVirtuallySet = TRUE; + fAreFieldsSet = fAreAllFieldsSet = false; + fIsTimeSet = fAreFieldsVirtuallySet = true; for (int32_t i=0; i>= 1; } @@ -1916,13 +1916,13 @@ void Calendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& statu // * If era==0 and years go backwards in time, change sign of amount. // * Until we have new API per #9393, we temporarily hardcode knowledge of // which calendars have era 0 years that go backwards. - UBool era0WithYearsThatGoBackwards = FALSE; + UBool era0WithYearsThatGoBackwards = false; int32_t era = get(UCAL_ERA, status); if (era == 0) { const char * calType = getType(); if ( uprv_strcmp(calType,"gregorian")==0 || uprv_strcmp(calType,"roc")==0 || uprv_strcmp(calType,"coptic")==0 ) { amount = -amount; - era0WithYearsThatGoBackwards = TRUE; + era0WithYearsThatGoBackwards = true; } } int32_t newYear = internalGet(field) + amount; @@ -2191,7 +2191,7 @@ void Calendar::add(UCalendarDateFields field, int32_t amount, UErrorCode& status // we don't want the wall time to shift due to changes in DST. If the // result of the add operation is to move from DST to Standard, or // vice versa, we need to adjust by an hour forward or back, - // respectively. For such fields we set keepWallTimeInvariant to TRUE. + // respectively. For such fields we set keepWallTimeInvariant to true. // We only adjust the DST for fields larger than an hour. For // fields smaller than an hour, we cannot adjust for DST without @@ -2206,7 +2206,7 @@ void Calendar::add(UCalendarDateFields field, int32_t amount, UErrorCode& status // , rather than => . double delta = amount; // delta in ms - UBool keepWallTimeInvariant = TRUE; + UBool keepWallTimeInvariant = true; switch (field) { case UCAL_ERA: @@ -2238,10 +2238,10 @@ void Calendar::add(UCalendarDateFields field, int32_t amount, UErrorCode& status case UCAL_MONTH: { UBool oldLenient = isLenient(); - setLenient(TRUE); + setLenient(true); set(field, get(field, status) + amount); pinField(UCAL_DAY_OF_MONTH, status); - if(oldLenient==FALSE) { + if(oldLenient==false) { complete(status); /* force recalculate */ setLenient(oldLenient); } @@ -2269,22 +2269,22 @@ void Calendar::add(UCalendarDateFields field, int32_t amount, UErrorCode& status case UCAL_HOUR_OF_DAY: case UCAL_HOUR: delta *= kOneHour; - keepWallTimeInvariant = FALSE; + keepWallTimeInvariant = false; break; case UCAL_MINUTE: delta *= kOneMinute; - keepWallTimeInvariant = FALSE; + keepWallTimeInvariant = false; break; case UCAL_SECOND: delta *= kOneSecond; - keepWallTimeInvariant = FALSE; + keepWallTimeInvariant = false; break; case UCAL_MILLISECOND: case UCAL_MILLISECONDS_IN_DAY: - keepWallTimeInvariant = FALSE; + keepWallTimeInvariant = false; break; default: @@ -2477,7 +2477,7 @@ Calendar::adoptTimeZone(TimeZone* zone) fZone = zone; // if the zone changes, we need to recompute the time fields - fAreFieldsSet = FALSE; + fAreFieldsSet = false; } // ------------------------------------- @@ -2570,7 +2570,7 @@ Calendar::setFirstDayOfWeek(UCalendarDaysOfWeek value) if (fFirstDayOfWeek != value && value >= UCAL_SUNDAY && value <= UCAL_SATURDAY) { fFirstDayOfWeek = value; - fAreFieldsSet = FALSE; + fAreFieldsSet = false; } } @@ -2602,7 +2602,7 @@ Calendar::setMinimalDaysInFirstWeek(uint8_t value) } if (fMinimalDaysInFirstWeek != value) { fMinimalDaysInFirstWeek = value; - fAreFieldsSet = FALSE; + fAreFieldsSet = false; } } @@ -2669,15 +2669,15 @@ UBool Calendar::isWeekend(UDate date, UErrorCode &status) const { if (U_FAILURE(status)) { - return FALSE; + return false; } // clone the calendar so we don't mess with the real one. Calendar *work = this->clone(); if (work == NULL) { status = U_MEMORY_ALLOCATION_ERROR; - return FALSE; + return false; } - UBool result = FALSE; + UBool result = false; work->setTime(date, status); if (U_SUCCESS(status)) { result = work->isWeekend(); @@ -2695,9 +2695,9 @@ Calendar::isWeekend(void) const if (U_SUCCESS(status)) { switch (dayType) { case UCAL_WEEKDAY: - return FALSE; + return false; case UCAL_WEEKEND: - return TRUE; + return true; case UCAL_WEEKEND_ONSET: case UCAL_WEEKEND_CEASE: // Use internalGet() because the above call to get() populated all fields. @@ -2709,14 +2709,14 @@ Calendar::isWeekend(void) const (millisInDay >= transitionMillis): (millisInDay < transitionMillis); } - // else fall through, return FALSE + // else fall through, return false U_FALLTHROUGH; } default: break; } } - return FALSE; + return false; } // ------------------------------------- limits @@ -2840,7 +2840,7 @@ Calendar::getActualMinimum(UCalendarDateFields field, UErrorCode& status) const status = U_MEMORY_ALLOCATION_ERROR; return 0; } - work->setLenient(TRUE); + work->setLenient(true); // now try each value from getLeastMaximum() to getMaximum() one by one until // we get a value that normalizes to another value. The last value that @@ -3142,7 +3142,7 @@ void Calendar::computeTime(UErrorCode& status) { UDate tmpTime = millis + millisInDay - zoneOffset; int32_t raw, dst; - fZone->getOffset(tmpTime, FALSE, raw, dst, status); + fZone->getOffset(tmpTime, false, raw, dst, status); if (U_SUCCESS(status)) { // zoneOffset != (raw + dst) only when the given wall time fall into @@ -3179,15 +3179,15 @@ void Calendar::computeTime(UErrorCode& status) { */ UBool Calendar::getImmediatePreviousZoneTransition(UDate base, UDate *transitionTime, UErrorCode& status) const { if (U_FAILURE(status)) { - return FALSE; + return false; } BasicTimeZone *btz = getBasicTimeZone(); if (btz) { TimeZoneTransition trans; - UBool hasTransition = btz->getPreviousTransition(base, TRUE, trans); + UBool hasTransition = btz->getPreviousTransition(base, true, trans); if (hasTransition) { *transitionTime = trans.getTime(); - return TRUE; + return true; } else { // Could not find any transitions. // Note: This should never happen. @@ -3198,7 +3198,7 @@ UBool Calendar::getImmediatePreviousZoneTransition(UDate base, UDate *transition // TODO: We may support non-BasicTimeZone in future. status = U_UNSUPPORTED_ERROR; } - return FALSE; + return false; } /** @@ -3267,9 +3267,9 @@ int32_t Calendar::computeZoneOffset(double millis, double millisInDay, UErrorCod } else { const TimeZone& tz = getTimeZone(); // By default, TimeZone::getOffset behaves UCAL_WALLTIME_LAST for both. - tz.getOffset(wall, TRUE, rawOffset, dstOffset, ec); + tz.getOffset(wall, true, rawOffset, dstOffset, ec); - UBool sawRecentNegativeShift = FALSE; + UBool sawRecentNegativeShift = false; if (fRepeatedWallTime == UCAL_WALLTIME_FIRST) { // Check if the given wall time falls into repeated time range UDate tgmt = wall - (rawOffset + dstOffset); @@ -3278,16 +3278,16 @@ int32_t Calendar::computeZoneOffset(double millis, double millisInDay, UErrorCod // Note: The maximum historic negative zone transition is -3 hours in the tz database. // 6 hour window would be sufficient for this purpose. int32_t tmpRaw, tmpDst; - tz.getOffset(tgmt - 6*60*60*1000, FALSE, tmpRaw, tmpDst, ec); + tz.getOffset(tgmt - 6*60*60*1000, false, tmpRaw, tmpDst, ec); int32_t offsetDelta = (rawOffset + dstOffset) - (tmpRaw + tmpDst); U_ASSERT(offsetDelta < -6*60*60*1000); if (offsetDelta < 0) { - sawRecentNegativeShift = TRUE; + sawRecentNegativeShift = true; // Negative shift within last 6 hours. When UCAL_WALLTIME_FIRST is used and the given wall time falls // into the repeated time range, use offsets before the transition. // Note: If it does not fall into the repeated time range, offsets remain unchanged below. - tz.getOffset(wall + offsetDelta, TRUE, rawOffset, dstOffset, ec); + tz.getOffset(wall + offsetDelta, true, rawOffset, dstOffset, ec); } } if (!sawRecentNegativeShift && fSkippedWallTime == UCAL_WALLTIME_FIRST) { @@ -3297,7 +3297,7 @@ int32_t Calendar::computeZoneOffset(double millis, double millisInDay, UErrorCod // the offsets will be based on the zone offsets AFTER // the transition (which means, earliest possible interpretation). UDate tgmt = wall - (rawOffset + dstOffset); - tz.getOffset(tgmt, FALSE, rawOffset, dstOffset, ec); + tz.getOffset(tgmt, false, rawOffset, dstOffset, ec); } } return rawOffset + dstOffset; @@ -3441,7 +3441,7 @@ int32_t Calendar::handleComputeJulianDay(UCalendarDateFields bestField) { // need to be sure to stay in 'real' year. int32_t woy = internalGet(bestField); - int32_t nextJulianDay = handleComputeMonthStart(year+1, 0, FALSE); // jd of day before jan 1 + int32_t nextJulianDay = handleComputeMonthStart(year+1, 0, false); // jd of day before jan 1 int32_t nextFirst = julianDayToDayOfWeek(nextJulianDay + 1) - firstDayOfWeek; if (nextFirst < 0) { // 0..6 ldow of Jan 1 @@ -3492,7 +3492,7 @@ int32_t Calendar::handleComputeJulianDay(UCalendarDateFields bestField) { #endif if(julianDay+testDate > nextJulianDay) { // is it past Dec 31? (nextJulianDay is day BEFORE year+1's Jan 1) // Fire up the calculating engines.. retry YWOY = (year-1) - julianDay = handleComputeMonthStart(year-1, 0, FALSE); // jd before Jan 1 of previous year + julianDay = handleComputeMonthStart(year-1, 0, false); // jd before Jan 1 of previous year first = julianDayToDayOfWeek(julianDay + 1) - firstDayOfWeek; // 0 based local dow of first week if(first < 0) { // 0..6 @@ -3572,8 +3572,8 @@ int32_t Calendar::handleGetExtendedYearFromWeekFields(int32_t yearWoy, int32_t w // Now, a local DOW int32_t dowLocal = getLocalDOW(); // 0..6 int32_t firstDayOfWeek = getFirstDayOfWeek(); // Localized fdw - int32_t jan1Start = handleComputeMonthStart(yearWoy, 0, FALSE); - int32_t nextJan1Start = handleComputeMonthStart(yearWoy+1, 0, FALSE); // next year's Jan1 start + int32_t jan1Start = handleComputeMonthStart(yearWoy, 0, false); + int32_t nextJan1Start = handleComputeMonthStart(yearWoy+1, 0, false); // next year's Jan1 start // At this point julianDay is the 0-based day BEFORE the first day of // January 1, year 1 of the given calendar. If julianDay == 0, it @@ -3599,21 +3599,21 @@ int32_t Calendar::handleGetExtendedYearFromWeekFields(int32_t yearWoy, int32_t w //} int32_t minDays = getMinimalDaysInFirstWeek(); - UBool jan1InPrevYear = FALSE; // January 1st in the year of WOY is the 1st week? (i.e. first week is < minimal ) - //UBool nextJan1InPrevYear = FALSE; // January 1st of Year of WOY + 1 is in the first week? + UBool jan1InPrevYear = false; // January 1st in the year of WOY is the 1st week? (i.e. first week is < minimal ) + //UBool nextJan1InPrevYear = false; // January 1st of Year of WOY + 1 is in the first week? if((7 - first) < minDays) { - jan1InPrevYear = TRUE; + jan1InPrevYear = true; } // if((7 - nextFirst) < minDays) { - // nextJan1InPrevYear = TRUE; + // nextJan1InPrevYear = true; // } switch(bestField) { case UCAL_WEEK_OF_YEAR: if(woy == 1) { - if(jan1InPrevYear == TRUE) { + if(jan1InPrevYear == true) { // the first week of January is in the previous year // therefore WOY1 is always solidly within yearWoy return yearWoy; @@ -3632,7 +3632,7 @@ int32_t Calendar::handleGetExtendedYearFromWeekFields(int32_t yearWoy, int32_t w (7-first) + // days in the first week (Jan 1.. ) (woy-1)*7 + // add the weeks of the year dowLocal; // the local dow (0..6) of last week - if(jan1InPrevYear==FALSE) { + if(jan1InPrevYear==false) { jd -= 7; // woy already includes Jan 1's week. } @@ -3674,13 +3674,13 @@ int32_t Calendar::handleGetExtendedYearFromWeekFields(int32_t yearWoy, int32_t w int32_t Calendar::handleGetMonthLength(int32_t extendedYear, int32_t month) const { - return handleComputeMonthStart(extendedYear, month+1, TRUE) - - handleComputeMonthStart(extendedYear, month, TRUE); + return handleComputeMonthStart(extendedYear, month+1, true) - + handleComputeMonthStart(extendedYear, month, true); } int32_t Calendar::handleGetYearLength(int32_t eyear) const { - return handleComputeMonthStart(eyear+1, 0, FALSE) - - handleComputeMonthStart(eyear, 0, FALSE); + return handleComputeMonthStart(eyear+1, 0, false) - + handleComputeMonthStart(eyear, 0, false); } int32_t @@ -3696,8 +3696,8 @@ Calendar::getActualMaximum(UCalendarDateFields field, UErrorCode& status) const if(U_FAILURE(status)) return 0; Calendar *cal = clone(); if(!cal) { status = U_MEMORY_ALLOCATION_ERROR; return 0; } - cal->setLenient(TRUE); - cal->prepareGetActual(field,FALSE,status); + cal->setLenient(true); + cal->prepareGetActual(field,false,status); result = handleGetMonthLength(cal->get(UCAL_EXTENDED_YEAR, status), cal->get(UCAL_MONTH, status)); delete cal; } @@ -3708,8 +3708,8 @@ Calendar::getActualMaximum(UCalendarDateFields field, UErrorCode& status) const if(U_FAILURE(status)) return 0; Calendar *cal = clone(); if(!cal) { status = U_MEMORY_ALLOCATION_ERROR; return 0; } - cal->setLenient(TRUE); - cal->prepareGetActual(field,FALSE,status); + cal->setLenient(true); + cal->prepareGetActual(field,false,status); result = handleGetYearLength(cal->get(UCAL_EXTENDED_YEAR, status)); delete cal; } @@ -3841,7 +3841,7 @@ int32_t Calendar::getActualHelper(UCalendarDateFields field, int32_t startValue, // may cause conflict with fields previously set (but not yet resolved). work->complete(status); - work->setLenient(TRUE); + work->setLenient(true); work->prepareGetActual(field, delta < 0, status); // now try each value from the start to the end one by one until @@ -3957,7 +3957,7 @@ Calendar::setWeekData(const Locale& desiredLocale, const char *type, UErrorCode& } char region[ULOC_COUNTRY_CAPACITY]; - (void)ulocimp_getRegionForSupplementalData(desiredLocale.getName(), TRUE, region, sizeof(region), &status); + (void)ulocimp_getRegionForSupplementalData(desiredLocale.getName(), true, region, sizeof(region), &status); // Read week data values from supplementalData week data UResourceBundle *rb = ures_openDirect(NULL, "supplementalData", &status); @@ -4008,10 +4008,10 @@ Calendar::updateTime(UErrorCode& status) // the values. Also, if we haven't set all the fields yet (i.e., // in a newly-created object), we need to fill in the fields. [LIU] if (isLenient() || ! fAreAllFieldsSet) - fAreFieldsSet = FALSE; + fAreFieldsSet = false; - fIsTimeSet = TRUE; - fAreFieldsVirtuallySet = FALSE; + fIsTimeSet = true; + fAreFieldsVirtuallySet = false; } Locale diff --git a/icu4c/source/i18n/casetrn.cpp b/icu4c/source/i18n/casetrn.cpp index bb650f8fa29..a065330cac2 100644 --- a/icu4c/source/i18n/casetrn.cpp +++ b/icu4c/source/i18n/casetrn.cpp @@ -71,13 +71,13 @@ utrans_rep_caseContextIterator(void *context, int8_t dir) c=rep->char32At(csc->index); if(c<0) { csc->limit=csc->index; - csc->b1=TRUE; + csc->b1=true; } else { csc->index+=U16_LENGTH(c); return c; } } else { - csc->b1=TRUE; + csc->b1=true; } } return U_SENTINEL; @@ -170,7 +170,7 @@ void CaseMapTransliterator::handleTransliterate(Replaceable& text, // see UCASE_MAX_STRING_LENGTH if(result<=UCASE_MAX_STRING_LENGTH) { // string s[result] - tmp.setTo(FALSE, s, result); + tmp.setTo(false, s, result); delta=result-U16_LENGTH(c); } else { // single code point diff --git a/icu4c/source/i18n/cecal.cpp b/icu4c/source/i18n/cecal.cpp index cd9871e4d95..60e3d4b2657 100644 --- a/icu4c/source/i18n/cecal.cpp +++ b/icu4c/source/i18n/cecal.cpp @@ -90,19 +90,19 @@ UBool CECalendar::inDaylightTime(UErrorCode& status) const { if (U_FAILURE(status) || !getTimeZone().useDaylightTime()) { - return FALSE; + return false; } // Force an update of the state of the Calendar. ((CECalendar*)this)->complete(status); // cast away const - return (UBool)(U_SUCCESS(status) ? (internalGet(UCAL_DST_OFFSET) != 0) : FALSE); + return (UBool)(U_SUCCESS(status) ? (internalGet(UCAL_DST_OFFSET) != 0) : false); } UBool CECalendar::haveDefaultCentury() const { - return TRUE; + return true; } //------------------------------------------------------------------------- diff --git a/icu4c/source/i18n/chnsecal.cpp b/icu4c/source/i18n/chnsecal.cpp index 678de09611c..e48c90eb5af 100644 --- a/icu4c/source/i18n/chnsecal.cpp +++ b/icu4c/source/i18n/chnsecal.cpp @@ -103,7 +103,7 @@ static UBool calendar_chinese_cleanup(void) { gChineseCalendarZoneAstroCalc = NULL; } gChineseCalendarZoneAstroCalcInitOnce.reset(); - return TRUE; + return true; } U_CDECL_END @@ -124,7 +124,7 @@ ChineseCalendar* ChineseCalendar::clone() const { ChineseCalendar::ChineseCalendar(const Locale& aLocale, UErrorCode& success) : Calendar(TimeZone::forLocaleOrDefault(aLocale), aLocale, success), - isLeapYear(FALSE), + isLeapYear(false), fEpochYear(CHINESE_EPOCH_YEAR), fZoneAstroCalc(getChineseCalZoneAstroCalc()) { @@ -134,7 +134,7 @@ ChineseCalendar::ChineseCalendar(const Locale& aLocale, UErrorCode& success) ChineseCalendar::ChineseCalendar(const Locale& aLocale, int32_t epochYear, const TimeZone* zoneAstroCalc, UErrorCode &success) : Calendar(TimeZone::forLocaleOrDefault(aLocale), aLocale, success), - isLeapYear(FALSE), + isLeapYear(false), fEpochYear(epochYear), fZoneAstroCalc(zoneAstroCalc) { @@ -239,9 +239,9 @@ int32_t ChineseCalendar::handleGetExtendedYear() { * @stable ICU 2.8 */ int32_t ChineseCalendar::handleGetMonthLength(int32_t extendedYear, int32_t month) const { - int32_t thisStart = handleComputeMonthStart(extendedYear, month, TRUE) - + int32_t thisStart = handleComputeMonthStart(extendedYear, month, true) - kEpochStartAsJulianDay + 1; // Julian day -> local days - int32_t nextStart = newMoonNear(thisStart + SYNODIC_GAP, TRUE); + int32_t nextStart = newMoonNear(thisStart + SYNODIC_GAP, true); return nextStart - thisStart; } @@ -267,7 +267,7 @@ void ChineseCalendar::handleComputeFields(int32_t julianDay, UErrorCode &/*statu computeChineseFields(julianDay - kEpochStartAsJulianDay, // local days getGregorianYear(), getGregorianMonth(), - TRUE); // set all fields + true); // set all fields } /** @@ -334,7 +334,7 @@ int32_t ChineseCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, U int32_t gyear = eyear + fEpochYear - 1; // Gregorian year int32_t theNewYear = newYear(gyear); - int32_t newMoon = newMoonNear(theNewYear + month * 29, TRUE); + int32_t newMoon = newMoonNear(theNewYear + month * 29, true); int32_t julianDay = newMoon + kEpochStartAsJulianDay; @@ -352,11 +352,11 @@ int32_t ChineseCalendar::handleComputeMonthStart(int32_t eyear, int32_t month, U // This will modify the MONTH and IS_LEAP_MONTH fields (only) nonConstThis->computeChineseFields(newMoon, getGregorianYear(), - getGregorianMonth(), FALSE); + getGregorianMonth(), false); if (month != internalGet(UCAL_MONTH) || isLeapMonth != internalGet(UCAL_IS_LEAP_MONTH)) { - newMoon = newMoonNear(newMoon + SYNODIC_GAP, TRUE); + newMoon = newMoonNear(newMoon + SYNODIC_GAP, true); julianDay = newMoon + kEpochStartAsJulianDay; } @@ -432,7 +432,7 @@ void ChineseCalendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode // otherwise it will be the start of month 1. int moon1 = moon - (int) (CalendarAstronomer::SYNODIC_MONTH * (m - 0.5)); - moon1 = newMoonNear(moon1, TRUE); + moon1 = newMoonNear(moon1, true); if (isLeapMonthBetween(moon1, moon)) { ++m; } @@ -485,7 +485,7 @@ double ChineseCalendar::daysToMillis(double days) const { if (fZoneAstroCalc != NULL) { int32_t rawOffset, dstOffset; UErrorCode status = U_ZERO_ERROR; - fZoneAstroCalc->getOffset(millis, FALSE, rawOffset, dstOffset, status); + fZoneAstroCalc->getOffset(millis, false, rawOffset, dstOffset, status); if (U_SUCCESS(status)) { return millis - (double)(rawOffset + dstOffset); } @@ -502,7 +502,7 @@ double ChineseCalendar::millisToDays(double millis) const { if (fZoneAstroCalc != NULL) { int32_t rawOffset, dstOffset; UErrorCode status = U_ZERO_ERROR; - fZoneAstroCalc->getOffset(millis, FALSE, rawOffset, dstOffset, status); + fZoneAstroCalc->getOffset(millis, false, rawOffset, dstOffset, status); if (U_SUCCESS(status)) { return ClockMath::floorDivide(millis + (double)(rawOffset + dstOffset), kOneDay); } @@ -541,7 +541,7 @@ int32_t ChineseCalendar::winterSolstice(int32_t gyear) const { ucln_i18n_registerCleanup(UCLN_I18N_CHINESE_CALENDAR, calendar_chinese_cleanup); } gChineseCalendarAstro->setTime(ms); - UDate solarLong = gChineseCalendarAstro->getSunTime(CalendarAstronomer::WINTER_SOLSTICE(), TRUE); + UDate solarLong = gChineseCalendarAstro->getSunTime(CalendarAstronomer::WINTER_SOLSTICE(), true); umtx_unlock(&astroLock); // Winter solstice is 270 degrees solar longitude aka Dongzhi @@ -621,7 +621,7 @@ int32_t ChineseCalendar::majorSolarTerm(int32_t days) const { */ UBool ChineseCalendar::hasNoMajorSolarTerm(int32_t newMoon) const { return majorSolarTerm(newMoon) == - majorSolarTerm(newMoonNear(newMoon + SYNODIC_GAP, TRUE)); + majorSolarTerm(newMoonNear(newMoon + SYNODIC_GAP, true)); } @@ -650,7 +650,7 @@ UBool ChineseCalendar::isLeapMonthBetween(int32_t newMoon1, int32_t newMoon2) co #endif return (newMoon2 >= newMoon1) && - (isLeapMonthBetween(newMoon1, newMoonNear(newMoon2 - SYNODIC_GAP, FALSE)) || + (isLeapMonthBetween(newMoon1, newMoonNear(newMoon2 - SYNODIC_GAP, false)) || hasNoMajorSolarTerm(newMoon2)); } @@ -689,9 +689,9 @@ void ChineseCalendar::computeChineseFields(int32_t days, int32_t gyear, int32_t // Find the start of the month after month 11. This will be either // the prior month 12 or leap month 11 (very rare). Also find the // start of the following month 11. - int32_t firstMoon = newMoonNear(solsticeBefore + 1, TRUE); - int32_t lastMoon = newMoonNear(solsticeAfter + 1, FALSE); - int32_t thisMoon = newMoonNear(days + 1, FALSE); // Start of this month + int32_t firstMoon = newMoonNear(solsticeBefore + 1, true); + int32_t lastMoon = newMoonNear(solsticeAfter + 1, false); + int32_t thisMoon = newMoonNear(days + 1, false); // Start of this month // Note: isLeapYear is a member variable isLeapYear = synodicMonthsBetween(firstMoon, lastMoon) == 12; @@ -705,7 +705,7 @@ void ChineseCalendar::computeChineseFields(int32_t days, int32_t gyear, int32_t UBool isLeapMonth = isLeapYear && hasNoMajorSolarTerm(thisMoon) && - !isLeapMonthBetween(firstMoon, newMoonNear(thisMoon - SYNODIC_GAP, FALSE)); + !isLeapMonthBetween(firstMoon, newMoonNear(thisMoon - SYNODIC_GAP, false)); internalSet(UCAL_MONTH, month-1); // Convert from 1-based to 0-based internalSet(UCAL_IS_LEAP_MONTH, isLeapMonth?1:0); @@ -764,13 +764,13 @@ int32_t ChineseCalendar::newYear(int32_t gyear) const { int32_t solsticeBefore= winterSolstice(gyear - 1); int32_t solsticeAfter = winterSolstice(gyear); - int32_t newMoon1 = newMoonNear(solsticeBefore + 1, TRUE); - int32_t newMoon2 = newMoonNear(newMoon1 + SYNODIC_GAP, TRUE); - int32_t newMoon11 = newMoonNear(solsticeAfter + 1, FALSE); + int32_t newMoon1 = newMoonNear(solsticeBefore + 1, true); + int32_t newMoon2 = newMoonNear(newMoon1 + SYNODIC_GAP, true); + int32_t newMoon11 = newMoonNear(solsticeAfter + 1, false); if (synodicMonthsBetween(newMoon1, newMoon11) == 12 && (hasNoMajorSolarTerm(newMoon1) || hasNoMajorSolarTerm(newMoon2))) { - cacheValue = newMoonNear(newMoon2 + SYNODIC_GAP, TRUE); + cacheValue = newMoonNear(newMoon2 + SYNODIC_GAP, true); } else { cacheValue = newMoon2; } @@ -801,7 +801,7 @@ void ChineseCalendar::offsetMonth(int32_t newMoon, int32_t dom, int32_t delta) { newMoon += (int32_t) (CalendarAstronomer::SYNODIC_MONTH * (delta - 0.5)); // Search forward to the target month's new moon - newMoon = newMoonNear(newMoon, TRUE); + newMoon = newMoonNear(newMoon, true); // Find the target dom int32_t jd = newMoon + kEpochStartAsJulianDay - 1 + dom; @@ -831,12 +831,12 @@ ChineseCalendar::inDaylightTime(UErrorCode& status) const { // copied from GregorianCalendar if (U_FAILURE(status) || !getTimeZone().useDaylightTime()) - return FALSE; + return false; // Force an update of the state of the Calendar. ((ChineseCalendar*)this)->complete(status); // cast away const - return (UBool)(U_SUCCESS(status) ? (internalGet(UCAL_DST_OFFSET) != 0) : FALSE); + return (UBool)(U_SUCCESS(status) ? (internalGet(UCAL_DST_OFFSET) != 0) : false); } // default century @@ -848,7 +848,7 @@ static icu::UInitOnce gSystemDefaultCenturyInitOnce {}; UBool ChineseCalendar::haveDefaultCentury() const { - return TRUE; + return true; } UDate ChineseCalendar::defaultCenturyStart() const diff --git a/icu4c/source/i18n/coleitr.cpp b/icu4c/source/i18n/coleitr.cpp index 48c1da9015a..05039502734 100644 --- a/icu4c/source/i18n/coleitr.cpp +++ b/icu4c/source/i18n/coleitr.cpp @@ -440,7 +440,7 @@ CollationElementIterator::computeMaxExpansions(const CollationData *data, UError uhash_compareLong, &errorCode); if (U_FAILURE(errorCode)) { return NULL; } MaxExpSink sink(maxExpansions, errorCode); - ContractionsAndExpansions(NULL, NULL, &sink, TRUE).forData(data, errorCode); + ContractionsAndExpansions(NULL, NULL, &sink, true).forData(data, errorCode); if (U_FAILURE(errorCode)) { uhash_close(maxExpansions); return NULL; diff --git a/icu4c/source/i18n/coll.cpp b/icu4c/source/i18n/coll.cpp index d14f76c8acf..b22a9d58760 100644 --- a/icu4c/source/i18n/coll.cpp +++ b/icu4c/source/i18n/coll.cpp @@ -87,7 +87,7 @@ static UBool U_CALLCONV collator_cleanup(void) { } availableLocaleListCount = 0; gAvailableLocaleListInitOnce.reset(); - return TRUE; + return true; } U_CDECL_END @@ -109,7 +109,7 @@ CollatorFactory::~CollatorFactory() {} UBool CollatorFactory::visible(void) const { - return TRUE; + return true; } //------------------------------------------- @@ -794,7 +794,7 @@ Collator::unregister(URegistryKey key, UErrorCode& status) } status = U_ILLEGAL_ARGUMENT_ERROR; } - return FALSE; + return false; } #endif /* UCONFIG_NO_SERVICE */ diff --git a/icu4c/source/i18n/collationbuilder.cpp b/icu4c/source/i18n/collationbuilder.cpp index 97de83c6ccf..d7ea4c1cba9 100644 --- a/icu4c/source/i18n/collationbuilder.cpp +++ b/icu4c/source/i18n/collationbuilder.cpp @@ -89,7 +89,7 @@ RuleBasedCollator::RuleBasedCollator() cacheEntry(NULL), validLocale(""), explicitlySetAttributes(0), - actualLocaleIsSameAsValid(FALSE) { + actualLocaleIsSameAsValid(false) { } RuleBasedCollator::RuleBasedCollator(const UnicodeString &rules, UErrorCode &errorCode) @@ -99,7 +99,7 @@ RuleBasedCollator::RuleBasedCollator(const UnicodeString &rules, UErrorCode &err cacheEntry(NULL), validLocale(""), explicitlySetAttributes(0), - actualLocaleIsSameAsValid(FALSE) { + actualLocaleIsSameAsValid(false) { internalBuildTailoring(rules, UCOL_DEFAULT, UCOL_DEFAULT, NULL, NULL, errorCode); } @@ -111,7 +111,7 @@ RuleBasedCollator::RuleBasedCollator(const UnicodeString &rules, ECollationStren cacheEntry(NULL), validLocale(""), explicitlySetAttributes(0), - actualLocaleIsSameAsValid(FALSE) { + actualLocaleIsSameAsValid(false) { internalBuildTailoring(rules, strength, UCOL_DEFAULT, NULL, NULL, errorCode); } @@ -124,7 +124,7 @@ RuleBasedCollator::RuleBasedCollator(const UnicodeString &rules, cacheEntry(NULL), validLocale(""), explicitlySetAttributes(0), - actualLocaleIsSameAsValid(FALSE) { + actualLocaleIsSameAsValid(false) { internalBuildTailoring(rules, UCOL_DEFAULT, decompositionMode, NULL, NULL, errorCode); } @@ -138,7 +138,7 @@ RuleBasedCollator::RuleBasedCollator(const UnicodeString &rules, cacheEntry(NULL), validLocale(""), explicitlySetAttributes(0), - actualLocaleIsSameAsValid(FALSE) { + actualLocaleIsSameAsValid(false) { internalBuildTailoring(rules, strength, decompositionMode, NULL, NULL, errorCode); } @@ -151,7 +151,7 @@ RuleBasedCollator::RuleBasedCollator(const UnicodeString &rules, cacheEntry(NULL), validLocale(""), explicitlySetAttributes(0), - actualLocaleIsSameAsValid(FALSE) { + actualLocaleIsSameAsValid(false) { internalBuildTailoring(rules, UCOL_DEFAULT, UCOL_DEFAULT, &parseError, &reason, errorCode); } @@ -206,7 +206,7 @@ CollationBuilder::CollationBuilder(const CollationTailoring *b, UBool icu4xMode, baseData(b->data), rootElements(b->data->rootElements, b->data->rootElementsLength), variableTop(0), - dataBuilder(new CollationDataBuilder(icu4xMode, errorCode)), fastLatinEnabled(TRUE), + dataBuilder(new CollationDataBuilder(icu4xMode, errorCode)), fastLatinEnabled(true), icu4xMode(icu4xMode), errorReason(NULL), cesLength(0), @@ -227,7 +227,7 @@ CollationBuilder::CollationBuilder(const CollationTailoring *b, UBool icu4xMode, } CollationBuilder::CollationBuilder(const CollationTailoring *b, UErrorCode &errorCode) - : CollationBuilder(b, FALSE, errorCode) + : CollationBuilder(b, false, errorCode) {} CollationBuilder::~CollationBuilder() { @@ -493,7 +493,7 @@ CollationBuilder::getSpecialResetPosition(const UnicodeString &str, U_ASSERT(str.length() == 2); int64_t ce; int32_t strength = UCOL_PRIMARY; - UBool isBoundary = FALSE; + UBool isBoundary = false; UChar32 pos = str.charAt(1) - CollationRuleParser::POS_BASE; U_ASSERT(0 <= pos && pos <= CollationRuleParser::LAST_TRAILING); switch(pos) { @@ -553,14 +553,14 @@ CollationBuilder::getSpecialResetPosition(const UnicodeString &str, break; case CollationRuleParser::FIRST_VARIABLE: ce = rootElements.getFirstPrimaryCE(); - isBoundary = TRUE; // FractionalUCA.txt: FDD1 00A0, SPACE first primary + isBoundary = true; // FractionalUCA.txt: FDD1 00A0, SPACE first primary break; case CollationRuleParser::LAST_VARIABLE: ce = rootElements.lastCEWithPrimaryBefore(variableTop + 1); break; case CollationRuleParser::FIRST_REGULAR: ce = rootElements.firstCEWithPrimaryAtLeast(variableTop + 1); - isBoundary = TRUE; // FractionalUCA.txt: FDD1 263A, SYMBOL first primary + isBoundary = true; // FractionalUCA.txt: FDD1 263A, SYMBOL first primary break; case CollationRuleParser::LAST_REGULAR: // Use the Hani-first-primary rather than the actual last "regular" CE before it, @@ -579,7 +579,7 @@ CollationBuilder::getSpecialResetPosition(const UnicodeString &str, return 0; case CollationRuleParser::FIRST_TRAILING: ce = Collation::makeCE(Collation::FIRST_TRAILING_PRIMARY); - isBoundary = TRUE; // trailing first primary (there is no mapping for it) + isBoundary = true; // trailing first primary (there is no mapping for it) break; case CollationRuleParser::LAST_TRAILING: errorCode = U_ILLEGAL_ARGUMENT_ERROR; @@ -1038,7 +1038,7 @@ CollationBuilder::setCaseBits(const UnicodeString &nfdString, int64_t cases = 0; if(numTailoredPrimaries > 0) { const UChar *s = nfdString.getBuffer(); - UTF16CollationIterator baseCEs(baseData, FALSE, s, s, s + nfdString.length()); + UTF16CollationIterator baseCEs(baseData, false, s, s, s + nfdString.length()); int32_t baseCEsLength = baseCEs.fetchCEs(errorCode) - 1; if(U_FAILURE(errorCode)) { parserErrorReason = "fetching root CEs for tailored string"; @@ -1230,18 +1230,18 @@ CollationBuilder::mergeCompositeIntoString(const UnicodeString &nfdString, UChar32 composite, const UnicodeString &decomp, UnicodeString &newNFDString, UnicodeString &newString, UErrorCode &errorCode) const { - if(U_FAILURE(errorCode)) { return FALSE; } + if(U_FAILURE(errorCode)) { return false; } U_ASSERT(nfdString.char32At(indexAfterLastStarter - 1) == decomp.char32At(0)); int32_t lastStarterLength = decomp.moveIndex32(0, 1); if(lastStarterLength == decomp.length()) { // Singleton decompositions should be found by addWithClosure() // and the CanonicalIterator, so we can ignore them here. - return FALSE; + return false; } if(nfdString.compare(indexAfterLastStarter, 0x7fffffff, decomp, lastStarterLength, 0x7fffffff) == 0) { // same strings, nothing new to be found here - return FALSE; + return false; } // Make new FCD strings that combine a composite, or its decomposition, @@ -1251,7 +1251,7 @@ CollationBuilder::mergeCompositeIntoString(const UnicodeString &nfdString, newString.setTo(nfdString, 0, indexAfterLastStarter - lastStarterLength).append(composite); // The following is related to discontiguous contraction matching, - // but builds only FCD strings (or else returns FALSE). + // but builds only FCD strings (or else returns false). int32_t sourceIndex = indexAfterLastStarter; int32_t decompIndex = lastStarterLength; // Small optimization: We keep the source character across loop iterations @@ -1278,16 +1278,16 @@ CollationBuilder::mergeCompositeIntoString(const UnicodeString &nfdString, // Unable to merge because the source contains a non-zero combining mark // but the composite's decomposition contains another starter. // The strings would not be equivalent. - return FALSE; + return false; } else if(sourceCC < decompCC) { // Composite + sourceChar would not be FCD. - return FALSE; + return false; } else if(decompCC < sourceCC) { newNFDString.append(decompChar); decompIndex += U16_LENGTH(decompChar); } else if(decompChar != sourceChar) { // Blocked because same combining class. - return FALSE; + return false; } else { // match: decompChar == sourceChar newNFDString.append(decompChar); decompIndex += U16_LENGTH(decompChar); @@ -1299,7 +1299,7 @@ CollationBuilder::mergeCompositeIntoString(const UnicodeString &nfdString, if(sourceChar >= 0) { // more characters from nfdString but not from decomp if(sourceCC < decompCC) { // Appending the next source character to the composite would not be FCD. - return FALSE; + return false; } newNFDString.append(nfdString, sourceIndex, 0x7fffffff); newString.append(nfdString, sourceIndex, 0x7fffffff); @@ -1309,7 +1309,7 @@ CollationBuilder::mergeCompositeIntoString(const UnicodeString &nfdString, U_ASSERT(nfd.isNormalized(newNFDString, errorCode)); U_ASSERT(fcd.isNormalized(newString, errorCode)); U_ASSERT(nfd.normalize(newString, errorCode) == newNFDString); // canonically equivalent - return TRUE; + return true; } UBool @@ -1374,13 +1374,13 @@ UBool CollationBuilder::sameCEs(const int64_t ces1[], int32_t ces1Length, const int64_t ces2[], int32_t ces2Length) { if(ces1Length != ces2Length) { - return FALSE; + return false; } U_ASSERT(ces1Length <= Collation::MAX_EXPANSION_LENGTH); for(int32_t i = 0; i < ces1Length; ++i) { - if(ces1[i] != ces2[i]) { return FALSE; } + if(ces1[i] != ces2[i]) { return false; } } - return TRUE; + return true; } #ifdef DEBUG_COLLATION_BUILDER @@ -1412,9 +1412,9 @@ CollationBuilder::makeTailoredCEs(UErrorCode &errorCode) { uint32_t s = p == 0 ? 0 : Collation::COMMON_WEIGHT16; uint32_t t = s; uint32_t q = 0; - UBool pIsTailored = FALSE; - UBool sIsTailored = FALSE; - UBool tIsTailored = FALSE; + UBool pIsTailored = false; + UBool sIsTailored = false; + UBool tIsTailored = false; #ifdef DEBUG_COLLATION_BUILDER printf("\nprimary %lx\n", (long)alignWeightRight(p)); #endif @@ -1468,13 +1468,13 @@ CollationBuilder::makeTailoredCEs(UErrorCode &errorCode) { errorReason = "tertiary tailoring gap too small"; return; } - tIsTailored = TRUE; + tIsTailored = true; } t = tertiaries.nextWeight(); U_ASSERT(t != 0xffffffff); } else { t = weight16FromNode(node); - tIsTailored = FALSE; + tIsTailored = false; #ifdef DEBUG_COLLATION_BUILDER printf(" ter %lx\n", (long)alignWeightRight(t)); #endif @@ -1520,13 +1520,13 @@ CollationBuilder::makeTailoredCEs(UErrorCode &errorCode) { #endif return; } - sIsTailored = TRUE; + sIsTailored = true; } s = secondaries.nextWeight(); U_ASSERT(s != 0xffffffff); } else { s = weight16FromNode(node); - sIsTailored = FALSE; + sIsTailored = false; #ifdef DEBUG_COLLATION_BUILDER printf(" sec %lx\n", (long)alignWeightRight(s)); #endif @@ -1549,15 +1549,15 @@ CollationBuilder::makeTailoredCEs(UErrorCode &errorCode) { errorReason = "primary tailoring gap too small"; return; } - pIsTailored = TRUE; + pIsTailored = true; } p = primaries.nextWeight(); U_ASSERT(p != 0xffffffff); s = Collation::COMMON_WEIGHT16; - sIsTailored = FALSE; + sIsTailored = false; } t = s == 0 ? 0 : Collation::COMMON_WEIGHT16; - tIsTailored = FALSE; + tIsTailored = false; } q = 0; } @@ -1703,7 +1703,7 @@ ucol_getUnsafeSet( const UCollator *coll, USet *contractions = uset_open(0,0); int32_t i = 0, j = 0; - ucol_getContractionsAndExpansions(coll, contractions, NULL, FALSE, status); + ucol_getContractionsAndExpansions(coll, contractions, NULL, false, status); int32_t contsSize = uset_size(contractions); UChar32 c = 0; // Contraction set consists only of strings diff --git a/icu4c/source/i18n/collationcompare.cpp b/icu4c/source/i18n/collationcompare.cpp index cbf32c9fe68..d9048afc279 100644 --- a/icu4c/source/i18n/collationcompare.cpp +++ b/icu4c/source/i18n/collationcompare.cpp @@ -39,7 +39,7 @@ CollationCompare::compareUpToQuaternary(CollationIterator &left, CollationIterat // +1 so that we can use "<" and primary ignorables test out early. variableTop = settings.variableTop + 1; } - UBool anyVariable = FALSE; + UBool anyVariable = false; // Fetch CEs, compare primaries, store secondary & tertiary weights. for(;;) { @@ -51,7 +51,7 @@ CollationCompare::compareUpToQuaternary(CollationIterator &left, CollationIterat if(leftPrimary < variableTop && leftPrimary > Collation::MERGE_SEPARATOR_PRIMARY) { // Variable CE, shift it to quaternary level. // Ignore all following primary ignorables, and shift further variable CEs. - anyVariable = TRUE; + anyVariable = true; do { // Store only the primary of the variable CE. left.setCurrentCE(ce & INT64_C(0xffffffff00000000)); @@ -76,7 +76,7 @@ CollationCompare::compareUpToQuaternary(CollationIterator &left, CollationIterat if(rightPrimary < variableTop && rightPrimary > Collation::MERGE_SEPARATOR_PRIMARY) { // Variable CE, shift it to quaternary level. // Ignore all following primary ignorables, and shift further variable CEs. - anyVariable = TRUE; + anyVariable = true; do { // Store only the primary of the variable CE. right.setCurrentCE(ce & INT64_C(0xffffffff00000000)); diff --git a/icu4c/source/i18n/collationdata.cpp b/icu4c/source/i18n/collationdata.cpp index 688770f8f62..1b8b6a76de3 100644 --- a/icu4c/source/i18n/collationdata.cpp +++ b/icu4c/source/i18n/collationdata.cpp @@ -205,7 +205,7 @@ CollationData::getEquivalentScripts(int32_t script, void CollationData::makeReorderRanges(const int32_t *reorder, int32_t length, UVector32 &ranges, UErrorCode &errorCode) const { - makeReorderRanges(reorder, length, FALSE, ranges, errorCode); + makeReorderRanges(reorder, length, false, ranges, errorCode); } void @@ -277,12 +277,12 @@ CollationData::makeReorderRanges(const int32_t *reorder, int32_t length, // Reorder according to the input scripts, continuing from the bottom of the primary range. int32_t originalLength = length; // length will be decremented if "others" is in the list. - UBool hasReorderToEnd = FALSE; + UBool hasReorderToEnd = false; for(int32_t i = 0; i < length;) { int32_t script = reorder[i++]; if(script == USCRIPT_UNKNOWN) { // Put the remaining scripts at the top. - hasReorderToEnd = TRUE; + hasReorderToEnd = true; while(i < length) { script = reorder[--length]; if(script == USCRIPT_UNKNOWN || // Must occur at most once. @@ -329,7 +329,7 @@ CollationData::makeReorderRanges(const int32_t *reorder, int32_t length, if(lowStart > highLimit) { if((lowStart - (skippedReserved & 0xff00)) <= highLimit) { // Try not skipping the before-Latin reserved range. - makeReorderRanges(reorder, originalLength, TRUE, ranges, errorCode); + makeReorderRanges(reorder, originalLength, true, ranges, errorCode); return; } // We need more primary lead bytes than available, despite the reserved ranges. diff --git a/icu4c/source/i18n/collationdatabuilder.cpp b/icu4c/source/i18n/collationdatabuilder.cpp index a28e5aec972..c9a4a32e838 100644 --- a/icu4c/source/i18n/collationdatabuilder.cpp +++ b/icu4c/source/i18n/collationdatabuilder.cpp @@ -164,7 +164,7 @@ protected: }; DataBuilderCollationIterator::DataBuilderCollationIterator(CollationDataBuilder &b) - : CollationIterator(&builderData, /*numeric=*/ FALSE), + : CollationIterator(&builderData, /*numeric=*/ false), builder(b), builderData(b.nfcImpl), s(NULL), pos(0) { builderData.base = builder.base; @@ -204,7 +204,7 @@ DataBuilderCollationIterator::fetchCEs(const UnicodeString &str, int32_t start, } else { d = &builderData; } - appendCEsFromCE32(d, c, ce32, /*forward=*/ TRUE, errorCode); + appendCEsFromCE32(d, c, ce32, /*forward=*/ true, errorCode); U_ASSERT(U_SUCCESS(errorCode)); for(int32_t i = 0; i < getCEsLength(); ++i) { int64_t ce = getCE(i); @@ -301,9 +301,9 @@ CollationDataBuilder::CollationDataBuilder(UBool icu4xMode, UErrorCode &errorCod base(NULL), baseSettings(NULL), trie(NULL), ce32s(errorCode), ce64s(errorCode), conditionalCE32s(errorCode), - modified(FALSE), + modified(false), icu4xMode(icu4xMode), - fastLatinEnabled(FALSE), fastLatinBuilder(NULL), + fastLatinEnabled(false), fastLatinBuilder(NULL), collIter(NULL) { // Reserve the first CE32 for U+0000. if (!icu4xMode) { @@ -351,7 +351,7 @@ CollationDataBuilder::initForTailoring(const CollationData *b, UErrorCode &error // Do this here, rather than in buildMappings(), // so that we see the HANGUL_TAG in various assertions. uint32_t hangulCE32 = Collation::makeCE32FromTagAndIndex(Collation::HANGUL_TAG, 0); - utrie2_setRange32(trie, Hangul::HANGUL_BASE, Hangul::HANGUL_END, hangulCE32, TRUE, &errorCode); + utrie2_setRange32(trie, Hangul::HANGUL_BASE, Hangul::HANGUL_END, hangulCE32, true, &errorCode); // Copy the set contents but don't copy/clone the set as a whole because // that would copy the isFrozen state too. @@ -365,7 +365,7 @@ UBool CollationDataBuilder::maybeSetPrimaryRange(UChar32 start, UChar32 end, uint32_t primary, int32_t step, UErrorCode &errorCode) { - if(U_FAILURE(errorCode)) { return FALSE; } + if(U_FAILURE(errorCode)) { return false; } U_ASSERT(start <= end); // TODO: Do we need to check what values are currently set for start..end? // An offset range is worth it only if we can achieve an overlap between @@ -390,11 +390,11 @@ CollationDataBuilder::maybeSetPrimaryRange(UChar32 start, UChar32 end, return 0; } uint32_t offsetCE32 = Collation::makeCE32FromTagAndIndex(Collation::OFFSET_TAG, index); - utrie2_setRange32(trie, start, end, offsetCE32, TRUE, &errorCode); - modified = TRUE; - return TRUE; + utrie2_setRange32(trie, start, end, offsetCE32, true, &errorCode); + modified = true; + return true; } else { - return FALSE; + return false; } } @@ -415,7 +415,7 @@ CollationDataBuilder::setPrimaryRangeAndReturnNext(UChar32 start, UChar32 end, primary = Collation::incThreeBytePrimaryByOffset(primary, isCompressible, step); if(start > end) { return primary; } } - modified = TRUE; + modified = true; } } @@ -451,10 +451,10 @@ int64_t CollationDataBuilder::getSingleCE(UChar32 c, UErrorCode &errorCode) const { if(U_FAILURE(errorCode)) { return 0; } // Keep parallel with CollationData::getSingleCE(). - UBool fromBase = FALSE; + UBool fromBase = false; uint32_t ce32 = utrie2_get32(trie, c); if(ce32 == Collation::FALLBACK_CE32) { - fromBase = TRUE; + fromBase = true; ce32 = base->getCE32(c); } while(Collation::isSpecialCE32(ce32)) { @@ -673,7 +673,7 @@ CollationDataBuilder::addCE32(const UnicodeString &prefix, const UnicodeString & // Otherwise we just override the base mapping. uint32_t baseCE32 = base->getFinalCE32(base->getCE32(c)); if(hasContext || Collation::ce32HasContext(baseCE32)) { - oldCE32 = copyFromBaseCE32(c, baseCE32, TRUE, errorCode); + oldCE32 = copyFromBaseCE32(c, baseCE32, true, errorCode); utrie2_set32(trie, c, oldCE32, &errorCode); if(U_FAILURE(errorCode)) { return; } } @@ -733,7 +733,7 @@ CollationDataBuilder::addCE32(const UnicodeString &prefix, const UnicodeString & cond = nextCond; } } - modified = TRUE; + modified = true; } uint32_t @@ -917,7 +917,7 @@ CollationDataBuilder::copyFromBaseCE32(UChar32 c, uint32_t ce32, UBool withConte const UChar *p = base->contexts + Collation::indexFromCE32(ce32); ce32 = CollationData::readCE32(p); // Default if no prefix match. if(!withContext) { - return copyFromBaseCE32(c, ce32, FALSE, errorCode); + return copyFromBaseCE32(c, ce32, false, errorCode); } ConditionalCE32 head; UnicodeString context((UChar)0); @@ -925,7 +925,7 @@ CollationDataBuilder::copyFromBaseCE32(UChar32 c, uint32_t ce32, UBool withConte if(Collation::isContractionCE32(ce32)) { index = copyContractionsFromBaseCE32(context, c, ce32, &head, errorCode); } else { - ce32 = copyFromBaseCE32(c, ce32, TRUE, errorCode); + ce32 = copyFromBaseCE32(c, ce32, true, errorCode); head.next = index = addConditionalCE32(context, ce32, errorCode); } if(U_FAILURE(errorCode)) { return 0; } @@ -939,7 +939,7 @@ CollationDataBuilder::copyFromBaseCE32(UChar32 c, uint32_t ce32, UBool withConte if(Collation::isContractionCE32(ce32)) { index = copyContractionsFromBaseCE32(context, c, ce32, cond, errorCode); } else { - ce32 = copyFromBaseCE32(c, ce32, TRUE, errorCode); + ce32 = copyFromBaseCE32(c, ce32, true, errorCode); cond->next = index = addConditionalCE32(context, ce32, errorCode); } if(U_FAILURE(errorCode)) { return 0; } @@ -953,7 +953,7 @@ CollationDataBuilder::copyFromBaseCE32(UChar32 c, uint32_t ce32, UBool withConte if(!withContext) { const UChar *p = base->contexts + Collation::indexFromCE32(ce32); ce32 = CollationData::readCE32(p); // Default if no suffix match. - return copyFromBaseCE32(c, ce32, FALSE, errorCode); + return copyFromBaseCE32(c, ce32, false, errorCode); } ConditionalCE32 head; UnicodeString context((UChar)0); @@ -966,7 +966,7 @@ CollationDataBuilder::copyFromBaseCE32(UChar32 c, uint32_t ce32, UBool withConte errorCode = U_UNSUPPORTED_ERROR; // We forbid tailoring of Hangul syllables. break; case Collation::OFFSET_TAG: - ce32 = getCE32FromOffsetCE32(TRUE, c, ce32); + ce32 = getCE32FromOffsetCE32(true, c, ce32); break; case Collation::IMPLICIT_TAG: ce32 = encodeOneCE(Collation::unassignedCEFromCodePoint(c), errorCode); @@ -992,7 +992,7 @@ CollationDataBuilder::copyContractionsFromBaseCE32(UnicodeString &context, UChar } else { ce32 = CollationData::readCE32(p); // Default if no suffix match. U_ASSERT(!Collation::isContractionCE32(ce32)); - ce32 = copyFromBaseCE32(c, ce32, TRUE, errorCode); + ce32 = copyFromBaseCE32(c, ce32, true, errorCode); cond->next = index = addConditionalCE32(context, ce32, errorCode); if(U_FAILURE(errorCode)) { return 0; } cond = getConditionalCE32(index); @@ -1002,7 +1002,7 @@ CollationDataBuilder::copyContractionsFromBaseCE32(UnicodeString &context, UChar UCharsTrie::Iterator suffixes(p + 2, 0, errorCode); while(suffixes.next(errorCode)) { context.append(suffixes.getString()); - ce32 = copyFromBaseCE32(c, (uint32_t)suffixes.getValue(), TRUE, errorCode); + ce32 = copyFromBaseCE32(c, (uint32_t)suffixes.getValue(), true, errorCode); cond->next = index = addConditionalCE32(context, ce32, errorCode); if(U_FAILURE(errorCode)) { return 0; } // No need to update the unsafeBackwardSet because the tailoring set @@ -1023,7 +1023,7 @@ public: UBool copyRangeCE32(UChar32 start, UChar32 end, uint32_t ce32) { ce32 = copyCE32(ce32); - utrie2_setRange32(dest.trie, start, end, ce32, TRUE, &errorCode); + utrie2_setRange32(dest.trie, start, end, ce32, true, &errorCode); if(CollationDataBuilder::isBuilderContextCE32(ce32)) { dest.contextChars.add(start, end); } @@ -1044,7 +1044,7 @@ public: int32_t length = Collation::lengthFromCE32(ce32); // Inspect the source CE32s. Just copy them if none are modified. // Otherwise copy to modifiedCEs, with modifications. - UBool isModified = FALSE; + UBool isModified = false; for(int32_t i = 0; i < length; ++i) { ce32 = srcCE32s[i]; int64_t ce; @@ -1058,7 +1058,7 @@ public: for(int32_t j = 0; j < i; ++j) { modifiedCEs[j] = Collation::ceFromCE32(srcCE32s[j]); } - isModified = TRUE; + isModified = true; } modifiedCEs[i] = ce; } @@ -1075,7 +1075,7 @@ public: int32_t length = Collation::lengthFromCE32(ce32); // Inspect the source CEs. Just copy them if none are modified. // Otherwise copy to modifiedCEs, with modifications. - UBool isModified = FALSE; + UBool isModified = false; for(int32_t i = 0; i < length; ++i) { int64_t srcCE = srcCEs[i]; int64_t ce = modifier.modifyCE(srcCE); @@ -1088,7 +1088,7 @@ public: for(int32_t j = 0; j < i; ++j) { modifiedCEs[j] = srcCEs[j]; } - isModified = TRUE; + isModified = true; } modifiedCEs[i] = ce; } @@ -1170,11 +1170,11 @@ CollationDataBuilder::optimize(const UnicodeSet &set, UErrorCode &errorCode) { uint32_t ce32 = utrie2_get32(trie, c); if(ce32 == Collation::FALLBACK_CE32) { ce32 = base->getFinalCE32(base->getCE32(c)); - ce32 = copyFromBaseCE32(c, ce32, TRUE, errorCode); + ce32 = copyFromBaseCE32(c, ce32, true, errorCode); utrie2_set32(trie, c, ce32, &errorCode); } } - modified = TRUE; + modified = true; } void @@ -1187,7 +1187,7 @@ CollationDataBuilder::suppressContractions(const UnicodeSet &set, UErrorCode &er if(ce32 == Collation::FALLBACK_CE32) { ce32 = base->getFinalCE32(base->getCE32(c)); if(Collation::ce32HasContext(ce32)) { - ce32 = copyFromBaseCE32(c, ce32, FALSE /* without context */, errorCode); + ce32 = copyFromBaseCE32(c, ce32, false /* without context */, errorCode); utrie2_set32(trie, c, ce32, &errorCode); } } else if(isBuilderContextCE32(ce32)) { @@ -1199,23 +1199,23 @@ CollationDataBuilder::suppressContractions(const UnicodeSet &set, UErrorCode &er contextChars.remove(c); } } - modified = TRUE; + modified = true; } UBool CollationDataBuilder::getJamoCE32s(uint32_t jamoCE32s[], UErrorCode &errorCode) { - if(U_FAILURE(errorCode)) { return FALSE; } + if(U_FAILURE(errorCode)) { return false; } UBool anyJamoAssigned = base == NULL; // always set jamoCE32s in the base data - UBool needToCopyFromBase = FALSE; + UBool needToCopyFromBase = false; for(int32_t j = 0; j < CollationData::JAMO_CE32S_LENGTH; ++j) { // Count across Jamo types. UChar32 jamo = jamoCpFromIndex(j); - UBool fromBase = FALSE; + UBool fromBase = false; uint32_t ce32 = utrie2_get32(trie, jamo); anyJamoAssigned |= Collation::isAssignedCE32(ce32); // TODO: Try to prevent [optimize [Jamo]] from counting as anyJamoAssigned. // (As of CLDR 24 [2013] the Korean tailoring does not optimize conjoining Jamo.) if(ce32 == Collation::FALLBACK_CE32) { - fromBase = TRUE; + fromBase = true; ce32 = base->getCE32(jamo); } if(Collation::isSpecialCE32(ce32)) { @@ -1232,14 +1232,14 @@ CollationDataBuilder::getJamoCE32s(uint32_t jamoCE32s[], UErrorCode &errorCode) if(fromBase) { // Defer copying until we know if anyJamoAssigned. ce32 = Collation::FALLBACK_CE32; - needToCopyFromBase = TRUE; + needToCopyFromBase = true; } break; case Collation::IMPLICIT_TAG: // An unassigned Jamo should only occur in tests with incomplete bases. U_ASSERT(fromBase); ce32 = Collation::FALLBACK_CE32; - needToCopyFromBase = TRUE; + needToCopyFromBase = true; break; case Collation::OFFSET_TAG: ce32 = getCE32FromOffsetCE32(fromBase, jamo, ce32); @@ -1252,7 +1252,7 @@ CollationDataBuilder::getJamoCE32s(uint32_t jamoCE32s[], UErrorCode &errorCode) case Collation::HANGUL_TAG: case Collation::LEAD_SURROGATE_TAG: errorCode = U_INTERNAL_PROGRAM_ERROR; - return FALSE; + return false; } } jamoCE32s[j] = ce32; @@ -1262,7 +1262,7 @@ CollationDataBuilder::getJamoCE32s(uint32_t jamoCE32s[], UErrorCode &errorCode) if(jamoCE32s[j] == Collation::FALLBACK_CE32) { UChar32 jamo = jamoCpFromIndex(j); jamoCE32s[j] = copyFromBaseCE32(jamo, base->getCE32(jamo), - /*withContext=*/ TRUE, errorCode); + /*withContext=*/ true, errorCode); } } } @@ -1303,15 +1303,15 @@ enumRangeLeadValue(const void *context, UChar32 /*start*/, UChar32 /*end*/, uint value = Collation::LEAD_ALL_FALLBACK; } else { *pValue = Collation::LEAD_MIXED; - return FALSE; + return false; } if(*pValue < 0) { *pValue = (int32_t)value; } else if(*pValue != (int32_t)value) { *pValue = Collation::LEAD_MIXED; - return FALSE; + return false; } - return TRUE; + return true; } U_CDECL_END @@ -1366,10 +1366,10 @@ CollationDataBuilder::buildMappings(CollationData &data, UErrorCode &errorCode) // In order to still have good trie compression and keep this code simple, // we only set this flag if a whole block of 588 Hangul syllables starting with // a common leading consonant (Jamo L) has this property. - UBool isAnyJamoVTSpecial = FALSE; + UBool isAnyJamoVTSpecial = false; for(int32_t i = Hangul::JAMO_L_COUNT; i < CollationData::JAMO_CE32S_LENGTH; ++i) { if(Collation::isSpecialCE32(jamoCE32s[i])) { - isAnyJamoVTSpecial = TRUE; + isAnyJamoVTSpecial = true; break; } } @@ -1381,7 +1381,7 @@ CollationDataBuilder::buildMappings(CollationData &data, UErrorCode &errorCode) ce32 |= Collation::HANGUL_NO_SPECIAL_JAMO; } UChar32 limit = c + Hangul::JAMO_VT_COUNT; - utrie2_setRange32(trie, c, limit - 1, ce32, TRUE, &errorCode); + utrie2_setRange32(trie, c, limit - 1, ce32, true, &errorCode); c = limit; } } else { @@ -1391,7 +1391,7 @@ CollationDataBuilder::buildMappings(CollationData &data, UErrorCode &errorCode) uint32_t ce32 = base->getCE32(c); U_ASSERT(Collation::hasCE32Tag(ce32, Collation::HANGUL_TAG)); UChar32 limit = c + Hangul::JAMO_VT_COUNT; - utrie2_setRange32(trie, c, limit - 1, ce32, TRUE, &errorCode); + utrie2_setRange32(trie, c, limit - 1, ce32, true, &errorCode); c = limit; } } diff --git a/icu4c/source/i18n/collationdatareader.cpp b/icu4c/source/i18n/collationdatareader.cpp index c7ab04cdf2e..a96982cd946 100644 --- a/icu4c/source/i18n/collationdatareader.cpp +++ b/icu4c/source/i18n/collationdatareader.cpp @@ -471,9 +471,9 @@ CollationDataReader::isAcceptable(void *context, if(version != NULL) { uprv_memcpy(version, pInfo->dataVersion, 4); } - return TRUE; + return true; } else { - return FALSE; + return false; } } diff --git a/icu4c/source/i18n/collationdatawriter.cpp b/icu4c/source/i18n/collationdatawriter.cpp index 823c8eb0111..b4be7df8878 100644 --- a/icu4c/source/i18n/collationdatawriter.cpp +++ b/icu4c/source/i18n/collationdatawriter.cpp @@ -79,7 +79,7 @@ CollationDataWriter::writeBase(const CollationData &data, const CollationSetting const void *rootElements, int32_t rootElementsLength, int32_t indexes[], uint8_t *dest, int32_t capacity, UErrorCode &errorCode) { - return write(TRUE, NULL, + return write(true, NULL, data, settings, rootElements, rootElementsLength, indexes, dest, capacity, errorCode); @@ -89,7 +89,7 @@ int32_t CollationDataWriter::writeTailoring(const CollationTailoring &t, const CollationSettings &settings, int32_t indexes[], uint8_t *dest, int32_t capacity, UErrorCode &errorCode) { - return write(FALSE, t.version, + return write(false, t.version, *t.data, settings, NULL, 0, indexes, dest, capacity, errorCode); @@ -129,11 +129,11 @@ CollationDataWriter::write(UBool isBase, const UVersionInfo dataVersion, // so that we start with an 8-aligned offset. indexesLength = CollationDataReader::IX_TOTAL_SIZE + 1; U_ASSERT(settings.reorderCodesLength == 0); - hasMappings = TRUE; + hasMappings = true; unsafeBackwardSet = *data.unsafeBackwardSet; fastLatinTableLength = data.fastLatinTableLength; } else if(baseData == NULL) { - hasMappings = FALSE; + hasMappings = false; if(settings.reorderCodesLength == 0) { // only options indexesLength = CollationDataReader::IX_OPTIONS + 1; // no limit offset here @@ -142,7 +142,7 @@ CollationDataWriter::write(UBool isBase, const UVersionInfo dataVersion, indexesLength = CollationDataReader::IX_REORDER_TABLE_OFFSET + 2; } } else { - hasMappings = TRUE; + hasMappings = true; // Tailored mappings, and what else? // Check in ascending order of optional tailoring data items. indexesLength = CollationDataReader::IX_CE32S_OFFSET + 2; diff --git a/icu4c/source/i18n/collationfastlatin.cpp b/icu4c/source/i18n/collationfastlatin.cpp index b98b8457f45..35cf60e8151 100644 --- a/icu4c/source/i18n/collationfastlatin.cpp +++ b/icu4c/source/i18n/collationfastlatin.cpp @@ -45,7 +45,7 @@ CollationFastLatin::getOptions(const CollationData *data, const CollationSetting miniVarTop = table[i]; } - UBool digitsAreReordered = FALSE; + UBool digitsAreReordered = false; if(settings.hasReordering()) { uint32_t prevStart = 0; uint32_t beforeDigitStart = 0; @@ -80,7 +80,7 @@ CollationFastLatin::getOptions(const CollationData *data, const CollationSetting afterDigitStart = latinStart; } if(!(beforeDigitStart < digitStart && digitStart < afterDigitStart)) { - digitsAreReordered = TRUE; + digitsAreReordered = true; } } diff --git a/icu4c/source/i18n/collationfastlatinbuilder.cpp b/icu4c/source/i18n/collationfastlatinbuilder.cpp index e5ba2f0e21d..fc50e9df8ed 100644 --- a/icu4c/source/i18n/collationfastlatinbuilder.cpp +++ b/icu4c/source/i18n/collationfastlatinbuilder.cpp @@ -91,7 +91,7 @@ CollationFastLatinBuilder::CollationFastLatinBuilder(UErrorCode &errorCode) contractionCEs(errorCode), uniqueCEs(errorCode), miniCEs(NULL), firstDigitPrimary(0), firstLatinPrimary(0), lastLatinPrimary(0), - firstShortPrimary(0), shortPrimaryOverflow(FALSE), + firstShortPrimary(0), shortPrimaryOverflow(false), headerLength(0) { } @@ -101,24 +101,24 @@ CollationFastLatinBuilder::~CollationFastLatinBuilder() { UBool CollationFastLatinBuilder::forData(const CollationData &data, UErrorCode &errorCode) { - if(U_FAILURE(errorCode)) { return FALSE; } + if(U_FAILURE(errorCode)) { return false; } if(!result.isEmpty()) { // This builder is not reusable. errorCode = U_INVALID_STATE_ERROR; - return FALSE; + return false; } - if(!loadGroups(data, errorCode)) { return FALSE; } + if(!loadGroups(data, errorCode)) { return false; } // Fast handling of digits. firstShortPrimary = firstDigitPrimary; getCEs(data, errorCode); - if(!encodeUniqueCEs(errorCode)) { return FALSE; } + if(!encodeUniqueCEs(errorCode)) { return false; } if(shortPrimaryOverflow) { // Give digits long mini primaries, // so that there are more short primaries for letters. firstShortPrimary = firstLatinPrimary; resetCEs(); getCEs(data, errorCode); - if(!encodeUniqueCEs(errorCode)) { return FALSE; } + if(!encodeUniqueCEs(errorCode)) { return false; } } // Note: If we still have a short-primary overflow but not a long-primary overflow, // then we could calculate how many more long primaries would fit, @@ -126,7 +126,7 @@ CollationFastLatinBuilder::forData(const CollationData &data, UErrorCode &errorC // and try again. // However, this might only benefit the en_US_POSIX tailoring, // and it is simpler to suppress building fast Latin data for it in genrb, - // or by returning FALSE here if shortPrimaryOverflow. + // or by returning false here if shortPrimaryOverflow. UBool ok = !shortPrimaryOverflow && encodeCharCEs(errorCode) && encodeContractions(errorCode); @@ -137,7 +137,7 @@ CollationFastLatinBuilder::forData(const CollationData &data, UErrorCode &errorC UBool CollationFastLatinBuilder::loadGroups(const CollationData &data, UErrorCode &errorCode) { - if(U_FAILURE(errorCode)) { return FALSE; } + if(U_FAILURE(errorCode)) { return false; } headerLength = 1 + NUM_SPECIAL_GROUPS; uint32_t r0 = (CollationFastLatin::VERSION << 8) | headerLength; result.append((UChar)r0); @@ -147,7 +147,7 @@ CollationFastLatinBuilder::loadGroups(const CollationData &data, UErrorCode &err lastSpecialPrimaries[i] = data.getLastPrimaryForGroup(UCOL_REORDER_CODE_FIRST + i); if(lastSpecialPrimaries[i] == 0) { // missing data - return FALSE; + return false; } result.append((UChar)0); // reserve a slot for this group } @@ -157,9 +157,9 @@ CollationFastLatinBuilder::loadGroups(const CollationData &data, UErrorCode &err lastLatinPrimary = data.getLastPrimaryForGroup(USCRIPT_LATIN); if(firstDigitPrimary == 0 || firstLatinPrimary == 0) { // missing data - return FALSE; + return false; } - return TRUE; + return true; } UBool @@ -169,7 +169,7 @@ CollationFastLatinBuilder::inSameGroup(uint32_t p, uint32_t q) const { if(p >= firstShortPrimary) { return q >= firstShortPrimary; } else if(q >= firstShortPrimary) { - return FALSE; + return false; } // Both or neither must be potentially-variable, // so that we can test only one and determine if both are variable. @@ -177,7 +177,7 @@ CollationFastLatinBuilder::inSameGroup(uint32_t p, uint32_t q) const { if(p > lastVariablePrimary) { return q > lastVariablePrimary; } else if(q > lastVariablePrimary) { - return FALSE; + return false; } // Both will be encoded with long mini primaries. // They must be in the same special reordering group, @@ -188,7 +188,7 @@ CollationFastLatinBuilder::inSameGroup(uint32_t p, uint32_t q) const { if(p <= lastPrimary) { return q <= lastPrimary; } else if(q <= lastPrimary) { - return FALSE; + return false; } } } @@ -197,7 +197,7 @@ void CollationFastLatinBuilder::resetCEs() { contractionCEs.removeAllElements(); uniqueCEs.removeAllElements(); - shortPrimaryOverflow = FALSE; + shortPrimaryOverflow = false; result.truncate(headerLength); } @@ -245,7 +245,7 @@ CollationFastLatinBuilder::getCEs(const CollationData &data, UErrorCode &errorCo UBool CollationFastLatinBuilder::getCEsFromCE32(const CollationData &data, UChar32 c, uint32_t ce32, UErrorCode &errorCode) { - if(U_FAILURE(errorCode)) { return FALSE; } + if(U_FAILURE(errorCode)) { return false; } ce32 = data.getFinalCE32(ce32); ce1 = 0; if(Collation::isSimpleOrLongCE32(ce32)) { @@ -266,7 +266,7 @@ CollationFastLatinBuilder::getCEsFromCE32(const CollationData &data, UChar32 c, } break; } else { - return FALSE; + return false; } } case Collation::EXPANSION_TAG: { @@ -279,7 +279,7 @@ CollationFastLatinBuilder::getCEsFromCE32(const CollationData &data, UChar32 c, } break; } else { - return FALSE; + return false; } } // Note: We could support PREFIX_TAG (assert c>=0) @@ -295,24 +295,24 @@ CollationFastLatinBuilder::getCEsFromCE32(const CollationData &data, UChar32 c, ce0 = data.getCEFromOffsetCE32(c, ce32); break; default: - return FALSE; + return false; } } // A mapping can be completely ignorable. if(ce0 == 0) { return ce1 == 0; } // We do not support an ignorable ce0 unless it is completely ignorable. uint32_t p0 = (uint32_t)(ce0 >> 32); - if(p0 == 0) { return FALSE; } + if(p0 == 0) { return false; } // We only support primaries up to the Latin script. - if(p0 > lastLatinPrimary) { return FALSE; } + if(p0 > lastLatinPrimary) { return false; } // We support non-common secondary and case weights only together with short primaries. uint32_t lower32_0 = (uint32_t)ce0; if(p0 < firstShortPrimary) { uint32_t sc0 = lower32_0 & Collation::SECONDARY_AND_CASE_MASK; - if(sc0 != Collation::COMMON_SECONDARY_CE) { return FALSE; } + if(sc0 != Collation::COMMON_SECONDARY_CE) { return false; } } // No below-common tertiary weights. - if((lower32_0 & Collation::ONLY_TERTIARY_MASK) < Collation::COMMON_WEIGHT16) { return FALSE; } + if((lower32_0 & Collation::ONLY_TERTIARY_MASK) < Collation::COMMON_WEIGHT16) { return false; } if(ce1 != 0) { // Both primaries must be in the same group, // or both must get short mini primaries, @@ -320,28 +320,28 @@ CollationFastLatinBuilder::getCEsFromCE32(const CollationData &data, UChar32 c, // This is so that we can test the first primary and use the same mask for both, // and determine for both whether they are variable. uint32_t p1 = (uint32_t)(ce1 >> 32); - if(p1 == 0 ? p0 < firstShortPrimary : !inSameGroup(p0, p1)) { return FALSE; } + if(p1 == 0 ? p0 < firstShortPrimary : !inSameGroup(p0, p1)) { return false; } uint32_t lower32_1 = (uint32_t)ce1; // No tertiary CEs. - if((lower32_1 >> 16) == 0) { return FALSE; } + if((lower32_1 >> 16) == 0) { return false; } // We support non-common secondary and case weights // only for secondary CEs or together with short primaries. if(p1 != 0 && p1 < firstShortPrimary) { uint32_t sc1 = lower32_1 & Collation::SECONDARY_AND_CASE_MASK; - if(sc1 != Collation::COMMON_SECONDARY_CE) { return FALSE; } + if(sc1 != Collation::COMMON_SECONDARY_CE) { return false; } } // No below-common tertiary weights. - if((lower32_1 & Collation::ONLY_TERTIARY_MASK) < Collation::COMMON_WEIGHT16) { return FALSE; } + if((lower32_1 & Collation::ONLY_TERTIARY_MASK) < Collation::COMMON_WEIGHT16) { return false; } } // No quaternary weights. - if(((ce0 | ce1) & Collation::QUATERNARY_MASK) != 0) { return FALSE; } - return TRUE; + if(((ce0 | ce1) & Collation::QUATERNARY_MASK) != 0) { return false; } + return true; } UBool CollationFastLatinBuilder::getCEsFromContractionCE32(const CollationData &data, uint32_t ce32, UErrorCode &errorCode) { - if(U_FAILURE(errorCode)) { return FALSE; } + if(U_FAILURE(errorCode)) { return false; } const UChar *p = data.contexts + Collation::indexFromCE32(ce32); ce32 = CollationData::readCE32(p); // Default if no suffix match. // Since the original ce32 is not a prefix mapping, @@ -357,7 +357,7 @@ CollationFastLatinBuilder::getCEsFromContractionCE32(const CollationData &data, // Handle an encodable contraction unless the next contraction is too long // and starts with the same character. int32_t prevX = -1; - UBool addContraction = FALSE; + UBool addContraction = false; UCharsTrie::Iterator suffixes(p + 2, 0, errorCode); while(suffixes.next(errorCode)) { const UnicodeString &suffix = suffixes.getString(); @@ -367,7 +367,7 @@ CollationFastLatinBuilder::getCEsFromContractionCE32(const CollationData &data, if(addContraction) { // Bail out for all contractions starting with this character. addContractionEntry(x, Collation::NO_CE, 0, errorCode); - addContraction = FALSE; + addContraction = false; } continue; } @@ -376,17 +376,17 @@ CollationFastLatinBuilder::getCEsFromContractionCE32(const CollationData &data, } ce32 = (uint32_t)suffixes.getValue(); if(suffix.length() == 1 && getCEsFromCE32(data, U_SENTINEL, ce32, errorCode)) { - addContraction = TRUE; + addContraction = true; } else { addContractionEntry(x, Collation::NO_CE, 0, errorCode); - addContraction = FALSE; + addContraction = false; } prevX = x; } if(addContraction) { addContractionEntry(prevX, ce0, ce1, errorCode); } - if(U_FAILURE(errorCode)) { return FALSE; } + if(U_FAILURE(errorCode)) { return false; } // Note: There might not be any fast Latin contractions, but // we need to enter contraction handling anyway so that we can bail out // when there is a non-fast-Latin character following. @@ -394,7 +394,7 @@ CollationFastLatinBuilder::getCEsFromContractionCE32(const CollationData &data, // following umlaut and bail out, rather than return the difference of Y vs. u. ce0 = ((int64_t)Collation::NO_CE_PRIMARY << 32) | CONTRACTION_FLAG | contractionIndex; ce1 = 0; - return TRUE; + return true; } void @@ -428,12 +428,12 @@ CollationFastLatinBuilder::getMiniCE(int64_t ce) const { UBool CollationFastLatinBuilder::encodeUniqueCEs(UErrorCode &errorCode) { - if(U_FAILURE(errorCode)) { return FALSE; } + if(U_FAILURE(errorCode)) { return false; } uprv_free(miniCEs); miniCEs = (uint16_t *)uprv_malloc(uniqueCEs.size() * 2); if(miniCEs == NULL) { errorCode = U_MEMORY_ALLOCATION_ERROR; - return FALSE; + return false; } int32_t group = 0; uint32_t lastGroupPrimary = lastSpecialPrimaries[group]; @@ -484,7 +484,7 @@ CollationFastLatinBuilder::encodeUniqueCEs(UErrorCode &errorCode) { #if DEBUG_COLLATION_FAST_LATIN_BUILDER printf("short-primary overflow for %08x\n", p); #endif - shortPrimaryOverflow = TRUE; + shortPrimaryOverflow = true; miniCEs[i] = CollationFastLatin::BAIL_OUT; continue; } @@ -563,7 +563,7 @@ CollationFastLatinBuilder::encodeUniqueCEs(UErrorCode &errorCode) { UBool CollationFastLatinBuilder::encodeCharCEs(UErrorCode &errorCode) { - if(U_FAILURE(errorCode)) { return FALSE; } + if(U_FAILURE(errorCode)) { return false; } int32_t miniCEsStart = result.length(); for(int32_t i = 0; i < CollationFastLatin::NUM_FAST_CHARS; ++i) { result.append((UChar)0); // initialize to completely ignorable @@ -594,7 +594,7 @@ UBool CollationFastLatinBuilder::encodeContractions(UErrorCode &errorCode) { // We encode all contraction lists so that the first word of a list // terminates the previous list, and we only need one additional terminator at the end. - if(U_FAILURE(errorCode)) { return FALSE; } + if(U_FAILURE(errorCode)) { return false; } int32_t indexBase = headerLength + CollationFastLatin::NUM_FAST_CHARS; int32_t firstContractionIndex = result.length(); for(int32_t i = 0; i < CollationFastLatin::NUM_FAST_CHARS; ++i) { @@ -605,7 +605,7 @@ CollationFastLatinBuilder::encodeContractions(UErrorCode &errorCode) { result.setCharAt(headerLength + i, CollationFastLatin::BAIL_OUT); continue; } - UBool firstTriple = TRUE; + UBool firstTriple = true; for(int32_t index = (int32_t)ce & 0x7fffffff;; index += 3) { int32_t x = static_cast(contractionCEs.elementAti(index)); if((uint32_t)x == CollationFastLatin::CONTR_CHAR_MASK && !firstTriple) { break; } @@ -621,7 +621,7 @@ CollationFastLatinBuilder::encodeContractions(UErrorCode &errorCode) { result.append((UChar)(x | (3 << CollationFastLatin::CONTR_LENGTH_SHIFT))); result.append((UChar)(miniCE >> 16)).append((UChar)miniCE); } - firstTriple = FALSE; + firstTriple = false; } // Note: There is a chance that this new contraction list is the same as a previous one, // and if so, then we could truncate the result and reuse the other list. @@ -635,7 +635,7 @@ CollationFastLatinBuilder::encodeContractions(UErrorCode &errorCode) { } if(result.isBogus()) { errorCode = U_MEMORY_ALLOCATION_ERROR; - return FALSE; + return false; } #if DEBUG_COLLATION_FAST_LATIN_BUILDER printf("** fast Latin %d * 2 = %d bytes\n", result.length(), result.length() * 2); @@ -663,7 +663,7 @@ CollationFastLatinBuilder::encodeContractions(UErrorCode &errorCode) { } puts(""); #endif - return TRUE; + return true; } uint32_t diff --git a/icu4c/source/i18n/collationiterator.cpp b/icu4c/source/i18n/collationiterator.cpp index 6bfdfbe7c70..a47b3d86bea 100644 --- a/icu4c/source/i18n/collationiterator.cpp +++ b/icu4c/source/i18n/collationiterator.cpp @@ -36,8 +36,8 @@ CollationIterator::CEBuffer::~CEBuffer() {} UBool CollationIterator::CEBuffer::ensureAppendCapacity(int32_t appCap, UErrorCode &errorCode) { int32_t capacity = buffer.getCapacity(); - if((length + appCap) <= capacity) { return TRUE; } - if(U_FAILURE(errorCode)) { return FALSE; } + if((length + appCap) <= capacity) { return true; } + if(U_FAILURE(errorCode)) { return false; } do { if(capacity < 1000) { capacity *= 4; @@ -48,9 +48,9 @@ CollationIterator::CEBuffer::ensureAppendCapacity(int32_t appCap, UErrorCode &er int64_t *p = buffer.resize(capacity, length); if(p == NULL) { errorCode = U_MEMORY_ALLOCATION_ERROR; - return FALSE; + return false; } - return TRUE; + return true; } // State of combining marks skipped in discontiguous contraction. @@ -216,12 +216,12 @@ CollationIterator::handleGetTrailSurrogate() { UBool CollationIterator::foundNULTerminator() { - return FALSE; + return false; } UBool CollationIterator::forbidSurrogateCodePoints() const { - return FALSE; + return false; } uint32_t @@ -239,7 +239,7 @@ int64_t CollationIterator::nextCEFromCE32(const CollationData *d, UChar32 c, uint32_t ce32, UErrorCode &errorCode) { --ceBuffer.length; // Undo ceBuffer.incLength(). - appendCEsFromCE32(d, c, ce32, TRUE, errorCode); + appendCEsFromCE32(d, c, ce32, true, errorCode); if(U_SUCCESS(errorCode)) { return ceBuffer.get(cesIndex++); } else { @@ -661,7 +661,7 @@ CollationIterator::nextCE32FromDiscontiguousContraction( // and then from the combining marks that we skipped before the match. c = U_SENTINEL; for(;;) { - appendCEsFromCE32(d, c, ce32, TRUE, errorCode); + appendCEsFromCE32(d, c, ce32, true, errorCode); // Fetch CE32s for skipped combining marks from the normal data, with fallback, // rather than from the CollationData where we found the contraction. if(!skipped->hasNext()) { break; } @@ -864,7 +864,7 @@ CollationIterator::previousCE(UVector32 &offsets, UErrorCode &errorCode) { if(Collation::isSimpleOrLongCE32(ce32)) { return Collation::ceFromCE32(ce32); } - appendCEsFromCE32(d, c, ce32, FALSE, errorCode); + appendCEsFromCE32(d, c, ce32, false, errorCode); if(U_SUCCESS(errorCode)) { if(ceBuffer.length > 1) { offsets.addElement(getOffset(), errorCode); diff --git a/icu4c/source/i18n/collationkeys.cpp b/icu4c/source/i18n/collationkeys.cpp index b5c322fb446..c7e0de618de 100644 --- a/icu4c/source/i18n/collationkeys.cpp +++ b/icu4c/source/i18n/collationkeys.cpp @@ -90,10 +90,10 @@ namespace { */ class SortKeyLevel : public UMemory { public: - SortKeyLevel() : len(0), ok(TRUE) {} + SortKeyLevel() : len(0), ok(true) {} ~SortKeyLevel() {} - /** @return FALSE if memory allocation failed */ + /** @return false if memory allocation failed */ UBool isOk() const { return ok; } UBool isEmpty() const { return len == 0; } int32_t length() const { return len; } @@ -182,7 +182,7 @@ SortKeyLevel::appendReverseWeight16(uint32_t w) { UBool SortKeyLevel::ensureCapacity(int32_t appendCapacity) { if(!ok) { - return FALSE; + return false; } int32_t newCapacity = 2 * buffer.getCapacity(); int32_t altCapacity = len + 2 * appendCapacity; @@ -193,9 +193,9 @@ UBool SortKeyLevel::ensureCapacity(int32_t appendCapacity) { newCapacity = 200; } if(buffer.resize(newCapacity, len)==NULL) { - return ok = FALSE; + return ok = false; } - return TRUE; + return true; } } // namespace @@ -203,7 +203,7 @@ UBool SortKeyLevel::ensureCapacity(int32_t appendCapacity) { CollationKeys::LevelCallback::~LevelCallback() {} UBool -CollationKeys::LevelCallback::needToWrite(Collation::Level /*level*/) { return TRUE; } +CollationKeys::LevelCallback::needToWrite(Collation::Level /*level*/) { return true; } /** * Map from collation strength (UColAttributeValue) @@ -619,7 +619,7 @@ CollationKeys::writeSortKeyUpToQuaternary(CollationIterator &iter, if(U_FAILURE(errorCode)) { return; } // Append the beyond-primary levels. - UBool ok = TRUE; + UBool ok = true; if((levels & Collation::SECONDARY_LEVEL_FLAG) != 0) { if(!callback.needToWrite(Collation::SECONDARY_LEVEL)) { return; } ok &= secondaries.isOk(); diff --git a/icu4c/source/i18n/collationroot.cpp b/icu4c/source/i18n/collationroot.cpp index a6f0eb28ce5..dc88c35a680 100644 --- a/icu4c/source/i18n/collationroot.cpp +++ b/icu4c/source/i18n/collationroot.cpp @@ -43,7 +43,7 @@ U_CDECL_BEGIN static UBool U_CALLCONV uprv_collation_root_cleanup() { SharedObject::clearPtr(rootSingleton); initOnce.reset(); - return TRUE; + return true; } U_CDECL_END diff --git a/icu4c/source/i18n/collationruleparser.cpp b/icu4c/source/i18n/collationruleparser.cpp index ade6ecb552a..7fb95c0b2b5 100644 --- a/icu4c/source/i18n/collationruleparser.cpp +++ b/icu4c/source/i18n/collationruleparser.cpp @@ -128,7 +128,7 @@ CollationRuleParser::parse(const UnicodeString &ruleString, UErrorCode &errorCod void CollationRuleParser::parseRuleChain(UErrorCode &errorCode) { int32_t resetStrength = parseResetAndPosition(errorCode); - UBool isFirstRelation = TRUE; + UBool isFirstRelation = true; for(;;) { int32_t result = parseRelationOperator(errorCode); if(U_FAILURE(errorCode)) { return; } @@ -165,7 +165,7 @@ CollationRuleParser::parseRuleChain(UErrorCode &errorCode) { parseStarredCharacters(strength, i, errorCode); } if(U_FAILURE(errorCode)) { return; } - isFirstRelation = FALSE; + isFirstRelation = false; } } diff --git a/icu4c/source/i18n/collationsets.cpp b/icu4c/source/i18n/collationsets.cpp index 09581416a85..b23c5e318d7 100644 --- a/icu4c/source/i18n/collationsets.cpp +++ b/icu4c/source/i18n/collationsets.cpp @@ -34,7 +34,7 @@ U_CDECL_BEGIN static UBool U_CALLCONV enumTailoredRange(const void *context, UChar32 start, UChar32 end, uint32_t ce32) { if(ce32 == Collation::FALLBACK_CE32) { - return TRUE; // fallback to base, not tailored + return true; // fallback to base, not tailored } TailoredSet *ts = (TailoredSet *)context; return ts->handleCE32(start, end, ce32); @@ -365,14 +365,14 @@ enumCnERange(const void *context, UChar32 start, UChar32 end, uint32_t ce32) { } else if(cne->checkTailored < 0) { // Collect the set of code points with mappings in the tailoring data. if(ce32 == Collation::FALLBACK_CE32) { - return TRUE; // fallback to base, not tailored + return true; // fallback to base, not tailored } else { cne->tailored.add(start, end); } // checkTailored > 0: Exclude tailored ranges from the base data enumeration. } else if(start == end) { if(cne->tailored.contains(start)) { - return TRUE; + return true; } } else if(cne->tailored.containsSome(start, end)) { cne->ranges.set(start, end).removeAll(cne->tailored); @@ -509,7 +509,7 @@ ContractionsAndExpansions::handleCE32(UChar32 start, UChar32 end, uint32_t ce32) if(sink != NULL) { // TODO: This should be optimized, // especially if [start..end] is the complete Hangul range. (assert that) - UTF16CollationIterator iter(data, FALSE, NULL, NULL, NULL); + UTF16CollationIterator iter(data, false, NULL, NULL, NULL); UChar hangul[1] = { 0 }; for(UChar32 c = start; c <= end; ++c) { hangul[0] = (UChar)c; diff --git a/icu4c/source/i18n/collationsettings.cpp b/icu4c/source/i18n/collationsettings.cpp index 9eeab483310..fe051880b81 100644 --- a/icu4c/source/i18n/collationsettings.cpp +++ b/icu4c/source/i18n/collationsettings.cpp @@ -248,10 +248,10 @@ CollationSettings::reorderTableHasSplitBytes(const uint8_t table[256]) { U_ASSERT(table[0] == 0); for(int32_t i = 1; i < 256; ++i) { if(table[i] == 0) { - return TRUE; + return true; } } - return FALSE; + return false; } uint32_t diff --git a/icu4c/source/i18n/collationtailoring.cpp b/icu4c/source/i18n/collationtailoring.cpp index 78a11fbb26b..440414c4336 100644 --- a/icu4c/source/i18n/collationtailoring.cpp +++ b/icu4c/source/i18n/collationtailoring.cpp @@ -68,18 +68,18 @@ CollationTailoring::~CollationTailoring() { UBool CollationTailoring::ensureOwnedData(UErrorCode &errorCode) { - if(U_FAILURE(errorCode)) { return FALSE; } + if(U_FAILURE(errorCode)) { return false; } if(ownedData == NULL) { const Normalizer2Impl *nfcImpl = Normalizer2Factory::getNFCImpl(errorCode); - if(U_FAILURE(errorCode)) { return FALSE; } + if(U_FAILURE(errorCode)) { return false; } ownedData = new CollationData(*nfcImpl); if(ownedData == NULL) { errorCode = U_MEMORY_ALLOCATION_ERROR; - return FALSE; + return false; } } data = ownedData; - return TRUE; + return true; } void diff --git a/icu4c/source/i18n/collationweights.cpp b/icu4c/source/i18n/collationweights.cpp index 05458962c6d..02d0268f53b 100644 --- a/icu4c/source/i18n/collationweights.cpp +++ b/icu4c/source/i18n/collationweights.cpp @@ -227,7 +227,7 @@ CollationWeights::getWeightRanges(uint32_t lowerLimit, uint32_t upperLimit) { #ifdef UCOL_DEBUG printf("error: no space between lower & upper limits\n"); #endif - return FALSE; + return false; } /* check that neither is a prefix of the other */ @@ -236,7 +236,7 @@ CollationWeights::getWeightRanges(uint32_t lowerLimit, uint32_t upperLimit) { #ifdef UCOL_DEBUG printf("error: lower limit 0x%08lx is a prefix of upper limit 0x%08lx\n", lowerLimit, upperLimit); #endif - return FALSE; + return false; } } /* if the upper limit is a prefix of the lower limit then the earlier test lowerLimit>=upperLimit has caught it */ @@ -307,7 +307,7 @@ CollationWeights::getWeightRanges(uint32_t lowerLimit, uint32_t upperLimit) { // maxByte (for lowerEnd) or minByte (for upperStart). const uint32_t lowerEnd=lower[length].end; const uint32_t upperStart=upper[length].start; - UBool merged=FALSE; + UBool merged=false; if(lowerEnd>upperStart) { // These two lower and upper ranges collide. @@ -326,7 +326,7 @@ CollationWeights::getWeightRanges(uint32_t lowerLimit, uint32_t upperLimit) { (int32_t)getWeightTrail(lower[length].start, length)+1; // count might be <=0 in which case there is no room, // and the range-collecting code below will ignore this range. - merged=TRUE; + merged=true; } else if(lowerEnd==upperStart) { // Not possible, unless minByte==maxByte which is not allowed. U_ASSERT(minBytes[length]countBytes - merged=TRUE; + merged=true; } } if(merged) { @@ -409,14 +409,14 @@ CollationWeights::allocWeightsInShortRanges(int32_t n, int32_t minLength) { /* sort the ranges by weight values */ UErrorCode errorCode=U_ZERO_ERROR; uprv_sortArray(ranges, rangeCount, sizeof(WeightRange), - compareRanges, NULL, FALSE, &errorCode); + compareRanges, NULL, false, &errorCode); /* ignore error code: we know that the internal sort function will not fail here */ } - return TRUE; + return true; } n -= ranges[i].count; // still >0 } - return FALSE; + return false; } UBool @@ -433,7 +433,7 @@ CollationWeights::allocWeightsInMinLengthRanges(int32_t n, int32_t minLength) { } int32_t nextCountBytes = countBytes(minLength + 1); - if(n > count * nextCountBytes) { return FALSE; } + if(n > count * nextCountBytes) { return false; } // Use the minLength ranges. Merge them, and then split again as necessary. uint32_t start = ranges[0].start; @@ -485,7 +485,7 @@ CollationWeights::allocWeightsInMinLengthRanges(int32_t n, int32_t minLength) { lengthenRange(ranges[1]); rangeCount = 2; } - return TRUE; + return true; } /* @@ -503,7 +503,7 @@ CollationWeights::allocWeights(uint32_t lowerLimit, uint32_t upperLimit, int32_t #ifdef UCOL_DEBUG printf("error: unable to get Weight ranges\n"); #endif - return FALSE; + return false; } /* try until we find suitably large ranges */ @@ -518,7 +518,7 @@ CollationWeights::allocWeights(uint32_t lowerLimit, uint32_t upperLimit, int32_t printf("error: the maximum number of %ld weights is insufficient for n=%ld\n", minLengthCount, n); #endif - return FALSE; + return false; } if(allocWeightsInMinLengthRanges(n, minLength)) { break; } @@ -541,7 +541,7 @@ CollationWeights::allocWeights(uint32_t lowerLimit, uint32_t upperLimit, int32_t #endif rangeIndex = 0; - return TRUE; + return true; } uint32_t diff --git a/icu4c/source/i18n/cpdtrans.cpp b/icu4c/source/i18n/cpdtrans.cpp index dc0217ba612..f2b1c36a338 100644 --- a/icu4c/source/i18n/cpdtrans.cpp +++ b/icu4c/source/i18n/cpdtrans.cpp @@ -73,7 +73,7 @@ CompoundTransliterator::CompoundTransliterator(const UnicodeString& id, trans(0), numAnonymousRBTs(0) { // TODO add code for parseError...currently unused, but // later may be used by parsing code... - init(id, direction, TRUE, status); + init(id, direction, true, status); } CompoundTransliterator::CompoundTransliterator(const UnicodeString& id, @@ -83,7 +83,7 @@ CompoundTransliterator::CompoundTransliterator(const UnicodeString& id, trans(0), numAnonymousRBTs(0) { // TODO add code for parseError...currently unused, but // later may be used by parsing code... - init(id, UTRANS_FORWARD, TRUE, status); + init(id, UTRANS_FORWARD, true, status); } @@ -99,7 +99,7 @@ CompoundTransliterator::CompoundTransliterator(const UnicodeString& newID, Transliterator(newID, adoptedFilter), trans(0), numAnonymousRBTs(anonymousRBTs) { - init(list, UTRANS_FORWARD, FALSE, status); + init(list, UTRANS_FORWARD, false, status); } /** @@ -115,7 +115,7 @@ CompoundTransliterator::CompoundTransliterator(UVector& list, { // TODO add code for parseError...currently unused, but // later may be used by parsing code... - init(list, UTRANS_FORWARD, FALSE, status); + init(list, UTRANS_FORWARD, false, status); // assume caller will fixup ID } @@ -126,7 +126,7 @@ CompoundTransliterator::CompoundTransliterator(UVector& list, Transliterator(UnicodeString(), NULL), trans(0), numAnonymousRBTs(anonymousRBTs) { - init(list, UTRANS_FORWARD, FALSE, status); + init(list, UTRANS_FORWARD, false, status); } /** @@ -140,7 +140,7 @@ CompoundTransliterator::CompoundTransliterator(UVector& list, * @param adoptedSplitTransliterator a transliterator to be inserted * before the entry at offset idSplitPoint in the id string. May be * NULL to insert no entry. - * @param fixReverseID if TRUE, then reconstruct the ID of reverse + * @param fixReverseID if true, then reconstruct the ID of reverse * entries by calling getID() of component entries. Some constructors * do not require this because they apply a facade ID anyway. * @param status the error code indicating success or failure @@ -182,7 +182,7 @@ void CompoundTransliterator::init(const UnicodeString& id, * is, it should be in the FORWARD order; if direction is REVERSE then * the list order will be reversed. * @param direction either FORWARD or REVERSE - * @param fixReverseID if TRUE, then reconstruct the ID of reverse + * @param fixReverseID if true, then reconstruct the ID of reverse * entries by calling getID() of component entries. Some constructors * do not require this because they apply a facade ID anyway. * @param status the error code indicating success or failure @@ -285,7 +285,7 @@ CompoundTransliterator& CompoundTransliterator::operator=( if (this == &t) { return *this; } // self-assignment: no-op Transliterator::operator=(t); int32_t i = 0; - UBool failed = FALSE; + UBool failed = false; if (trans != NULL) { for (i=0; iclone(); if (trans[i] == NULL) { - failed = TRUE; + failed = true; break; } } @@ -352,11 +352,11 @@ void CompoundTransliterator::setTransliterators(Transliterator* const transliter return; } int32_t i = 0; - UBool failed = FALSE; + UBool failed = false; for (i=0; iclone(); if (a[i] == NULL) { - failed = TRUE; + failed = true; break; } } diff --git a/icu4c/source/i18n/csdetect.cpp b/icu4c/source/i18n/csdetect.cpp index 29a0aded822..0b22d4dc2ae 100644 --- a/icu4c/source/i18n/csdetect.cpp +++ b/icu4c/source/i18n/csdetect.cpp @@ -66,7 +66,7 @@ static UBool U_CALLCONV csdet_cleanup(void) } gCSRecognizersInitOnce.reset(); - return TRUE; + return true; } static int32_t U_CALLCONV @@ -85,39 +85,39 @@ static void U_CALLCONV initRecognizers(UErrorCode &status) { U_NAMESPACE_USE ucln_i18n_registerCleanup(UCLN_I18N_CSDET, csdet_cleanup); CSRecognizerInfo *tempArray[] = { - new CSRecognizerInfo(new CharsetRecog_UTF8(), TRUE), + new CSRecognizerInfo(new CharsetRecog_UTF8(), true), - new CSRecognizerInfo(new CharsetRecog_UTF_16_BE(), TRUE), - new CSRecognizerInfo(new CharsetRecog_UTF_16_LE(), TRUE), - new CSRecognizerInfo(new CharsetRecog_UTF_32_BE(), TRUE), - new CSRecognizerInfo(new CharsetRecog_UTF_32_LE(), TRUE), + new CSRecognizerInfo(new CharsetRecog_UTF_16_BE(), true), + new CSRecognizerInfo(new CharsetRecog_UTF_16_LE(), true), + new CSRecognizerInfo(new CharsetRecog_UTF_32_BE(), true), + new CSRecognizerInfo(new CharsetRecog_UTF_32_LE(), true), - new CSRecognizerInfo(new CharsetRecog_8859_1(), TRUE), - new CSRecognizerInfo(new CharsetRecog_8859_2(), TRUE), - new CSRecognizerInfo(new CharsetRecog_8859_5_ru(), TRUE), - new CSRecognizerInfo(new CharsetRecog_8859_6_ar(), TRUE), - new CSRecognizerInfo(new CharsetRecog_8859_7_el(), TRUE), - new CSRecognizerInfo(new CharsetRecog_8859_8_I_he(), TRUE), - new CSRecognizerInfo(new CharsetRecog_8859_8_he(), TRUE), - new CSRecognizerInfo(new CharsetRecog_windows_1251(), TRUE), - new CSRecognizerInfo(new CharsetRecog_windows_1256(), TRUE), - new CSRecognizerInfo(new CharsetRecog_KOI8_R(), TRUE), - new CSRecognizerInfo(new CharsetRecog_8859_9_tr(), TRUE), - new CSRecognizerInfo(new CharsetRecog_sjis(), TRUE), - new CSRecognizerInfo(new CharsetRecog_gb_18030(), TRUE), - new CSRecognizerInfo(new CharsetRecog_euc_jp(), TRUE), - new CSRecognizerInfo(new CharsetRecog_euc_kr(), TRUE), - new CSRecognizerInfo(new CharsetRecog_big5(), TRUE), + new CSRecognizerInfo(new CharsetRecog_8859_1(), true), + new CSRecognizerInfo(new CharsetRecog_8859_2(), true), + new CSRecognizerInfo(new CharsetRecog_8859_5_ru(), true), + new CSRecognizerInfo(new CharsetRecog_8859_6_ar(), true), + new CSRecognizerInfo(new CharsetRecog_8859_7_el(), true), + new CSRecognizerInfo(new CharsetRecog_8859_8_I_he(), true), + new CSRecognizerInfo(new CharsetRecog_8859_8_he(), true), + new CSRecognizerInfo(new CharsetRecog_windows_1251(), true), + new CSRecognizerInfo(new CharsetRecog_windows_1256(), true), + new CSRecognizerInfo(new CharsetRecog_KOI8_R(), true), + new CSRecognizerInfo(new CharsetRecog_8859_9_tr(), true), + new CSRecognizerInfo(new CharsetRecog_sjis(), true), + new CSRecognizerInfo(new CharsetRecog_gb_18030(), true), + new CSRecognizerInfo(new CharsetRecog_euc_jp(), true), + new CSRecognizerInfo(new CharsetRecog_euc_kr(), true), + new CSRecognizerInfo(new CharsetRecog_big5(), true), - new CSRecognizerInfo(new CharsetRecog_2022JP(), TRUE), + new CSRecognizerInfo(new CharsetRecog_2022JP(), true), #if !UCONFIG_ONLY_HTML_CONVERSION - new CSRecognizerInfo(new CharsetRecog_2022KR(), TRUE), - new CSRecognizerInfo(new CharsetRecog_2022CN(), TRUE), + new CSRecognizerInfo(new CharsetRecog_2022KR(), true), + new CSRecognizerInfo(new CharsetRecog_2022CN(), true), - new CSRecognizerInfo(new CharsetRecog_IBM424_he_rtl(), FALSE), - new CSRecognizerInfo(new CharsetRecog_IBM424_he_ltr(), FALSE), - new CSRecognizerInfo(new CharsetRecog_IBM420_ar_rtl(), FALSE), - new CSRecognizerInfo(new CharsetRecog_IBM420_ar_ltr(), FALSE) + new CSRecognizerInfo(new CharsetRecog_IBM424_he_rtl(), false), + new CSRecognizerInfo(new CharsetRecog_IBM424_he_ltr(), false), + new CSRecognizerInfo(new CharsetRecog_IBM420_ar_rtl(), false), + new CSRecognizerInfo(new CharsetRecog_IBM420_ar_ltr(), false) #endif }; int32_t rCount = UPRV_LENGTHOF(tempArray); @@ -149,7 +149,7 @@ void CharsetDetector::setRecognizers(UErrorCode &status) CharsetDetector::CharsetDetector(UErrorCode &status) : textIn(new InputText(status)), resultArray(NULL), - resultCount(0), fStripTags(FALSE), fFreshTextSet(FALSE), + resultCount(0), fStripTags(false), fFreshTextSet(false), fEnabledRecognizers(NULL) { if (U_FAILURE(status)) { @@ -197,14 +197,14 @@ CharsetDetector::~CharsetDetector() void CharsetDetector::setText(const char *in, int32_t len) { textIn->setText(in, len); - fFreshTextSet = TRUE; + fFreshTextSet = true; } UBool CharsetDetector::setStripTagsFlag(UBool flag) { UBool temp = fStripTags; fStripTags = flag; - fFreshTextSet = TRUE; + fFreshTextSet = true; return temp; } @@ -263,9 +263,9 @@ const CharsetMatch * const *CharsetDetector::detectAll(int32_t &maxMatchesFound, } if (resultCount > 1) { - uprv_sortArray(resultArray, resultCount, sizeof resultArray[0], charsetMatchComparator, NULL, TRUE, &status); + uprv_sortArray(resultArray, resultCount, sizeof resultArray[0], charsetMatchComparator, NULL, true, &status); } - fFreshTextSet = FALSE; + fFreshTextSet = false; } maxMatchesFound = resultCount; @@ -285,7 +285,7 @@ void CharsetDetector::setDetectableCharset(const char *encoding, UBool enabled, } int32_t modIdx = -1; - UBool isDefaultVal = FALSE; + UBool isDefaultVal = false; for (int32_t i = 0; i < fCSRecognizers_size; i++) { CSRecognizerInfo *csrinfo = fCSRecognizers[i]; if (uprv_strcmp(csrinfo->recognizer->getName(), encoding) == 0) { @@ -459,7 +459,7 @@ UEnumeration * CharsetDetector::getAllDetectableCharsets(UErrorCode &status) return 0; } uprv_memset(en->context, 0, sizeof(Context)); - ((Context*)en->context)->all = TRUE; + ((Context*)en->context)->all = true; return en; } @@ -482,7 +482,7 @@ UEnumeration * CharsetDetector::getDetectableCharsets(UErrorCode &status) const return 0; } uprv_memset(en->context, 0, sizeof(Context)); - ((Context*)en->context)->all = FALSE; + ((Context*)en->context)->all = false; ((Context*)en->context)->enabledRecognizers = fEnabledRecognizers; return en; } diff --git a/icu4c/source/i18n/csrmbcs.cpp b/icu4c/source/i18n/csrmbcs.cpp index b9f268ab3f4..ec346b5fb3f 100644 --- a/icu4c/source/i18n/csrmbcs.cpp +++ b/icu4c/source/i18n/csrmbcs.cpp @@ -115,7 +115,7 @@ static int32_t binarySearch(const uint16_t *array, int32_t len, uint16_t value) } IteratedChar::IteratedChar() : -charValue(0), index(-1), nextIndex(0), error(FALSE), done(FALSE) +charValue(0), index(-1), nextIndex(0), error(false), done(false) { // nothing else to do. } @@ -125,14 +125,14 @@ charValue(0), index(-1), nextIndex(0), error(FALSE), done(FALSE) charValue = 0; index = -1; nextIndex = 0; - error = FALSE; - done = FALSE; + error = false; + done = false; }*/ int32_t IteratedChar::nextByte(InputText *det) { if (nextIndex >= det->fRawLength) { - done = TRUE; + done = true; return -1; } @@ -240,16 +240,16 @@ CharsetRecog_sjis::~CharsetRecog_sjis() UBool CharsetRecog_sjis::nextChar(IteratedChar* it, InputText* det) const { it->index = it->nextIndex; - it->error = FALSE; + it->error = false; int32_t firstByte = it->charValue = it->nextByte(det); if (firstByte < 0) { - return FALSE; + return false; } if (firstByte <= 0x7F || (firstByte > 0xA0 && firstByte <= 0xDF)) { - return TRUE; + return true; } int32_t secondByte = it->nextByte(det); @@ -260,10 +260,10 @@ UBool CharsetRecog_sjis::nextChar(IteratedChar* it, InputText* det) const { if (! ((secondByte >= 0x40 && secondByte <= 0x7F) || (secondByte >= 0x80 && secondByte <= 0xFE))) { // Illegal second byte value. - it->error = TRUE; + it->error = true; } - return TRUE; + return true; } UBool CharsetRecog_sjis::match(InputText* det, CharsetMatch *results) const { @@ -293,17 +293,17 @@ UBool CharsetRecog_euc::nextChar(IteratedChar* it, InputText* det) const { int32_t thirdByte = 0; it->index = it->nextIndex; - it->error = FALSE; + it->error = false; firstByte = it->charValue = it->nextByte(det); if (firstByte < 0) { // Ran off the end of the input data - return FALSE; + return false; } if (firstByte <= 0x8D) { // single byte char - return TRUE; + return true; } secondByte = it->nextByte(det); @@ -315,10 +315,10 @@ UBool CharsetRecog_euc::nextChar(IteratedChar* it, InputText* det) const { if (firstByte >= 0xA1 && firstByte <= 0xFE) { // Two byte Char if (secondByte < 0xA1) { - it->error = TRUE; + it->error = true; } - return TRUE; + return true; } if (firstByte == 0x8E) { @@ -329,10 +329,10 @@ UBool CharsetRecog_euc::nextChar(IteratedChar* it, InputText* det) const { // Treat it like EUC-JP. If the data really was EUC-TW, the following two // bytes will look like a well formed 2 byte char. if (secondByte < 0xA1) { - it->error = TRUE; + it->error = true; } - return TRUE; + return true; } if (firstByte == 0x8F) { @@ -343,11 +343,11 @@ UBool CharsetRecog_euc::nextChar(IteratedChar* it, InputText* det) const { if (thirdByte < 0xa1) { // Bad second byte or ran off the end of the input data with a non-ASCII first byte. - it->error = TRUE; + it->error = true; } } - return TRUE; + return true; } @@ -405,16 +405,16 @@ UBool CharsetRecog_big5::nextChar(IteratedChar* it, InputText* det) const int32_t firstByte; it->index = it->nextIndex; - it->error = FALSE; + it->error = false; firstByte = it->charValue = it->nextByte(det); if (firstByte < 0) { - return FALSE; + return false; } if (firstByte <= 0x7F || firstByte == 0xFF) { // single byte character. - return TRUE; + return true; } int32_t secondByte = it->nextByte(det); @@ -424,10 +424,10 @@ UBool CharsetRecog_big5::nextChar(IteratedChar* it, InputText* det) const // else we'll handle the error later. if (secondByte < 0x40 || secondByte == 0x7F || secondByte == 0xFF) { - it->error = TRUE; + it->error = true; } - return TRUE; + return true; } const char *CharsetRecog_big5::getName() const @@ -459,17 +459,17 @@ UBool CharsetRecog_gb_18030::nextChar(IteratedChar* it, InputText* det) const { int32_t fourthByte = 0; it->index = it->nextIndex; - it->error = FALSE; + it->error = false; firstByte = it->charValue = it->nextByte(det); if (firstByte < 0) { // Ran off the end of the input data - return FALSE; + return false; } if (firstByte <= 0x80) { // single byte char - return TRUE; + return true; } secondByte = it->nextByte(det); @@ -481,7 +481,7 @@ UBool CharsetRecog_gb_18030::nextChar(IteratedChar* it, InputText* det) const { if (firstByte >= 0x81 && firstByte <= 0xFE) { // Two byte Char if ((secondByte >= 0x40 && secondByte <= 0x7E) || (secondByte >=80 && secondByte <= 0xFE)) { - return TRUE; + return true; } // Four byte char @@ -494,16 +494,16 @@ UBool CharsetRecog_gb_18030::nextChar(IteratedChar* it, InputText* det) const { if (fourthByte >= 0x30 && fourthByte <= 0x39) { it->charValue = (it->charValue << 16) | (thirdByte << 8) | fourthByte; - return TRUE; + return true; } } } // Something wasn't valid, or we ran out of data (-1). - it->error = TRUE; + it->error = true; } - return TRUE; + return true; } const char *CharsetRecog_gb_18030::getName() const diff --git a/icu4c/source/i18n/csrsbcs.cpp b/icu4c/source/i18n/csrsbcs.cpp index 0b0d8967e7d..92af9b5291b 100644 --- a/icu4c/source/i18n/csrsbcs.cpp +++ b/icu4c/source/i18n/csrsbcs.cpp @@ -104,7 +104,7 @@ int32_t NGramParser::nextByte(InputText *det) void NGramParser::parseCharacters(InputText *det) { int32_t b; - bool ignoreSpace = FALSE; + bool ignoreSpace = false; while ((b = nextByte(det)) >= 0) { uint8_t mb = charMap[b]; @@ -211,7 +211,7 @@ int32_t NGramParser_IBM420::nextByte(InputText *det) void NGramParser_IBM420::parseCharacters(InputText *det) { int32_t b; - bool ignoreSpace = FALSE; + bool ignoreSpace = false; while ((b = nextByte(det)) >= 0) { uint8_t mb = charMap[b]; diff --git a/icu4c/source/i18n/csrucode.cpp b/icu4c/source/i18n/csrucode.cpp index 480dae1400c..e0a64aa949a 100644 --- a/icu4c/source/i18n/csrucode.cpp +++ b/icu4c/source/i18n/csrucode.cpp @@ -126,11 +126,11 @@ UBool CharsetRecog_UTF_32::match(InputText* textIn, CharsetMatch *results) const int32_t limit = (textIn->fRawLength / 4) * 4; int32_t numValid = 0; int32_t numInvalid = 0; - bool hasBOM = FALSE; + bool hasBOM = false; int32_t confidence = 0; if (limit > 0 && getChar(input, 0) == 0x0000FEFFUL) { - hasBOM = TRUE; + hasBOM = true; } for(int32_t i = 0; i < limit; i += 4) { diff --git a/icu4c/source/i18n/csrutf8.cpp b/icu4c/source/i18n/csrutf8.cpp index 3f16224ea6e..f114f097224 100644 --- a/icu4c/source/i18n/csrutf8.cpp +++ b/icu4c/source/i18n/csrutf8.cpp @@ -27,7 +27,7 @@ const char *CharsetRecog_UTF8::getName() const } UBool CharsetRecog_UTF8::match(InputText* input, CharsetMatch *results) const { - bool hasBOM = FALSE; + bool hasBOM = false; int32_t numValid = 0; int32_t numInvalid = 0; const uint8_t *inputBytes = input->fRawInput; @@ -37,7 +37,7 @@ UBool CharsetRecog_UTF8::match(InputText* input, CharsetMatch *results) const { if (input->fRawLength >= 3 && inputBytes[0] == 0xEF && inputBytes[1] == 0xBB && inputBytes[2] == 0xBF) { - hasBOM = TRUE; + hasBOM = true; } // Scan for multi-byte sequences diff --git a/icu4c/source/i18n/currpinf.cpp b/icu4c/source/i18n/currpinf.cpp index a2676ab5a1e..1a1c5802717 100644 --- a/icu4c/source/i18n/currpinf.cpp +++ b/icu4c/source/i18n/currpinf.cpp @@ -190,7 +190,7 @@ CurrencyPluralInfo::getCurrencyPluralPattern(const UnicodeString& pluralCount, // fall back to "other" if (pluralCount.compare(gPluralCountOther, 5)) { currencyPluralPattern = - (UnicodeString*)fPluralCountToCurrencyUnitPattern->get(UnicodeString(TRUE, gPluralCountOther, 5)); + (UnicodeString*)fPluralCountToCurrencyUnitPattern->get(UnicodeString(true, gPluralCountOther, 5)); } if (currencyPluralPattern == nullptr) { // no currencyUnitPatterns defined, @@ -351,15 +351,15 @@ CurrencyPluralInfo::setupCurrencyPluralPattern(const Locale& loc, UErrorCode& st pattern->extract(0, pattern->length(), result_1, "UTF-8"); std::cout << "pluralCount: " << pluralCount << "; pattern: " << result_1 << "\n"; #endif - pattern->findAndReplace(UnicodeString(TRUE, gPart0, 3), + pattern->findAndReplace(UnicodeString(true, gPart0, 3), UnicodeString(numberStylePattern, numberStylePatternLen)); - pattern->findAndReplace(UnicodeString(TRUE, gPart1, 3), UnicodeString(TRUE, gTripleCurrencySign, 3)); + pattern->findAndReplace(UnicodeString(true, gPart1, 3), UnicodeString(true, gTripleCurrencySign, 3)); if (hasSeparator) { UnicodeString negPattern(patternChars, ptnLength); - negPattern.findAndReplace(UnicodeString(TRUE, gPart0, 3), + negPattern.findAndReplace(UnicodeString(true, gPart0, 3), UnicodeString(negNumberStylePattern, negNumberStylePatternLen)); - negPattern.findAndReplace(UnicodeString(TRUE, gPart1, 3), UnicodeString(TRUE, gTripleCurrencySign, 3)); + negPattern.findAndReplace(UnicodeString(true, gPart1, 3), UnicodeString(true, gTripleCurrencySign, 3)); pattern->append(gNumberPatternSeparator); pattern->append(negPattern); } @@ -400,7 +400,7 @@ CurrencyPluralInfo::initHash(UErrorCode& status) { if (U_FAILURE(status)) { return nullptr; } - LocalPointer hTable(new Hashtable(TRUE, status), status); + LocalPointer hTable(new Hashtable(true, status), status); if (U_FAILURE(status)) { return nullptr; } diff --git a/icu4c/source/i18n/dangical.cpp b/icu4c/source/i18n/dangical.cpp index e16174cb5a9..59cdc661dac 100644 --- a/icu4c/source/i18n/dangical.cpp +++ b/icu4c/source/i18n/dangical.cpp @@ -39,7 +39,7 @@ static UBool calendar_dangi_cleanup(void) { gDangiCalendarZoneAstroCalc = NULL; } gDangiCalendarInitOnce.reset(); - return TRUE; + return true; } U_CDECL_END diff --git a/icu4c/source/i18n/datefmt.cpp b/icu4c/source/i18n/datefmt.cpp index fed8f79aa0f..16ac233c94c 100644 --- a/icu4c/source/i18n/datefmt.cpp +++ b/icu4c/source/i18n/datefmt.cpp @@ -588,8 +588,8 @@ DateFormat::adoptNumberFormat(NumberFormat* newNumberFormat) { delete fNumberFormat; fNumberFormat = newNumberFormat; - newNumberFormat->setParseIntegerOnly(TRUE); - newNumberFormat->setGroupingUsed(FALSE); + newNumberFormat->setParseIntegerOnly(true); + newNumberFormat->setGroupingUsed(false); } //---------------------------------------------------------------------- @@ -660,7 +660,7 @@ DateFormat::setLenient(UBool lenient) UBool DateFormat::isLenient() const { - UBool lenient = TRUE; + UBool lenient = true; if (fCalendar != NULL) { lenient = fCalendar->isLenient(); } @@ -687,7 +687,7 @@ DateFormat::isCalendarLenient() const return fCalendar->isLenient(); } // fCalendar is rarely null - return FALSE; + return false; } diff --git a/icu4c/source/i18n/dayperiodrules.cpp b/icu4c/source/i18n/dayperiodrules.cpp index 24d3afdbe54..3ef822842de 100644 --- a/icu4c/source/i18n/dayperiodrules.cpp +++ b/icu4c/source/i18n/dayperiodrules.cpp @@ -196,9 +196,9 @@ struct DayPeriodRulesDataSink : public ResourceSink { // AT cutoffs must be either midnight or noon. if (cutoffs[startHour] & (1 << CUTOFF_TYPE_AT)) { if (startHour == 0 && period == DayPeriodRules::DAYPERIOD_MIDNIGHT) { - rule.fHasMidnight = TRUE; + rule.fHasMidnight = true; } else if (startHour == 12 && period == DayPeriodRules::DAYPERIOD_NOON) { - rule.fHasNoon = TRUE; + rule.fHasNoon = true; } else { errorCode = U_INVALID_FORMAT_ERROR; // Bad data. return; @@ -308,7 +308,7 @@ U_CFUNC UBool U_CALLCONV dayPeriodRulesCleanup() { uhash_close(data->localeToRuleSetNumMap); delete data; data = NULL; - return TRUE; + return true; } } // namespace @@ -381,7 +381,7 @@ const DayPeriodRules *DayPeriodRules::getInstance(const Locale &locale, UErrorCo } } -DayPeriodRules::DayPeriodRules() : fHasMidnight(FALSE), fHasNoon(FALSE) { +DayPeriodRules::DayPeriodRules() : fHasMidnight(false), fHasNoon(false) { for (int32_t i = 0; i < 24; ++i) { fDayPeriodForHour[i] = DayPeriodRules::DAYPERIOD_UNKNOWN; } @@ -504,10 +504,10 @@ void DayPeriodRules::add(int32_t startHour, int32_t limitHour, DayPeriod period) UBool DayPeriodRules::allHoursAreSet() { for (int32_t i = 0; i < 24; ++i) { - if (fDayPeriodForHour[i] == DAYPERIOD_UNKNOWN) { return FALSE; } + if (fDayPeriodForHour[i] == DAYPERIOD_UNKNOWN) { return false; } } - return TRUE; + return true; } diff --git a/icu4c/source/i18n/dcfmtsym.cpp b/icu4c/source/i18n/dcfmtsym.cpp index 4f5bae4e11e..5d06c189fbe 100644 --- a/icu4c/source/i18n/dcfmtsym.cpp +++ b/icu4c/source/i18n/dcfmtsym.cpp @@ -100,7 +100,7 @@ static const char *gNumberElementKeys[DecimalFormatSymbols::kFormatSymbolCount] DecimalFormatSymbols::DecimalFormatSymbols(UErrorCode& status) : UObject(), locale(), currPattern(NULL) { - initialize(locale, status, TRUE); + initialize(locale, status, true); } // ------------------------------------- @@ -113,7 +113,7 @@ DecimalFormatSymbols::DecimalFormatSymbols(const Locale& loc, UErrorCode& status DecimalFormatSymbols::DecimalFormatSymbols(const Locale& loc, const NumberingSystem& ns, UErrorCode& status) : UObject(), locale(loc), currPattern(NULL) { - initialize(locale, status, FALSE, &ns); + initialize(locale, status, false, &ns); } DecimalFormatSymbols::DecimalFormatSymbols() @@ -227,7 +227,7 @@ struct DecFmtSymDataSink : public ResourceSink { // Constructor/Destructor DecFmtSymDataSink(DecimalFormatSymbols& _dfs) : dfs(_dfs) { - uprv_memset(seenSymbol, FALSE, sizeof(seenSymbol)); + uprv_memset(seenSymbol, false, sizeof(seenSymbol)); } virtual ~DecFmtSymDataSink(); @@ -239,7 +239,7 @@ struct DecFmtSymDataSink : public ResourceSink { for (int32_t i=0; i0) { --count; - if (array1[count] != array2[count]) return FALSE; + if (array1[count] != array2[count]) return false; } - return TRUE; + return true; } bool @@ -1334,7 +1334,7 @@ DateFormatSymbols::initZoneStringsArray(void) { i++; } - } while (FALSE); + } while (false); if (U_FAILURE(status)) { if (zarray) { @@ -1422,7 +1422,7 @@ static const uint64_t kNumericFieldsForCount12 = UBool U_EXPORT2 DateFormatSymbols::isNumericField(UDateFormatField f, int32_t count) { if (f == UDAT_FIELD_COUNT) { - return FALSE; + return false; } uint64_t flag = ((uint64_t)1 << f); return ((kNumericFieldsAlways & flag) != 0 || ((kNumericFieldsForCount12 & flag) != 0 && count < 3)); @@ -1524,7 +1524,7 @@ struct CalendarDataSink : public ResourceSink { // Initializes CalendarDataSink with default values CalendarDataSink(UErrorCode& status) - : arrays(FALSE, status), arraySizes(FALSE, status), maps(FALSE, status), + : arrays(false, status), arraySizes(false, status), maps(false, status), mapRefs(), aliasPathPairs(uprv_deleteUObject, uhash_compareUnicodeString, status), currentCalendarType(), nextCalendarType(), @@ -1690,7 +1690,7 @@ struct CalendarDataSink : public ResourceSink { // We are on a leaf, store the map elements into the stringMap if (i == 0) { // mapRefs will keep ownership of 'stringMap': - stringMap = mapRefs.create(FALSE, errorCode); + stringMap = mapRefs.create(false, errorCode); if (stringMap == NULL) { errorCode = U_MEMORY_ALLOCATION_ERROR; return; @@ -1703,7 +1703,7 @@ struct CalendarDataSink : public ResourceSink { int32_t valueStringSize; const UChar *valueString = value.getString(valueStringSize, errorCode); if (U_FAILURE(errorCode)) { return; } - LocalPointer valueUString(new UnicodeString(TRUE, valueString, valueStringSize), errorCode); + LocalPointer valueUString(new UnicodeString(true, valueString, valueStringSize), errorCode); stringMap->put(keyUString, valueUString.orphan(), errorCode); if (U_FAILURE(errorCode)) { return; } continue; @@ -1717,7 +1717,7 @@ struct CalendarDataSink : public ResourceSink { // In cyclicNameSets ignore everything but years/format/abbreviated // and zodiacs/format/abbreviated if (path.startsWith(kCyclicNameSetsTagUChar, UPRV_LENGTHOF(kCyclicNameSetsTagUChar))) { - UBool skip = TRUE; + UBool skip = true; int32_t startIndex = UPRV_LENGTHOF(kCyclicNameSetsTagUChar); int32_t length = 0; if (startIndex == path.length() @@ -1732,7 +1732,7 @@ struct CalendarDataSink : public ResourceSink { length = 0; if (startIndex == path.length() || path.compare(startIndex, (length = UPRV_LENGTHOF(kAbbrTagUChar)), kAbbrTagUChar, 0, UPRV_LENGTHOF(kAbbrTagUChar)) == 0) { - skip = FALSE; + skip = false; } } } @@ -1854,7 +1854,7 @@ initField(UnicodeString **field, int32_t& length, const UChar *data, LastResortS for(int32_t i = 0; isetTo(TRUE, data+(i*((int32_t)strLen)), -1); + (*(field)+i)->setTo(true, data+(i*((int32_t)strLen)), -1); } } else { @@ -1911,7 +1911,7 @@ initLeapMonthPattern(UnicodeString *field, int32_t index, CalendarDataSink &sink UnicodeString pathUString(path.data(), -1, US_INV); Hashtable *leapMonthTable = static_cast(sink.maps.get(pathUString)); if (leapMonthTable != NULL) { - UnicodeString leapLabel(FALSE, kLeapTagUChar, UPRV_LENGTHOF(kLeapTagUChar)); + UnicodeString leapLabel(false, kLeapTagUChar, UPRV_LENGTHOF(kLeapTagUChar)); UnicodeString *leapMonthPattern = static_cast(leapMonthTable->get(leapLabel)); if (leapMonthPattern != NULL) { field[index].fastCopyFrom(*leapMonthPattern); @@ -2122,7 +2122,7 @@ DateFormatSymbols::initializeData(const Locale& locale, const char *type, UError if (status == U_MISSING_RESOURCE_ERROR) { ures_close(ctb); if (uprv_strcmp(calendarTypeCArray, gGregorianTag) != 0) { - calendarType.setTo(FALSE, kGregorianTagUChar, UPRV_LENGTHOF(kGregorianTagUChar)); + calendarType.setTo(false, kGregorianTagUChar, UPRV_LENGTHOF(kGregorianTagUChar)); calendarSink.visitAllResources(); status = oldStatus; continue; @@ -2145,7 +2145,7 @@ DateFormatSymbols::initializeData(const Locale& locale, const char *type, UError // Gregorian is always the last fallback if (calendarType.isBogus()) { - calendarType.setTo(FALSE, kGregorianTagUChar, UPRV_LENGTHOF(kGregorianTagUChar)); + calendarType.setTo(false, kGregorianTagUChar, UPRV_LENGTHOF(kGregorianTagUChar)); calendarSink.visitAllResources(); } } @@ -2386,14 +2386,14 @@ DateFormatSymbols::initializeData(const Locale& locale, const char *type, UError /* // fastCopyFrom()/setTo() - see assignArray comments resStr = ures_getStringByKey(fResourceBundle, gLocalPatternCharsTag, &len, &status); - fLocalPatternChars.setTo(TRUE, resStr, len); + fLocalPatternChars.setTo(true, resStr, len); // If the locale data does not include new pattern chars, use the defaults // TODO: Consider making this an error, since this may add conflicting characters. if (len < PATTERN_CHARS_LEN) { - fLocalPatternChars.append(UnicodeString(TRUE, &gPatternChars[len], PATTERN_CHARS_LEN-len)); + fLocalPatternChars.append(UnicodeString(true, &gPatternChars[len], PATTERN_CHARS_LEN-len)); } */ - fLocalPatternChars.setTo(TRUE, gPatternChars, PATTERN_CHARS_LEN); + fLocalPatternChars.setTo(true, gPatternChars, PATTERN_CHARS_LEN); // Format wide weekdays -> fWeekdays // {sfb} fixed to handle 1-based weekdays @@ -2494,7 +2494,7 @@ DateFormatSymbols::initializeData(const Locale& locale, const char *type, UError initField(&fStandaloneQuarters, fStandaloneQuartersCount, (const UChar *)gLastResortQuarters, kQuarterNum, kQuarterLen, status); initField(&fStandaloneShortQuarters, fStandaloneShortQuartersCount, (const UChar *)gLastResortQuarters, kQuarterNum, kQuarterLen, status); initField(&fStandaloneNarrowQuarters, fStandaloneNarrowQuartersCount, (const UChar *)gLastResortQuarters, kQuarterNum, kQuarterLen, status); - fLocalPatternChars.setTo(TRUE, gPatternChars, PATTERN_CHARS_LEN); + fLocalPatternChars.setTo(true, gPatternChars, PATTERN_CHARS_LEN); } } diff --git a/icu4c/source/i18n/dtitvfmt.cpp b/icu4c/source/i18n/dtitvfmt.cpp index 23b285aff81..eb5be7846e2 100644 --- a/icu4c/source/i18n/dtitvfmt.cpp +++ b/icu4c/source/i18n/dtitvfmt.cpp @@ -298,7 +298,7 @@ DateIntervalFormat::format(const DateInterval* dtInterval, } FieldPositionOnlyHandler handler(fieldPosition); - handler.setAcceptFirstOnly(TRUE); + handler.setAcceptFirstOnly(true); int8_t ignore; Mutex lock(&gFormatterMutex); @@ -351,7 +351,7 @@ DateIntervalFormat::format(Calendar& fromCalendar, FieldPosition& pos, UErrorCode& status) const { FieldPositionOnlyHandler handler(pos); - handler.setAcceptFirstOnly(TRUE); + handler.setAcceptFirstOnly(true); int8_t ignore; Mutex lock(&gFormatterMutex); @@ -1207,8 +1207,8 @@ DateIntervalFormat::getDateTimeSkeleton(const UnicodeString& skeleton, * @param dateSkeleton normalized date skeleton * @param timeSkeleton normalized time skeleton * @return whether the resource is found for the skeleton. - * TRUE if interval pattern found for the skeleton, - * FALSE otherwise. + * true if interval pattern found for the skeleton, + * false otherwise. * @stable ICU 4.0 */ UBool @@ -1420,8 +1420,8 @@ DateIntervalFormat::setIntervalPattern(UCalendarDateFields field, * @param extendedBestSkeleton extended best match skeleton * @return whether the interval pattern is found * through extending skeleton or not. - * TRUE if interval pattern is found by - * extending skeleton, FALSE otherwise. + * true if interval pattern is found by + * extending skeleton, false otherwise. * @stable ICU 4.0 */ UBool @@ -1495,10 +1495,10 @@ DateIntervalFormat::setIntervalPattern(UCalendarDateFields field, setIntervalPattern(field, pattern); } if ( extendedSkeleton && !extendedSkeleton->isEmpty() ) { - return TRUE; + return true; } } - return FALSE; + return false; } @@ -1539,8 +1539,8 @@ DateIntervalFormat::splitPatternInto2Part(const UnicodeString& intervalPattern) if (ch != prevCh && count > 0) { // check the repeativeness of pattern letter UBool repeated = patternRepeated[(int)(prevCh - PATTERN_CHAR_BASE)]; - if ( repeated == FALSE ) { - patternRepeated[prevCh - PATTERN_CHAR_BASE] = TRUE; + if ( repeated == false ) { + patternRepeated[prevCh - PATTERN_CHAR_BASE] = true; } else { foundRepetition = true; break; @@ -1568,8 +1568,8 @@ DateIntervalFormat::splitPatternInto2Part(const UnicodeString& intervalPattern) // "dd MM" ( no repetition ), // "d-d"(last char repeated ), and // "d-d MM" ( repetition found ) - if ( count > 0 && foundRepetition == FALSE ) { - if ( patternRepeated[(int)(prevCh - PATTERN_CHAR_BASE)] == FALSE ) { + if ( count > 0 && foundRepetition == false ) { + if ( patternRepeated[(int)(prevCh - PATTERN_CHAR_BASE)] == false ) { count = 0; } } @@ -1683,7 +1683,7 @@ DateIntervalFormat::fieldExistsInSkeleton(UCalendarDateFields field, const UnicodeString& skeleton) { const UChar fieldChar = fgCalendarFieldToPatternLetter[field]; - return ( (skeleton.indexOf(fieldChar) == -1)?FALSE:TRUE ) ; + return ( (skeleton.indexOf(fieldChar) == -1)?false:true ) ; } diff --git a/icu4c/source/i18n/dtitvinf.cpp b/icu4c/source/i18n/dtitvinf.cpp index 6052894b586..f5fb86ce581 100644 --- a/icu4c/source/i18n/dtitvinf.cpp +++ b/icu4c/source/i18n/dtitvinf.cpp @@ -401,7 +401,7 @@ DateIntervalInfo::initializeData(const Locale& locale, UErrorCode& status) char localeWithCalendarKey[ULOC_LOCALE_IDENTIFIER_CAPACITY]; // obtain a locale that always has the calendar key value that should be used (void)ures_getFunctionalEquivalent(localeWithCalendarKey, ULOC_LOCALE_IDENTIFIER_CAPACITY, nullptr, - "calendar", "calendar", locName, nullptr, FALSE, &status); + "calendar", "calendar", locName, nullptr, false, &status); localeWithCalendarKey[ULOC_LOCALE_IDENTIFIER_CAPACITY-1] = 0; // ensure null termination // now get the calendar key value from that locale int32_t calendarTypeLen = uloc_getKeywordValue(localeWithCalendarKey, "calendar", calendarType, @@ -437,7 +437,7 @@ DateIntervalInfo::initializeData(const Locale& locale, UErrorCode& status) } if ( U_SUCCESS(status) && (resStr != nullptr)) { - UnicodeString pattern = UnicodeString(TRUE, resStr, resStrLen); + UnicodeString pattern = UnicodeString(true, resStr, resStrLen); setFallbackIntervalPattern(pattern, status); } ures_close(itvDtPtnResource); @@ -449,7 +449,7 @@ DateIntervalInfo::initializeData(const Locale& locale, UErrorCode& status) const UnicodeString &calendarTypeToUseUString = sink.getNextCalendarType(); // Already loaded calendar types - Hashtable loadedCalendarTypes(FALSE, status); + Hashtable loadedCalendarTypes(false, status); if (U_SUCCESS(status)) { while (!calendarTypeToUseUString.isBogus()) { @@ -504,7 +504,7 @@ DateIntervalInfo::setIntervalPatternInternally(const UnicodeString& skeleton, } patternsOfOneSkeleton[index] = intervalPattern; - if ( emptyHash == TRUE ) { + if ( emptyHash == true ) { fIntervalPatterns->put(skeleton, patternsOfOneSkeleton, status); } } @@ -738,7 +738,7 @@ U_CDECL_BEGIN * * @param val1 one value in comparison * @param val2 the other value in comparison - * @return TRUE if 2 values are the same, FALSE otherwise + * @return true if 2 values are the same, false otherwise */ static UBool U_CALLCONV dtitvinfHashTableValueComparator(UHashTok val1, UHashTok val2); @@ -746,9 +746,9 @@ static UBool U_CALLCONV dtitvinfHashTableValueComparator(UHashTok val1, UHashTok val2) { const UnicodeString* pattern1 = (UnicodeString*)val1.pointer; const UnicodeString* pattern2 = (UnicodeString*)val2.pointer; - UBool ret = TRUE; + UBool ret = true; int8_t i; - for ( i = 0; i < DateIntervalInfo::kMaxIntervalPatternIndex && ret == TRUE; ++i ) { + for ( i = 0; i < DateIntervalInfo::kMaxIntervalPatternIndex && ret == true; ++i ) { ret = (pattern1[i] == pattern2[i]); } return ret; @@ -763,7 +763,7 @@ DateIntervalInfo::initHash(UErrorCode& status) { return nullptr; } Hashtable* hTable; - if ( (hTable = new Hashtable(FALSE, status)) == nullptr ) { + if ( (hTable = new Hashtable(false, status)) == nullptr ) { status = U_MEMORY_ALLOCATION_ERROR; return nullptr; } diff --git a/icu4c/source/i18n/dtptngen.cpp b/icu4c/source/i18n/dtptngen.cpp index 87eae8c7245..f4e28de91bc 100644 --- a/icu4c/source/i18n/dtptngen.cpp +++ b/icu4c/source/i18n/dtptngen.cpp @@ -100,7 +100,7 @@ static void ures_a_open(UResourceBundleAIterator *aiter, UResourceBundle *bund, aiter->entries[i].key = (UChar*)uprv_malloc(len*sizeof(UChar)); u_charsToUChars(akey, aiter->entries[i].key, len); } - uprv_sortArray(aiter->entries, aiter->num, sizeof(UResAEntry), ures_a_codepointSort, nullptr, TRUE, status); + uprv_sortArray(aiter->entries, aiter->num, sizeof(UResAEntry), ures_a_codepointSort, nullptr, true, status); #endif } @@ -485,7 +485,7 @@ U_CFUNC void U_CALLCONV deleteAllowedHourFormats(void *ptr) { // Close hashmap at cleanup. U_CFUNC UBool U_CALLCONV allowedHourFormatsCleanup() { uhash_close(localeToAllowedHourFormatsMap); - return TRUE; + return true; } enum AllowedHourFormat{ @@ -820,7 +820,7 @@ DateTimePatternGenerator::addICUPatterns(const Locale& locale, UErrorCode& statu SimpleDateFormat* sdf; if (df != nullptr && (sdf = dynamic_cast(df)) != nullptr) { sdf->toPattern(dfPattern); - addPattern(dfPattern, FALSE, conflictingString, status); + addPattern(dfPattern, false, conflictingString, status); } // TODO Maybe we should return an error when the date format isn't simple. delete df; @@ -829,7 +829,7 @@ DateTimePatternGenerator::addICUPatterns(const Locale& locale, UErrorCode& statu df = DateFormat::createTimeInstance(style, locale); if (df != nullptr && (sdf = dynamic_cast(df)) != nullptr) { sdf->toPattern(dfPattern); - addPattern(dfPattern, FALSE, conflictingString, status); + addPattern(dfPattern, false, conflictingString, status); // TODO: C++ and Java are inconsistent (see #12568). // C++ uses MEDIUM, but Java uses SHORT. @@ -849,7 +849,7 @@ DateTimePatternGenerator::hackTimes(const UnicodeString& hackPattern, UErrorCode fp->set(hackPattern); UnicodeString mmss; - UBool gotMm=FALSE; + UBool gotMm=false; for (int32_t i=0; iitemNumber; ++i) { UnicodeString field = fp->items[i]; if ( fp->isQuoteLiteral(field) ) { @@ -866,7 +866,7 @@ DateTimePatternGenerator::hackTimes(const UnicodeString& hackPattern, UErrorCode else { UChar ch=field.charAt(0); if (ch==LOW_M) { - gotMm=TRUE; + gotMm=true; mmss+=field; } else { @@ -875,7 +875,7 @@ DateTimePatternGenerator::hackTimes(const UnicodeString& hackPattern, UErrorCode break; } mmss+= field; - addPattern(mmss, FALSE, conflictingString, status); + addPattern(mmss, false, conflictingString, status); break; } else { @@ -906,7 +906,7 @@ DateTimePatternGenerator::getCalendarTypeToUse(const Locale& locale, CharString& "calendar", locale.getName(), nullptr, - FALSE, + false, &localStatus); localeWithCalendarKey[ULOC_LOCALE_IDENTIFIER_CAPACITY-1] = 0; // ensure null termination // now get the calendar key value from that locale @@ -961,7 +961,7 @@ struct DateTimePatternGenerator::AppendItemFormatsSink : public ResourceSink { } void fillInMissing() { - UnicodeString defaultItemFormat(TRUE, UDATPG_ItemFormat, UPRV_LENGTHOF(UDATPG_ItemFormat)-1); // Read-only alias. + UnicodeString defaultItemFormat(true, UDATPG_ItemFormat, UPRV_LENGTHOF(UDATPG_ItemFormat)-1); // Read-only alias. for (int32_t i = 0; i < UDATPG_FIELD_COUNT; i++) { UDateTimePatternField field = (UDateTimePatternField)i; if (dtpg.getAppendItemFormat(field).isEmpty()) { @@ -1105,7 +1105,7 @@ DateTimePatternGenerator::initHashtable(UErrorCode& err) { if (fAvailableFormatKeyHash!=nullptr) { return; } - LocalPointer hash(new Hashtable(FALSE, err), err); + LocalPointer hash(new Hashtable(false, err), err); if (U_SUCCESS(err)) { fAvailableFormatKeyHash = hash.orphan(); } @@ -1247,7 +1247,7 @@ UnicodeString DateTimePatternGenerator::mapSkeletonMetacharacters(const UnicodeString& patternForm, int32_t* flags, UErrorCode& status) { UnicodeString patternFormMapped; patternFormMapped.remove(); - UBool inQuoted = FALSE; + UBool inQuoted = false; int32_t patPos, patLen = patternForm.length(); for (patPos = 0; patPos < patLen; patPos++) { UChar patChr = patternForm.charAt(patPos); @@ -1359,7 +1359,7 @@ DateTimePatternGenerator::addCanonicalItems(UErrorCode& status) { for (int32_t i=0; i 0) { - addPattern(UnicodeString(Canonical_Items[i]), FALSE, conflictingPattern, status); + addPattern(UnicodeString(Canonical_Items[i]), false, conflictingPattern, status); } if (U_FAILURE(status)) { return; } } @@ -1478,7 +1478,7 @@ DateTimePatternGenerator::setDateTimeFromCalendar(const Locale& locale, UErrorCo if (U_FAILURE(status)) { return; } for (int32_t style = UDAT_FULL; style <= UDAT_SHORT; style++) { resStr = ures_getStringByIndex(dateTimePatterns.getAlias(), dateTimeOffset + style, &resStrLen, &status); - setDateTimeFormat((UDateFormatStyle)style, UnicodeString(TRUE, resStr, resStrLen), status); + setDateTimeFormat((UDateFormatStyle)style, UnicodeString(true, resStr, resStrLen), status); } } @@ -1986,14 +1986,14 @@ DateTimePatternGenerator::getRedundants(UErrorCode& status) { UBool DateTimePatternGenerator::isCanonicalItem(const UnicodeString& item) const { if ( item.length() != 1 ) { - return FALSE; + return false; } for (int32_t i=0; ibasePattern != otherElem->basePattern) || (myElem->pattern != otherElem->pattern) ) { - return FALSE; + return false; } if ((myElem->skeleton.getAlias() != otherElem->skeleton.getAlias()) && !myElem->skeleton->equals(*(otherElem->skeleton))) { - return FALSE; + return false; } myElem = myElem->next.getAlias(); otherElem = otherElem->next.getAlias(); } } - return TRUE; + return true; } // find any key existing in the mapping table already. -// return TRUE if there is an existing key, otherwise return FALSE. +// return true if there is an existing key, otherwise return false. PtnElem* PatternMap::getDuplicateElem( const UnicodeString &basePattern, @@ -2268,10 +2268,10 @@ PatternMap::getDuplicateElem( } do { if ( basePattern.compare(curElem->basePattern)==0 ) { - UBool isEqual = TRUE; + UBool isEqual = true; for (int32_t i = 0; i < UDATPG_FIELD_COUNT; ++i) { if (curElem->skeleton->type[i] != skeleton.type[i] ) { - isEqual = FALSE; + isEqual = false; break; } } @@ -2316,7 +2316,7 @@ DateTimeMatcher::set(const UnicodeString& pattern, FormatParser* fp, PtnSkeleton } skeletonResult.original.clear(); skeletonResult.baseOriginal.clear(); - skeletonResult.addedDefaultDayPeriod = FALSE; + skeletonResult.addedDefaultDayPeriod = false; fp->set(pattern); for (i=0; i < fp->itemNumber; i++) { @@ -2384,7 +2384,7 @@ DateTimeMatcher::set(const UnicodeString& pattern, FormatParser* fp, PtnSkeleton skeletonResult.original.populate(UDATPG_DAYPERIOD_FIELD, dtTypes[i].patternChar, dtTypes[i].minLen); skeletonResult.baseOriginal.populate(UDATPG_DAYPERIOD_FIELD, dtTypes[i].patternChar, dtTypes[i].minLen); skeletonResult.type[UDATPG_DAYPERIOD_FIELD] = dtTypes[i].type; - skeletonResult.addedDefaultDayPeriod = TRUE; + skeletonResult.addedDefaultDayPeriod = true; break; } } @@ -2452,7 +2452,7 @@ DateTimeMatcher::copyFrom() { UBool DateTimeMatcher::equals(const DateTimeMatcher* other) const { - if (other==nullptr) { return FALSE; } + if (other==nullptr) { return false; } return skeleton.original == other->skeleton.original; } @@ -2611,10 +2611,10 @@ FormatParser::isPatternSeparator(const UnicodeString& field) const { continue; } else { - return FALSE; + return false; } } - return TRUE; + return true; } DistanceInfo::~DistanceInfo() {} @@ -2656,12 +2656,12 @@ PatternMapIterator::hasNext() const { PtnElem *curPtr = nodePtr; if (patternMap==nullptr) { - return FALSE; + return false; } while ( headIndex < MAX_PATTERN_ENTRIES ) { if ( curPtr != nullptr ) { if ( curPtr->next != nullptr ) { - return TRUE; + return true; } else { headIndex++; @@ -2671,7 +2671,7 @@ PatternMapIterator::hasNext() const { } else { if ( patternMap->boot[headIndex] != nullptr ) { - return TRUE; + return true; } else { headIndex++; @@ -2679,7 +2679,7 @@ PatternMapIterator::hasNext() const { } } } - return FALSE; + return false; } DateTimeMatcher& @@ -2786,7 +2786,7 @@ UChar SkeletonFields::getFirstChar() const { PtnSkeleton::PtnSkeleton() - : addedDefaultDayPeriod(FALSE) { + : addedDefaultDayPeriod(false) { } PtnSkeleton::PtnSkeleton(const PtnSkeleton& other) { @@ -2924,14 +2924,14 @@ DTSkeletonEnumeration::count(UErrorCode& /*status*/) const { UBool DTSkeletonEnumeration::isCanonicalItem(const UnicodeString& item) { if ( item.length() != 1 ) { - return FALSE; + return false; } for (int32_t i=0; igetOffset(localMillis, FALSE, rawOffset, dstOffset, ec); + zone->getOffset(localMillis, false, rawOffset, dstOffset, ec); delete zone; localMillis += (rawOffset + dstOffset); } diff --git a/icu4c/source/i18n/esctrn.cpp b/icu4c/source/i18n/esctrn.cpp index ba0e4c2c7bb..00c1304d245 100644 --- a/icu4c/source/i18n/esctrn.cpp +++ b/icu4c/source/i18n/esctrn.cpp @@ -36,28 +36,28 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(EscapeTransliterator) */ static Transliterator* _createEscUnicode(const UnicodeString& ID, Transliterator::Token /*context*/) { // Unicode: "U+10FFFF" hex, min=4, max=6 - return new EscapeTransliterator(ID, UnicodeString(TRUE, UNIPRE, 2), UnicodeString(), 16, 4, TRUE, NULL); + return new EscapeTransliterator(ID, UnicodeString(true, UNIPRE, 2), UnicodeString(), 16, 4, true, NULL); } static Transliterator* _createEscJava(const UnicodeString& ID, Transliterator::Token /*context*/) { // Java: "\\uFFFF" hex, min=4, max=4 - return new EscapeTransliterator(ID, UnicodeString(TRUE, BS_u, 2), UnicodeString(), 16, 4, FALSE, NULL); + return new EscapeTransliterator(ID, UnicodeString(true, BS_u, 2), UnicodeString(), 16, 4, false, NULL); } static Transliterator* _createEscC(const UnicodeString& ID, Transliterator::Token /*context*/) { // C: "\\uFFFF" hex, min=4, max=4; \\U0010FFFF hex, min=8, max=8 - return new EscapeTransliterator(ID, UnicodeString(TRUE, BS_u, 2), UnicodeString(), 16, 4, TRUE, - new EscapeTransliterator(UnicodeString(), UnicodeString(TRUE, BS_U, 2), UnicodeString(), 16, 8, TRUE, NULL)); + return new EscapeTransliterator(ID, UnicodeString(true, BS_u, 2), UnicodeString(), 16, 4, true, + new EscapeTransliterator(UnicodeString(), UnicodeString(true, BS_U, 2), UnicodeString(), 16, 8, true, NULL)); } static Transliterator* _createEscXML(const UnicodeString& ID, Transliterator::Token /*context*/) { // XML: "􏿿" hex, min=1, max=6 - return new EscapeTransliterator(ID, UnicodeString(TRUE, XMLPRE, 3), UnicodeString(SEMI[0]), 16, 1, TRUE, NULL); + return new EscapeTransliterator(ID, UnicodeString(true, XMLPRE, 3), UnicodeString(SEMI[0]), 16, 1, true, NULL); } static Transliterator* _createEscXML10(const UnicodeString& ID, Transliterator::Token /*context*/) { // XML10: "&1114111;" dec, min=1, max=7 (not really "Any-Hex") - return new EscapeTransliterator(ID, UnicodeString(TRUE, XML10PRE, 2), UnicodeString(SEMI[0]), 10, 1, TRUE, NULL); + return new EscapeTransliterator(ID, UnicodeString(true, XML10PRE, 2), UnicodeString(SEMI[0]), 10, 1, true, NULL); } static Transliterator* _createEscPerl(const UnicodeString& ID, Transliterator::Token /*context*/) { // Perl: "\\x{263A}" hex, min=1, max=6 - return new EscapeTransliterator(ID, UnicodeString(TRUE, PERLPRE, 3), UnicodeString(RBRACE[0]), 16, 1, TRUE, NULL); + return new EscapeTransliterator(ID, UnicodeString(true, PERLPRE, 3), UnicodeString(RBRACE[0]), 16, 1, true, NULL); } /** @@ -139,7 +139,7 @@ void EscapeTransliterator::handleTransliterate(Replaceable& text, UnicodeString buf(prefix); int32_t prefixLen = prefix.length(); - UBool redoPrefix = FALSE; + UBool redoPrefix = false; while (start < limit) { int32_t c = grokSupplementals ? text.char32At(start) : text.charAt(start); @@ -151,12 +151,12 @@ void EscapeTransliterator::handleTransliterate(Replaceable& text, ICU_Utility::appendNumber(buf, c, supplementalHandler->radix, supplementalHandler->minDigits); buf.append(supplementalHandler->suffix); - redoPrefix = TRUE; + redoPrefix = true; } else { if (redoPrefix) { buf.truncate(0); buf.append(prefix); - redoPrefix = FALSE; + redoPrefix = false; } else { buf.truncate(prefixLen); } diff --git a/icu4c/source/i18n/fmtable.cpp b/icu4c/source/i18n/fmtable.cpp index 7a9a81ded5d..c3ede98328e 100644 --- a/icu4c/source/i18n/fmtable.cpp +++ b/icu4c/source/i18n/fmtable.cpp @@ -53,7 +53,7 @@ using number::impl::DecimalQuantity; // NOTE: These inlines assume that all fObjects are in fact instances // of the Measure class, which is true as of 3.0. [alan] -// Return TRUE if *a == *b. +// Return true if *a == *b. static inline UBool objectEquals(const UObject* a, const UObject* b) { // LATER: return *a == *b; return *((const Measure*) a) == *((const Measure*) b); @@ -65,7 +65,7 @@ static inline UObject* objectClone(const UObject* a) { return ((const Measure*) a)->clone(); } -// Return TRUE if *a is an instance of Measure. +// Return true if *a is an instance of Measure. static inline UBool instanceOfMeasure(const UObject* a) { return dynamic_cast(a) != NULL; } @@ -382,9 +382,9 @@ Formattable::isNumeric() const { case kDouble: case kLong: case kInt64: - return TRUE; + return true; default: - return FALSE; + return false; } } diff --git a/icu4c/source/i18n/formatted_string_builder.cpp b/icu4c/source/i18n/formatted_string_builder.cpp index 628fbea8711..8dbf954af9f 100644 --- a/icu4c/source/i18n/formatted_string_builder.cpp +++ b/icu4c/source/i18n/formatted_string_builder.cpp @@ -380,7 +380,7 @@ UnicodeString FormattedStringBuilder::toUnicodeString() const { const UnicodeString FormattedStringBuilder::toTempUnicodeString() const { // Readonly-alias constructor: - return UnicodeString(FALSE, getCharPtr() + fZero, fLength); + return UnicodeString(false, getCharPtr() + fZero, fLength); } UnicodeString FormattedStringBuilder::toDebugString() const { diff --git a/icu4c/source/i18n/formattedval_iterimpl.cpp b/icu4c/source/i18n/formattedval_iterimpl.cpp index 75328fae883..ec770e2191d 100644 --- a/icu4c/source/i18n/formattedval_iterimpl.cpp +++ b/icu4c/source/i18n/formattedval_iterimpl.cpp @@ -32,7 +32,7 @@ UnicodeString FormattedValueFieldPositionIteratorImpl::toTempString( UErrorCode&) const { // The alias must point to memory owned by this object; // fastCopyFrom doesn't do this when using a stack buffer. - return UnicodeString(TRUE, fString.getBuffer(), fString.length()); + return UnicodeString(true, fString.getBuffer(), fString.length()); } Appendable& FormattedValueFieldPositionIteratorImpl::appendTo( diff --git a/icu4c/source/i18n/formattedvalue.cpp b/icu4c/source/i18n/formattedvalue.cpp index 1030661f220..f103c015b8e 100644 --- a/icu4c/source/i18n/formattedvalue.cpp +++ b/icu4c/source/i18n/formattedvalue.cpp @@ -43,7 +43,7 @@ void ConstrainedFieldPosition::setInt64IterationContext(int64_t context) { UBool ConstrainedFieldPosition::matchesField(int32_t category, int32_t field) const { switch (fConstraint) { case UCFPOS_CONSTRAINT_NONE: - return TRUE; + return true; case UCFPOS_CONSTRAINT_CATEGORY: return fCategory == category; case UCFPOS_CONSTRAINT_FIELD: @@ -223,7 +223,7 @@ ufmtval_nextPosition( const auto* fmtval = UFormattedValueApiHelper::validate(ufmtval, *ec); auto* cfpos = UConstrainedFieldPositionImpl::validate(ucfpos, *ec); if (U_FAILURE(*ec)) { - return FALSE; + return false; } return fmtval->fFormattedValue->nextPosition(cfpos->fImpl, *ec); } diff --git a/icu4c/source/i18n/fphdlimp.cpp b/icu4c/source/i18n/fphdlimp.cpp index f51bf4bae78..4f6a98c2120 100644 --- a/icu4c/source/i18n/fphdlimp.cpp +++ b/icu4c/source/i18n/fphdlimp.cpp @@ -39,7 +39,7 @@ FieldPositionOnlyHandler::~FieldPositionOnlyHandler() { void FieldPositionOnlyHandler::addAttribute(int32_t id, int32_t start, int32_t limit) { if (pos.getField() == id && (!acceptFirstOnly || !seenFirst)) { - seenFirst = TRUE; + seenFirst = true; pos.setBeginIndex(start + fShift); pos.setEndIndex(limit + fShift); } diff --git a/icu4c/source/i18n/fpositer.cpp b/icu4c/source/i18n/fpositer.cpp index 096896d7b38..64bec990e3a 100644 --- a/icu4c/source/i18n/fpositer.cpp +++ b/icu4c/source/i18n/fpositer.cpp @@ -92,7 +92,7 @@ void FieldPositionIterator::setData(UVector32 *adopt, UErrorCode& status) { UBool FieldPositionIterator::next(FieldPosition& fp) { if (pos == -1) { - return FALSE; + return false; } // Ignore the first element of the tetrad: used for field category @@ -105,7 +105,7 @@ UBool FieldPositionIterator::next(FieldPosition& fp) { pos = -1; } - return TRUE; + return true; } U_NAMESPACE_END diff --git a/icu4c/source/i18n/gender.cpp b/icu4c/source/i18n/gender.cpp index 0fe674fc7d1..ef64d178467 100644 --- a/icu4c/source/i18n/gender.cpp +++ b/icu4c/source/i18n/gender.cpp @@ -55,7 +55,7 @@ static UBool U_CALLCONV gender_cleanup(void) { delete [] gObjs; } gGenderInitOnce.reset(); - return TRUE; + return true; } U_CDECL_END @@ -184,8 +184,8 @@ UGender GenderInfo::getListGender(const UGender* genders, int32_t length, UError if (length == 1) { return genders[0]; } - UBool has_female = FALSE; - UBool has_male = FALSE; + UBool has_female = false; + UBool has_male = false; switch (_style) { case NEUTRAL: return UGENDER_OTHER; @@ -199,13 +199,13 @@ UGender GenderInfo::getListGender(const UGender* genders, int32_t length, UError if (has_male) { return UGENDER_OTHER; } - has_female = TRUE; + has_female = true; break; case UGENDER_MALE: if (has_female) { return UGENDER_OTHER; } - has_male = TRUE; + has_male = true; break; default: break; diff --git a/icu4c/source/i18n/gregocal.cpp b/icu4c/source/i18n/gregocal.cpp index 886c30b74df..63a6c2d4529 100644 --- a/icu4c/source/i18n/gregocal.cpp +++ b/icu4c/source/i18n/gregocal.cpp @@ -155,7 +155,7 @@ GregorianCalendar::GregorianCalendar(UErrorCode& status) : Calendar(status), fGregorianCutover(kPapalCutover), fCutoverJulianDay(kCutoverJulianDay), fNormalizedGregorianCutover(fGregorianCutover), fGregorianCutoverYear(1582), -fIsGregorian(TRUE), fInvertGregorian(FALSE) +fIsGregorian(true), fInvertGregorian(false) { setTimeInMillis(getNow(), status); } @@ -166,7 +166,7 @@ GregorianCalendar::GregorianCalendar(TimeZone* zone, UErrorCode& status) : Calendar(zone, Locale::getDefault(), status), fGregorianCutover(kPapalCutover), fCutoverJulianDay(kCutoverJulianDay), fNormalizedGregorianCutover(fGregorianCutover), fGregorianCutoverYear(1582), -fIsGregorian(TRUE), fInvertGregorian(FALSE) +fIsGregorian(true), fInvertGregorian(false) { setTimeInMillis(getNow(), status); } @@ -177,7 +177,7 @@ GregorianCalendar::GregorianCalendar(const TimeZone& zone, UErrorCode& status) : Calendar(zone, Locale::getDefault(), status), fGregorianCutover(kPapalCutover), fCutoverJulianDay(kCutoverJulianDay), fNormalizedGregorianCutover(fGregorianCutover), fGregorianCutoverYear(1582), -fIsGregorian(TRUE), fInvertGregorian(FALSE) +fIsGregorian(true), fInvertGregorian(false) { setTimeInMillis(getNow(), status); } @@ -188,7 +188,7 @@ GregorianCalendar::GregorianCalendar(const Locale& aLocale, UErrorCode& status) : Calendar(TimeZone::forLocaleOrDefault(aLocale), aLocale, status), fGregorianCutover(kPapalCutover), fCutoverJulianDay(kCutoverJulianDay), fNormalizedGregorianCutover(fGregorianCutover), fGregorianCutoverYear(1582), -fIsGregorian(TRUE), fInvertGregorian(FALSE) +fIsGregorian(true), fInvertGregorian(false) { setTimeInMillis(getNow(), status); } @@ -200,7 +200,7 @@ GregorianCalendar::GregorianCalendar(TimeZone* zone, const Locale& aLocale, : Calendar(zone, aLocale, status), fGregorianCutover(kPapalCutover), fCutoverJulianDay(kCutoverJulianDay), fNormalizedGregorianCutover(fGregorianCutover), fGregorianCutoverYear(1582), - fIsGregorian(TRUE), fInvertGregorian(FALSE) + fIsGregorian(true), fInvertGregorian(false) { setTimeInMillis(getNow(), status); } @@ -212,7 +212,7 @@ GregorianCalendar::GregorianCalendar(const TimeZone& zone, const Locale& aLocale : Calendar(zone, aLocale, status), fGregorianCutover(kPapalCutover), fCutoverJulianDay(kCutoverJulianDay), fNormalizedGregorianCutover(fGregorianCutover), fGregorianCutoverYear(1582), - fIsGregorian(TRUE), fInvertGregorian(FALSE) + fIsGregorian(true), fInvertGregorian(false) { setTimeInMillis(getNow(), status); } @@ -224,7 +224,7 @@ GregorianCalendar::GregorianCalendar(int32_t year, int32_t month, int32_t date, : Calendar(TimeZone::createDefault(), Locale::getDefault(), status), fGregorianCutover(kPapalCutover), fCutoverJulianDay(kCutoverJulianDay), fNormalizedGregorianCutover(fGregorianCutover), fGregorianCutoverYear(1582), - fIsGregorian(TRUE), fInvertGregorian(FALSE) + fIsGregorian(true), fInvertGregorian(false) { set(UCAL_ERA, AD); set(UCAL_YEAR, year); @@ -239,7 +239,7 @@ GregorianCalendar::GregorianCalendar(int32_t year, int32_t month, int32_t date, : Calendar(TimeZone::createDefault(), Locale::getDefault(), status), fGregorianCutover(kPapalCutover), fCutoverJulianDay(kCutoverJulianDay), fNormalizedGregorianCutover(fGregorianCutover), fGregorianCutoverYear(1582), - fIsGregorian(TRUE), fInvertGregorian(FALSE) + fIsGregorian(true), fInvertGregorian(false) { set(UCAL_ERA, AD); set(UCAL_YEAR, year); @@ -257,7 +257,7 @@ GregorianCalendar::GregorianCalendar(int32_t year, int32_t month, int32_t date, : Calendar(TimeZone::createDefault(), Locale::getDefault(), status), fGregorianCutover(kPapalCutover), fCutoverJulianDay(kCutoverJulianDay), fNormalizedGregorianCutover(fGregorianCutover), fGregorianCutoverYear(1582), - fIsGregorian(TRUE), fInvertGregorian(FALSE) + fIsGregorian(true), fInvertGregorian(false) { set(UCAL_ERA, AD); set(UCAL_YEAR, year); @@ -472,27 +472,27 @@ GregorianCalendar::isLeapYear(int32_t year) const int32_t GregorianCalendar::handleComputeJulianDay(UCalendarDateFields bestField) { - fInvertGregorian = FALSE; + fInvertGregorian = false; int32_t jd = Calendar::handleComputeJulianDay(bestField); if((bestField == UCAL_WEEK_OF_YEAR) && // if we are doing WOY calculations, we are counting relative to Jan 1 *julian* (internalGet(UCAL_EXTENDED_YEAR)==fGregorianCutoverYear) && jd >= fCutoverJulianDay) { - fInvertGregorian = TRUE; // So that the Julian Jan 1 will be used in handleComputeMonthStart + fInvertGregorian = true; // So that the Julian Jan 1 will be used in handleComputeMonthStart return Calendar::handleComputeJulianDay(bestField); } // The following check handles portions of the cutover year BEFORE the // cutover itself happens. - //if ((fIsGregorian==TRUE) != (jd >= fCutoverJulianDay)) { /* cutoverJulianDay)) { */ - if ((fIsGregorian==TRUE) != (jd >= fCutoverJulianDay)) { /* cutoverJulianDay)) { */ + //if ((fIsGregorian==true) != (jd >= fCutoverJulianDay)) { /* cutoverJulianDay)) { */ + if ((fIsGregorian==true) != (jd >= fCutoverJulianDay)) { /* cutoverJulianDay)) { */ #if defined (U_DEBUG_CAL) fprintf(stderr, "%s:%d: jd [invert] %d\n", __FILE__, __LINE__, jd); #endif - fInvertGregorian = TRUE; + fInvertGregorian = true; jd = Calendar::handleComputeJulianDay(bestField); #if defined (U_DEBUG_CAL) fprintf(stderr, "%s:%d: fIsGregorian %s, fInvertGregorian %s - ", @@ -651,7 +651,7 @@ GregorianCalendar::validateFields() const field != UCAL_DAY_OF_YEAR && isSet((UCalendarDateFields)field) && ! boundsCheck(internalGet((UCalendarDateFields)field), (UCalendarDateFields)field)) - return FALSE; + return false; } // Values differ in Least-Maximum and Maximum should be handled @@ -660,14 +660,14 @@ GregorianCalendar::validateFields() const int32_t date = internalGet(UCAL_DATE); if (date < getMinimum(UCAL_DATE) || date > monthLength(internalGet(UCAL_MONTH))) { - return FALSE; + return false; } } if (isSet(UCAL_DAY_OF_YEAR)) { int32_t days = internalGet(UCAL_DAY_OF_YEAR); if (days < 1 || days > yearLength()) { - return FALSE; + return false; } } @@ -675,10 +675,10 @@ GregorianCalendar::validateFields() const // We've checked against minimum and maximum above already. if (isSet(UCAL_DAY_OF_WEEK_IN_MONTH) && 0 == internalGet(UCAL_DAY_OF_WEEK_IN_MONTH)) { - return FALSE; + return false; } - return TRUE; + return true; } // ------------------------------------- @@ -828,7 +828,7 @@ GregorianCalendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& s } // J81 processing. (gregorian cutover) - UBool inCutoverMonth = FALSE; + UBool inCutoverMonth = false; int32_t cMonthLen=0; // 'c' for cutover; in days int32_t cDayOfMonth=0; // no discontinuity: [0, cMonthLen) double cMonthStart=0.0; // in ms @@ -849,7 +849,7 @@ GregorianCalendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& s // A month containing the cutover is 10 days shorter. if ((cMonthStart < fGregorianCutover) && (cMonthStart + (cMonthLen=(max-10))*kOneDay >= fGregorianCutover)) { - inCutoverMonth = TRUE; + inCutoverMonth = true; } } break; @@ -1145,7 +1145,7 @@ int32_t GregorianCalendar::getActualMaximum(UCalendarDateFields field, UErrorCod return 0; } - cal->setLenient(TRUE); + cal->setLenient(true); int32_t era = cal->get(UCAL_ERA, status); UDate d = cal->getTime(status); @@ -1241,12 +1241,12 @@ UBool GregorianCalendar::inDaylightTime(UErrorCode& status) const { if (U_FAILURE(status) || !getTimeZone().useDaylightTime()) - return FALSE; + return false; // Force an update of the state of the Calendar. ((GregorianCalendar*)this)->complete(status); // cast away const - return (UBool)(U_SUCCESS(status) ? (internalGet(UCAL_DST_OFFSET) != 0) : FALSE); + return (UBool)(U_SUCCESS(status) ? (internalGet(UCAL_DST_OFFSET) != 0) : false); } // ------------------------------------- @@ -1279,7 +1279,7 @@ static icu::UInitOnce gSystemDefaultCenturyInit {}; UBool GregorianCalendar::haveDefaultCentury() const { - return TRUE; + return true; } static void U_CALLCONV diff --git a/icu4c/source/i18n/hebrwcal.cpp b/icu4c/source/i18n/hebrwcal.cpp index 770634d6750..b3e6bcb65c3 100644 --- a/icu4c/source/i18n/hebrwcal.cpp +++ b/icu4c/source/i18n/hebrwcal.cpp @@ -140,7 +140,7 @@ U_CDECL_BEGIN static UBool calendar_hebrew_cleanup(void) { delete gCache; gCache = NULL; - return TRUE; + return true; } U_CDECL_END @@ -239,7 +239,7 @@ void HebrewCalendar::add(UCalendarDateFields field, int32_t amount, UErrorCode& } month -= ELUL+1; ++year; - acrossAdar1 = TRUE; + acrossAdar1 = true; } } else { acrossAdar1 = (month > ADAR_1); // started after ADAR_1? @@ -253,7 +253,7 @@ void HebrewCalendar::add(UCalendarDateFields field, int32_t amount, UErrorCode& } month += ELUL+1; --year; - acrossAdar1 = TRUE; + acrossAdar1 = true; } } set(UCAL_MONTH, month); @@ -671,12 +671,12 @@ HebrewCalendar::inDaylightTime(UErrorCode& status) const { // copied from GregorianCalendar if (U_FAILURE(status) || !getTimeZone().useDaylightTime()) - return FALSE; + return false; // Force an update of the state of the Calendar. ((HebrewCalendar*)this)->complete(status); // cast away const - return (UBool)(U_SUCCESS(status) ? (internalGet(UCAL_DST_OFFSET) != 0) : FALSE); + return (UBool)(U_SUCCESS(status) ? (internalGet(UCAL_DST_OFFSET) != 0) : false); } /** @@ -690,7 +690,7 @@ static icu::UInitOnce gSystemDefaultCenturyInit {}; UBool HebrewCalendar::haveDefaultCentury() const { - return TRUE; + return true; } static void U_CALLCONV initializeSystemDefaultCentury() diff --git a/icu4c/source/i18n/indiancal.cpp b/icu4c/source/i18n/indiancal.cpp index 5755892d11e..935290a5751 100644 --- a/icu4c/source/i18n/indiancal.cpp +++ b/icu4c/source/i18n/indiancal.cpp @@ -303,13 +303,13 @@ IndianCalendar::inDaylightTime(UErrorCode& status) const { // copied from GregorianCalendar if (U_FAILURE(status) || !getTimeZone().useDaylightTime()) { - return FALSE; + return false; } // Force an update of the state of the Calendar. ((IndianCalendar*)this)->complete(status); // cast away const - return (UBool)(U_SUCCESS(status) ? (internalGet(UCAL_DST_OFFSET) != 0) : FALSE); + return (UBool)(U_SUCCESS(status) ? (internalGet(UCAL_DST_OFFSET) != 0) : false); } @@ -325,7 +325,7 @@ static icu::UInitOnce gSystemDefaultCenturyInit {}; UBool IndianCalendar::haveDefaultCentury() const { - return TRUE; + return true; } static void U_CALLCONV diff --git a/icu4c/source/i18n/inputext.cpp b/icu4c/source/i18n/inputext.cpp index fa4939e8f4f..7c78ad249a4 100644 --- a/icu4c/source/i18n/inputext.cpp +++ b/icu4c/source/i18n/inputext.cpp @@ -49,7 +49,7 @@ InputText::~InputText() void InputText::setText(const char *in, int32_t len) { fInputLen = 0; - fC1Bytes = FALSE; + fC1Bytes = false; fRawInput = (const uint8_t *) in; fRawLength = len == -1? (int32_t)uprv_strlen(in) : len; } @@ -83,7 +83,7 @@ void InputText::MungeInput(UBool fStripTags) { int srci = 0; int dsti = 0; uint8_t b; - bool inMarkup = FALSE; + bool inMarkup = false; int32_t openTags = 0; int32_t badTags = 0; @@ -103,7 +103,7 @@ void InputText::MungeInput(UBool fStripTags) { badTags += 1; } - inMarkup = TRUE; + inMarkup = true; openTags += 1; } @@ -112,7 +112,7 @@ void InputText::MungeInput(UBool fStripTags) { } if (b == (uint8_t)0x3E) { /* Check for the ASCII '>' */ - inMarkup = FALSE; + inMarkup = false; } } @@ -153,7 +153,7 @@ void InputText::MungeInput(UBool fStripTags) { for (int32_t i = 0x80; i <= 0x9F; i += 1) { if (fByteStats[i] != 0) { - fC1Bytes = TRUE; + fC1Bytes = true; break; } } diff --git a/icu4c/source/i18n/islamcal.cpp b/icu4c/source/i18n/islamcal.cpp index d44bdcdeba3..916b4da2b64 100644 --- a/icu4c/source/i18n/islamcal.cpp +++ b/icu4c/source/i18n/islamcal.cpp @@ -67,7 +67,7 @@ static UBool calendar_islamic_cleanup(void) { delete gIslamicCalendarAstro; gIslamicCalendarAstro = NULL; } - return TRUE; + return true; } U_CDECL_END @@ -697,12 +697,12 @@ IslamicCalendar::inDaylightTime(UErrorCode& status) const { // copied from GregorianCalendar if (U_FAILURE(status) || !getTimeZone().useDaylightTime()) - return FALSE; + return false; // Force an update of the state of the Calendar. ((IslamicCalendar*)this)->complete(status); // cast away const - return (UBool)(U_SUCCESS(status) ? (internalGet(UCAL_DST_OFFSET) != 0) : FALSE); + return (UBool)(U_SUCCESS(status) ? (internalGet(UCAL_DST_OFFSET) != 0) : false); } /** @@ -717,7 +717,7 @@ static icu::UInitOnce gSystemDefaultCenturyInit {}; UBool IslamicCalendar::haveDefaultCentury() const { - return TRUE; + return true; } UDate IslamicCalendar::defaultCenturyStart() const diff --git a/icu4c/source/i18n/japancal.cpp b/icu4c/source/i18n/japancal.cpp index be9e53ff77b..ca9b0704a00 100644 --- a/icu4c/source/i18n/japancal.cpp +++ b/icu4c/source/i18n/japancal.cpp @@ -50,7 +50,7 @@ static UBool japanese_calendar_cleanup(void) { } gCurrentEra = 0; gJapaneseEraRulesInitOnce.reset(); - return TRUE; + return true; } U_CDECL_END @@ -71,7 +71,7 @@ UBool JapaneseCalendar::enableTentativeEra() { // 1. Environment variable ICU_ENABLE_TENTATIVE_ERA=true or false - UBool includeTentativeEra = FALSE; + UBool includeTentativeEra = false; #if U_PLATFORM_HAS_WINUWP_API == 1 // UWP doesn't allow access to getenv(), but we can call GetEnvironmentVariableW to do the same thing. @@ -80,12 +80,12 @@ UBool JapaneseCalendar::enableTentativeEra() { WCHAR varValue[5] = {}; DWORD ret = GetEnvironmentVariableW(reinterpret_cast(varName), varValue, UPRV_LENGTHOF(varValue)); if ((ret == 4) && (_wcsicmp(varValue, L"true") == 0)) { - includeTentativeEra = TRUE; + includeTentativeEra = true; } #else char *envVarVal = getenv(TENTATIVE_ERA_VAR_NAME); if (envVarVal != NULL && uprv_stricmp(envVarVal, "true") == 0) { - includeTentativeEra = TRUE; + includeTentativeEra = true; } #endif return includeTentativeEra; @@ -230,7 +230,7 @@ Disable pivoting */ UBool JapaneseCalendar::haveDefaultCentury() const { - return FALSE; + return false; } UDate JapaneseCalendar::defaultCenturyStart() const diff --git a/icu4c/source/i18n/measfmt.cpp b/icu4c/source/i18n/measfmt.cpp index a9a56a3b58d..1bfdc2b3f86 100644 --- a/icu4c/source/i18n/measfmt.cpp +++ b/icu4c/source/i18n/measfmt.cpp @@ -183,10 +183,10 @@ static UBool getString( int32_t len = 0; const UChar *resStr = ures_getString(resource, &len, &status); if (U_FAILURE(status)) { - return FALSE; + return false; } - result.setTo(TRUE, resStr, len); - return TRUE; + result.setTo(true, resStr, len); + return true; } static UnicodeString loadNumericDateFormatterPattern( @@ -645,7 +645,7 @@ void MeasureFormat::adoptNumberFormat( UBool MeasureFormat::setMeasureFormatLocale(const Locale &locale, UErrorCode &status) { if (U_FAILURE(status) || locale == getLocale(status)) { - return FALSE; + return false; } initMeasureFormat(locale, fWidth, NULL, status); return U_SUCCESS(status); @@ -769,7 +769,7 @@ UnicodeString &MeasureFormat::formatNumeric( FormattedStringBuilder fsb; - UBool protect = FALSE; + UBool protect = false; const int32_t patternLength = pattern.length(); for (int32_t i = 0; i < patternLength; i++) { char16_t c = pattern[i]; diff --git a/icu4c/source/i18n/measunit_extra.cpp b/icu4c/source/i18n/measunit_extra.cpp index d9dfd0eea74..3d49d1d610a 100644 --- a/icu4c/source/i18n/measunit_extra.cpp +++ b/icu4c/source/i18n/measunit_extra.cpp @@ -349,7 +349,7 @@ UBool U_CALLCONV cleanupUnitExtras() { uprv_free(gSimpleUnits); gSimpleUnits = nullptr; gUnitExtrasInitOnce.reset(); - return TRUE; + return true; } void U_CALLCONV initUnitExtras(UErrorCode& status) { diff --git a/icu4c/source/i18n/msgfmt.cpp b/icu4c/source/i18n/msgfmt.cpp index 13a5a089516..29476f328f8 100644 --- a/icu4c/source/i18n/msgfmt.cpp +++ b/icu4c/source/i18n/msgfmt.cpp @@ -239,7 +239,7 @@ MessageFormat::MessageFormat(const UnicodeString& pattern, argTypes(NULL), argTypeCount(0), argTypeCapacity(0), - hasArgTypeConflicts(FALSE), + hasArgTypeConflicts(false), defaultNumberFormat(NULL), defaultDateFormat(NULL), cachedFormatters(NULL), @@ -261,7 +261,7 @@ MessageFormat::MessageFormat(const UnicodeString& pattern, argTypes(NULL), argTypeCount(0), argTypeCapacity(0), - hasArgTypeConflicts(FALSE), + hasArgTypeConflicts(false), defaultNumberFormat(NULL), defaultDateFormat(NULL), cachedFormatters(NULL), @@ -284,7 +284,7 @@ MessageFormat::MessageFormat(const UnicodeString& pattern, argTypes(NULL), argTypeCount(0), argTypeCapacity(0), - hasArgTypeConflicts(FALSE), + hasArgTypeConflicts(false), defaultNumberFormat(NULL), defaultDateFormat(NULL), cachedFormatters(NULL), @@ -338,17 +338,17 @@ MessageFormat::~MessageFormat() /** * Allocate argTypes[] to at least the given capacity and return - * TRUE if successful. If not, leave argTypes[] unchanged. + * true if successful. If not, leave argTypes[] unchanged. * * If argTypes is NULL, allocate it. If it is not NULL, enlarge it * if necessary to be at least as large as specified. */ UBool MessageFormat::allocateArgTypes(int32_t capacity, UErrorCode& status) { if (U_FAILURE(status)) { - return FALSE; + return false; } if (argTypeCapacity >= capacity) { - return TRUE; + return true; } if (capacity < DEFAULT_INITIAL_CAPACITY) { capacity = DEFAULT_INITIAL_CAPACITY; @@ -359,11 +359,11 @@ UBool MessageFormat::allocateArgTypes(int32_t capacity, UErrorCode& status) { uprv_realloc(argTypes, sizeof(*argTypes) * capacity); if (a == NULL) { status = U_MEMORY_ALLOCATION_ERROR; - return FALSE; + return false; } argTypes = a; argTypeCapacity = capacity; - return TRUE; + return true; } // ------------------------------------- @@ -504,7 +504,7 @@ void MessageFormat::resetPattern() { uhash_close(customFormatArgStarts); customFormatArgStarts = NULL; argTypeCount = 0; - hasArgTypeConflicts = FALSE; + hasArgTypeConflicts = false; } void @@ -973,7 +973,7 @@ public: PluralSelectorContext(int32_t start, const UnicodeString &name, const Formattable &num, double off, UErrorCode &errorCode) : startIndex(start), argName(name), offset(off), - numberArgIndex(-1), formatter(NULL), forReplaceNumber(FALSE) { + numberArgIndex(-1), formatter(NULL), forReplaceNumber(false) { // number needs to be set even when select() is not called. // Keep it as a Number/Formattable: // For format() methods, and to preserve information (e.g., BigDecimal). @@ -996,7 +996,7 @@ public: const Format *formatter; /** formatted argument number - plural offset */ UnicodeString numberString; - /** TRUE if number-offset was formatted with the stock number formatter */ + /** true if number-offset was formatted with the stock number formatter */ UBool forReplaceNumber; }; @@ -1048,7 +1048,7 @@ void MessageFormat::format(int32_t msgStart, const void *plNumber, UMessagePatternArgType argType = part->getArgType(); part = &msgPattern.getPart(++i); const Formattable* arg; - UBool noArg = FALSE; + UBool noArg = false; UnicodeString argName = msgPattern.getSubstring(*part); if (argumentNames == NULL) { int32_t argNumber = part->getValue(); // ARG_NUMBER @@ -1056,12 +1056,12 @@ void MessageFormat::format(int32_t msgStart, const void *plNumber, arg = arguments + argNumber; } else { arg = NULL; - noArg = TRUE; + noArg = true; } } else { arg = getArgFromListByName(arguments, argumentNames, cnt, argName); if (arg == NULL) { - noArg = TRUE; + noArg = true; } } ++i; @@ -1268,7 +1268,7 @@ MessageFormat::findOtherSubMessage(int32_t partIndex) const { } // Iterate over (ARG_SELECTOR [ARG_INT|ARG_DOUBLE] message) tuples // until ARG_LIMIT or end of plural-only pattern. - UnicodeString other(FALSE, OTHER_STRING, 5); + UnicodeString other(false, OTHER_STRING, 5); do { part=&msgPattern.getPart(partIndex++); UMessagePatternPartType type=part->getType(); @@ -1393,7 +1393,7 @@ MessageFormat::parse(int32_t msgStart, ParsePosition tempStatus(0); for(int32_t i=msgStart+1; ; ++i) { - UBool haveArgResult = FALSE; + UBool haveArgResult = false; const MessagePattern::Part* part=&msgPattern.getPart(i); const UMessagePatternPartType type=part->getType(); int32_t index=part->getIndex(); @@ -1437,7 +1437,7 @@ MessageFormat::parse(int32_t msgStart, return NULL; // leave index as is to signal error } sourceOffset = tempStatus.getIndex(); - haveArgResult = TRUE; + haveArgResult = true; } else if( argType==UMSGPAT_ARG_TYPE_NONE || (cachedFormatters && uhash_iget(cachedFormatters, i -2))) { // We arrive here if getCachedFormatter returned NULL, but there was actually an element in the hash table. @@ -1466,7 +1466,7 @@ MessageFormat::parse(int32_t msgStart, compValue.append(RIGHT_CURLY_BRACE); if (0 != strValue.compare(compValue)) { argResult.setString(strValue); - haveArgResult = TRUE; + haveArgResult = true; } sourceOffset = next; } @@ -1478,7 +1478,7 @@ MessageFormat::parse(int32_t msgStart, return NULL; // leave index as is to signal error } argResult.setDouble(choiceResult); - haveArgResult = TRUE; + haveArgResult = true; sourceOffset = tempStatus.getIndex(); } else if(UMSGPAT_ARG_TYPE_HAS_PLURAL_STYLE(argType) || argType==UMSGPAT_ARG_TYPE_SELECT) { // Parsing not supported. @@ -1622,7 +1622,7 @@ void MessageFormat::cacheExplicitFormats(UErrorCode& status) { for (int32_t i = 0; i < argTypeCount; ++i) { argTypes[i] = Formattable::kObject; } - hasArgTypeConflicts = FALSE; + hasArgTypeConflicts = false; // This loop starts at part index 1 because we do need to examine // ARG_START parts. (But we can ignore the MSG_START.) @@ -1673,7 +1673,7 @@ void MessageFormat::cacheExplicitFormats(UErrorCode& status) { } if (argNumber != -1) { if (argTypes[argNumber] != Formattable::kObject && argTypes[argNumber] != formattableType) { - hasArgTypeConflicts = TRUE; + hasArgTypeConflicts = true; } argTypes[argNumber] = formattableType; } @@ -1789,7 +1789,7 @@ int32_t MessageFormat::findKeyword(const UnicodeString& s, int32_t length = s.length(); const UChar *ps = PatternProps::trimWhiteSpace(s.getBuffer(), length); - UnicodeString buffer(FALSE, ps, length); + UnicodeString buffer(false, ps, length); // Trims the space characters and turns all characters // in s to lower case. buffer.toLower(""); @@ -1810,8 +1810,8 @@ MessageFormat::createIntegerFormat(const Locale& locale, UErrorCode& status) con DecimalFormat *temp2; if (temp != NULL && (temp2 = dynamic_cast(temp)) != NULL) { temp2->setMaximumFractionDigits(0); - temp2->setDecimalSeparatorAlwaysShown(FALSE); - temp2->setParseIntegerOnly(TRUE); + temp2->setDecimalSeparatorAlwaysShown(false); + temp2->setParseIntegerOnly(true); } return temp; @@ -1951,13 +1951,13 @@ MessageFormat::PluralSelectorProvider::~PluralSelectorProvider() { UnicodeString MessageFormat::PluralSelectorProvider::select(void *ctx, double number, UErrorCode& ec) const { if (U_FAILURE(ec)) { - return UnicodeString(FALSE, OTHER_STRING, 5); + return UnicodeString(false, OTHER_STRING, 5); } MessageFormat::PluralSelectorProvider* t = const_cast(this); if(rules == NULL) { t->rules = PluralRules::forLocale(msgFormat.fLocale, type, ec); if (U_FAILURE(ec)) { - return UnicodeString(FALSE, OTHER_STRING, 5); + return UnicodeString(false, OTHER_STRING, 5); } } // Select a sub-message according to how the number is formatted, @@ -1975,11 +1975,11 @@ UnicodeString MessageFormat::PluralSelectorProvider::select(void *ctx, double nu } if(context.formatter == NULL) { context.formatter = msgFormat.getDefaultNumberFormat(ec); - context.forReplaceNumber = TRUE; + context.forReplaceNumber = true; } if (context.number.getDouble(ec) != number) { ec = U_INTERNAL_PROGRAM_ERROR; - return UnicodeString(FALSE, OTHER_STRING, 5); + return UnicodeString(false, OTHER_STRING, 5); } context.formatter->format(context.number, context.numberString, ec); auto* decFmt = dynamic_cast(context.formatter); @@ -1987,7 +1987,7 @@ UnicodeString MessageFormat::PluralSelectorProvider::select(void *ctx, double nu number::impl::DecimalQuantity dq; decFmt->formatToDecimalQuantity(context.number, dq, ec); if (U_FAILURE(ec)) { - return UnicodeString(FALSE, OTHER_STRING, 5); + return UnicodeString(false, OTHER_STRING, 5); } return rules->select(dq); } else { diff --git a/icu4c/source/i18n/name2uni.cpp b/icu4c/source/i18n/name2uni.cpp index ffbbf152d33..b22c68b022a 100644 --- a/icu4c/source/i18n/name2uni.cpp +++ b/icu4c/source/i18n/name2uni.cpp @@ -127,7 +127,7 @@ void NameUnicodeTransliterator::handleTransliterate(Replaceable& text, UTransPos return; } - UnicodeString openPat(TRUE, OPEN, -1); + UnicodeString openPat(true, OPEN, -1); UnicodeString str, name; int32_t cursor = offsets.start; @@ -222,7 +222,7 @@ void NameUnicodeTransliterator::handleTransliterate(Replaceable& text, UTransPos } // Check if c is a legal char. We assume here that - // legal.contains(OPEN_DELIM) is FALSE, so when we abort a + // legal.contains(OPEN_DELIM) is false, so when we abort a // name, we don't have to go back to openPos+1. if (legal.contains(c)) { name.append(c); diff --git a/icu4c/source/i18n/nfrs.cpp b/icu4c/source/i18n/nfrs.cpp index df04e33e04f..17fab139113 100644 --- a/icu4c/source/i18n/nfrs.cpp +++ b/icu4c/source/i18n/nfrs.cpp @@ -138,9 +138,9 @@ NFRuleSet::NFRuleSet(RuleBasedNumberFormat *_owner, UnicodeString* descriptions, , rules(0) , owner(_owner) , fractionRules() - , fIsFractionRuleSet(FALSE) - , fIsPublic(FALSE) - , fIsParseable(TRUE) + , fIsFractionRuleSet(false) + , fIsPublic(false) + , fIsParseable(true) { for (int32_t i = 0; i < NON_NUMERICAL_RULE_LENGTH; ++i) { nonNumericalRules[i] = NULL; @@ -185,7 +185,7 @@ NFRuleSet::NFRuleSet(RuleBasedNumberFormat *_owner, UnicodeString* descriptions, fIsPublic = name.indexOf(gPercentPercent, 2, 0) != 0; if ( name.endsWith(gNoparse,8) ) { - fIsParseable = FALSE; + fIsParseable = false; name.truncate(name.length()-8); // remove the @noparse from the name } @@ -273,13 +273,13 @@ void NFRuleSet::setNonNumericalRule(NFRule *rule) { nonNumericalRules[NEGATIVE_RULE_INDEX] = rule; } else if (baseValue == NFRule::kImproperFractionRule) { - setBestFractionRule(IMPROPER_FRACTION_RULE_INDEX, rule, TRUE); + setBestFractionRule(IMPROPER_FRACTION_RULE_INDEX, rule, true); } else if (baseValue == NFRule::kProperFractionRule) { - setBestFractionRule(PROPER_FRACTION_RULE_INDEX, rule, TRUE); + setBestFractionRule(PROPER_FRACTION_RULE_INDEX, rule, true); } else if (baseValue == NFRule::kDefaultRule) { - setBestFractionRule(DEFAULT_RULE_INDEX, rule, TRUE); + setBestFractionRule(DEFAULT_RULE_INDEX, rule, true); } else if (baseValue == NFRule::kInfinityRule) { delete nonNumericalRules[INFINITY_RULE_INDEX]; @@ -339,9 +339,9 @@ util_equalRules(const NFRule* rule1, const NFRule* rule2) return *rule1 == *rule2; } } else if (!rule2) { - return TRUE; + return true; } - return FALSE; + return false; } bool @@ -380,7 +380,7 @@ NFRuleSet::setDecimalFormatSymbols(const DecimalFormatSymbols &newSymbols, UErro for (uint32_t fIdx = 0; fIdx < fractionRules.size(); fIdx++) { NFRule *fractionRule = fractionRules[fIdx]; if (nonNumericalRules[nonNumericalIdx]->getBaseValue() == fractionRule->getBaseValue()) { - setBestFractionRule(nonNumericalIdx, fractionRule, FALSE); + setBestFractionRule(nonNumericalIdx, fractionRule, false); } } } diff --git a/icu4c/source/i18n/nfrule.cpp b/icu4c/source/i18n/nfrule.cpp index 4bb0785127f..2f8383c764c 100644 --- a/icu4c/source/i18n/nfrule.cpp +++ b/icu4c/source/i18n/nfrule.cpp @@ -621,9 +621,9 @@ util_equalSubstitutions(const NFSubstitution* sub1, const NFSubstitution* sub2) return *sub1 == *sub2; } } else if (!sub2) { - return TRUE; + return true; } - return FALSE; + return false; } /** @@ -856,7 +856,7 @@ NFRule::shouldRollBack(int64_t number) const int64_t re = util64_pow(radix, exponent); return (number % re) == 0 && (baseValue % re) != 0; } - return FALSE; + return false; } //----------------------------------------------------------------------- @@ -943,19 +943,19 @@ NFRule::doParse(const UnicodeString& text, // restored for ICU4C port parsePosition.setErrorIndex(pp.getErrorIndex()); resVal.setLong(0); - return TRUE; + return true; } if (baseValue == kInfinityRule) { // If you match this, don't try to perform any calculations on it. parsePosition.setIndex(pp.getIndex()); resVal.setDouble(uprv_getInfinity()); - return TRUE; + return true; } if (baseValue == kNaNRule) { // If you match this, don't try to perform any calculations on it. parsePosition.setIndex(pp.getIndex()); resVal.setDouble(uprv_getNaN()); - return TRUE; + return true; } // this is the fun part. The basic guts of the rule-matching @@ -1083,7 +1083,7 @@ NFRule::doParse(const UnicodeString& text, } resVal.setDouble(result); - return TRUE; // ??? do we need to worry if it is a long or a double? + return true; // ??? do we need to worry if it is a long or a double? } /** @@ -1191,7 +1191,7 @@ NFRule::matchToDelimiter(const UnicodeString& text, if (subText.length() > 0) { UBool success = sub->doParse(subText, tempPP, _baseValue, upperBound, #if UCONFIG_NO_COLLATION - FALSE, + false, #else formatter->isLenient(), #endif @@ -1245,7 +1245,7 @@ NFRule::matchToDelimiter(const UnicodeString& text, // try to match the whole string against the substitution UBool success = sub->doParse(text, tempPP, _baseValue, upperBound, #if UCONFIG_NO_COLLATION - FALSE, + false, #else formatter->isLenient(), #endif @@ -1579,7 +1579,7 @@ NFRule::allIgnorable(const UnicodeString& str, UErrorCode& status) const { // if the string is empty, we can just return true if (str.length() == 0) { - return TRUE; + return true; } #if !UCONFIG_NO_COLLATION @@ -1590,14 +1590,14 @@ NFRule::allIgnorable(const UnicodeString& str, UErrorCode& status) const const RuleBasedCollator* collator = formatter->getCollator(); if (collator == NULL) { status = U_MEMORY_ALLOCATION_ERROR; - return FALSE; + return false; } LocalPointer iter(collator->createCollationElementIterator(str)); // Memory allocation error check. if (iter.isNull()) { status = U_MEMORY_ALLOCATION_ERROR; - return FALSE; + return false; } UErrorCode err = U_ZERO_ERROR; @@ -1613,7 +1613,7 @@ NFRule::allIgnorable(const UnicodeString& str, UErrorCode& status) const // if lenient parsing is turned off, there is no such thing as // an ignorable character: return true only if the string is empty - return FALSE; + return false; } void diff --git a/icu4c/source/i18n/nfsubs.cpp b/icu4c/source/i18n/nfsubs.cpp index 7e50a81ca26..9dba77b1e30 100644 --- a/icu4c/source/i18n/nfsubs.cpp +++ b/icu4c/source/i18n/nfsubs.cpp @@ -167,7 +167,7 @@ public: virtual double calcUpperBound(double /*oldUpperBound*/) const override { return static_cast(divisor); } - virtual UBool isModulusSubstitution() const override { return TRUE; } + virtual UBool isModulusSubstitution() const override { return true; } virtual UChar tokenChar() const override { return (UChar)0x003e; } // '>' @@ -763,11 +763,11 @@ NFSubstitution::doParse(const UnicodeString& text, // the result. tempResult = composeRuleValue(tempResult, baseValue); result.setDouble(tempResult); - return TRUE; + return true; // if the parse was UNsuccessful, return 0 } else { result.setLong(0); - return FALSE; + return false; } } @@ -779,7 +779,7 @@ NFSubstitution::doParse(const UnicodeString& text, */ UBool NFSubstitution::isModulusSubstitution() const { - return FALSE; + return false; } //=================================================================== @@ -950,7 +950,7 @@ ModulusSubstitution::doParse(const UnicodeString& text, // use the specific rule's doParse() method, and then we have to // do some of the other work of NFRuleSet.parse() } else { - ruleToUse->doParse(text, parsePosition, FALSE, upperBound, nonNumericalExecutedRuleMask, result); + ruleToUse->doParse(text, parsePosition, false, upperBound, nonNumericalExecutedRuleMask, result); if (parsePosition.getIndex() != 0) { UErrorCode status = U_ZERO_ERROR; @@ -959,7 +959,7 @@ ModulusSubstitution::doParse(const UnicodeString& text, result.setDouble(tempResult); } - return TRUE; + return true; } } /** @@ -1007,17 +1007,17 @@ FractionalPartSubstitution::FractionalPartSubstitution(int32_t _pos, const UnicodeString& description, UErrorCode& status) : NFSubstitution(_pos, _ruleSet, description, status) - , byDigits(FALSE) - , useSpaces(TRUE) + , byDigits(false) + , useSpaces(true) { // akk, ruleSet can change in superclass constructor if (0 == description.compare(gGreaterGreaterThan, 2) || 0 == description.compare(gGreaterGreaterGreaterThan, 3) || _ruleSet == getRuleSet()) { - byDigits = TRUE; + byDigits = true; if (0 == description.compare(gGreaterGreaterGreaterThan, 3)) { - useSpaces = FALSE; + useSpaces = false; } } else { // cast away const @@ -1059,14 +1059,14 @@ FractionalPartSubstitution::doSubstitution(double number, UnicodeString& toInser // // this flag keeps us from formatting trailing zeros. It starts // // out false because we're pulling from the right, and switches // // to true the first time we encounter a non-zero digit - // UBool doZeros = FALSE; + // UBool doZeros = false; // for (int32_t i = 0; i < kMaxDecimalDigits; i++) { // int64_t digit = numberToFormat % 10; // if (digit != 0 || doZeros) { // if (doZeros && useSpaces) { // toInsertInto.insert(_pos + getPos(), gSpace); // } - // doZeros = TRUE; + // doZeros = true; // getRuleSet()->format(digit, toInsertInto, _pos + getPos()); // } // numberToFormat /= 10; @@ -1076,7 +1076,7 @@ FractionalPartSubstitution::doSubstitution(double number, UnicodeString& toInser dl.setToDouble(number); dl.roundToMagnitude(-20, UNUM_ROUND_HALFEVEN, status); // round to 20 fraction digits. - UBool pad = FALSE; + UBool pad = false; for (int32_t didx = dl.getLowerDisplayMagnitude(); didx<0; didx++) { // Loop iterates over fraction digits, starting with the LSD. // include both real digits from the number, and zeros @@ -1084,7 +1084,7 @@ FractionalPartSubstitution::doSubstitution(double number, UnicodeString& toInser if (pad && useSpaces) { toInsertInto.insert(_pos + getPos(), gSpace); } else { - pad = TRUE; + pad = true; } int64_t digit = dl.getDigit(didx); getRuleSet()->format(digit, toInsertInto, _pos + getPos(), recursionCount, status); @@ -1191,7 +1191,7 @@ FractionalPartSubstitution::doParse(const UnicodeString& text, result = dl.toDouble(); result = composeRuleValue(result, baseValue); resVal.setDouble(result); - return TRUE; + return true; } } @@ -1301,7 +1301,7 @@ NumeratorSubstitution::doParse(const UnicodeString& text, } // we've parsed off the zeros, now let's parse the rest from our current position - NFSubstitution::doParse(workText, parsePosition, withZeros ? 1 : baseValue, upperBound, FALSE, nonNumericalExecutedRuleMask, result); + NFSubstitution::doParse(workText, parsePosition, withZeros ? 1 : baseValue, upperBound, false, nonNumericalExecutedRuleMask, result); if (withZeros) { // any base value will do in this case. is there a way to @@ -1322,7 +1322,7 @@ NumeratorSubstitution::doParse(const UnicodeString& text, result.setDouble((double)n/(double)d); } - return TRUE; + return true; } bool diff --git a/icu4c/source/i18n/nortrans.cpp b/icu4c/source/i18n/nortrans.cpp index 6a8d2c74194..b1809daebd0 100644 --- a/icu4c/source/i18n/nortrans.cpp +++ b/icu4c/source/i18n/nortrans.cpp @@ -45,13 +45,13 @@ void NormalizationTransliterator::registerIDs() { Transliterator::_registerFactory(UNICODE_STRING_SIMPLE("Any-FCC"), _create, cstrToken("nfc\0\3")); Transliterator::_registerSpecialInverse(UNICODE_STRING_SIMPLE("NFC"), - UNICODE_STRING_SIMPLE("NFD"), TRUE); + UNICODE_STRING_SIMPLE("NFD"), true); Transliterator::_registerSpecialInverse(UNICODE_STRING_SIMPLE("NFKC"), - UNICODE_STRING_SIMPLE("NFKD"), TRUE); + UNICODE_STRING_SIMPLE("NFKD"), true); Transliterator::_registerSpecialInverse(UNICODE_STRING_SIMPLE("FCC"), - UNICODE_STRING_SIMPLE("NFD"), FALSE); + UNICODE_STRING_SIMPLE("NFD"), false); Transliterator::_registerSpecialInverse(UNICODE_STRING_SIMPLE("FCD"), - UNICODE_STRING_SIMPLE("FCD"), FALSE); + UNICODE_STRING_SIMPLE("FCD"), false); } /** diff --git a/icu4c/source/i18n/number_capi.cpp b/icu4c/source/i18n/number_capi.cpp index b87dbd93e5f..42bb05c0661 100644 --- a/icu4c/source/i18n/number_capi.cpp +++ b/icu4c/source/i18n/number_capi.cpp @@ -166,11 +166,11 @@ unumf_resultToString(const UFormattedNumber* uresult, UChar* buffer, int32_t buf U_CAPI UBool U_EXPORT2 unumf_resultNextFieldPosition(const UFormattedNumber* uresult, UFieldPosition* ufpos, UErrorCode* ec) { const auto* result = UFormattedNumberApiHelper::validate(uresult, *ec); - if (U_FAILURE(*ec)) { return FALSE; } + if (U_FAILURE(*ec)) { return false; } if (ufpos == nullptr) { *ec = U_ILLEGAL_ARGUMENT_ERROR; - return FALSE; + return false; } FieldPosition fp; @@ -181,7 +181,7 @@ unumf_resultNextFieldPosition(const UFormattedNumber* uresult, UFieldPosition* u ufpos->beginIndex = fp.getBeginIndex(); ufpos->endIndex = fp.getEndIndex(); // NOTE: MSVC sometimes complains when implicitly converting between bool and UBool - return retval ? TRUE : FALSE; + return retval ? true : false; } U_CAPI void U_EXPORT2 diff --git a/icu4c/source/i18n/number_modifiers.cpp b/icu4c/source/i18n/number_modifiers.cpp index 50f5e97cb91..092b66ff579 100644 --- a/icu4c/source/i18n/number_modifiers.cpp +++ b/icu4c/source/i18n/number_modifiers.cpp @@ -33,7 +33,7 @@ UBool U_CALLCONV cleanupDefaultCurrencySpacing() { delete UNISET_NOTSZ; UNISET_NOTSZ = nullptr; gDefaultCurrencySpacingInitOnce.reset(); - return TRUE; + return true; } void U_CALLCONV initDefaultCurrencySpacing(UErrorCode &status) { diff --git a/icu4c/source/i18n/number_skeletons.cpp b/icu4c/source/i18n/number_skeletons.cpp index 6a1572ad0b4..3db50369cb6 100644 --- a/icu4c/source/i18n/number_skeletons.cpp +++ b/icu4c/source/i18n/number_skeletons.cpp @@ -41,7 +41,7 @@ UBool U_CALLCONV cleanupNumberSkeletons() { uprv_free(kSerializedStemTrie); kSerializedStemTrie = nullptr; gNumberSkeletonsInitOnce.reset(); - return TRUE; + return true; } void U_CALLCONV initNumberSkeletons(UErrorCode& status) { diff --git a/icu4c/source/i18n/numfmt.cpp b/icu4c/source/i18n/numfmt.cpp index 0adad07379c..9e841da74a4 100644 --- a/icu4c/source/i18n/numfmt.cpp +++ b/icu4c/source/i18n/numfmt.cpp @@ -186,7 +186,7 @@ static UBool U_CALLCONV numfmt_cleanup(void) { uhash_close(NumberingSystem_cache); NumberingSystem_cache = NULL; } - return TRUE; + return true; } U_CDECL_END @@ -229,13 +229,13 @@ SimpleNumberFormatFactory::getSupportedIDs(int32_t &count, UErrorCode& status) c // ------------------------------------- // default constructor NumberFormat::NumberFormat() -: fGroupingUsed(TRUE), +: fGroupingUsed(true), fMaxIntegerDigits(gDefaultMaxIntegerDigits), fMinIntegerDigits(1), fMaxFractionDigits(3), // invariant, >= minFractionDigits fMinFractionDigits(0), - fParseIntegerOnly(FALSE), - fLenient(FALSE), + fParseIntegerOnly(false), + fLenient(false), fCapitalizationContext(UDISPCTX_CAPITALIZATION_NONE) { fCurrency[0] = 0; @@ -294,39 +294,39 @@ NumberFormat::operator==(const Format& that) const #ifdef FMT_DEBUG // This code makes it easy to determine why two format objects that should // be equal aren't. - UBool first = TRUE; + UBool first = true; if (!Format::operator==(that)) { - if (first) { printf("[ "); first = FALSE; } else { printf(", "); } + if (first) { printf("[ "); first = false; } else { printf(", "); } debug("Format::!="); } if (!(fMaxIntegerDigits == other->fMaxIntegerDigits && fMinIntegerDigits == other->fMinIntegerDigits)) { - if (first) { printf("[ "); first = FALSE; } else { printf(", "); } + if (first) { printf("[ "); first = false; } else { printf(", "); } debug("Integer digits !="); } if (!(fMaxFractionDigits == other->fMaxFractionDigits && fMinFractionDigits == other->fMinFractionDigits)) { - if (first) { printf("[ "); first = FALSE; } else { printf(", "); } + if (first) { printf("[ "); first = false; } else { printf(", "); } debug("Fraction digits !="); } if (!(fGroupingUsed == other->fGroupingUsed)) { - if (first) { printf("[ "); first = FALSE; } else { printf(", "); } + if (first) { printf("[ "); first = false; } else { printf(", "); } debug("fGroupingUsed != "); } if (!(fParseIntegerOnly == other->fParseIntegerOnly)) { - if (first) { printf("[ "); first = FALSE; } else { printf(", "); } + if (first) { printf("[ "); first = false; } else { printf(", "); } debug("fParseIntegerOnly != "); } if (!(u_strcmp(fCurrency, other->fCurrency) == 0)) { - if (first) { printf("[ "); first = FALSE; } else { printf(", "); } + if (first) { printf("[ "); first = false; } else { printf(", "); } debug("fCurrency !="); } if (!(fLenient == other->fLenient)) { - if (first) { printf("[ "); first = FALSE; } else { printf(", "); } + if (first) { printf("[ "); first = false; } else { printf(", "); } debug("fLenient != "); } if (!(fCapitalizationContext == other->fCapitalizationContext)) { - if (first) { printf("[ "); first = FALSE; } else { printf(", "); } + if (first) { printf("[ "); first = false; } else { printf(", "); } debug("fCapitalizationContext != "); } if (!first) { printf(" ]"); } @@ -502,7 +502,7 @@ ArgExtractor::iso(void) const { } ArgExtractor::ArgExtractor(const NumberFormat& /*nf*/, const Formattable& obj, UErrorCode& /*status*/) - : num(&obj), fWasCurrency(FALSE) { + : num(&obj), fWasCurrency(false) { const UObject* o = obj.getObject(); // most commonly o==NULL const CurrencyAmount* amt; @@ -512,7 +512,7 @@ ArgExtractor::ArgExtractor(const NumberFormat& /*nf*/, const Formattable& obj, U //const UChar* curr = amt->getISOCurrency(); u_strcpy(save, amt->getISOCurrency()); num = &amt->getNumber(); - fWasCurrency=TRUE; + fWasCurrency=true; } else { save[0]=0; } @@ -1007,13 +1007,13 @@ UBool U_EXPORT2 NumberFormat::unregister(URegistryKey key, UErrorCode& status) { if (U_FAILURE(status)) { - return FALSE; + return false; } if (haveService()) { return gService->unregister(key, status); } else { status = U_ILLEGAL_ARGUMENT_ERROR; - return FALSE; + return false; } } @@ -1337,11 +1337,11 @@ NumberFormat::makeInstance(const Locale& desiredLocale, // if the locale has "@compat=host", create a host-specific NumberFormat if (U_SUCCESS(status) && count > 0 && uprv_strcmp(buffer, "host") == 0) { - UBool curr = TRUE; + UBool curr = true; switch (style) { case UNUM_DECIMAL: - curr = FALSE; + curr = false; // fall-through U_FALLTHROUGH; @@ -1415,7 +1415,7 @@ NumberFormat::makeInstance(const Locale& desiredLocale, ns->getName(), gFormatCldrStyles[style], status); - pattern = UnicodeString(TRUE, patternPtr, -1); + pattern = UnicodeString(true, patternPtr, -1); } if (U_FAILURE(status)) { return NULL; @@ -1468,8 +1468,8 @@ NumberFormat::makeInstance(const Locale& desiredLocale, // replace single currency sign in the pattern with double currency sign // if the style is UNUM_CURRENCY_ISO if (style == UNUM_CURRENCY_ISO) { - pattern.findAndReplace(UnicodeString(TRUE, gSingleCurrencySign, 1), - UnicodeString(TRUE, gDoubleCurrencySign, 2)); + pattern.findAndReplace(UnicodeString(true, gSingleCurrencySign, 1), + UnicodeString(true, gDoubleCurrencySign, 2)); } // "new DecimalFormat()" does not adopt the symbols argument if its memory allocation fails. diff --git a/icu4c/source/i18n/numsys.cpp b/icu4c/source/i18n/numsys.cpp index 250349393e4..015d2a4cb69 100644 --- a/icu4c/source/i18n/numsys.cpp +++ b/icu4c/source/i18n/numsys.cpp @@ -61,7 +61,7 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(NumsysNameEnumeration) NumberingSystem::NumberingSystem() { radix = 10; - algorithmic = FALSE; + algorithmic = false; UnicodeString defaultDigits = DEFAULT_DIGITS; desc.setTo(defaultDigits); uprv_strcpy(name,gLatn); @@ -116,8 +116,8 @@ NumberingSystem::createInstance(const Locale & inLocale, UErrorCode& status) { return nullptr; } - UBool nsResolved = TRUE; - UBool usingFallback = FALSE; + UBool nsResolved = true; + UBool usingFallback = false; char buffer[ULOC_KEYWORDS_CAPACITY] = ""; int32_t count = inLocale.getKeywordValue("numbers", buffer, sizeof(buffer), status); if (U_FAILURE(status) || status == U_STRING_NOT_TERMINATED_WARNING) { @@ -130,11 +130,11 @@ NumberingSystem::createInstance(const Locale & inLocale, UErrorCode& status) { buffer[count] = '\0'; // Make sure it is null terminated. if ( !uprv_strcmp(buffer,gDefault) || !uprv_strcmp(buffer,gNative) || !uprv_strcmp(buffer,gTraditional) || !uprv_strcmp(buffer,gFinance)) { - nsResolved = FALSE; + nsResolved = false; } } else { uprv_strcpy(buffer, gDefault); - nsResolved = FALSE; + nsResolved = false; } if (!nsResolved) { // Resolve the numbering system ( default, native, traditional or finance ) into a "real" numbering system @@ -158,7 +158,7 @@ NumberingSystem::createInstance(const Locale & inLocale, UErrorCode& status) { if ( count > 0 && count < ULOC_KEYWORDS_CAPACITY ) { // numbering system found u_UCharsToChars(nsName, buffer, count); buffer[count] = '\0'; // Make sure it is null terminated. - nsResolved = TRUE; + nsResolved = true; } if (!nsResolved) { // Fallback behavior per TR35 - traditional falls back to native, finance and native fall back to default @@ -167,8 +167,8 @@ NumberingSystem::createInstance(const Locale & inLocale, UErrorCode& status) { } else if (!uprv_strcmp(buffer,gTraditional)) { uprv_strcpy(buffer,gNative); } else { // If we get here we couldn't find even the default numbering system - usingFallback = TRUE; - nsResolved = TRUE; + usingFallback = true; + nsResolved = true; } } } diff --git a/icu4c/source/i18n/olsontz.cpp b/icu4c/source/i18n/olsontz.cpp index 0f06db5c751..e5c60f8cbe0 100644 --- a/icu4c/source/i18n/olsontz.cpp +++ b/icu4c/source/i18n/olsontz.cpp @@ -53,13 +53,13 @@ static void debug_tz_msg(const char *pat, ...) static UBool arrayEqual(const void *a1, const void *a2, int32_t size) { if (a1 == NULL && a2 == NULL) { - return TRUE; + return true; } if ((a1 != NULL && a2 == NULL) || (a1 == NULL && a2 != NULL)) { - return FALSE; + return false; } if (a1 == a2) { - return TRUE; + return true; } return (uprv_memcmp(a1, a2, size) == 0); @@ -87,7 +87,7 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(OlsonTimeZone) * Default constructor. Creates a time zone with an empty ID and * a fixed GMT offset of zero. */ -/*OlsonTimeZone::OlsonTimeZone() : finalYear(INT32_MAX), finalMillis(DBL_MAX), finalZone(0), transitionRulesInitialized(FALSE) { +/*OlsonTimeZone::OlsonTimeZone() : finalYear(INT32_MAX), finalMillis(DBL_MAX), finalZone(0), transitionRulesInitialized(false) { clearTransitionRules(); constructEmpty(); }*/ @@ -204,7 +204,7 @@ OlsonTimeZone::OlsonTimeZone(const UResourceBundle* top, ures_getByKey(res, kFINALYEAR, r.getAlias(), &ec); int32_t ruleYear = ures_getInt(r.getAlias(), &ec); if (U_SUCCESS(ec)) { - UnicodeString ruleID(TRUE, ruleIdUStr, len); + UnicodeString ruleID(true, ruleIdUStr, len); UResourceBundle *rule = TimeZone::loadRule(top, ruleID, NULL, ec); const int32_t *ruleData = ures_getIntVector(rule, &len, &ec); if (U_SUCCESS(ec) && len == 11) { @@ -381,7 +381,7 @@ int32_t OlsonTimeZone::getOffset(uint8_t era, int32_t year, int32_t month, // Compute local epoch millis from input fields UDate date = (UDate)(Grego::fieldsToDay(year, month, dom) * U_MILLIS_PER_DAY + millis); int32_t rawoff, dstoff; - getHistoricalOffset(date, TRUE, kDaylight, kStandard, rawoff, dstoff); + getHistoricalOffset(date, true, kDaylight, kStandard, rawoff, dstoff); return rawoff + dstoff; } @@ -409,7 +409,7 @@ void OlsonTimeZone::getOffsetFromLocal(UDate date, UTimeZoneLocalOption nonExist if (finalZone != NULL && date >= finalStartMillis) { finalZone->getOffsetFromLocal(date, nonExistingTimeOpt, duplicatedTimeOpt, rawoff, dstoff, ec); } else { - getHistoricalOffset(date, TRUE, nonExistingTimeOpt, duplicatedTimeOpt, rawoff, dstoff); + getHistoricalOffset(date, true, nonExistingTimeOpt, duplicatedTimeOpt, rawoff, dstoff); } } @@ -430,7 +430,7 @@ void OlsonTimeZone::setRawOffset(int32_t /*offsetMillis*/) { int32_t OlsonTimeZone::getRawOffset() const { UErrorCode ec = U_ZERO_ERROR; int32_t raw, dst; - getOffset(uprv_getUTCtime(), FALSE, raw, dst, ec); + getOffset(uprv_getUTCtime(), false, raw, dst, ec); return raw; } @@ -559,9 +559,9 @@ OlsonTimeZone::getHistoricalOffset(UDate date, UBool local, UBool OlsonTimeZone::useDaylightTime() const { // If DST was observed in 1942 (for example) but has never been // observed from 1943 to the present, most clients will expect - // this method to return FALSE. This method determines whether + // this method to return false. This method determines whether // DST is in use in the current year (at any point in the year) - // and returns TRUE if so. + // and returns true if so. UDate current = uprv_getUTCtime(); if (finalZone != NULL && current >= finalStartMillis) { @@ -575,7 +575,7 @@ UBool OlsonTimeZone::useDaylightTime() const { double start = Grego::fieldsToDay(year, 0, 1) * SECONDS_PER_DAY; double limit = Grego::fieldsToDay(year+1, 0, 1) * SECONDS_PER_DAY; - // Return TRUE if DST is observed at any time during the current + // Return true if DST is observed at any time during the current // year. for (int16_t i = 0; i < transitionCount(); ++i) { double transition = (double)transitionTimeInSeconds(i); @@ -584,10 +584,10 @@ UBool OlsonTimeZone::useDaylightTime() const { } if ((transition >= start && dstOffsetAt(i) != 0) || (transition > start && dstOffsetAt(i - 1) != 0)) { - return TRUE; + return true; } } - return FALSE; + return false; } int32_t OlsonTimeZone::getDSTSavings() const{ @@ -601,25 +601,25 @@ OlsonTimeZone::getDSTSavings() const{ */ UBool OlsonTimeZone::inDaylightTime(UDate date, UErrorCode& ec) const { int32_t raw, dst; - getOffset(date, FALSE, raw, dst, ec); + getOffset(date, false, raw, dst, ec); return dst != 0; } UBool OlsonTimeZone::hasSameRules(const TimeZone &other) const { if (this == &other) { - return TRUE; + return true; } const OlsonTimeZone* z = dynamic_cast(&other); if (z == NULL) { - return FALSE; + return false; } // [sic] pointer comparison: typeMapData points into // memory-mapped or DLL space, so if two zones have the same // pointer, they are equal. if (typeMapData == z->typeMapData) { - return TRUE; + return true; } // If the pointers are not equal, the zones may still @@ -627,19 +627,19 @@ OlsonTimeZone::hasSameRules(const TimeZone &other) const { if ((finalZone == NULL && z->finalZone != NULL) || (finalZone != NULL && z->finalZone == NULL) || (finalZone != NULL && z->finalZone != NULL && *finalZone != *z->finalZone)) { - return FALSE; + return false; } if (finalZone != NULL) { if (finalStartYear != z->finalStartYear || finalStartMillis != z->finalStartMillis) { - return FALSE; + return false; } } if (typeCount != z->typeCount || transitionCountPre32 != z->transitionCountPre32 || transitionCount32 != z->transitionCount32 || transitionCountPost32 != z->transitionCountPost32) { - return FALSE; + return false; } return @@ -881,20 +881,20 @@ OlsonTimeZone::getNextTransition(UDate base, UBool inclusive, TimeZoneTransition UErrorCode status = U_ZERO_ERROR; checkTransitionRules(status); if (U_FAILURE(status)) { - return FALSE; + return false; } if (finalZone != NULL) { if (inclusive && base == firstFinalTZTransition->getTime()) { result = *firstFinalTZTransition; - return TRUE; + return true; } else if (base >= firstFinalTZTransition->getTime()) { if (finalZone->useDaylightTime()) { //return finalZone->getNextTransition(base, inclusive, result); return finalZoneWithStartYear->getNextTransition(base, inclusive, result); } else { // No more transitions - return FALSE; + return false; } } } @@ -911,13 +911,13 @@ OlsonTimeZone::getNextTransition(UDate base, UBool inclusive, TimeZoneTransition if (ttidx == transCount - 1) { if (firstFinalTZTransition != NULL) { result = *firstFinalTZTransition; - return TRUE; + return true; } else { - return FALSE; + return false; } } else if (ttidx < firstTZTransitionIdx) { result = *firstTZTransition; - return TRUE; + return true; } else { // Create a TimeZoneTransition TimeZoneRule *to = historicRules[typeMapData[ttidx + 1]]; @@ -935,10 +935,10 @@ OlsonTimeZone::getNextTransition(UDate base, UBool inclusive, TimeZoneTransition result.setTime(startTime); result.adoptFrom(from->clone()); result.adoptTo(to->clone()); - return TRUE; + return true; } } - return FALSE; + return false; } UBool @@ -946,20 +946,20 @@ OlsonTimeZone::getPreviousTransition(UDate base, UBool inclusive, TimeZoneTransi UErrorCode status = U_ZERO_ERROR; checkTransitionRules(status); if (U_FAILURE(status)) { - return FALSE; + return false; } if (finalZone != NULL) { if (inclusive && base == firstFinalTZTransition->getTime()) { result = *firstFinalTZTransition; - return TRUE; + return true; } else if (base > firstFinalTZTransition->getTime()) { if (finalZone->useDaylightTime()) { //return finalZone->getPreviousTransition(base, inclusive, result); return finalZoneWithStartYear->getPreviousTransition(base, inclusive, result); } else { result = *firstFinalTZTransition; - return TRUE; + return true; } } } @@ -975,10 +975,10 @@ OlsonTimeZone::getPreviousTransition(UDate base, UBool inclusive, TimeZoneTransi } if (ttidx < firstTZTransitionIdx) { // No more transitions - return FALSE; + return false; } else if (ttidx == firstTZTransitionIdx) { result = *firstTZTransition; - return TRUE; + return true; } else { // Create a TimeZoneTransition TimeZoneRule *to = historicRules[typeMapData[ttidx]]; @@ -996,10 +996,10 @@ OlsonTimeZone::getPreviousTransition(UDate base, UBool inclusive, TimeZoneTransi result.setTime(startTime); result.adoptFrom(from->clone()); result.adoptTo(to->clone()); - return TRUE; + return true; } } - return FALSE; + return false; } int32_t diff --git a/icu4c/source/i18n/persncal.cpp b/icu4c/source/i18n/persncal.cpp index 2a15cae0444..9db47c98912 100644 --- a/icu4c/source/i18n/persncal.cpp +++ b/icu4c/source/i18n/persncal.cpp @@ -119,7 +119,7 @@ UBool PersianCalendar::isLeapYear(int32_t year) * from the Persian epoch, origin 0. */ int32_t PersianCalendar::yearStart(int32_t year) { - return handleComputeMonthStart(year,0,FALSE); + return handleComputeMonthStart(year,0,false); } /** @@ -130,7 +130,7 @@ int32_t PersianCalendar::yearStart(int32_t year) { * @param year The Persian month, 0-based */ int32_t PersianCalendar::monthStart(int32_t year, int32_t month) const { - return handleComputeMonthStart(year,month,TRUE); + return handleComputeMonthStart(year,month,true); } //---------------------------------------------------------------------- @@ -238,12 +238,12 @@ PersianCalendar::inDaylightTime(UErrorCode& status) const { // copied from GregorianCalendar if (U_FAILURE(status) || !getTimeZone().useDaylightTime()) - return FALSE; + return false; // Force an update of the state of the Calendar. ((PersianCalendar*)this)->complete(status); // cast away const - return (UBool)(U_SUCCESS(status) ? (internalGet(UCAL_DST_OFFSET) != 0) : FALSE); + return (UBool)(U_SUCCESS(status) ? (internalGet(UCAL_DST_OFFSET) != 0) : false); } // default century @@ -254,7 +254,7 @@ static icu::UInitOnce gSystemDefaultCenturyInit {}; UBool PersianCalendar::haveDefaultCentury() const { - return TRUE; + return true; } static void U_CALLCONV initializeSystemDefaultCentury() { diff --git a/icu4c/source/i18n/plurfmt.cpp b/icu4c/source/i18n/plurfmt.cpp index 65e275eeeb7..3b8f3a660e5 100644 --- a/icu4c/source/i18n/plurfmt.cpp +++ b/icu4c/source/i18n/plurfmt.cpp @@ -434,11 +434,11 @@ int32_t PluralFormat::findSubMessage(const MessagePattern& pattern, int32_t part // (In other words, we never call the selector if we match against an explicit value, // or if the only non-explicit keyword is "other".) UnicodeString keyword; - UnicodeString other(FALSE, OTHER_STRING, 5); + UnicodeString other(false, OTHER_STRING, 5); // When we find a match, we set msgStart>0 and also set this boolean to true // to avoid matching the keyword again (duplicates are allowed) // while we continue to look for an explicit-value match. - UBool haveKeywordMatch=FALSE; + UBool haveKeywordMatch=false; // msgStart is 0 until we find any appropriate sub-message. // We remember the first "other" sub-message if we have not seen any // appropriate sub-message before. @@ -477,7 +477,7 @@ int32_t PluralFormat::findSubMessage(const MessagePattern& pattern, int32_t part // This is the first "other" sub-message, // and the selected keyword is also "other". // Do not match "other" again. - haveKeywordMatch=TRUE; + haveKeywordMatch=true; } } } else { @@ -486,7 +486,7 @@ int32_t PluralFormat::findSubMessage(const MessagePattern& pattern, int32_t part if(msgStart!=0 && (0 == keyword.compare(other))) { // We have already seen an "other" sub-message. // Do not match "other" again. - haveKeywordMatch=TRUE; + haveKeywordMatch=true; // Skip keyword matching but do getLimitPartIndex(). } } @@ -494,7 +494,7 @@ int32_t PluralFormat::findSubMessage(const MessagePattern& pattern, int32_t part // keyword matches msgStart=partIndex; // Do not match this keyword again. - haveKeywordMatch=TRUE; + haveKeywordMatch=true; } } } diff --git a/icu4c/source/i18n/plurrule.cpp b/icu4c/source/i18n/plurrule.cpp index edc3d883027..431a3ce04ba 100644 --- a/icu4c/source/i18n/plurrule.cpp +++ b/icu4c/source/i18n/plurrule.cpp @@ -179,7 +179,7 @@ PluralRules::createRules(const UnicodeString& description, UErrorCode& status) { PluralRules* U_EXPORT2 PluralRules::createDefaultRules(UErrorCode& status) { - return createRules(UnicodeString(TRUE, PLURAL_DEFAULT_RULE, -1), status); + return createRules(UnicodeString(true, PLURAL_DEFAULT_RULE, -1), status); } /******************************************************************************/ @@ -307,7 +307,7 @@ PluralRules::select(const number::FormattedNumber& number, UErrorCode& status) c UnicodeString PluralRules::select(const IFixedDecimal &number) const { if (mRules == nullptr) { - return UnicodeString(TRUE, PLURAL_DEFAULT_RULE, -1); + return UnicodeString(true, PLURAL_DEFAULT_RULE, -1); } else { return mRules->select(number); @@ -554,7 +554,7 @@ PluralRules::isKeyword(const UnicodeString& keyword) const { UnicodeString PluralRules::getKeywordOther() const { - return UnicodeString(TRUE, PLURAL_KEYWORD_OTHER, 5); + return UnicodeString(true, PLURAL_KEYWORD_OTHER, 5); } bool @@ -641,11 +641,11 @@ PluralRuleParser::parse(const UnicodeString& ruleData, PluralRules *prules, UErr break; case tNot: U_ASSERT(curAndConstraint != nullptr); - curAndConstraint->negated=TRUE; + curAndConstraint->negated=true; break; case tNotEqual: - curAndConstraint->negated=TRUE; + curAndConstraint->negated=true; U_FALLTHROUGH; case tIn: case tWithin: @@ -761,7 +761,7 @@ PluralRuleParser::parse(const UnicodeString& ruleData, PluralRules *prules, UErr break; } if (type == tEllipsis) { - currentChain->fIntegerSamplesUnbounded = TRUE; + currentChain->fIntegerSamplesUnbounded = true; continue; } currentChain->fIntegerSamples.append(token); @@ -775,7 +775,7 @@ PluralRuleParser::parse(const UnicodeString& ruleData, PluralRules *prules, UErr break; } if (type == tEllipsis) { - currentChain->fDecimalSamplesUnbounded = TRUE; + currentChain->fDecimalSamplesUnbounded = true; continue; } currentChain->fDecimalSamples.append(token); @@ -919,10 +919,10 @@ AndConstraint::~AndConstraint() { UBool AndConstraint::isFulfilled(const IFixedDecimal &number) { - UBool result = TRUE; + UBool result = true; if (digitsType == none) { // An empty AndConstraint, created by a rule with a keyword but no following expression. - return TRUE; + return true; } PluralOperand operand = tokenTypeToPluralOperand(digitsType); @@ -931,7 +931,7 @@ AndConstraint::isFulfilled(const IFixedDecimal &number) { // May be non-integer (n option only) do { if (integerOnly && n != uprv_floor(n)) { - result = FALSE; + result = false; break; } @@ -943,14 +943,14 @@ AndConstraint::isFulfilled(const IFixedDecimal &number) { n == value; // 'is' rule break; } - result = FALSE; // 'in' or 'within' rule + result = false; // 'in' or 'within' rule for (int32_t r=0; rsize(); r+=2) { if (rangeList->elementAti(r) <= n && n <= rangeList->elementAti(r+1)) { - result = TRUE; + result = true; break; } } - } while (FALSE); + } while (false); if (negated) { result = !result; @@ -1026,10 +1026,10 @@ OrConstraint::add(UErrorCode& status) { UBool OrConstraint::isFulfilled(const IFixedDecimal &number) { OrConstraint* orRule=this; - UBool result=FALSE; + UBool result=false; while (orRule!=nullptr && !result) { - result=TRUE; + result=true; AndConstraint* andRule = orRule->childNode; while (andRule!=nullptr && result) { result = andRule->isFulfilled(number); @@ -1086,7 +1086,7 @@ RuleChain::select(const IFixedDecimal &number) const { } } } - return UnicodeString(TRUE, PLURAL_KEYWORD_OTHER, 5); + return UnicodeString(true, PLURAL_KEYWORD_OTHER, 5); } static UnicodeString tokenString(tokenType tok) { @@ -1225,14 +1225,14 @@ RuleChain::getKeywords(int32_t capacityOfKeywords, UnicodeString* keywords, int3 UBool RuleChain::isKeyword(const UnicodeString& keywordParam) const { if ( fKeyword == keywordParam ) { - return TRUE; + return true; } if ( fNext != nullptr ) { return fNext->isKeyword(keywordParam); } else { - return FALSE; + return false; } } @@ -1547,7 +1547,7 @@ PluralKeywordEnumeration::PluralKeywordEnumeration(RuleChain *header, UErrorCode return; } fKeywordNames.setDeleter(uprv_deleteUObject); - UBool addKeywordOther = TRUE; + UBool addKeywordOther = true; RuleChain *node = header; while (node != nullptr) { LocalPointer newElem(node->fKeyword.clone(), status); @@ -1556,7 +1556,7 @@ PluralKeywordEnumeration::PluralKeywordEnumeration(RuleChain *header, UErrorCode return; } if (0 == node->fKeyword.compare(PLURAL_KEYWORD_OTHER, 5)) { - addKeywordOther = FALSE; + addKeywordOther = false; } node = node->fNext; } @@ -1753,7 +1753,7 @@ void FixedDecimal::init(double n, int32_t v, int64_t f, int32_t e, int32_t c) { v = 0; f = 0; intValue = 0; - _hasIntegerValue = FALSE; + _hasIntegerValue = false; } else { intValue = (int64_t)source; _hasIntegerValue = (source == intValue); @@ -1779,13 +1779,13 @@ void FixedDecimal::init(double n, int32_t v, int64_t f, int32_t e, int32_t c) { // A single multiply of the original number works more reliably. static int32_t p10[] = {1, 10, 100, 1000, 10000}; UBool FixedDecimal::quickInit(double n) { - UBool success = FALSE; + UBool success = false; n = fabs(n); int32_t numFractionDigits; for (numFractionDigits = 0; numFractionDigits <= 3; numFractionDigits++) { double scaledN = n * p10[numFractionDigits]; if (scaledN == floor(scaledN)) { - success = TRUE; + success = true; break; } } diff --git a/icu4c/source/i18n/quantityformatter.cpp b/icu4c/source/i18n/quantityformatter.cpp index 9c9aa99b670..7b4d51e803f 100644 --- a/icu4c/source/i18n/quantityformatter.cpp +++ b/icu4c/source/i18n/quantityformatter.cpp @@ -81,22 +81,22 @@ UBool QuantityFormatter::addIfAbsent( UErrorCode &status) { int32_t pluralIndex = StandardPlural::indexFromString(variant, status); if (U_FAILURE(status)) { - return FALSE; + return false; } if (formatters[pluralIndex] != NULL) { - return TRUE; + return true; } SimpleFormatter *newFmt = new SimpleFormatter(rawPattern, 0, 1, status); if (newFmt == NULL) { status = U_MEMORY_ALLOCATION_ERROR; - return FALSE; + return false; } if (U_FAILURE(status)) { delete newFmt; - return FALSE; + return false; } formatters[pluralIndex] = newFmt; - return TRUE; + return true; } UBool QuantityFormatter::isValid() const { diff --git a/icu4c/source/i18n/rbnf.cpp b/icu4c/source/i18n/rbnf.cpp index 7f54fd7a33f..3d0da00bdb8 100644 --- a/icu4c/source/i18n/rbnf.cpp +++ b/icu4c/source/i18n/rbnf.cpp @@ -119,16 +119,16 @@ LocalizationInfo::~LocalizationInfo() {} //UOBJECT_DEFINE_ABSTRACT_RTTI_IMPLEMENTATION(LocalizationInfo) -// if both strings are NULL, this returns TRUE +// if both strings are NULL, this returns true static UBool streq(const UChar* lhs, const UChar* rhs) { if (rhs == lhs) { - return TRUE; + return true; } if (lhs && rhs) { return u_strcmp(lhs, rhs) == 0; } - return FALSE; + return false; } bool @@ -325,9 +325,9 @@ private: inline UBool checkInc(UChar c) { if (p < e && (ch == c || *p == c)) { inc(); - return TRUE; + return true; } - return FALSE; + return false; } inline UBool check(UChar c) { return p < e && (ch == c || *p == c); @@ -339,7 +339,7 @@ private: } inline UBool inList(UChar c, const UChar* list) const { if (*list == SPACE && PatternProps::isWhiteSpace(c)) { - return TRUE; + return true; } while (*list && *list != c) { ++list; @@ -425,10 +425,10 @@ LocDataParser::doParse(void) { ERROR("Missing open angle"); } else { VArray array(DeleteFn); - UBool mightHaveNext = TRUE; + UBool mightHaveNext = true; int32_t requiredLength = -1; while (mightHaveNext) { - mightHaveNext = FALSE; + mightHaveNext = false; UChar** elem = nextArray(requiredLength); skipWhitespace(); UBool haveComma = check(COMMA); @@ -436,7 +436,7 @@ LocDataParser::doParse(void) { array.add(elem, ec); if (haveComma) { inc(); - mightHaveNext = TRUE; + mightHaveNext = true; } } else if (haveComma) { ERROR("Unexpected character"); @@ -481,9 +481,9 @@ LocDataParser::nextArray(int32_t& requiredLength) { } VArray array; - UBool mightHaveNext = TRUE; + UBool mightHaveNext = true; while (mightHaveNext) { - mightHaveNext = FALSE; + mightHaveNext = false; UChar* elem = nextString(); skipWhitespace(); UBool haveComma = check(COMMA); @@ -491,7 +491,7 @@ LocDataParser::nextArray(int32_t& requiredLength) { array.add(elem, ec); if (haveComma) { inc(); - mightHaveNext = TRUE; + mightHaveNext = true; } } else if (haveComma) { ERROR("Unexpected comma"); @@ -696,12 +696,12 @@ RuleBasedNumberFormat::RuleBasedNumberFormat(const UnicodeString& description, , defaultInfinityRule(NULL) , defaultNaNRule(NULL) , fRoundingMode(DecimalFormat::ERoundingMode::kRoundUnnecessary) - , lenient(FALSE) + , lenient(false) , lenientParseRules(NULL) , localizations(NULL) - , capitalizationInfoSet(FALSE) - , capitalizationForUIListMenu(FALSE) - , capitalizationForStandAlone(FALSE) + , capitalizationInfoSet(false) + , capitalizationForUIListMenu(false) + , capitalizationForStandAlone(false) , capitalizationBrkIter(NULL) { LocalizationInfo* locinfo = StringLocalizationInfo::create(locs, perror, status); @@ -721,12 +721,12 @@ RuleBasedNumberFormat::RuleBasedNumberFormat(const UnicodeString& description, , defaultInfinityRule(NULL) , defaultNaNRule(NULL) , fRoundingMode(DecimalFormat::ERoundingMode::kRoundUnnecessary) - , lenient(FALSE) + , lenient(false) , lenientParseRules(NULL) , localizations(NULL) - , capitalizationInfoSet(FALSE) - , capitalizationForUIListMenu(FALSE) - , capitalizationForStandAlone(FALSE) + , capitalizationInfoSet(false) + , capitalizationForUIListMenu(false) + , capitalizationForStandAlone(false) , capitalizationBrkIter(NULL) { LocalizationInfo* locinfo = StringLocalizationInfo::create(locs, perror, status); @@ -746,12 +746,12 @@ RuleBasedNumberFormat::RuleBasedNumberFormat(const UnicodeString& description, , defaultInfinityRule(NULL) , defaultNaNRule(NULL) , fRoundingMode(DecimalFormat::ERoundingMode::kRoundUnnecessary) - , lenient(FALSE) + , lenient(false) , lenientParseRules(NULL) , localizations(NULL) - , capitalizationInfoSet(FALSE) - , capitalizationForUIListMenu(FALSE) - , capitalizationForStandAlone(FALSE) + , capitalizationInfoSet(false) + , capitalizationForUIListMenu(false) + , capitalizationForStandAlone(false) , capitalizationBrkIter(NULL) { init(description, info, perror, status); @@ -770,12 +770,12 @@ RuleBasedNumberFormat::RuleBasedNumberFormat(const UnicodeString& description, , defaultInfinityRule(NULL) , defaultNaNRule(NULL) , fRoundingMode(DecimalFormat::ERoundingMode::kRoundUnnecessary) - , lenient(FALSE) + , lenient(false) , lenientParseRules(NULL) , localizations(NULL) - , capitalizationInfoSet(FALSE) - , capitalizationForUIListMenu(FALSE) - , capitalizationForStandAlone(FALSE) + , capitalizationInfoSet(false) + , capitalizationForUIListMenu(false) + , capitalizationForStandAlone(false) , capitalizationBrkIter(NULL) { init(description, NULL, perror, status); @@ -795,12 +795,12 @@ RuleBasedNumberFormat::RuleBasedNumberFormat(const UnicodeString& description, , defaultInfinityRule(NULL) , defaultNaNRule(NULL) , fRoundingMode(DecimalFormat::ERoundingMode::kRoundUnnecessary) - , lenient(FALSE) + , lenient(false) , lenientParseRules(NULL) , localizations(NULL) - , capitalizationInfoSet(FALSE) - , capitalizationForUIListMenu(FALSE) - , capitalizationForStandAlone(FALSE) + , capitalizationInfoSet(false) + , capitalizationForUIListMenu(false) + , capitalizationForStandAlone(false) , capitalizationBrkIter(NULL) { init(description, NULL, perror, status); @@ -817,12 +817,12 @@ RuleBasedNumberFormat::RuleBasedNumberFormat(URBNFRuleSetTag tag, const Locale& , defaultInfinityRule(NULL) , defaultNaNRule(NULL) , fRoundingMode(DecimalFormat::ERoundingMode::kRoundUnnecessary) - , lenient(FALSE) + , lenient(false) , lenientParseRules(NULL) , localizations(NULL) - , capitalizationInfoSet(FALSE) - , capitalizationForUIListMenu(FALSE) - , capitalizationForStandAlone(FALSE) + , capitalizationInfoSet(false) + , capitalizationForUIListMenu(false) + , capitalizationForStandAlone(false) , capitalizationBrkIter(NULL) { if (U_FAILURE(status)) { @@ -884,12 +884,12 @@ RuleBasedNumberFormat::RuleBasedNumberFormat(const RuleBasedNumberFormat& rhs) , defaultInfinityRule(NULL) , defaultNaNRule(NULL) , fRoundingMode(DecimalFormat::ERoundingMode::kRoundUnnecessary) - , lenient(FALSE) + , lenient(false) , lenientParseRules(NULL) , localizations(NULL) - , capitalizationInfoSet(FALSE) - , capitalizationForUIListMenu(FALSE) - , capitalizationForStandAlone(FALSE) + , capitalizationInfoSet(false) + , capitalizationForUIListMenu(false) + , capitalizationForStandAlone(false) , capitalizationBrkIter(NULL) { this->operator=(rhs); @@ -990,7 +990,7 @@ UnicodeString RuleBasedNumberFormat::getRuleSetName(int32_t index) const { if (localizations) { - UnicodeString string(TRUE, localizations->getRuleSetName(index), (int32_t)-1); + UnicodeString string(true, localizations->getRuleSetName(index), (int32_t)-1); return string; } else if (fRuleSets) { @@ -1040,7 +1040,7 @@ RuleBasedNumberFormat::getRuleSetDisplayNameLocale(int32_t index, UErrorCode& st return Locale(""); } if (localizations && index >= 0 && index < localizations->getNumberOfDisplayLocales()) { - UnicodeString name(TRUE, localizations->getLocaleName(index), -1); + UnicodeString name(true, localizations->getLocaleName(index), -1); char buffer[64]; int32_t cap = name.length() + 1; char* bp = buffer; @@ -1073,7 +1073,7 @@ RuleBasedNumberFormat::getRuleSetDisplayName(int32_t index, const Locale& locale localeStr[len] = 0; int32_t ix = localizations->indexForLocale(localeStr); if (ix >= 0) { - UnicodeString name(TRUE, localizations->getDisplayName(ix, index), -1); + UnicodeString name(true, localizations->getDisplayName(ix, index), -1); return name; } @@ -1081,7 +1081,7 @@ RuleBasedNumberFormat::getRuleSetDisplayName(int32_t index, const Locale& locale do { --len;} while (len > 0 && localeStr[len] != 0x005f); // underscore while (len > 0 && localeStr[len-1] == 0x005F) --len; } - UnicodeString name(TRUE, localizations->getRuleSetName(index), -1); + UnicodeString name(true, localizations->getRuleSetName(index), -1); return name; } UnicodeString bogus; @@ -1413,7 +1413,7 @@ RuleBasedNumberFormat::setDefaultRuleSet(const UnicodeString& ruleSetName, UErro if (U_SUCCESS(status)) { if (ruleSetName.isEmpty()) { if (localizations) { - UnicodeString name(TRUE, localizations->getRuleSetName(0), -1); + UnicodeString name(true, localizations->getRuleSetName(0), -1); defaultRuleSet = findRuleSet(name, status); } else { initDefaultRuleSet(); @@ -1636,7 +1636,7 @@ RuleBasedNumberFormat::init(const UnicodeString& rules, LocalizationInfo* locali // confirm the names, if any aren't in the rules, that's an error // it is ok if the rules contain public rule sets that are not in this list for (int32_t i = 0; i < localizationInfos->getNumberOfRuleSets(); ++i) { - UnicodeString name(TRUE, localizationInfos->getRuleSetName(i), -1); + UnicodeString name(true, localizationInfos->getRuleSetName(i), -1); NFRuleSet* rs = findRuleSet(name, status); if (rs == NULL) { break; // error @@ -1661,7 +1661,7 @@ RuleBasedNumberFormat::setContext(UDisplayContext value, UErrorCode& status) if (!capitalizationInfoSet && (value==UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU || value==UDISPCTX_CAPITALIZATION_FOR_STANDALONE)) { initCapitalizationContextInfo(locale); - capitalizationInfoSet = TRUE; + capitalizationInfoSet = true; } #if !UCONFIG_NO_BREAK_ITERATION if ( capitalizationBrkIter == NULL && (value==UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE || diff --git a/icu4c/source/i18n/rbt.cpp b/icu4c/source/i18n/rbt.cpp index 1de53e6071c..86d6cbd8bda 100644 --- a/icu4c/source/i18n/rbt.cpp +++ b/icu4c/source/i18n/rbt.cpp @@ -34,7 +34,7 @@ void RuleBasedTransliterator::_construct(const UnicodeString& rules, UParseError& parseError, UErrorCode& status) { fData = 0; - isDataOwned = TRUE; + isDataOwned = true; if (U_FAILURE(status)) { return; } @@ -143,7 +143,7 @@ RuleBasedTransliterator::RuleBasedTransliterator(const UnicodeString& id, UnicodeFilter* adoptedFilter) : Transliterator(id, adoptedFilter), fData((TransliterationRuleData*)theData), // cast away const - isDataOwned(FALSE) { + isDataOwned(false) { setMaximumContextLength(fData->ruleSet.getMaximumContextLength()); } @@ -241,7 +241,7 @@ RuleBasedTransliterator::handleTransliterate(Replaceable& text, UTransPosition& // Double-locking must be prevented in these cases. // - UBool lockedMutexAtThisLevel = FALSE; + UBool lockedMutexAtThisLevel = false; // Test whether this request is operating on the same text string as // some other transliteration that is still in progress and holding the @@ -263,7 +263,7 @@ RuleBasedTransliterator::handleTransliterate(Replaceable& text, UTransPosition& umtx_lock(&transliteratorDataMutex); // Contention, longish waits possible here. Mutex m; gLockedText = &text; - lockedMutexAtThisLevel = TRUE; + lockedMutexAtThisLevel = true; } // Check to make sure we don't dereference a null pointer. @@ -292,14 +292,14 @@ UnicodeString& RuleBasedTransliterator::toRules(UnicodeString& rulesSource, * Implement Transliterator framework */ void RuleBasedTransliterator::handleGetSourceSet(UnicodeSet& result) const { - fData->ruleSet.getSourceTargetSet(result, FALSE); + fData->ruleSet.getSourceTargetSet(result, false); } /** * Override Transliterator framework */ UnicodeSet& RuleBasedTransliterator::getTargetSet(UnicodeSet& result) const { - return fData->ruleSet.getSourceTargetSet(result, TRUE); + return fData->ruleSet.getSourceTargetSet(result, true); } U_NAMESPACE_END diff --git a/icu4c/source/i18n/rbt_data.cpp b/icu4c/source/i18n/rbt_data.cpp index f3985fc7685..866f0c2bfa1 100644 --- a/icu4c/source/i18n/rbt_data.cpp +++ b/icu4c/source/i18n/rbt_data.cpp @@ -25,7 +25,7 @@ U_NAMESPACE_BEGIN TransliterationRuleData::TransliterationRuleData(UErrorCode& status) : UMemory(), ruleSet(status), variableNames(status), - variables(0), variablesAreOwned(TRUE) + variables(0), variablesAreOwned(true) { if (U_FAILURE(status)) { return; @@ -37,7 +37,7 @@ TransliterationRuleData::TransliterationRuleData(UErrorCode& status) TransliterationRuleData::TransliterationRuleData(const TransliterationRuleData& other) : UMemory(other), ruleSet(other.ruleSet), - variablesAreOwned(TRUE), + variablesAreOwned(true), variablesBase(other.variablesBase), variablesLength(other.variablesLength) { diff --git a/icu4c/source/i18n/rbt_pars.cpp b/icu4c/source/i18n/rbt_pars.cpp index 2f207a8deb0..f13bf1c227a 100644 --- a/icu4c/source/i18n/rbt_pars.cpp +++ b/icu4c/source/i18n/rbt_pars.cpp @@ -233,7 +233,7 @@ UBool ParseData::isMatcher(UChar32 ch) { UnicodeFunctor *f = (UnicodeFunctor*) variablesVector->elementAt(i); return f != NULL && f->toMatcher() != NULL; } - return TRUE; + return true; } /** @@ -248,7 +248,7 @@ UBool ParseData::isReplacer(UChar32 ch) { UnicodeFunctor *f = (UnicodeFunctor*) variablesVector->elementAt(i); return f != NULL && f->toReplacer() != NULL; } - return TRUE; + return true; } //---------------------------------------------------------------------- @@ -348,7 +348,7 @@ RuleHalf::RuleHalf(TransliteratorParser& p) : post = -1; cursorOffset = 0; cursorOffsetPos = 0; - anchorStart = anchorEnd = FALSE; + anchorStart = anchorEnd = false; nextSegmentNumber = 1; } @@ -364,7 +364,7 @@ RuleHalf::~RuleHalf() { int32_t RuleHalf::parse(const UnicodeString& rule, int32_t pos, int32_t limit, UErrorCode& status) { int32_t start = pos; text.truncate(0); - pos = parseSection(rule, pos, limit, text, UnicodeString(TRUE, ILLEGAL_TOP, -1), FALSE, status); + pos = parseSection(rule, pos, limit, text, UnicodeString(true, ILLEGAL_TOP, -1), false, status); if (cursorOffset > 0 && cursor != cursorOffsetPos) { return syntaxError(U_MISPLACED_CURSOR_OFFSET, rule, start, status); @@ -403,7 +403,7 @@ int32_t RuleHalf::parseSection(const UnicodeString& rule, int32_t pos, int32_t l int32_t start = pos; ParsePosition pp; UnicodeString scratch; - UBool done = FALSE; + UBool done = false; int32_t quoteStart = -1; // Most recent 'single quoted string' int32_t quoteLimit = -1; int32_t varStart = -1; // Most recent $variableReference @@ -511,7 +511,7 @@ int32_t RuleHalf::parseSection(const UnicodeString& rule, int32_t pos, int32_t l //------------------------------------------------------ case ANCHOR_START: if (buf.length() == 0 && !anchorStart) { - anchorStart = TRUE; + anchorStart = true; } else { return syntaxError(U_MISPLACED_ANCHOR_START, rule, start, status); @@ -529,7 +529,7 @@ int32_t RuleHalf::parseSection(const UnicodeString& rule, int32_t pos, int32_t l int32_t segmentNumber = nextSegmentNumber++; // 1-based // Parse the segment - pos = parseSection(rule, pos, limit, buf, UnicodeString(TRUE, ILLEGAL_SEG, -1), TRUE, status); + pos = parseSection(rule, pos, limit, buf, UnicodeString(true, ILLEGAL_SEG, -1), true, status); // After parsing a segment, the relevant characters are // in buf, starting at offset bufSegStart. Extract them @@ -571,7 +571,7 @@ int32_t RuleHalf::parseSection(const UnicodeString& rule, int32_t pos, int32_t l int32_t bufSegStart = buf.length(); // Parse the segment - pos = parseSection(rule, iref, limit, buf, UnicodeString(TRUE, ILLEGAL_FUNC, -1), TRUE, status); + pos = parseSection(rule, iref, limit, buf, UnicodeString(true, ILLEGAL_FUNC, -1), true, status); // After parsing a segment, the relevant characters are // in buf, starting at offset bufSegStart. @@ -598,7 +598,7 @@ int32_t RuleHalf::parseSection(const UnicodeString& rule, int32_t pos, int32_t l if (pos == limit) { // A variable ref character at the end acts as // an anchor to the context limit, as in perl. - anchorEnd = TRUE; + anchorEnd = true; break; } // Parse "$1" "$2" .. "$9" .. (no upper limit) @@ -621,7 +621,7 @@ int32_t RuleHalf::parseSection(const UnicodeString& rule, int32_t pos, int32_t l // end anchor then. If this also doesn't work // (if we see a following character) then signal // an error. - anchorEnd = TRUE; + anchorEnd = true; break; } pos = pp.getIndex(); @@ -704,7 +704,7 @@ int32_t RuleHalf::parseSection(const UnicodeString& rule, int32_t pos, int32_t l case SEGMENT_CLOSE: // assert(isSegment); // We're done parsing a segment. - done = TRUE; + done = true; break; //------------------------------------------------------ @@ -786,7 +786,7 @@ void RuleHalf::removeContext() { text.removeBetween(0, ante); } ante = post = -1; - anchorStart = anchorEnd = FALSE; + anchorStart = anchorEnd = false; } /** @@ -798,10 +798,10 @@ UBool RuleHalf::isValidOutput(TransliteratorParser& transParser) { UChar32 c = text.char32At(i); i += U16_LENGTH(c); if (!transParser.parseData->isReplacer(c)) { - return FALSE; + return false; } } - return TRUE; + return true; } /** @@ -813,10 +813,10 @@ UBool RuleHalf::isValidInput(TransliteratorParser& transParser) { UChar32 c = text.char32At(i); i += U16_LENGTH(c); if (!transParser.parseData->isMatcher(c)) { - return FALSE; + return false; } } - return TRUE; + return true; } //---------------------------------------------------------------------- @@ -891,7 +891,7 @@ void TransliteratorParser::parseRules(const UnicodeString& rule, uprv_memset(&parseError, 0, sizeof(parseError)); parseError.line = parseError.offset = -1; - UBool parsingIDs = TRUE; + UBool parsingIDs = true; int32_t ruleCount = 0; while (!dataVector.isEmpty()) { @@ -985,7 +985,7 @@ void TransliteratorParser::parseRules(const UnicodeString& rule, } curData = NULL; } - parsingIDs = TRUE; + parsingIDs = true; } TransliteratorIDParser::SingleID* id = @@ -1044,7 +1044,7 @@ void TransliteratorParser::parseRules(const UnicodeString& rule, return; } idBlockResult.remove(); - parsingIDs = FALSE; + parsingIDs = false; curData = new TransliterationRuleData(status); // NULL pointer check if (curData == NULL) { @@ -1177,7 +1177,7 @@ void TransliteratorParser::setVariableRange(int32_t start, int32_t end, UErrorCo /** * Assert that the given character is NOT within the variable range. - * If it is, return FALSE. This is necessary to ensure that the + * If it is, return false. This is necessary to ensure that the * variable range does not overlap characters used in a rule. */ UBool TransliteratorParser::checkVariableRange(UChar32 ch) const { @@ -1218,7 +1218,7 @@ static const UChar PRAGMA_NFC_RULES[] = {0x7E,0x6E,0x66,0x63,0x20,0x72,0x75,0x6C */ UBool TransliteratorParser::resemblesPragma(const UnicodeString& rule, int32_t pos, int32_t limit) { // Must start with /use\s/i - return ICU_Utility::parsePattern(rule, pos, limit, UnicodeString(TRUE, PRAGMA_USE, 4), NULL) >= 0; + return ICU_Utility::parsePattern(rule, pos, limit, UnicodeString(true, PRAGMA_USE, 4), NULL) >= 0; } /** @@ -1243,25 +1243,25 @@ int32_t TransliteratorParser::parsePragma(const UnicodeString& rule, int32_t pos // use maximum backup 16; // use nfd rules; // use nfc rules; - int p = ICU_Utility::parsePattern(rule, pos, limit, UnicodeString(TRUE, PRAGMA_VARIABLE_RANGE, -1), array); + int p = ICU_Utility::parsePattern(rule, pos, limit, UnicodeString(true, PRAGMA_VARIABLE_RANGE, -1), array); if (p >= 0) { setVariableRange(array[0], array[1], status); return p; } - p = ICU_Utility::parsePattern(rule, pos, limit, UnicodeString(TRUE, PRAGMA_MAXIMUM_BACKUP, -1), array); + p = ICU_Utility::parsePattern(rule, pos, limit, UnicodeString(true, PRAGMA_MAXIMUM_BACKUP, -1), array); if (p >= 0) { pragmaMaximumBackup(array[0]); return p; } - p = ICU_Utility::parsePattern(rule, pos, limit, UnicodeString(TRUE, PRAGMA_NFD_RULES, -1), NULL); + p = ICU_Utility::parsePattern(rule, pos, limit, UnicodeString(true, PRAGMA_NFD_RULES, -1), NULL); if (p >= 0) { pragmaNormalizeRules(UNORM_NFD); return p; } - p = ICU_Utility::parsePattern(rule, pos, limit, UnicodeString(TRUE, PRAGMA_NFC_RULES, -1), NULL); + p = ICU_Utility::parsePattern(rule, pos, limit, UnicodeString(true, PRAGMA_NFC_RULES, -1), NULL); if (p >= 0) { pragmaNormalizeRules(UNORM_NFC); return p; @@ -1620,7 +1620,7 @@ void TransliteratorParser::setSegmentObject(int32_t seg, StringMatcher* adopted, */ UChar TransliteratorParser::getDotStandIn(UErrorCode& status) { if (dotStandIn == (UChar) -1) { - UnicodeSet* tempus = new UnicodeSet(UnicodeString(TRUE, DOT_SET, -1), status); + UnicodeSet* tempus = new UnicodeSet(UnicodeString(true, DOT_SET, -1), status); // Null pointer check. if (tempus == NULL) { status = U_MEMORY_ALLOCATION_ERROR; @@ -1681,7 +1681,7 @@ utrans_stripRules(const UChar *source, int32_t sourceLen, UChar *target, UErrorC const UChar *sourceLimit = source+sourceLen; UChar *targetLimit = target+sourceLen; UChar32 c = 0; - UBool quoted = FALSE; + UBool quoted = false; int32_t index; uprv_memset(target, 0, sourceLen*U_SIZEOF_UCHAR); @@ -1748,7 +1748,7 @@ utrans_stripRules(const UChar *source, int32_t sourceLen, UChar *target, UErrorC /* ignore spaces carriage returns, and all leading spaces on the next line. * and line feed unless in the form \uXXXX */ - quoted = FALSE; + quoted = false; while (source < sourceLimit) { c = *(source); if (c != CR && c != LF && c != 0x0020) { diff --git a/icu4c/source/i18n/rbt_rule.cpp b/icu4c/source/i18n/rbt_rule.cpp index 6cc5325c467..ee0d938ca95 100644 --- a/icu4c/source/i18n/rbt_rule.cpp +++ b/icu4c/source/i18n/rbt_rule.cpp @@ -50,9 +50,9 @@ U_NAMESPACE_BEGIN * segments, or null if there are none. The array itself is adopted, * but the pointers within it are not. * @param segsCount number of elements in segs[] - * @param anchorStart TRUE if the the rule is anchored on the left to + * @param anchorStart true if the the rule is anchored on the left to * the context start - * @param anchorEnd TRUE if the rule is anchored on the right to the + * @param anchorEnd true if the rule is anchored on the right to the * context limit */ TransliterationRule::TransliterationRule(const UnicodeString& input, @@ -119,7 +119,7 @@ TransliterationRule::TransliterationRule(const UnicodeString& input, anteContext = NULL; if (anteContextLength > 0) { anteContext = new StringMatcher(pattern, 0, anteContextLength, - FALSE, *data); + false, *data); /* test for NULL */ if (anteContext == 0) { status = U_MEMORY_ALLOCATION_ERROR; @@ -130,7 +130,7 @@ TransliterationRule::TransliterationRule(const UnicodeString& input, key = NULL; if (keyLength > 0) { key = new StringMatcher(pattern, anteContextLength, anteContextLength + keyLength, - FALSE, *data); + false, *data); /* test for NULL */ if (key == 0) { status = U_MEMORY_ALLOCATION_ERROR; @@ -142,7 +142,7 @@ TransliterationRule::TransliterationRule(const UnicodeString& input, postContext = NULL; if (postContextLength > 0) { postContext = new StringMatcher(pattern, anteContextLength + keyLength, pattern.length(), - FALSE, *data); + false, *data); /* test for NULL */ if (postContext == 0) { status = U_MEMORY_ALLOCATION_ERROR; @@ -242,7 +242,7 @@ UBool TransliterationRule::matchesIndexValue(uint8_t v) const { // Delegate to the key, or if there is none, to the postContext. // If there is neither then we match any key; return true. UnicodeMatcher *m = (key != NULL) ? key : postContext; - return (m != NULL) ? m->matchesIndexValue(v) : TRUE; + return (m != NULL) ? m->matchesIndexValue(v) : true; } /** @@ -343,11 +343,11 @@ static inline int32_t posAfter(const Replaceable& str, int32_t pos) { * * @param text the text * @param pos the position indices - * @param incremental if TRUE, test for partial matches that may + * @param incremental if true, test for partial matches that may * be completed by additional text inserted at pos.limit. * @return one of U_MISMATCH, * U_PARTIAL_MATCH, or U_MATCH. If - * incremental is FALSE then U_PARTIAL_MATCH will not be returned. + * incremental is false then U_PARTIAL_MATCH will not be returned. */ UMatchDegree TransliterationRule::matchAndReplace(Replaceable& text, UTransPosition& pos, @@ -392,7 +392,7 @@ UMatchDegree TransliterationRule::matchAndReplace(Replaceable& text, oText = posBefore(text, pos.start); if (anteContext != NULL) { - match = anteContext->matches(text, oText, anteLimit, FALSE); + match = anteContext->matches(text, oText, anteLimit, false); if (match != U_MATCH) { return U_MISMATCH; } @@ -488,13 +488,13 @@ UnicodeString& TransliterationRule::toRule(UnicodeString& rule, ICU_Utility::appendToRule(rule, anteContext, escapeUnprintable, quoteBuf); if (emitBraces) { - ICU_Utility::appendToRule(rule, (UChar) 0x007B /*{*/, TRUE, escapeUnprintable, quoteBuf); + ICU_Utility::appendToRule(rule, (UChar) 0x007B /*{*/, true, escapeUnprintable, quoteBuf); } ICU_Utility::appendToRule(rule, key, escapeUnprintable, quoteBuf); if (emitBraces) { - ICU_Utility::appendToRule(rule, (UChar) 0x007D /*}*/, TRUE, escapeUnprintable, quoteBuf); + ICU_Utility::appendToRule(rule, (UChar) 0x007D /*}*/, true, escapeUnprintable, quoteBuf); } ICU_Utility::appendToRule(rule, postContext, escapeUnprintable, quoteBuf); @@ -504,14 +504,14 @@ UnicodeString& TransliterationRule::toRule(UnicodeString& rule, rule.append((UChar)36/*$*/); } - ICU_Utility::appendToRule(rule, UnicodeString(TRUE, FORWARD_OP, 3), TRUE, escapeUnprintable, quoteBuf); + ICU_Utility::appendToRule(rule, UnicodeString(true, FORWARD_OP, 3), true, escapeUnprintable, quoteBuf); // Emit the output pattern ICU_Utility::appendToRule(rule, output->toReplacer()->toReplacerPattern(str, escapeUnprintable), - TRUE, escapeUnprintable, quoteBuf); + true, escapeUnprintable, quoteBuf); - ICU_Utility::appendToRule(rule, (UChar) 0x003B /*;*/, TRUE, escapeUnprintable, quoteBuf); + ICU_Utility::appendToRule(rule, (UChar) 0x003B /*;*/, true, escapeUnprintable, quoteBuf); return rule; } diff --git a/icu4c/source/i18n/rbt_set.cpp b/icu4c/source/i18n/rbt_set.cpp index 6835c03a698..c5174674361 100644 --- a/icu4c/source/i18n/rbt_set.cpp +++ b/icu4c/source/i18n/rbt_set.cpp @@ -114,7 +114,7 @@ inline void _debugOut(const char* msg, TransliterationRule* rule, UnicodeString buf(msg, ""); if (rule) { UnicodeString r; - rule->toRule(r, TRUE); + rule->toRule(r, true); buf.append((UChar)32).append(r); } buf.append(UnicodeString(" => ", "")); @@ -145,14 +145,14 @@ static void maskingError(const icu::TransliterationRule& rule1, parseError.line = parseError.offset = -1; // for pre-context - rule1.toRule(r, FALSE); + rule1.toRule(r, false); len = uprv_min(r.length(), U_PARSE_CONTEXT_LEN-1); r.extract(0, len, parseError.preContext); parseError.preContext[len] = 0; //for post-context r.truncate(0); - rule2.toRule(r, FALSE); + rule2.toRule(r, false); len = uprv_min(r.length(), U_PARSE_CONTEXT_LEN-1); r.extract(0, len, parseError.postContext); parseError.postContext[len] = 0; @@ -387,14 +387,14 @@ void TransliterationRuleSet::freeze(UParseError& parseError,UErrorCode& status) /** * Transliterate the given text with the given UTransPosition - * indices. Return TRUE if the transliteration should continue - * or FALSE if it should halt (because of a U_PARTIAL_MATCH match). - * Note that FALSE is only ever returned if isIncremental is TRUE. + * indices. Return true if the transliteration should continue + * or false if it should halt (because of a U_PARTIAL_MATCH match). + * Note that false is only ever returned if isIncremental is true. * @param text the text to be transliterated * @param pos the position indices, which will be updated - * @param incremental if TRUE, assume new text may be inserted - * at index.limit, and return FALSE if there is a partial match. - * @return TRUE unless a U_PARTIAL_MATCH has been obtained, + * @param incremental if true, assume new text may be inserted + * at index.limit, and return false if there is a partial match. + * @return true unless a U_PARTIAL_MATCH has been obtained, * indicating that transliteration should stop until more text * arrives. */ @@ -407,10 +407,10 @@ UBool TransliterationRuleSet::transliterate(Replaceable& text, switch (m) { case U_MATCH: _debugOut("match", rules[i], text, pos); - return TRUE; + return true; case U_PARTIAL_MATCH: _debugOut("partial match", rules[i], text, pos); - return FALSE; + return false; default: /* Ram: added default to make GCC happy */ break; } @@ -418,7 +418,7 @@ UBool TransliterationRuleSet::transliterate(Replaceable& text, // No match or partial match from any rule pos.start += U16_LENGTH(text.char32At(pos.start)); _debugOut("no match", NULL, text, pos); - return TRUE; + return true; } /** diff --git a/icu4c/source/i18n/rbtz.cpp b/icu4c/source/i18n/rbtz.cpp index 7eba471a713..0e174bab38a 100644 --- a/icu4c/source/i18n/rbtz.cpp +++ b/icu4c/source/i18n/rbtz.cpp @@ -40,34 +40,34 @@ U_CDECL_END static UBool compareRules(UVector* rules1, UVector* rules2) { if (rules1 == NULL && rules2 == NULL) { - return TRUE; + return true; } else if (rules1 == NULL || rules2 == NULL) { - return FALSE; + return false; } int32_t size = rules1->size(); if (size != rules2->size()) { - return FALSE; + return false; } for (int32_t i = 0; i < size; i++) { TimeZoneRule *r1 = (TimeZoneRule*)rules1->elementAt(i); TimeZoneRule *r2 = (TimeZoneRule*)rules2->elementAt(i); if (*r1 != *r2) { - return FALSE; + return false; } } - return TRUE; + return true; } UOBJECT_DEFINE_RTTI_IMPLEMENTATION(RuleBasedTimeZone) RuleBasedTimeZone::RuleBasedTimeZone(const UnicodeString& id, InitialTimeZoneRule* initialRule) : BasicTimeZone(id), fInitialRule(initialRule), fHistoricRules(NULL), fFinalRules(NULL), - fHistoricTransitions(NULL), fUpToDate(FALSE) { + fHistoricTransitions(NULL), fUpToDate(false) { } RuleBasedTimeZone::RuleBasedTimeZone(const RuleBasedTimeZone& source) : BasicTimeZone(source), fInitialRule(source.fInitialRule->clone()), - fHistoricTransitions(NULL), fUpToDate(FALSE) { + fHistoricTransitions(NULL), fUpToDate(false) { fHistoricRules = copyRules(source.fHistoricRules); fFinalRules = copyRules(source.fFinalRules); if (source.fUpToDate) { @@ -90,7 +90,7 @@ RuleBasedTimeZone::operator=(const RuleBasedTimeZone& right) { fHistoricRules = copyRules(right.fHistoricRules); fFinalRules = copyRules(right.fFinalRules); deleteTransitions(); - fUpToDate = FALSE; + fUpToDate = false; } return *this; } @@ -152,7 +152,7 @@ RuleBasedTimeZone::addTransitionRule(TimeZoneRule* rule, UErrorCode& status) { fHistoricRules->adoptElement(lpRule.orphan(), status); } // Mark dirty, so transitions are recalculated at next complete() call - fUpToDate = FALSE; + fUpToDate = false; } @@ -203,7 +203,7 @@ RuleBasedTimeZone::complete(UErrorCode& status) { for (i = 0; i < historicCount; i++) { done[i] = false; } - while (TRUE) { + while (true) { int32_t curStdOffset = curRule->getRawOffset(); int32_t curDstSavings = curRule->getDSTSavings(); UDate nextTransitionTime = MAX_MILLIS; @@ -239,10 +239,10 @@ RuleBasedTimeZone::complete(UErrorCode& status) { if (nextRule == NULL) { // Check if all historic rules are done - UBool bDoneAll = TRUE; + UBool bDoneAll = true; for (int32_t j = 0; j < historicCount; j++) { if (!done[j]) { - bDoneAll = FALSE; + bDoneAll = false; break; } } @@ -344,12 +344,12 @@ RuleBasedTimeZone::complete(UErrorCode& status) { } } } - fUpToDate = TRUE; + fUpToDate = true; return; cleanup: deleteTransitions(); - fUpToDate = FALSE; + fUpToDate = false; } RuleBasedTimeZone* @@ -386,7 +386,7 @@ RuleBasedTimeZone::getOffset(uint8_t era, int32_t year, int32_t month, int32_t d } int32_t rawOffset, dstOffset; UDate time = (UDate)Grego::fieldsToDay(year, month, day) * U_MILLIS_PER_DAY + millis; - getOffsetInternal(time, TRUE, kDaylight, kStandard, rawOffset, dstOffset, status); + getOffsetInternal(time, true, kDaylight, kStandard, rawOffset, dstOffset, status); if (U_FAILURE(status)) { return 0; } @@ -402,7 +402,7 @@ RuleBasedTimeZone::getOffset(UDate date, UBool local, int32_t& rawOffset, void RuleBasedTimeZone::getOffsetFromLocal(UDate date, UTimeZoneLocalOption nonExistingTimeOpt, UTimeZoneLocalOption duplicatedTimeOpt, int32_t& rawOffset, int32_t& dstOffset, UErrorCode& status) const { - getOffsetInternal(date, TRUE, nonExistingTimeOpt, duplicatedTimeOpt, rawOffset, dstOffset, status); + getOffsetInternal(date, true, nonExistingTimeOpt, duplicatedTimeOpt, rawOffset, dstOffset, status); } @@ -479,7 +479,7 @@ RuleBasedTimeZone::getRawOffset(void) const { // as of current time. UErrorCode status = U_ZERO_ERROR; int32_t raw, dst; - getOffset(uprv_getUTCtime(), FALSE, raw, dst, status); + getOffset(uprv_getUTCtime(), false, raw, dst, status); return raw; } @@ -491,50 +491,50 @@ RuleBasedTimeZone::useDaylightTime(void) const { UErrorCode status = U_ZERO_ERROR; UDate now = uprv_getUTCtime(); int32_t raw, dst; - getOffset(now, FALSE, raw, dst, status); + getOffset(now, false, raw, dst, status); if (dst != 0) { - return TRUE; + return true; } // If DST is not used now, check if DST is used after the next transition UDate time; TimeZoneRule *from, *to; - UBool avail = findNext(now, FALSE, time, from, to); + UBool avail = findNext(now, false, time, from, to); if (avail && to->getDSTSavings() != 0) { - return TRUE; + return true; } - return FALSE; + return false; } UBool RuleBasedTimeZone::inDaylightTime(UDate date, UErrorCode& status) const { if (U_FAILURE(status)) { - return FALSE; + return false; } int32_t raw, dst; - getOffset(date, FALSE, raw, dst, status); + getOffset(date, false, raw, dst, status); if (dst != 0) { - return TRUE; + return true; } - return FALSE; + return false; } UBool RuleBasedTimeZone::hasSameRules(const TimeZone& other) const { if (this == &other) { - return TRUE; + return true; } if (typeid(*this) != typeid(other)) { - return FALSE; + return false; } const RuleBasedTimeZone& that = (const RuleBasedTimeZone&)other; if (*fInitialRule != *(that.fInitialRule)) { - return FALSE; + return false; } if (compareRules(fHistoricRules, that.fHistoricRules) && compareRules(fFinalRules, that.fFinalRules)) { - return TRUE; + return true; } - return FALSE; + return false; } UBool @@ -542,7 +542,7 @@ RuleBasedTimeZone::getNextTransition(UDate base, UBool inclusive, TimeZoneTransi UErrorCode status = U_ZERO_ERROR; completeConst(status); if (U_FAILURE(status)) { - return FALSE; + return false; } UDate transitionTime; TimeZoneRule *fromRule, *toRule; @@ -551,9 +551,9 @@ RuleBasedTimeZone::getNextTransition(UDate base, UBool inclusive, TimeZoneTransi result.setTime(transitionTime); result.setFrom((const TimeZoneRule&)*fromRule); result.setTo((const TimeZoneRule&)*toRule); - return TRUE; + return true; } - return FALSE; + return false; } UBool @@ -561,7 +561,7 @@ RuleBasedTimeZone::getPreviousTransition(UDate base, UBool inclusive, TimeZoneTr UErrorCode status = U_ZERO_ERROR; completeConst(status); if (U_FAILURE(status)) { - return FALSE; + return false; } UDate transitionTime; TimeZoneRule *fromRule, *toRule; @@ -570,9 +570,9 @@ RuleBasedTimeZone::getPreviousTransition(UDate base, UBool inclusive, TimeZoneTr result.setTime(transitionTime); result.setFrom((const TimeZoneRule&)*fromRule); result.setTo((const TimeZoneRule&)*toRule); - return TRUE; + return true; } - return FALSE; + return false; } int32_t @@ -687,7 +687,7 @@ RuleBasedTimeZone::findRuleInFinal(UDate date, UBool local, NonExistingTimeOpt, DuplicatedTimeOpt); base -= localDelta; } - UBool avail0 = fr0->getPreviousStart(base, fr1->getRawOffset(), fr1->getDSTSavings(), TRUE, start0); + UBool avail0 = fr0->getPreviousStart(base, fr1->getRawOffset(), fr1->getDSTSavings(), true, start0); base = date; if (local) { @@ -696,7 +696,7 @@ RuleBasedTimeZone::findRuleInFinal(UDate date, UBool local, NonExistingTimeOpt, DuplicatedTimeOpt); base -= localDelta; } - UBool avail1 = fr1->getPreviousStart(base, fr0->getRawOffset(), fr0->getDSTSavings(), TRUE, start1); + UBool avail1 = fr1->getPreviousStart(base, fr0->getRawOffset(), fr0->getDSTSavings(), true, start1); if (!avail0 || !avail1) { if (avail0) { @@ -715,23 +715,23 @@ UBool RuleBasedTimeZone::findNext(UDate base, UBool inclusive, UDate& transitionTime, TimeZoneRule*& fromRule, TimeZoneRule*& toRule) const { if (fHistoricTransitions == NULL) { - return FALSE; + return false; } - UBool isFinal = FALSE; - UBool found = FALSE; + UBool isFinal = false; + UBool found = false; Transition result; Transition *tzt = (Transition*)fHistoricTransitions->elementAt(0); UDate tt = tzt->time; if (tt > base || (inclusive && tt == base)) { result = *tzt; - found = TRUE; + found = true; } else { int32_t idx = fHistoricTransitions->size() - 1; tzt = (Transition*)fHistoricTransitions->elementAt(idx); tt = tzt->time; if (inclusive && tt == base) { result = *tzt; - found = TRUE; + found = true; } else if (tt <= base) { if (fFinalRules != NULL) { // Find a transion time with finalRules @@ -740,9 +740,9 @@ RuleBasedTimeZone::findNext(UDate base, UBool inclusive, UDate& transitionTime, UDate start0, start1; UBool avail0 = r0->getNextStart(base, r1->getRawOffset(), r1->getDSTSavings(), inclusive, start0); UBool avail1 = r1->getNextStart(base, r0->getRawOffset(), r0->getDSTSavings(), inclusive, start1); - // avail0/avail1 should be always TRUE + // avail0/avail1 should be always true if (!avail0 && !avail1) { - return FALSE; + return false; } if (!avail1 || start0 < start1) { result.time = start0; @@ -753,8 +753,8 @@ RuleBasedTimeZone::findNext(UDate base, UBool inclusive, UDate& transitionTime, result.from = r0; result.to = r1; } - isFinal = TRUE; - found = TRUE; + isFinal = true; + found = true; } } else { // Find a transition within the historic transitions @@ -772,7 +772,7 @@ RuleBasedTimeZone::findNext(UDate base, UBool inclusive, UDate& transitionTime, result.time = prev->time; result.from = prev->from; result.to = prev->to; - found = TRUE; + found = true; } } if (found) { @@ -780,41 +780,41 @@ RuleBasedTimeZone::findNext(UDate base, UBool inclusive, UDate& transitionTime, if (result.from->getRawOffset() == result.to->getRawOffset() && result.from->getDSTSavings() == result.to->getDSTSavings()) { if (isFinal) { - return FALSE; + return false; } else { // No offset changes. Try next one if not final - return findNext(result.time, FALSE /* always exclusive */, + return findNext(result.time, false /* always exclusive */, transitionTime, fromRule, toRule); } } transitionTime = result.time; fromRule = result.from; toRule = result.to; - return TRUE; + return true; } - return FALSE; + return false; } UBool RuleBasedTimeZone::findPrev(UDate base, UBool inclusive, UDate& transitionTime, TimeZoneRule*& fromRule, TimeZoneRule*& toRule) const { if (fHistoricTransitions == NULL) { - return FALSE; + return false; } - UBool found = FALSE; + UBool found = false; Transition result; Transition *tzt = (Transition*)fHistoricTransitions->elementAt(0); UDate tt = tzt->time; if (inclusive && tt == base) { result = *tzt; - found = TRUE; + found = true; } else if (tt < base) { int32_t idx = fHistoricTransitions->size() - 1; tzt = (Transition*)fHistoricTransitions->elementAt(idx); tt = tzt->time; if (inclusive && tt == base) { result = *tzt; - found = TRUE; + found = true; } else if (tt < base) { if (fFinalRules != NULL) { // Find a transion time with finalRules @@ -823,9 +823,9 @@ RuleBasedTimeZone::findPrev(UDate base, UBool inclusive, UDate& transitionTime, UDate start0, start1; UBool avail0 = r0->getPreviousStart(base, r1->getRawOffset(), r1->getDSTSavings(), inclusive, start0); UBool avail1 = r1->getPreviousStart(base, r0->getRawOffset(), r0->getDSTSavings(), inclusive, start1); - // avail0/avail1 should be always TRUE + // avail0/avail1 should be always true if (!avail0 && !avail1) { - return FALSE; + return false; } if (!avail1 || start0 > start1) { result.time = start0; @@ -839,7 +839,7 @@ RuleBasedTimeZone::findPrev(UDate base, UBool inclusive, UDate& transitionTime, } else { result = *tzt; } - found = TRUE; + found = true; } else { // Find a transition within the historic transitions idx--; @@ -852,7 +852,7 @@ RuleBasedTimeZone::findPrev(UDate base, UBool inclusive, UDate& transitionTime, idx--; } result = *tzt; - found = TRUE; + found = true; } } if (found) { @@ -860,15 +860,15 @@ RuleBasedTimeZone::findPrev(UDate base, UBool inclusive, UDate& transitionTime, if (result.from->getRawOffset() == result.to->getRawOffset() && result.from->getDSTSavings() == result.to->getDSTSavings()) { // No offset changes. Try next one if not final - return findPrev(result.time, FALSE /* always exclusive */, + return findPrev(result.time, false /* always exclusive */, transitionTime, fromRule, toRule); } transitionTime = result.time; fromRule = result.from; toRule = result.to; - return TRUE; + return true; } - return FALSE; + return false; } UDate diff --git a/icu4c/source/i18n/regexcmp.cpp b/icu4c/source/i18n/regexcmp.cpp index 89cb6584251..4b507002d63 100644 --- a/icu4c/source/i18n/regexcmp.cpp +++ b/icu4c/source/i18n/regexcmp.cpp @@ -66,10 +66,10 @@ RegexCompile::RegexCompile(RegexPattern *rxp, UErrorCode &status) : fPeekChar = -1; fLineNum = 1; fCharNum = 0; - fQuoteMode = FALSE; - fInBackslashQuote = FALSE; + fQuoteMode = false; + fInBackslashQuote = false; fModeFlags = fRXPat->fFlags | 0x80000000; - fEOLComments = TRUE; + fEOLComments = true; fMatchOpenParen = -1; fMatchCloseParen = -1; @@ -144,7 +144,7 @@ void RegexCompile::compile( U_ASSERT(fRXPat->fPattern == NULL || utext_nativeLength(fRXPat->fPattern) == 0); // Prepare the RegexPattern object to receive the compiled pattern. - fRXPat->fPattern = utext_clone(fRXPat->fPattern, pat, FALSE, TRUE, fStatus); + fRXPat->fPattern = utext_clone(fRXPat->fPattern, pat, false, true, fStatus); if (U_FAILURE(*fStatus)) { return; } @@ -156,7 +156,7 @@ void RegexCompile::compile( // UREGEX_LITERAL force entire pattern to be treated as a literal string. if (fModeFlags & UREGEX_LITERAL) { - fQuoteMode = TRUE; + fQuoteMode = true; } nextChar(fC); // Fetch the first char from the pattern string. @@ -193,7 +193,7 @@ void RegexCompile::compile( for (;;) { // loop through table rows belonging to this state, looking for one // that matches the current input char. REGEX_SCAN_DEBUG_PRINTF((".")); - if (tableEl->fCharClass < 127 && fC.fQuoted == FALSE && tableEl->fCharClass == fC.fChar) { + if (tableEl->fCharClass < 127 && fC.fQuoted == false && tableEl->fCharClass == fC.fChar) { // Table row specified an individual character, not a set, and // the input character is not quoted, and // the input character matched it. @@ -213,7 +213,7 @@ void RegexCompile::compile( } if (tableEl->fCharClass >= 128 && tableEl->fCharClass < 240 && // Table specs a char class && - fC.fQuoted == FALSE && // char is not escaped && + fC.fQuoted == false && // char is not escaped && fC.fChar != (UChar32)-1) { // char is not EOF U_ASSERT(tableEl->fCharClass <= 137); if (RegexStaticSets::gStaticSets->fRuleSets[tableEl->fCharClass-128].contains(fC.fChar)) { @@ -232,7 +232,7 @@ void RegexCompile::compile( // We've found the row of the state table that matches the current input // character from the rules string. // Perform any action specified by this row in the state table. - if (doParseActions(tableEl->fAction) == FALSE) { + if (doParseActions(tableEl->fAction) == false) { // Break out of the state machine loop if the // the action signalled some kind of error, or // the action was to exit, occurs on normal end-of-rules-input. @@ -345,7 +345,7 @@ void RegexCompile::compile( //------------------------------------------------------------------------------ UBool RegexCompile::doParseActions(int32_t action) { - UBool returnVal = TRUE; + UBool returnVal = true; switch ((Regex_PatternParseAction)action) { @@ -386,7 +386,7 @@ UBool RegexCompile::doParseActions(int32_t action) appendOp(URX_END, 0); // Terminate the pattern compilation state machine. - returnVal = FALSE; + returnVal = false; break; @@ -395,7 +395,7 @@ UBool RegexCompile::doParseActions(int32_t action) // Scanning a '|', as in (A|B) { // Generate code for any pending literals preceding the '|' - fixLiterals(FALSE); + fixLiterals(false); // Insert a SAVE operation at the start of the pattern section preceding // this OR at this level. This SAVE will branch the match forward @@ -788,7 +788,7 @@ UBool RegexCompile::doParseActions(int32_t action) // 2. LOOP_SR_I set number (assuming repeated item is a set ref) // 3. LOOP_C stack location { - int32_t topLoc = blockTopLoc(FALSE); // location of item #1 + int32_t topLoc = blockTopLoc(false); // location of item #1 int32_t frameLoc; // Check for simple constructs, which may get special optimized code. @@ -850,7 +850,7 @@ UBool RegexCompile::doParseActions(int32_t action) // 2. state-save 1 // 3. ... { - int32_t topLoc = blockTopLoc(FALSE); + int32_t topLoc = blockTopLoc(false); appendOp(URX_STATE_SAVE, topLoc); } break; @@ -864,7 +864,7 @@ UBool RegexCompile::doParseActions(int32_t action) // 3. ... // Insert the state save into the compiled pattern, and we're done. { - int32_t saveStateLoc = blockTopLoc(TRUE); + int32_t saveStateLoc = blockTopLoc(true); int32_t saveStateOp = buildOp(URX_STATE_SAVE, fRXPat->fCompiledPat->size()); fRXPat->fCompiledPat->setElementAt(saveStateOp, saveStateLoc); } @@ -881,7 +881,7 @@ UBool RegexCompile::doParseActions(int32_t action) // This code is less than ideal, with two jmps instead of one, because we can only // insert one instruction at the top of the block being iterated. { - int32_t jmp1_loc = blockTopLoc(TRUE); + int32_t jmp1_loc = blockTopLoc(true); int32_t jmp2_loc = fRXPat->fCompiledPat->size(); int32_t jmp1_op = buildOp(URX_JMP, jmp2_loc+1); @@ -919,7 +919,7 @@ UBool RegexCompile::doParseActions(int32_t action) // 5. ... { // location of item #1, the STATE_SAVE - int32_t topLoc = blockTopLoc(FALSE); + int32_t topLoc = blockTopLoc(false); int32_t dataLoc = -1; // Check for simple *, where the construct being repeated @@ -958,7 +958,7 @@ UBool RegexCompile::doParseActions(int32_t action) // Emit general case code for this * // The optimizations did not apply. - int32_t saveStateLoc = blockTopLoc(TRUE); + int32_t saveStateLoc = blockTopLoc(true); int32_t jmpOp = buildOp(URX_JMP_SAV, saveStateLoc+1); // Check for minimum match length of zero, which requires @@ -993,7 +993,7 @@ UBool RegexCompile::doParseActions(int32_t action) // 3. STATE_SAVE 2 // 4 ... { - int32_t jmpLoc = blockTopLoc(TRUE); // loc 1. + int32_t jmpLoc = blockTopLoc(true); // loc 1. int32_t saveLoc = fRXPat->fCompiledPat->size(); // loc 3. int32_t jmpOp = buildOp(URX_JMP, saveLoc); fRXPat->fCompiledPat->setElementAt(jmpOp, jmpLoc); @@ -1048,7 +1048,7 @@ UBool RegexCompile::doParseActions(int32_t action) case doInterval: // Finished scanning a normal {lower,upper} interval. Generate the code for it. - if (compileInlineInterval() == FALSE) { + if (compileInlineInterval() == false) { compileInterval(URX_CTR_INIT, URX_CTR_LOOP); } break; @@ -1060,7 +1060,7 @@ UBool RegexCompile::doParseActions(int32_t action) // (Can not reserve a slot in the compiled pattern at this time, because // compileInterval needs to reserve also, and blockTopLoc can only reserve // once per block.) - int32_t topLoc = blockTopLoc(FALSE); + int32_t topLoc = blockTopLoc(false); // Produce normal looping code. compileInterval(URX_CTR_INIT, URX_CTR_LOOP); @@ -1116,7 +1116,7 @@ UBool RegexCompile::doParseActions(int32_t action) case doDotAny: // scanned a ".", match any single character. { - fixLiterals(FALSE); + fixLiterals(false); if (fModeFlags & UREGEX_DOTALL) { appendOp(URX_DOTANY_ALL, 0); } else if (fModeFlags & UREGEX_UNIX_LINES) { @@ -1129,7 +1129,7 @@ UBool RegexCompile::doParseActions(int32_t action) case doCaret: { - fixLiterals(FALSE); + fixLiterals(false); if ( (fModeFlags & UREGEX_MULTILINE) == 0 && (fModeFlags & UREGEX_UNIX_LINES) == 0) { appendOp(URX_CARET, 0); } else if ((fModeFlags & UREGEX_MULTILINE) != 0 && (fModeFlags & UREGEX_UNIX_LINES) == 0) { @@ -1144,7 +1144,7 @@ UBool RegexCompile::doParseActions(int32_t action) case doDollar: { - fixLiterals(FALSE); + fixLiterals(false); if ( (fModeFlags & UREGEX_MULTILINE) == 0 && (fModeFlags & UREGEX_UNIX_LINES) == 0) { appendOp(URX_DOLLAR, 0); } else if ((fModeFlags & UREGEX_MULTILINE) != 0 && (fModeFlags & UREGEX_UNIX_LINES) == 0) { @@ -1158,7 +1158,7 @@ UBool RegexCompile::doParseActions(int32_t action) break; case doBackslashA: - fixLiterals(FALSE); + fixLiterals(false); appendOp(URX_CARET, 0); break; @@ -1169,7 +1169,7 @@ UBool RegexCompile::doParseActions(int32_t action) error(U_UNSUPPORTED_ERROR); } #endif - fixLiterals(FALSE); + fixLiterals(false); int32_t op = (fModeFlags & UREGEX_UWORD)? URX_BACKSLASH_BU : URX_BACKSLASH_B; appendOp(op, 1); } @@ -1182,69 +1182,69 @@ UBool RegexCompile::doParseActions(int32_t action) error(U_UNSUPPORTED_ERROR); } #endif - fixLiterals(FALSE); + fixLiterals(false); int32_t op = (fModeFlags & UREGEX_UWORD)? URX_BACKSLASH_BU : URX_BACKSLASH_B; appendOp(op, 0); } break; case doBackslashD: - fixLiterals(FALSE); + fixLiterals(false); appendOp(URX_BACKSLASH_D, 1); break; case doBackslashd: - fixLiterals(FALSE); + fixLiterals(false); appendOp(URX_BACKSLASH_D, 0); break; case doBackslashG: - fixLiterals(FALSE); + fixLiterals(false); appendOp(URX_BACKSLASH_G, 0); break; case doBackslashH: - fixLiterals(FALSE); + fixLiterals(false); appendOp(URX_BACKSLASH_H, 1); break; case doBackslashh: - fixLiterals(FALSE); + fixLiterals(false); appendOp(URX_BACKSLASH_H, 0); break; case doBackslashR: - fixLiterals(FALSE); + fixLiterals(false); appendOp(URX_BACKSLASH_R, 0); break; case doBackslashS: - fixLiterals(FALSE); + fixLiterals(false); appendOp(URX_STAT_SETREF_N, URX_ISSPACE_SET); break; case doBackslashs: - fixLiterals(FALSE); + fixLiterals(false); appendOp(URX_STATIC_SETREF, URX_ISSPACE_SET); break; case doBackslashV: - fixLiterals(FALSE); + fixLiterals(false); appendOp(URX_BACKSLASH_V, 1); break; case doBackslashv: - fixLiterals(FALSE); + fixLiterals(false); appendOp(URX_BACKSLASH_V, 0); break; case doBackslashW: - fixLiterals(FALSE); + fixLiterals(false); appendOp(URX_STAT_SETREF_N, URX_ISWORD_SET); break; case doBackslashw: - fixLiterals(FALSE); + fixLiterals(false); appendOp(URX_STATIC_SETREF, URX_ISWORD_SET); break; @@ -1253,17 +1253,17 @@ UBool RegexCompile::doParseActions(int32_t action) // Grapheme Cluster Boundary requires ICU break iteration. error(U_UNSUPPORTED_ERROR); #endif - fixLiterals(FALSE); + fixLiterals(false); appendOp(URX_BACKSLASH_X, 0); break; case doBackslashZ: - fixLiterals(FALSE); + fixLiterals(false); appendOp(URX_DOLLAR, 0); break; case doBackslashz: - fixLiterals(FALSE); + fixLiterals(false); appendOp(URX_BACKSLASH_Z, 0); break; @@ -1272,13 +1272,13 @@ UBool RegexCompile::doParseActions(int32_t action) break; case doExit: - fixLiterals(FALSE); - returnVal = FALSE; + fixLiterals(false); + returnVal = false; break; case doProperty: { - fixLiterals(FALSE); + fixLiterals(false); UnicodeSet *theSet = scanProp(); compileSet(theSet); } @@ -1310,7 +1310,7 @@ UBool RegexCompile::doParseActions(int32_t action) break; } c = peekCharLL(); - if (RegexStaticSets::gStaticSets->fRuleDigitsAlias->contains(c) == FALSE) { + if (RegexStaticSets::gStaticSets->fRuleDigitsAlias->contains(c) == false) { break; } nextCharLL(); @@ -1323,7 +1323,7 @@ UBool RegexCompile::doParseActions(int32_t action) // of compilation, it will be changed to the variable's location. U_ASSERT(groupNum > 0); // Shouldn't happen. '\0' begins an octal escape sequence, // and shouldn't enter this code path at all. - fixLiterals(FALSE); + fixLiterals(false); if (fModeFlags & UREGEX_CASE_INSENSITIVE) { appendOp(URX_BACKREF_I, groupNum); } else { @@ -1356,7 +1356,7 @@ UBool RegexCompile::doParseActions(int32_t action) } else { // Given the number, handle identically to a \n numbered back reference. // See comments above, under doBackRef - fixLiterals(FALSE); + fixLiterals(false); if (fModeFlags & UREGEX_CASE_INSENSITIVE) { appendOp(URX_BACKREF_I, groupNumber); } else { @@ -1383,7 +1383,7 @@ UBool RegexCompile::doParseActions(int32_t action) // { // Emit the STO_SP - int32_t topLoc = blockTopLoc(TRUE); + int32_t topLoc = blockTopLoc(true); int32_t stoLoc = allocateData(1); // Reserve the data location for storing save stack ptr. int32_t op = buildOp(URX_STO_SP, stoLoc); fRXPat->fCompiledPat->setElementAt(op, topLoc); @@ -1411,7 +1411,7 @@ UBool RegexCompile::doParseActions(int32_t action) // TODO: do something to cut back the state stack each time through the loop. { // Reserve two slots at the top of the block. - int32_t topLoc = blockTopLoc(TRUE); + int32_t topLoc = blockTopLoc(true); insertOp(topLoc); // emit STO_SP loc @@ -1443,7 +1443,7 @@ UBool RegexCompile::doParseActions(int32_t action) // { // Reserve two slots at the top of the block. - int32_t topLoc = blockTopLoc(TRUE); + int32_t topLoc = blockTopLoc(true); insertOp(topLoc); // Emit the STO_SP @@ -1464,7 +1464,7 @@ UBool RegexCompile::doParseActions(int32_t action) case doBeginMatchMode: fNewModeFlags = fModeFlags; - fSetModeFlag = TRUE; + fSetModeFlag = true; break; case doMatchMode: // (?i) and similar @@ -1478,7 +1478,7 @@ UBool RegexCompile::doParseActions(int32_t action) case 0x75: /* 'u' */ bit = 0; /* Unicode casing */ break; case 0x77: /* 'w' */ bit = UREGEX_UWORD; break; case 0x78: /* 'x' */ bit = UREGEX_COMMENTS; break; - case 0x2d: /* '-' */ fSetModeFlag = FALSE; break; + case 0x2d: /* '-' */ fSetModeFlag = false; break; default: UPRV_UNREACHABLE_EXIT; // Should never happen. Other chars are filtered out // by the scanner. @@ -1513,7 +1513,7 @@ UBool RegexCompile::doParseActions(int32_t action) // - NOP, which may later be replaced by a save-state if there // is an '|' alternation within the parens. { - fixLiterals(FALSE); + fixLiterals(false); appendOp(URX_NOP, 0); appendOp(URX_NOP, 0); @@ -1539,7 +1539,7 @@ UBool RegexCompile::doParseActions(int32_t action) // We have just scanned a '(?'. We now need to prevent the character scanner from // treating a '#' as a to-the-end-of-line comment. // (This Perl compatibility just gets uglier and uglier to do...) - fEOLComments = FALSE; + fEOLComments = false; break; @@ -1652,7 +1652,7 @@ UBool RegexCompile::doParseActions(int32_t action) case doSetBegin: { - fixLiterals(FALSE); + fixLiterals(false); LocalPointer lpSet(new UnicodeSet(), *fStatus); fSetStack.push(lpSet.orphan(), *fStatus); fSetOpStack.push(setStart, *fStatus); @@ -1862,7 +1862,7 @@ UBool RegexCompile::doParseActions(int32_t action) } if (U_FAILURE(*fStatus)) { - returnVal = FALSE; + returnVal = false; } return returnVal; @@ -1913,12 +1913,12 @@ void RegexCompile::fixLiterals(UBool split) { if (split) { fLiteralChars.truncate(indexOfLastCodePoint); - fixLiterals(FALSE); // Recursive call, emit code to match the first part of the string. + fixLiterals(false); // Recursive call, emit code to match the first part of the string. // Note that the truncated literal string may be empty, in which case // nothing will be emitted. literalChar(lastCodePoint); // Re-add the last code point as if it were a new literal. - fixLiterals(FALSE); // Second recursive call, code for the final code point. + fixLiterals(false); // Second recursive call, code for the final code point. return; } @@ -2130,15 +2130,15 @@ int32_t RegexCompile::allocateStackData(int32_t size) { // is reserved for this purpose. .* or similar don't // and a slot needs to be added. // -// parameter reserveLoc : TRUE - ensure that there is space to add an opcode +// parameter reserveLoc : true - ensure that there is space to add an opcode // at the returned location. -// FALSE - just return the address, +// false - just return the address, // do not reserve a location there. // //------------------------------------------------------------------------------ int32_t RegexCompile::blockTopLoc(UBool reserveLoc) { int32_t theLoc; - fixLiterals(TRUE); // Emit code for any pending literals. + fixLiterals(true); // Emit code for any pending literals. // If last item was a string, emit separate op for the its last char. if (fRXPat->fCompiledPat->size() == fMatchCloseParen) { @@ -2189,7 +2189,7 @@ void RegexCompile::handleCloseParen() { } // Emit code for any pending literals. - fixLiterals(FALSE); + fixLiterals(false); // Fixup any operations within the just-closed parenthesized group // that need to reference the end of the (block). @@ -2459,7 +2459,7 @@ void RegexCompile::compileInterval(int32_t InitOp, int32_t LoopOp) { // The CTR_INIT op at the top of the block with the {n,m} quantifier takes // four slots in the compiled code. Reserve them. - int32_t topOfBlock = blockTopLoc(TRUE); + int32_t topOfBlock = blockTopLoc(true); insertOp(topOfBlock); insertOp(topOfBlock); insertOp(topOfBlock); @@ -2507,10 +2507,10 @@ UBool RegexCompile::compileInlineInterval() { if (fIntervalUpper > 10 || fIntervalUpper < fIntervalLow) { // Too big to inline. Fail, which will cause looping code to be generated. // (Upper < Lower picks up unbounded upper and errors, both.) - return FALSE; + return false; } - int32_t topOfBlock = blockTopLoc(FALSE); + int32_t topOfBlock = blockTopLoc(false); if (fIntervalUpper == 0) { // Pathological case. Attempt no matches, as if the block doesn't exist. // Discard the generated code for the block. @@ -2522,7 +2522,7 @@ UBool RegexCompile::compileInlineInterval() { if (fMatchCloseParen >= topOfBlock) { fMatchCloseParen = -1; } - return TRUE; + return true; } if (topOfBlock != fRXPat->fCompiledPat->size()-1 && fIntervalUpper != 1) { @@ -2530,7 +2530,7 @@ UBool RegexCompile::compileInlineInterval() { // more complex block. Do it as a loop, not inlines. // Note that things "repeated" a max of once are handled as inline, because // the one copy of the code already generated is just fine. - return FALSE; + return false; } // Pick up the opcode that is to be repeated @@ -2560,7 +2560,7 @@ UBool RegexCompile::compileInlineInterval() { } appendOp(op); } - return TRUE; + return true; } @@ -2701,7 +2701,7 @@ void RegexCompile::matchStartType() { int32_t currentLen = 0; // Minimum length of a match to this point (loc) in the pattern int32_t numInitialStrings = 0; // Number of strings encountered that could match at start. - UBool atStart = TRUE; // True if no part of the pattern yet encountered + UBool atStart = true; // True if no part of the pattern yet encountered // could have advanced the position in a match. // (Maximum match length so far == 0) @@ -2777,7 +2777,7 @@ void RegexCompile::matchStartType() { numInitialStrings += 2; } currentLen = safeIncrement(currentLen, 1); - atStart = FALSE; + atStart = false; break; @@ -2790,7 +2790,7 @@ void RegexCompile::matchStartType() { numInitialStrings += 2; } currentLen = safeIncrement(currentLen, 1); - atStart = FALSE; + atStart = false; break; case URX_LOOP_SR_I: @@ -2803,7 +2803,7 @@ void RegexCompile::matchStartType() { fRXPat->fInitialChars->addAll(*s); numInitialStrings += 2; } - atStart = FALSE; + atStart = false; break; case URX_LOOP_DOT_I: @@ -2814,7 +2814,7 @@ void RegexCompile::matchStartType() { fRXPat->fInitialChars->complement(); numInitialStrings += 2; } - atStart = FALSE; + atStart = false; break; @@ -2827,7 +2827,7 @@ void RegexCompile::matchStartType() { numInitialStrings += 2; } currentLen = safeIncrement(currentLen, 1); - atStart = FALSE; + atStart = false; break; @@ -2841,7 +2841,7 @@ void RegexCompile::matchStartType() { numInitialStrings += 2; } currentLen = safeIncrement(currentLen, 1); - atStart = FALSE; + atStart = false; break; @@ -2858,7 +2858,7 @@ void RegexCompile::matchStartType() { numInitialStrings += 2; } currentLen = safeIncrement(currentLen, 1); - atStart = FALSE; + atStart = false; break; @@ -2875,7 +2875,7 @@ void RegexCompile::matchStartType() { numInitialStrings += 2; } currentLen = safeIncrement(currentLen, 1); - atStart = FALSE; + atStart = false; break; @@ -2894,7 +2894,7 @@ void RegexCompile::matchStartType() { numInitialStrings += 2; } currentLen = safeIncrement(currentLen, 1); - atStart = FALSE; + atStart = false; break; @@ -2918,7 +2918,7 @@ void RegexCompile::matchStartType() { numInitialStrings += 2; } currentLen = safeIncrement(currentLen, 1); - atStart = FALSE; + atStart = false; break; @@ -2934,7 +2934,7 @@ void RegexCompile::matchStartType() { numInitialStrings += 2; } currentLen = safeIncrement(currentLen, 1); - atStart = FALSE; + atStart = false; break; @@ -2957,21 +2957,21 @@ void RegexCompile::matchStartType() { } } } - atStart = FALSE; + atStart = false; break; case URX_JMP_SAV: case URX_JMP_SAV_X: // Combo of state save to the next loc, + jmp backwards. // Net effect on min. length computation is nothing. - atStart = FALSE; + atStart = false; break; case URX_BACKTRACK: // Fails are kind of like a branch, except that the min length was // propagated already, by the state save. currentLen = forwardedLength.elementAti(loc+1); - atStart = FALSE; + atStart = false; break; @@ -2986,7 +2986,7 @@ void RegexCompile::matchStartType() { } } } - atStart = FALSE; + atStart = false; break; @@ -3014,7 +3014,7 @@ void RegexCompile::matchStartType() { } currentLen = safeIncrement(currentLen, stringLen); - atStart = FALSE; + atStart = false; } break; @@ -3039,7 +3039,7 @@ void RegexCompile::matchStartType() { numInitialStrings += 2; // Matching on an initial string not possible. } currentLen = safeIncrement(currentLen, stringLen); - atStart = FALSE; + atStart = false; } break; @@ -3067,7 +3067,7 @@ void RegexCompile::matchStartType() { } loc+=3; // Skips over operands of CTR_INIT } - atStart = FALSE; + atStart = false; break; @@ -3075,13 +3075,13 @@ void RegexCompile::matchStartType() { case URX_CTR_LOOP_NG: // Loop ops. // The jump is conditional, backwards only. - atStart = FALSE; + atStart = false; break; case URX_LOOP_C: // More loop ops. These state-save to themselves. // don't change the minimum match - atStart = FALSE; + atStart = false; break; @@ -3177,7 +3177,7 @@ void RegexCompile::matchStartType() { fRXPat->fStartType = START_CHAR; fRXPat->fInitialChar = fRXPat->fInitialChars->charAt(0); U_ASSERT(fRXPat->fInitialChar != (UChar32)-1); - } else if (fRXPat->fInitialChars->contains((UChar32)0, (UChar32)0x10ffff) == FALSE && + } else if (fRXPat->fInitialChars->contains((UChar32)0, (UChar32)0x10ffff) == false && fRXPat->fMinMatchLen > 0) { // Matches start with a set of character smaller than the set of all chars. fRXPat->fStartType = START_SET; @@ -3834,7 +3834,7 @@ void RegexCompile::stripNOPs() { fRXPat->fCompiledPat->setElementAt(op, dst); dst++; - fRXPat->fNeedsAltInput = TRUE; + fRXPat->fNeedsAltInput = true; break; } case URX_RESERVED_OP: @@ -4032,13 +4032,13 @@ void RegexCompile::nextChar(RegexPatternChar &c) { tailRecursion: fScanIndex = UTEXT_GETNATIVEINDEX(fRXPat->fPattern); c.fChar = nextCharLL(); - c.fQuoted = FALSE; + c.fQuoted = false; if (fQuoteMode) { - c.fQuoted = TRUE; + c.fQuoted = true; if ((c.fChar==chBackSlash && peekCharLL()==chE && ((fModeFlags & UREGEX_LITERAL) == 0)) || c.fChar == (UChar32)-1) { - fQuoteMode = FALSE; // Exit quote mode, + fQuoteMode = false; // Exit quote mode, nextCharLL(); // discard the E // nextChar(c); // recurse to get the real next char goto tailRecursion; // Note: fuzz testing produced testcases that @@ -4050,7 +4050,7 @@ void RegexCompile::nextChar(RegexPatternChar &c) { // Don't check for any further escapes, just return it as-is. // Don't set c.fQuoted, because that would prevent the state machine from // dispatching on the character. - fInBackslashQuote = FALSE; + fInBackslashQuote = false; } else { @@ -4065,7 +4065,7 @@ void RegexCompile::nextChar(RegexPatternChar &c) { if (c.fChar == (UChar32)-1) { break; // End of Input } - if (c.fChar == chPound && fEOLComments == TRUE) { + if (c.fChar == chPound && fEOLComments == true) { // Start of a comment. Consume the rest of it, until EOF or a new line for (;;) { c.fChar = nextCharLL(); @@ -4079,7 +4079,7 @@ void RegexCompile::nextChar(RegexPatternChar &c) { } } // TODO: check what Java & Perl do with non-ASCII white spaces. Ticket 6061. - if (PatternProps::isWhiteSpace(c.fChar) == FALSE) { + if (PatternProps::isWhiteSpace(c.fChar) == false) { break; } c.fChar = nextCharLL(); @@ -4098,7 +4098,7 @@ void RegexCompile::nextChar(RegexPatternChar &c) { // Return the single equivalent character. // nextCharLL(); // get & discard the peeked char. - c.fQuoted = TRUE; + c.fQuoted = true; if (UTEXT_FULL_TEXT_IN_CHUNK(fRXPat->fPattern, fPatternLength)) { int32_t endIndex = (int32_t)pos; @@ -4155,11 +4155,11 @@ void RegexCompile::nextChar(RegexPatternChar &c) { c.fChar >>= 3; } } - c.fQuoted = TRUE; + c.fQuoted = true; } else if (peekCharLL() == chQ) { // "\Q" enter quote mode, which will continue until "\E" - fQuoteMode = TRUE; + fQuoteMode = true; nextCharLL(); // discard the 'Q'. // nextChar(c); // recurse to get the real next char. goto tailRecursion; // Note: fuzz testing produced test cases that @@ -4170,7 +4170,7 @@ void RegexCompile::nextChar(RegexPatternChar &c) { // We are in a '\' escape that will be handled by the state table scanner. // Just return the backslash, but remember that the following char is to // be taken literally. - fInBackslashQuote = TRUE; + fInBackslashQuote = true; } } } @@ -4178,7 +4178,7 @@ void RegexCompile::nextChar(RegexPatternChar &c) { // re-enable # to end-of-line comments, in case they were disabled. // They are disabled by the parser upon seeing '(?', but this lasts for // the fetching of the next character only. - fEOLComments = TRUE; + fEOLComments = true; // putc(c.fChar, stdout); } @@ -4331,17 +4331,17 @@ UnicodeSet *RegexCompile::scanPosixProp() { // ending on the second closing ]. UnicodeString propName; - UBool negated = FALSE; + UBool negated = false; // Check for and consume the '^' in a negated POSIX property, e.g. [:^Letter:] nextChar(fC); if (fC.fChar == chUp) { - negated = TRUE; + negated = true; nextChar(fC); } // Scan for the closing ":]", collecting the property name along the way. - UBool sawPropSetTerminator = FALSE; + UBool sawPropSetTerminator = false; for (;;) { propName.append(fC.fChar); nextChar(fC); @@ -4352,7 +4352,7 @@ UnicodeSet *RegexCompile::scanPosixProp() { if (fC.fChar == chColon) { nextChar(fC); if (fC.fChar == chRBracket) { - sawPropSetTerminator = TRUE; + sawPropSetTerminator = true; } break; } @@ -4613,13 +4613,13 @@ void RegexCompile::setEval(int32_t nextOp) { UnicodeSet *rightOperand = NULL; UnicodeSet *leftOperand = NULL; for (;;) { - U_ASSERT(fSetOpStack.empty()==FALSE); + U_ASSERT(fSetOpStack.empty()==false); int32_t pendingSetOperation = fSetOpStack.peeki(); if ((pendingSetOperation&0xffff0000) < (nextOp&0xffff0000)) { break; } fSetOpStack.popi(); - U_ASSERT(fSetStack.empty() == FALSE); + U_ASSERT(fSetStack.empty() == false); rightOperand = (UnicodeSet *)fSetStack.peek(); // ICU 70 adds emoji properties of strings, but createSetForProperty() removes all strings // (see comments there). diff --git a/icu4c/source/i18n/regexcst.h b/icu4c/source/i18n/regexcst.h index d44c2aec2be..a475b6b363e 100644 --- a/icu4c/source/i18n/regexcst.h +++ b/icu4c/source/i18n/regexcst.h @@ -149,213 +149,213 @@ struct RegexTableEl { }; static const struct RegexTableEl gRuleParseStateTable[] = { - {doNOP, 0, 0, 0, TRUE} - , {doPatStart, 255, 2,0, FALSE} // 1 start - , {doLiteralChar, 254, 14,0, TRUE} // 2 term - , {doLiteralChar, 130, 14,0, TRUE} // 3 - , {doSetBegin, 91 /* [ */, 123, 205, TRUE} // 4 - , {doNOP, 40 /* ( */, 27,0, TRUE} // 5 - , {doDotAny, 46 /* . */, 14,0, TRUE} // 6 - , {doCaret, 94 /* ^ */, 14,0, TRUE} // 7 - , {doDollar, 36 /* $ */, 14,0, TRUE} // 8 - , {doNOP, 92 /* \ */, 89,0, TRUE} // 9 - , {doOrOperator, 124 /* | */, 2,0, TRUE} // 10 - , {doCloseParen, 41 /* ) */, 255,0, TRUE} // 11 - , {doPatFinish, 253, 2,0, FALSE} // 12 - , {doRuleError, 255, 206,0, FALSE} // 13 - , {doNOP, 42 /* * */, 68,0, TRUE} // 14 expr-quant - , {doNOP, 43 /* + */, 71,0, TRUE} // 15 - , {doNOP, 63 /* ? */, 74,0, TRUE} // 16 - , {doIntervalInit, 123 /* { */, 77,0, TRUE} // 17 - , {doNOP, 40 /* ( */, 23,0, TRUE} // 18 - , {doNOP, 255, 20,0, FALSE} // 19 - , {doOrOperator, 124 /* | */, 2,0, TRUE} // 20 expr-cont - , {doCloseParen, 41 /* ) */, 255,0, TRUE} // 21 - , {doNOP, 255, 2,0, FALSE} // 22 - , {doSuppressComments, 63 /* ? */, 25,0, TRUE} // 23 open-paren-quant - , {doNOP, 255, 27,0, FALSE} // 24 - , {doNOP, 35 /* # */, 50, 14, TRUE} // 25 open-paren-quant2 - , {doNOP, 255, 29,0, FALSE} // 26 - , {doSuppressComments, 63 /* ? */, 29,0, TRUE} // 27 open-paren - , {doOpenCaptureParen, 255, 2, 14, FALSE} // 28 - , {doOpenNonCaptureParen, 58 /* : */, 2, 14, TRUE} // 29 open-paren-extended - , {doOpenAtomicParen, 62 /* > */, 2, 14, TRUE} // 30 - , {doOpenLookAhead, 61 /* = */, 2, 20, TRUE} // 31 - , {doOpenLookAheadNeg, 33 /* ! */, 2, 20, TRUE} // 32 - , {doNOP, 60 /* < */, 46,0, TRUE} // 33 - , {doNOP, 35 /* # */, 50, 2, TRUE} // 34 - , {doBeginMatchMode, 105 /* i */, 53,0, FALSE} // 35 - , {doBeginMatchMode, 100 /* d */, 53,0, FALSE} // 36 - , {doBeginMatchMode, 109 /* m */, 53,0, FALSE} // 37 - , {doBeginMatchMode, 115 /* s */, 53,0, FALSE} // 38 - , {doBeginMatchMode, 117 /* u */, 53,0, FALSE} // 39 - , {doBeginMatchMode, 119 /* w */, 53,0, FALSE} // 40 - , {doBeginMatchMode, 120 /* x */, 53,0, FALSE} // 41 - , {doBeginMatchMode, 45 /* - */, 53,0, FALSE} // 42 - , {doConditionalExpr, 40 /* ( */, 206,0, TRUE} // 43 - , {doPerlInline, 123 /* { */, 206,0, TRUE} // 44 - , {doBadOpenParenType, 255, 206,0, FALSE} // 45 - , {doOpenLookBehind, 61 /* = */, 2, 20, TRUE} // 46 open-paren-lookbehind - , {doOpenLookBehindNeg, 33 /* ! */, 2, 20, TRUE} // 47 - , {doBeginNamedCapture, 129, 64,0, FALSE} // 48 - , {doBadOpenParenType, 255, 206,0, FALSE} // 49 - , {doNOP, 41 /* ) */, 255,0, TRUE} // 50 paren-comment - , {doMismatchedParenErr, 253, 206,0, FALSE} // 51 - , {doNOP, 255, 50,0, TRUE} // 52 - , {doMatchMode, 105 /* i */, 53,0, TRUE} // 53 paren-flag - , {doMatchMode, 100 /* d */, 53,0, TRUE} // 54 - , {doMatchMode, 109 /* m */, 53,0, TRUE} // 55 - , {doMatchMode, 115 /* s */, 53,0, TRUE} // 56 - , {doMatchMode, 117 /* u */, 53,0, TRUE} // 57 - , {doMatchMode, 119 /* w */, 53,0, TRUE} // 58 - , {doMatchMode, 120 /* x */, 53,0, TRUE} // 59 - , {doMatchMode, 45 /* - */, 53,0, TRUE} // 60 - , {doSetMatchMode, 41 /* ) */, 2,0, TRUE} // 61 - , {doMatchModeParen, 58 /* : */, 2, 14, TRUE} // 62 - , {doBadModeFlag, 255, 206,0, FALSE} // 63 - , {doContinueNamedCapture, 129, 64,0, TRUE} // 64 named-capture - , {doContinueNamedCapture, 128, 64,0, TRUE} // 65 - , {doOpenCaptureParen, 62 /* > */, 2, 14, TRUE} // 66 - , {doBadNamedCapture, 255, 206,0, FALSE} // 67 - , {doNGStar, 63 /* ? */, 20,0, TRUE} // 68 quant-star - , {doPossessiveStar, 43 /* + */, 20,0, TRUE} // 69 - , {doStar, 255, 20,0, FALSE} // 70 - , {doNGPlus, 63 /* ? */, 20,0, TRUE} // 71 quant-plus - , {doPossessivePlus, 43 /* + */, 20,0, TRUE} // 72 - , {doPlus, 255, 20,0, FALSE} // 73 - , {doNGOpt, 63 /* ? */, 20,0, TRUE} // 74 quant-opt - , {doPossessiveOpt, 43 /* + */, 20,0, TRUE} // 75 - , {doOpt, 255, 20,0, FALSE} // 76 - , {doNOP, 128, 79,0, FALSE} // 77 interval-open - , {doIntervalError, 255, 206,0, FALSE} // 78 - , {doIntevalLowerDigit, 128, 79,0, TRUE} // 79 interval-lower - , {doNOP, 44 /* , */, 83,0, TRUE} // 80 - , {doIntervalSame, 125 /* } */, 86,0, TRUE} // 81 - , {doIntervalError, 255, 206,0, FALSE} // 82 - , {doIntervalUpperDigit, 128, 83,0, TRUE} // 83 interval-upper - , {doNOP, 125 /* } */, 86,0, TRUE} // 84 - , {doIntervalError, 255, 206,0, FALSE} // 85 - , {doNGInterval, 63 /* ? */, 20,0, TRUE} // 86 interval-type - , {doPossessiveInterval, 43 /* + */, 20,0, TRUE} // 87 - , {doInterval, 255, 20,0, FALSE} // 88 - , {doBackslashA, 65 /* A */, 2,0, TRUE} // 89 backslash - , {doBackslashB, 66 /* B */, 2,0, TRUE} // 90 - , {doBackslashb, 98 /* b */, 2,0, TRUE} // 91 - , {doBackslashd, 100 /* d */, 14,0, TRUE} // 92 - , {doBackslashD, 68 /* D */, 14,0, TRUE} // 93 - , {doBackslashG, 71 /* G */, 2,0, TRUE} // 94 - , {doBackslashh, 104 /* h */, 14,0, TRUE} // 95 - , {doBackslashH, 72 /* H */, 14,0, TRUE} // 96 - , {doNOP, 107 /* k */, 115,0, TRUE} // 97 - , {doNamedChar, 78 /* N */, 14,0, FALSE} // 98 - , {doProperty, 112 /* p */, 14,0, FALSE} // 99 - , {doProperty, 80 /* P */, 14,0, FALSE} // 100 - , {doBackslashR, 82 /* R */, 14,0, TRUE} // 101 - , {doEnterQuoteMode, 81 /* Q */, 2,0, TRUE} // 102 - , {doBackslashS, 83 /* S */, 14,0, TRUE} // 103 - , {doBackslashs, 115 /* s */, 14,0, TRUE} // 104 - , {doBackslashv, 118 /* v */, 14,0, TRUE} // 105 - , {doBackslashV, 86 /* V */, 14,0, TRUE} // 106 - , {doBackslashW, 87 /* W */, 14,0, TRUE} // 107 - , {doBackslashw, 119 /* w */, 14,0, TRUE} // 108 - , {doBackslashX, 88 /* X */, 14,0, TRUE} // 109 - , {doBackslashZ, 90 /* Z */, 2,0, TRUE} // 110 - , {doBackslashz, 122 /* z */, 2,0, TRUE} // 111 - , {doBackRef, 128, 14,0, TRUE} // 112 - , {doEscapeError, 253, 206,0, FALSE} // 113 - , {doEscapedLiteralChar, 255, 14,0, TRUE} // 114 - , {doBeginNamedBackRef, 60 /* < */, 117,0, TRUE} // 115 named-backref - , {doBadNamedCapture, 255, 206,0, FALSE} // 116 - , {doContinueNamedBackRef, 129, 119,0, TRUE} // 117 named-backref-2 - , {doBadNamedCapture, 255, 206,0, FALSE} // 118 - , {doContinueNamedBackRef, 129, 119,0, TRUE} // 119 named-backref-3 - , {doContinueNamedBackRef, 128, 119,0, TRUE} // 120 - , {doCompleteNamedBackRef, 62 /* > */, 14,0, TRUE} // 121 - , {doBadNamedCapture, 255, 206,0, FALSE} // 122 - , {doSetNegate, 94 /* ^ */, 126,0, TRUE} // 123 set-open - , {doSetPosixProp, 58 /* : */, 128,0, FALSE} // 124 - , {doNOP, 255, 126,0, FALSE} // 125 - , {doSetLiteral, 93 /* ] */, 141,0, TRUE} // 126 set-open2 - , {doNOP, 255, 131,0, FALSE} // 127 - , {doSetEnd, 93 /* ] */, 255,0, TRUE} // 128 set-posix - , {doNOP, 58 /* : */, 131,0, FALSE} // 129 - , {doRuleError, 255, 206,0, FALSE} // 130 - , {doSetEnd, 93 /* ] */, 255,0, TRUE} // 131 set-start - , {doSetBeginUnion, 91 /* [ */, 123, 148, TRUE} // 132 - , {doNOP, 92 /* \ */, 191,0, TRUE} // 133 - , {doNOP, 45 /* - */, 137,0, TRUE} // 134 - , {doNOP, 38 /* & */, 139,0, TRUE} // 135 - , {doSetLiteral, 255, 141,0, TRUE} // 136 - , {doRuleError, 45 /* - */, 206,0, FALSE} // 137 set-start-dash - , {doSetAddDash, 255, 141,0, FALSE} // 138 - , {doRuleError, 38 /* & */, 206,0, FALSE} // 139 set-start-amp - , {doSetAddAmp, 255, 141,0, FALSE} // 140 - , {doSetEnd, 93 /* ] */, 255,0, TRUE} // 141 set-after-lit - , {doSetBeginUnion, 91 /* [ */, 123, 148, TRUE} // 142 - , {doNOP, 45 /* - */, 178,0, TRUE} // 143 - , {doNOP, 38 /* & */, 169,0, TRUE} // 144 - , {doNOP, 92 /* \ */, 191,0, TRUE} // 145 - , {doSetNoCloseError, 253, 206,0, FALSE} // 146 - , {doSetLiteral, 255, 141,0, TRUE} // 147 - , {doSetEnd, 93 /* ] */, 255,0, TRUE} // 148 set-after-set - , {doSetBeginUnion, 91 /* [ */, 123, 148, TRUE} // 149 - , {doNOP, 45 /* - */, 171,0, TRUE} // 150 - , {doNOP, 38 /* & */, 166,0, TRUE} // 151 - , {doNOP, 92 /* \ */, 191,0, TRUE} // 152 - , {doSetNoCloseError, 253, 206,0, FALSE} // 153 - , {doSetLiteral, 255, 141,0, TRUE} // 154 - , {doSetEnd, 93 /* ] */, 255,0, TRUE} // 155 set-after-range - , {doSetBeginUnion, 91 /* [ */, 123, 148, TRUE} // 156 - , {doNOP, 45 /* - */, 174,0, TRUE} // 157 - , {doNOP, 38 /* & */, 176,0, TRUE} // 158 - , {doNOP, 92 /* \ */, 191,0, TRUE} // 159 - , {doSetNoCloseError, 253, 206,0, FALSE} // 160 - , {doSetLiteral, 255, 141,0, TRUE} // 161 - , {doSetBeginUnion, 91 /* [ */, 123, 148, TRUE} // 162 set-after-op - , {doSetOpError, 93 /* ] */, 206,0, FALSE} // 163 - , {doNOP, 92 /* \ */, 191,0, TRUE} // 164 - , {doSetLiteral, 255, 141,0, TRUE} // 165 - , {doSetBeginIntersection1, 91 /* [ */, 123, 148, TRUE} // 166 set-set-amp - , {doSetIntersection2, 38 /* & */, 162,0, TRUE} // 167 - , {doSetAddAmp, 255, 141,0, FALSE} // 168 - , {doSetIntersection2, 38 /* & */, 162,0, TRUE} // 169 set-lit-amp - , {doSetAddAmp, 255, 141,0, FALSE} // 170 - , {doSetBeginDifference1, 91 /* [ */, 123, 148, TRUE} // 171 set-set-dash - , {doSetDifference2, 45 /* - */, 162,0, TRUE} // 172 - , {doSetAddDash, 255, 141,0, FALSE} // 173 - , {doSetDifference2, 45 /* - */, 162,0, TRUE} // 174 set-range-dash - , {doSetAddDash, 255, 141,0, FALSE} // 175 - , {doSetIntersection2, 38 /* & */, 162,0, TRUE} // 176 set-range-amp - , {doSetAddAmp, 255, 141,0, FALSE} // 177 - , {doSetDifference2, 45 /* - */, 162,0, TRUE} // 178 set-lit-dash - , {doSetAddDash, 91 /* [ */, 141,0, FALSE} // 179 - , {doSetAddDash, 93 /* ] */, 141,0, FALSE} // 180 - , {doNOP, 92 /* \ */, 183,0, TRUE} // 181 - , {doSetRange, 255, 155,0, TRUE} // 182 - , {doSetOpError, 115 /* s */, 206,0, FALSE} // 183 set-lit-dash-escape - , {doSetOpError, 83 /* S */, 206,0, FALSE} // 184 - , {doSetOpError, 119 /* w */, 206,0, FALSE} // 185 - , {doSetOpError, 87 /* W */, 206,0, FALSE} // 186 - , {doSetOpError, 100 /* d */, 206,0, FALSE} // 187 - , {doSetOpError, 68 /* D */, 206,0, FALSE} // 188 - , {doSetNamedRange, 78 /* N */, 155,0, FALSE} // 189 - , {doSetRange, 255, 155,0, TRUE} // 190 - , {doSetProp, 112 /* p */, 148,0, FALSE} // 191 set-escape - , {doSetProp, 80 /* P */, 148,0, FALSE} // 192 - , {doSetNamedChar, 78 /* N */, 141,0, FALSE} // 193 - , {doSetBackslash_s, 115 /* s */, 155,0, TRUE} // 194 - , {doSetBackslash_S, 83 /* S */, 155,0, TRUE} // 195 - , {doSetBackslash_w, 119 /* w */, 155,0, TRUE} // 196 - , {doSetBackslash_W, 87 /* W */, 155,0, TRUE} // 197 - , {doSetBackslash_d, 100 /* d */, 155,0, TRUE} // 198 - , {doSetBackslash_D, 68 /* D */, 155,0, TRUE} // 199 - , {doSetBackslash_h, 104 /* h */, 155,0, TRUE} // 200 - , {doSetBackslash_H, 72 /* H */, 155,0, TRUE} // 201 - , {doSetBackslash_v, 118 /* v */, 155,0, TRUE} // 202 - , {doSetBackslash_V, 86 /* V */, 155,0, TRUE} // 203 - , {doSetLiteralEscaped, 255, 141,0, TRUE} // 204 - , {doSetFinish, 255, 14,0, FALSE} // 205 set-finish - , {doExit, 255, 206,0, TRUE} // 206 errorDeath + {doNOP, 0, 0, 0, true} + , {doPatStart, 255, 2,0, false} // 1 start + , {doLiteralChar, 254, 14,0, true} // 2 term + , {doLiteralChar, 130, 14,0, true} // 3 + , {doSetBegin, 91 /* [ */, 123, 205, true} // 4 + , {doNOP, 40 /* ( */, 27,0, true} // 5 + , {doDotAny, 46 /* . */, 14,0, true} // 6 + , {doCaret, 94 /* ^ */, 14,0, true} // 7 + , {doDollar, 36 /* $ */, 14,0, true} // 8 + , {doNOP, 92 /* \ */, 89,0, true} // 9 + , {doOrOperator, 124 /* | */, 2,0, true} // 10 + , {doCloseParen, 41 /* ) */, 255,0, true} // 11 + , {doPatFinish, 253, 2,0, false} // 12 + , {doRuleError, 255, 206,0, false} // 13 + , {doNOP, 42 /* * */, 68,0, true} // 14 expr-quant + , {doNOP, 43 /* + */, 71,0, true} // 15 + , {doNOP, 63 /* ? */, 74,0, true} // 16 + , {doIntervalInit, 123 /* { */, 77,0, true} // 17 + , {doNOP, 40 /* ( */, 23,0, true} // 18 + , {doNOP, 255, 20,0, false} // 19 + , {doOrOperator, 124 /* | */, 2,0, true} // 20 expr-cont + , {doCloseParen, 41 /* ) */, 255,0, true} // 21 + , {doNOP, 255, 2,0, false} // 22 + , {doSuppressComments, 63 /* ? */, 25,0, true} // 23 open-paren-quant + , {doNOP, 255, 27,0, false} // 24 + , {doNOP, 35 /* # */, 50, 14, true} // 25 open-paren-quant2 + , {doNOP, 255, 29,0, false} // 26 + , {doSuppressComments, 63 /* ? */, 29,0, true} // 27 open-paren + , {doOpenCaptureParen, 255, 2, 14, false} // 28 + , {doOpenNonCaptureParen, 58 /* : */, 2, 14, true} // 29 open-paren-extended + , {doOpenAtomicParen, 62 /* > */, 2, 14, true} // 30 + , {doOpenLookAhead, 61 /* = */, 2, 20, true} // 31 + , {doOpenLookAheadNeg, 33 /* ! */, 2, 20, true} // 32 + , {doNOP, 60 /* < */, 46,0, true} // 33 + , {doNOP, 35 /* # */, 50, 2, true} // 34 + , {doBeginMatchMode, 105 /* i */, 53,0, false} // 35 + , {doBeginMatchMode, 100 /* d */, 53,0, false} // 36 + , {doBeginMatchMode, 109 /* m */, 53,0, false} // 37 + , {doBeginMatchMode, 115 /* s */, 53,0, false} // 38 + , {doBeginMatchMode, 117 /* u */, 53,0, false} // 39 + , {doBeginMatchMode, 119 /* w */, 53,0, false} // 40 + , {doBeginMatchMode, 120 /* x */, 53,0, false} // 41 + , {doBeginMatchMode, 45 /* - */, 53,0, false} // 42 + , {doConditionalExpr, 40 /* ( */, 206,0, true} // 43 + , {doPerlInline, 123 /* { */, 206,0, true} // 44 + , {doBadOpenParenType, 255, 206,0, false} // 45 + , {doOpenLookBehind, 61 /* = */, 2, 20, true} // 46 open-paren-lookbehind + , {doOpenLookBehindNeg, 33 /* ! */, 2, 20, true} // 47 + , {doBeginNamedCapture, 129, 64,0, false} // 48 + , {doBadOpenParenType, 255, 206,0, false} // 49 + , {doNOP, 41 /* ) */, 255,0, true} // 50 paren-comment + , {doMismatchedParenErr, 253, 206,0, false} // 51 + , {doNOP, 255, 50,0, true} // 52 + , {doMatchMode, 105 /* i */, 53,0, true} // 53 paren-flag + , {doMatchMode, 100 /* d */, 53,0, true} // 54 + , {doMatchMode, 109 /* m */, 53,0, true} // 55 + , {doMatchMode, 115 /* s */, 53,0, true} // 56 + , {doMatchMode, 117 /* u */, 53,0, true} // 57 + , {doMatchMode, 119 /* w */, 53,0, true} // 58 + , {doMatchMode, 120 /* x */, 53,0, true} // 59 + , {doMatchMode, 45 /* - */, 53,0, true} // 60 + , {doSetMatchMode, 41 /* ) */, 2,0, true} // 61 + , {doMatchModeParen, 58 /* : */, 2, 14, true} // 62 + , {doBadModeFlag, 255, 206,0, false} // 63 + , {doContinueNamedCapture, 129, 64,0, true} // 64 named-capture + , {doContinueNamedCapture, 128, 64,0, true} // 65 + , {doOpenCaptureParen, 62 /* > */, 2, 14, true} // 66 + , {doBadNamedCapture, 255, 206,0, false} // 67 + , {doNGStar, 63 /* ? */, 20,0, true} // 68 quant-star + , {doPossessiveStar, 43 /* + */, 20,0, true} // 69 + , {doStar, 255, 20,0, false} // 70 + , {doNGPlus, 63 /* ? */, 20,0, true} // 71 quant-plus + , {doPossessivePlus, 43 /* + */, 20,0, true} // 72 + , {doPlus, 255, 20,0, false} // 73 + , {doNGOpt, 63 /* ? */, 20,0, true} // 74 quant-opt + , {doPossessiveOpt, 43 /* + */, 20,0, true} // 75 + , {doOpt, 255, 20,0, false} // 76 + , {doNOP, 128, 79,0, false} // 77 interval-open + , {doIntervalError, 255, 206,0, false} // 78 + , {doIntevalLowerDigit, 128, 79,0, true} // 79 interval-lower + , {doNOP, 44 /* , */, 83,0, true} // 80 + , {doIntervalSame, 125 /* } */, 86,0, true} // 81 + , {doIntervalError, 255, 206,0, false} // 82 + , {doIntervalUpperDigit, 128, 83,0, true} // 83 interval-upper + , {doNOP, 125 /* } */, 86,0, true} // 84 + , {doIntervalError, 255, 206,0, false} // 85 + , {doNGInterval, 63 /* ? */, 20,0, true} // 86 interval-type + , {doPossessiveInterval, 43 /* + */, 20,0, true} // 87 + , {doInterval, 255, 20,0, false} // 88 + , {doBackslashA, 65 /* A */, 2,0, true} // 89 backslash + , {doBackslashB, 66 /* B */, 2,0, true} // 90 + , {doBackslashb, 98 /* b */, 2,0, true} // 91 + , {doBackslashd, 100 /* d */, 14,0, true} // 92 + , {doBackslashD, 68 /* D */, 14,0, true} // 93 + , {doBackslashG, 71 /* G */, 2,0, true} // 94 + , {doBackslashh, 104 /* h */, 14,0, true} // 95 + , {doBackslashH, 72 /* H */, 14,0, true} // 96 + , {doNOP, 107 /* k */, 115,0, true} // 97 + , {doNamedChar, 78 /* N */, 14,0, false} // 98 + , {doProperty, 112 /* p */, 14,0, false} // 99 + , {doProperty, 80 /* P */, 14,0, false} // 100 + , {doBackslashR, 82 /* R */, 14,0, true} // 101 + , {doEnterQuoteMode, 81 /* Q */, 2,0, true} // 102 + , {doBackslashS, 83 /* S */, 14,0, true} // 103 + , {doBackslashs, 115 /* s */, 14,0, true} // 104 + , {doBackslashv, 118 /* v */, 14,0, true} // 105 + , {doBackslashV, 86 /* V */, 14,0, true} // 106 + , {doBackslashW, 87 /* W */, 14,0, true} // 107 + , {doBackslashw, 119 /* w */, 14,0, true} // 108 + , {doBackslashX, 88 /* X */, 14,0, true} // 109 + , {doBackslashZ, 90 /* Z */, 2,0, true} // 110 + , {doBackslashz, 122 /* z */, 2,0, true} // 111 + , {doBackRef, 128, 14,0, true} // 112 + , {doEscapeError, 253, 206,0, false} // 113 + , {doEscapedLiteralChar, 255, 14,0, true} // 114 + , {doBeginNamedBackRef, 60 /* < */, 117,0, true} // 115 named-backref + , {doBadNamedCapture, 255, 206,0, false} // 116 + , {doContinueNamedBackRef, 129, 119,0, true} // 117 named-backref-2 + , {doBadNamedCapture, 255, 206,0, false} // 118 + , {doContinueNamedBackRef, 129, 119,0, true} // 119 named-backref-3 + , {doContinueNamedBackRef, 128, 119,0, true} // 120 + , {doCompleteNamedBackRef, 62 /* > */, 14,0, true} // 121 + , {doBadNamedCapture, 255, 206,0, false} // 122 + , {doSetNegate, 94 /* ^ */, 126,0, true} // 123 set-open + , {doSetPosixProp, 58 /* : */, 128,0, false} // 124 + , {doNOP, 255, 126,0, false} // 125 + , {doSetLiteral, 93 /* ] */, 141,0, true} // 126 set-open2 + , {doNOP, 255, 131,0, false} // 127 + , {doSetEnd, 93 /* ] */, 255,0, true} // 128 set-posix + , {doNOP, 58 /* : */, 131,0, false} // 129 + , {doRuleError, 255, 206,0, false} // 130 + , {doSetEnd, 93 /* ] */, 255,0, true} // 131 set-start + , {doSetBeginUnion, 91 /* [ */, 123, 148, true} // 132 + , {doNOP, 92 /* \ */, 191,0, true} // 133 + , {doNOP, 45 /* - */, 137,0, true} // 134 + , {doNOP, 38 /* & */, 139,0, true} // 135 + , {doSetLiteral, 255, 141,0, true} // 136 + , {doRuleError, 45 /* - */, 206,0, false} // 137 set-start-dash + , {doSetAddDash, 255, 141,0, false} // 138 + , {doRuleError, 38 /* & */, 206,0, false} // 139 set-start-amp + , {doSetAddAmp, 255, 141,0, false} // 140 + , {doSetEnd, 93 /* ] */, 255,0, true} // 141 set-after-lit + , {doSetBeginUnion, 91 /* [ */, 123, 148, true} // 142 + , {doNOP, 45 /* - */, 178,0, true} // 143 + , {doNOP, 38 /* & */, 169,0, true} // 144 + , {doNOP, 92 /* \ */, 191,0, true} // 145 + , {doSetNoCloseError, 253, 206,0, false} // 146 + , {doSetLiteral, 255, 141,0, true} // 147 + , {doSetEnd, 93 /* ] */, 255,0, true} // 148 set-after-set + , {doSetBeginUnion, 91 /* [ */, 123, 148, true} // 149 + , {doNOP, 45 /* - */, 171,0, true} // 150 + , {doNOP, 38 /* & */, 166,0, true} // 151 + , {doNOP, 92 /* \ */, 191,0, true} // 152 + , {doSetNoCloseError, 253, 206,0, false} // 153 + , {doSetLiteral, 255, 141,0, true} // 154 + , {doSetEnd, 93 /* ] */, 255,0, true} // 155 set-after-range + , {doSetBeginUnion, 91 /* [ */, 123, 148, true} // 156 + , {doNOP, 45 /* - */, 174,0, true} // 157 + , {doNOP, 38 /* & */, 176,0, true} // 158 + , {doNOP, 92 /* \ */, 191,0, true} // 159 + , {doSetNoCloseError, 253, 206,0, false} // 160 + , {doSetLiteral, 255, 141,0, true} // 161 + , {doSetBeginUnion, 91 /* [ */, 123, 148, true} // 162 set-after-op + , {doSetOpError, 93 /* ] */, 206,0, false} // 163 + , {doNOP, 92 /* \ */, 191,0, true} // 164 + , {doSetLiteral, 255, 141,0, true} // 165 + , {doSetBeginIntersection1, 91 /* [ */, 123, 148, true} // 166 set-set-amp + , {doSetIntersection2, 38 /* & */, 162,0, true} // 167 + , {doSetAddAmp, 255, 141,0, false} // 168 + , {doSetIntersection2, 38 /* & */, 162,0, true} // 169 set-lit-amp + , {doSetAddAmp, 255, 141,0, false} // 170 + , {doSetBeginDifference1, 91 /* [ */, 123, 148, true} // 171 set-set-dash + , {doSetDifference2, 45 /* - */, 162,0, true} // 172 + , {doSetAddDash, 255, 141,0, false} // 173 + , {doSetDifference2, 45 /* - */, 162,0, true} // 174 set-range-dash + , {doSetAddDash, 255, 141,0, false} // 175 + , {doSetIntersection2, 38 /* & */, 162,0, true} // 176 set-range-amp + , {doSetAddAmp, 255, 141,0, false} // 177 + , {doSetDifference2, 45 /* - */, 162,0, true} // 178 set-lit-dash + , {doSetAddDash, 91 /* [ */, 141,0, false} // 179 + , {doSetAddDash, 93 /* ] */, 141,0, false} // 180 + , {doNOP, 92 /* \ */, 183,0, true} // 181 + , {doSetRange, 255, 155,0, true} // 182 + , {doSetOpError, 115 /* s */, 206,0, false} // 183 set-lit-dash-escape + , {doSetOpError, 83 /* S */, 206,0, false} // 184 + , {doSetOpError, 119 /* w */, 206,0, false} // 185 + , {doSetOpError, 87 /* W */, 206,0, false} // 186 + , {doSetOpError, 100 /* d */, 206,0, false} // 187 + , {doSetOpError, 68 /* D */, 206,0, false} // 188 + , {doSetNamedRange, 78 /* N */, 155,0, false} // 189 + , {doSetRange, 255, 155,0, true} // 190 + , {doSetProp, 112 /* p */, 148,0, false} // 191 set-escape + , {doSetProp, 80 /* P */, 148,0, false} // 192 + , {doSetNamedChar, 78 /* N */, 141,0, false} // 193 + , {doSetBackslash_s, 115 /* s */, 155,0, true} // 194 + , {doSetBackslash_S, 83 /* S */, 155,0, true} // 195 + , {doSetBackslash_w, 119 /* w */, 155,0, true} // 196 + , {doSetBackslash_W, 87 /* W */, 155,0, true} // 197 + , {doSetBackslash_d, 100 /* d */, 155,0, true} // 198 + , {doSetBackslash_D, 68 /* D */, 155,0, true} // 199 + , {doSetBackslash_h, 104 /* h */, 155,0, true} // 200 + , {doSetBackslash_H, 72 /* H */, 155,0, true} // 201 + , {doSetBackslash_v, 118 /* v */, 155,0, true} // 202 + , {doSetBackslash_V, 86 /* V */, 155,0, true} // 203 + , {doSetLiteralEscaped, 255, 141,0, true} // 204 + , {doSetFinish, 255, 14,0, false} // 205 set-finish + , {doExit, 255, 206,0, true} // 206 errorDeath }; static const char * const RegexStateNames[] = { 0, "start", diff --git a/icu4c/source/i18n/regexcst.pl b/icu4c/source/i18n/regexcst.pl index 7636757331d..24596d4122d 100755 --- a/icu4c/source/i18n/regexcst.pl +++ b/icu4c/source/i18n/regexcst.pl @@ -110,9 +110,9 @@ line_loop: while (<>) { # # do the 'n' flag # - $state_flag[$num_states] = "FALSE"; + $state_flag[$num_states] = "false"; if ($fields[0] eq "n") { - $state_flag[$num_states] = "TRUE"; + $state_flag[$num_states] = "true"; shift @fields; } @@ -282,7 +282,7 @@ print "};\n\n"; # emit the state transition table # print "static const struct RegexTableEl gRuleParseStateTable[] = {\n"; -print " {doNOP, 0, 0, 0, TRUE}\n"; # State 0 is a dummy. Real states start with index = 1. +print " {doNOP, 0, 0, 0, true}\n"; # State 0 is a dummy. Real states start with index = 1. for ($state=1; $state < $num_states; $state++) { print " , {$state_func_name[$state],"; if ($state_literal_chars[$state] ne "") { diff --git a/icu4c/source/i18n/regexst.cpp b/icu4c/source/i18n/regexst.cpp index b014013780a..dc01327a02c 100644 --- a/icu4c/source/i18n/regexst.cpp +++ b/icu4c/source/i18n/regexst.cpp @@ -77,13 +77,13 @@ RegexStaticSets::RegexStaticSets(UErrorCode *status) { fUnescapeCharSet.addAll(UnicodeString(true, gUnescapeChars, -1)).freeze(); fPropSets[URX_ISWORD_SET].applyPattern(UnicodeString(true, gIsWordPattern, -1), *status).freeze(); fPropSets[URX_ISSPACE_SET].applyPattern(UnicodeString(true, gIsSpacePattern, -1), *status).freeze(); - fPropSets[URX_GC_EXTEND].applyPattern(UnicodeString(TRUE, gGC_ExtendPattern, -1), *status).freeze(); - fPropSets[URX_GC_CONTROL].applyPattern(UnicodeString(TRUE, gGC_ControlPattern, -1), *status).freeze(); - fPropSets[URX_GC_L].applyPattern(UnicodeString(TRUE, gGC_LPattern, -1), *status).freeze(); - fPropSets[URX_GC_V].applyPattern(UnicodeString(TRUE, gGC_VPattern, -1), *status).freeze(); - fPropSets[URX_GC_T].applyPattern(UnicodeString(TRUE, gGC_TPattern, -1), *status).freeze(); - fPropSets[URX_GC_LV].applyPattern(UnicodeString(TRUE, gGC_LVPattern, -1), *status).freeze(); - fPropSets[URX_GC_LVT].applyPattern(UnicodeString(TRUE, gGC_LVTPattern, -1), *status).freeze(); + fPropSets[URX_GC_EXTEND].applyPattern(UnicodeString(true, gGC_ExtendPattern, -1), *status).freeze(); + fPropSets[URX_GC_CONTROL].applyPattern(UnicodeString(true, gGC_ControlPattern, -1), *status).freeze(); + fPropSets[URX_GC_L].applyPattern(UnicodeString(true, gGC_LPattern, -1), *status).freeze(); + fPropSets[URX_GC_V].applyPattern(UnicodeString(true, gGC_VPattern, -1), *status).freeze(); + fPropSets[URX_GC_T].applyPattern(UnicodeString(true, gGC_TPattern, -1), *status).freeze(); + fPropSets[URX_GC_LV].applyPattern(UnicodeString(true, gGC_LVPattern, -1), *status).freeze(); + fPropSets[URX_GC_LVT].applyPattern(UnicodeString(true, gGC_LVTPattern, -1), *status).freeze(); // @@ -147,7 +147,7 @@ regex_cleanup(void) { delete RegexStaticSets::gStaticSets; RegexStaticSets::gStaticSets = nullptr; gStaticSetsInitOnce.reset(); - return TRUE; + return true; } static void U_CALLCONV initStaticSets(UErrorCode &status) { diff --git a/icu4c/source/i18n/region.cpp b/icu4c/source/i18n/region.cpp index 70d88974b24..6a0c05fc78f 100644 --- a/icu4c/source/i18n/region.cpp +++ b/icu4c/source/i18n/region.cpp @@ -46,7 +46,7 @@ static UBool U_CALLCONV region_cleanup(void) { icu::Region::cleanupRegionData(); - return TRUE; + return true; } U_CDECL_END @@ -668,21 +668,21 @@ Region::contains(const Region &other) const { umtx_initOnce(gRegionDataInitOnce, &loadRegionData, status); if (!containedRegions) { - return FALSE; + return false; } if (containedRegions->contains((void *)&other.idStr)) { - return TRUE; + return true; } else { for ( int32_t i = 0 ; i < containedRegions->size() ; i++ ) { UnicodeString *crStr = (UnicodeString *)containedRegions->elementAt(i); Region *cr = (Region *) uhash_get(regionIDMap,(void *)crStr); if ( cr && cr->contains(other) ) { - return TRUE; + return true; } } } - return FALSE; + return false; } /** diff --git a/icu4c/source/i18n/reldatefmt.cpp b/icu4c/source/i18n/reldatefmt.cpp index d8df4c88284..6dfbffebb0c 100644 --- a/icu4c/source/i18n/reldatefmt.cpp +++ b/icu4c/source/i18n/reldatefmt.cpp @@ -195,10 +195,10 @@ static UBool getStringByIndex( const UChar *resStr = ures_getStringByIndex( resource, idx, &len, &status); if (U_FAILURE(status)) { - return FALSE; + return false; } - result.setTo(TRUE, resStr, len); - return TRUE; + result.setTo(true, resStr, len); + return true; } namespace { @@ -655,7 +655,7 @@ static UBool getDateTimePattern( UnicodeString &result, UErrorCode &status) { if (U_FAILURE(status)) { - return FALSE; + return false; } char cType[cTypeBufMax + 1]; Calendar::getCalendarTypeFromLocale(locale, cType, cTypeBufMax, status); @@ -690,13 +690,13 @@ static UBool getDateTimePattern( resource, pathBuffer.data(), nullptr, &status)); } if (U_FAILURE(status)) { - return FALSE; + return false; } if (dateTimeFormatOffset == DateFormat::kDateTime && ures_getSize(topLevel.getAlias()) <= DateFormat::kDateTime) { // Oops, size is too small to access the index that we want, fallback // to a hard-coded value. result = UNICODE_STRING_SIMPLE("{1} {0}"); - return TRUE; + return true; } return getStringByIndex(topLevel.getAlias(), dateTimeFormatOffset, result, status); } @@ -1212,9 +1212,9 @@ UBool RelativeDateTimeFormatter::checkNoAdjustForContext(UErrorCode& status) con // casing. The code could be written and tested if there is demand. if (fOptBreakIterator != nullptr) { status = U_UNSUPPORTED_ERROR; - return FALSE; + return false; } - return TRUE; + return true; } void RelativeDateTimeFormatter::init( diff --git a/icu4c/source/i18n/reldtfmt.cpp b/icu4c/source/i18n/reldtfmt.cpp index 5fdef1c0d67..f381bf8981a 100644 --- a/icu4c/source/i18n/reldtfmt.cpp +++ b/icu4c/source/i18n/reldtfmt.cpp @@ -71,8 +71,8 @@ RelativeDateFormat::RelativeDateFormat( UDateFormatStyle timeStyle, UDateFormatS const Locale& locale, UErrorCode& status) : DateFormat(), fDateTimeFormatter(NULL), fDatePattern(), fTimePattern(), fCombinedFormat(NULL), fDateStyle(dateStyle), fLocale(locale), fDatesLen(0), fDates(NULL), - fCombinedHasDateAtStart(FALSE), fCapitalizationInfoSet(FALSE), - fCapitalizationOfRelativeUnitsForUIListMenu(FALSE), fCapitalizationOfRelativeUnitsForStandAlone(FALSE), + fCombinedHasDateAtStart(false), fCapitalizationInfoSet(false), + fCapitalizationOfRelativeUnitsForUIListMenu(false), fCapitalizationOfRelativeUnitsForStandAlone(false), fCapitalizationBrkIter(NULL) { if(U_FAILURE(status) ) { @@ -246,13 +246,13 @@ void RelativeDateFormat::parse( const UnicodeString& text, } else if (fTimePattern.isEmpty() || fCombinedFormat == NULL) { // no time pattern or way to combine, try parsing as date // first check whether text matches a relativeDayString - UBool matchedRelative = FALSE; + UBool matchedRelative = false; for (int n=0; n < fDatesLen && !matchedRelative; n++) { if (fDates[n].string != NULL && text.compare(startIndex, fDates[n].len, fDates[n].string) == 0) { // it matched, handle the relative day string UErrorCode status = U_ZERO_ERROR; - matchedRelative = TRUE; + matchedRelative = true; // Set the calendar to now+offset cal.setTime(Calendar::getNow(),status); @@ -424,7 +424,7 @@ RelativeDateFormat::setContext(UDisplayContext value, UErrorCode& status) if (!fCapitalizationInfoSet && (value==UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU || value==UDISPCTX_CAPITALIZATION_FOR_STANDALONE)) { initCapitalizationContextInfo(fLocale); - fCapitalizationInfoSet = TRUE; + fCapitalizationInfoSet = true; } #if !UCONFIG_NO_BREAK_ITERATION if ( fCapitalizationBrkIter == NULL && (value==UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE || @@ -536,9 +536,9 @@ void RelativeDateFormat::loadDates(UErrorCode &status) { const UChar *resStr = ures_getStringByIndex(dateTimePatterns.getAlias(), glueIndex, &resStrLen, &status); if (U_SUCCESS(status) && resStrLen >= patItem1Len && u_strncmp(resStr,patItem1,patItem1Len)==0) { - fCombinedHasDateAtStart = TRUE; + fCombinedHasDateAtStart = true; } - fCombinedFormat = new SimpleFormatter(UnicodeString(TRUE, resStr, resStrLen), 2, 2, status); + fCombinedFormat = new SimpleFormatter(UnicodeString(true, resStr, resStrLen), 2, 2, status); } } diff --git a/icu4c/source/i18n/rematch.cpp b/icu4c/source/i18n/rematch.cpp index 7d6eaeed8bb..e74ca3a659f 100644 --- a/icu4c/source/i18n/rematch.cpp +++ b/icu4c/source/i18n/rematch.cpp @@ -98,7 +98,7 @@ RegexMatcher::RegexMatcher(const UnicodeString ®exp, const UnicodeString &inp init2(&inputText, status); utext_close(&inputText); - fInputUniStrMaybeMutable = TRUE; + fInputUniStrMaybeMutable = true; } @@ -200,15 +200,15 @@ void RegexMatcher::init(UErrorCode &status) { fLookLimit = 0; fActiveStart = 0; fActiveLimit = 0; - fTransparentBounds = FALSE; - fAnchoringBounds = TRUE; - fMatch = FALSE; + fTransparentBounds = false; + fAnchoringBounds = true; + fMatch = false; fMatchStart = 0; fMatchEnd = 0; fLastMatchEnd = -1; fAppendPosition = 0; - fHitEnd = FALSE; - fRequireEnd = FALSE; + fHitEnd = false; + fRequireEnd = false; fStack = NULL; fFrame = NULL; fTimeLimit = 0; @@ -219,7 +219,7 @@ void RegexMatcher::init(UErrorCode &status) { fCallbackContext = NULL; fFindProgressCallbackFn = NULL; fFindProgressCallbackContext = NULL; - fTraceDebug = FALSE; + fTraceDebug = false; fDeferredStatus = status; fData = fSmallData; fWordBreakItr = NULL; @@ -230,7 +230,7 @@ void RegexMatcher::init(UErrorCode &status) { fAltInputText = NULL; fInput = NULL; fInputLength = 0; - fInputUniStrMaybeMutable = FALSE; + fInputUniStrMaybeMutable = false; } // @@ -309,7 +309,7 @@ RegexMatcher &RegexMatcher::appendReplacement(UText *dest, status = fDeferredStatus; return *this; } - if (fMatch == FALSE) { + if (fMatch == false) { status = U_REGEX_INVALID_STATE; return *this; } @@ -449,7 +449,7 @@ RegexMatcher &RegexMatcher::appendReplacement(UText *dest, if (nextChar == U_SENTINEL) { break; } - if (u_isdigit(nextChar) == FALSE) { + if (u_isdigit(nextChar) == false) { break; } int32_t nextDigitVal = u_charDigitValue(nextChar); @@ -561,7 +561,7 @@ int64_t RegexMatcher::end64(int32_t group, UErrorCode &err) const { if (U_FAILURE(err)) { return -1; } - if (fMatch == FALSE) { + if (fMatch == false) { err = U_REGEX_INVALID_STATE; return -1; } @@ -594,16 +594,16 @@ int32_t RegexMatcher::end(int32_t group, UErrorCode &err) const { // string from the find() function, and calls the user progress callback // function if there is one installed. // -// Return: TRUE if the find operation is to be terminated. -// FALSE if the find operation is to continue running. +// Return: true if the find operation is to be terminated. +// false if the find operation is to continue running. // //-------------------------------------------------------------------------------- UBool RegexMatcher::findProgressInterrupt(int64_t pos, UErrorCode &status) { if (fFindProgressCallbackFn && !(*fFindProgressCallbackFn)(fFindProgressCallbackContext, pos)) { status = U_REGEX_STOPPED_BY_CALLER; - return TRUE; + return true; } - return FALSE; + return false; } //-------------------------------------------------------------------------------- @@ -613,7 +613,7 @@ UBool RegexMatcher::findProgressInterrupt(int64_t pos, UErrorCode &status) { //-------------------------------------------------------------------------------- UBool RegexMatcher::find() { if (U_FAILURE(fDeferredStatus)) { - return FALSE; + return false; } UErrorCode status = U_ZERO_ERROR; UBool result = find(status); @@ -630,11 +630,11 @@ UBool RegexMatcher::find(UErrorCode &status) { // matcher has been reset.) // if (U_FAILURE(status)) { - return FALSE; + return false; } if (U_FAILURE(fDeferredStatus)) { status = fDeferredStatus; - return FALSE; + return false; } if (UTEXT_FULL_TEXT_IN_CHUNK(fInputText, fInputLength)) { @@ -654,9 +654,9 @@ UBool RegexMatcher::find(UErrorCode &status) { // Previous match had zero length. Move start position up one position // to avoid sending find() into a loop on zero-length matches. if (startPos >= fActiveLimit) { - fMatch = FALSE; - fHitEnd = TRUE; - return FALSE; + fMatch = false; + fHitEnd = true; + return false; } UTEXT_SETNATIVEINDEX(fInputText, startPos); (void)UTEXT_NEXT32(fInputText); @@ -667,8 +667,8 @@ UBool RegexMatcher::find(UErrorCode &status) { // A previous find() failed to match. Don't try again. // (without this test, a pattern with a zero-length match // could match again at the end of an input string.) - fHitEnd = TRUE; - return FALSE; + fHitEnd = true; + return false; } } @@ -681,9 +681,9 @@ UBool RegexMatcher::find(UErrorCode &status) { if (UTEXT_USES_U16(fInputText)) { testStartLimit = fActiveLimit - fPattern->fMinMatchLen; if (startPos > testStartLimit) { - fMatch = FALSE; - fHitEnd = TRUE; - return FALSE; + fMatch = false; + fHitEnd = true; + return false; } } else { // We don't know exactly how long the minimum match length is in native characters. @@ -699,16 +699,16 @@ UBool RegexMatcher::find(UErrorCode &status) { // No optimization was found. // Try a match at each input position. for (;;) { - MatchAt(startPos, FALSE, status); + MatchAt(startPos, false, status); if (U_FAILURE(status)) { - return FALSE; + return false; } if (fMatch) { - return TRUE; + return true; } if (startPos >= testStartLimit) { - fHitEnd = TRUE; - return FALSE; + fHitEnd = true; + return false; } UTEXT_SETNATIVEINDEX(fInputText, startPos); (void)UTEXT_NEXT32(fInputText); @@ -717,7 +717,7 @@ UBool RegexMatcher::find(UErrorCode &status) { // match at the end of a string, so we must make sure that the loop // runs with startPos == testStartLimit the last time through. if (findProgressInterrupt(startPos, status)) - return FALSE; + return false; } UPRV_UNREACHABLE_EXIT; @@ -725,12 +725,12 @@ UBool RegexMatcher::find(UErrorCode &status) { // Matches are only possible at the start of the input string // (pattern begins with ^ or \A) if (startPos > fActiveStart) { - fMatch = FALSE; - return FALSE; + fMatch = false; + return false; } - MatchAt(startPos, FALSE, status); + MatchAt(startPos, false, status); if (U_FAILURE(status)) { - return FALSE; + return false; } return fMatch; @@ -749,22 +749,22 @@ UBool RegexMatcher::find(UErrorCode &status) { // and handle end of text in the following block. if (c >= 0 && ((c<256 && fPattern->fInitialChars8->contains(c)) || (c>=256 && fPattern->fInitialChars->contains(c)))) { - MatchAt(pos, FALSE, status); + MatchAt(pos, false, status); if (U_FAILURE(status)) { - return FALSE; + return false; } if (fMatch) { - return TRUE; + return true; } UTEXT_SETNATIVEINDEX(fInputText, pos); } if (startPos > testStartLimit) { - fMatch = FALSE; - fHitEnd = TRUE; - return FALSE; + fMatch = false; + fHitEnd = true; + return false; } if (findProgressInterrupt(startPos, status)) - return FALSE; + return false; } } UPRV_UNREACHABLE_EXIT; @@ -781,22 +781,22 @@ UBool RegexMatcher::find(UErrorCode &status) { c = UTEXT_NEXT32(fInputText); startPos = UTEXT_GETNATIVEINDEX(fInputText); if (c == theChar) { - MatchAt(pos, FALSE, status); + MatchAt(pos, false, status); if (U_FAILURE(status)) { - return FALSE; + return false; } if (fMatch) { - return TRUE; + return true; } UTEXT_SETNATIVEINDEX(fInputText, startPos); } if (startPos > testStartLimit) { - fMatch = FALSE; - fHitEnd = TRUE; - return FALSE; + fMatch = false; + fHitEnd = true; + return false; } if (findProgressInterrupt(startPos, status)) - return FALSE; + return false; } } UPRV_UNREACHABLE_EXIT; @@ -805,12 +805,12 @@ UBool RegexMatcher::find(UErrorCode &status) { { UChar32 ch; if (startPos == fAnchorStart) { - MatchAt(startPos, FALSE, status); + MatchAt(startPos, false, status); if (U_FAILURE(status)) { - return FALSE; + return false; } if (fMatch) { - return TRUE; + return true; } UTEXT_SETNATIVEINDEX(fInputText, startPos); ch = UTEXT_NEXT32(fInputText); @@ -824,19 +824,19 @@ UBool RegexMatcher::find(UErrorCode &status) { if (fPattern->fFlags & UREGEX_UNIX_LINES) { for (;;) { if (ch == 0x0a) { - MatchAt(startPos, FALSE, status); + MatchAt(startPos, false, status); if (U_FAILURE(status)) { - return FALSE; + return false; } if (fMatch) { - return TRUE; + return true; } UTEXT_SETNATIVEINDEX(fInputText, startPos); } if (startPos >= testStartLimit) { - fMatch = FALSE; - fHitEnd = TRUE; - return FALSE; + fMatch = false; + fHitEnd = true; + return false; } ch = UTEXT_NEXT32(fInputText); startPos = UTEXT_GETNATIVEINDEX(fInputText); @@ -844,7 +844,7 @@ UBool RegexMatcher::find(UErrorCode &status) { // match at the end of a string, so we must make sure that the loop // runs with startPos == testStartLimit the last time through. if (findProgressInterrupt(startPos, status)) - return FALSE; + return false; } } else { for (;;) { @@ -853,19 +853,19 @@ UBool RegexMatcher::find(UErrorCode &status) { (void)UTEXT_NEXT32(fInputText); startPos = UTEXT_GETNATIVEINDEX(fInputText); } - MatchAt(startPos, FALSE, status); + MatchAt(startPos, false, status); if (U_FAILURE(status)) { - return FALSE; + return false; } if (fMatch) { - return TRUE; + return true; } UTEXT_SETNATIVEINDEX(fInputText, startPos); } if (startPos >= testStartLimit) { - fMatch = FALSE; - fHitEnd = TRUE; - return FALSE; + fMatch = false; + fHitEnd = true; + return false; } ch = UTEXT_NEXT32(fInputText); startPos = UTEXT_GETNATIVEINDEX(fInputText); @@ -873,7 +873,7 @@ UBool RegexMatcher::find(UErrorCode &status) { // match at the end of a string, so we must make sure that the loop // runs with startPos == testStartLimit the last time through. if (findProgressInterrupt(startPos, status)) - return FALSE; + return false; } } } @@ -884,7 +884,7 @@ UBool RegexMatcher::find(UErrorCode &status) { // we have reports of this in production code, don't use UPRV_UNREACHABLE_EXIT. // See ICU-21669. status = U_INTERNAL_PROGRAM_ERROR; - return FALSE; + return false; } UPRV_UNREACHABLE_EXIT; @@ -894,23 +894,23 @@ UBool RegexMatcher::find(UErrorCode &status) { UBool RegexMatcher::find(int64_t start, UErrorCode &status) { if (U_FAILURE(status)) { - return FALSE; + return false; } if (U_FAILURE(fDeferredStatus)) { status = fDeferredStatus; - return FALSE; + return false; } this->reset(); // Note: Reset() is specified by Java Matcher documentation. // This will reset the region to be the full input length. if (start < 0) { status = U_INDEX_OUTOFBOUNDS_ERROR; - return FALSE; + return false; } int64_t nativeStart = start; if (nativeStart < fActiveStart || nativeStart > fActiveLimit) { status = U_INDEX_OUTOFBOUNDS_ERROR; - return FALSE; + return false; } fMatchEnd = nativeStart; return find(status); @@ -943,9 +943,9 @@ UBool RegexMatcher::findUsingChunk(UErrorCode &status) { // Previous match had zero length. Move start position up one position // to avoid sending find() into a loop on zero-length matches. if (startPos >= fActiveLimit) { - fMatch = FALSE; - fHitEnd = TRUE; - return FALSE; + fMatch = false; + fHitEnd = true; + return false; } U16_FWD_1(inputBuf, startPos, fInputLength); } @@ -954,8 +954,8 @@ UBool RegexMatcher::findUsingChunk(UErrorCode &status) { // A previous find() failed to match. Don't try again. // (without this test, a pattern with a zero-length match // could match again at the end of an input string.) - fHitEnd = TRUE; - return FALSE; + fHitEnd = true; + return false; } } @@ -967,9 +967,9 @@ UBool RegexMatcher::findUsingChunk(UErrorCode &status) { // Note: a match can begin at inputBuf + testLen; it is an inclusive limit. int32_t testLen = (int32_t)(fActiveLimit - fPattern->fMinMatchLen); if (startPos > testLen) { - fMatch = FALSE; - fHitEnd = TRUE; - return FALSE; + fMatch = false; + fHitEnd = true; + return false; } UChar32 c; @@ -980,23 +980,23 @@ UBool RegexMatcher::findUsingChunk(UErrorCode &status) { // No optimization was found. // Try a match at each input position. for (;;) { - MatchChunkAt(startPos, FALSE, status); + MatchChunkAt(startPos, false, status); if (U_FAILURE(status)) { - return FALSE; + return false; } if (fMatch) { - return TRUE; + return true; } if (startPos >= testLen) { - fHitEnd = TRUE; - return FALSE; + fHitEnd = true; + return false; } U16_FWD_1(inputBuf, startPos, fActiveLimit); // Note that it's perfectly OK for a pattern to have a zero-length // match at the end of a string, so we must make sure that the loop // runs with startPos == testLen the last time through. if (findProgressInterrupt(startPos, status)) - return FALSE; + return false; } UPRV_UNREACHABLE_EXIT; @@ -1004,12 +1004,12 @@ UBool RegexMatcher::findUsingChunk(UErrorCode &status) { // Matches are only possible at the start of the input string // (pattern begins with ^ or \A) if (startPos > fActiveStart) { - fMatch = FALSE; - return FALSE; + fMatch = false; + return false; } - MatchChunkAt(startPos, FALSE, status); + MatchChunkAt(startPos, false, status); if (U_FAILURE(status)) { - return FALSE; + return false; } return fMatch; @@ -1023,21 +1023,21 @@ UBool RegexMatcher::findUsingChunk(UErrorCode &status) { U16_NEXT(inputBuf, startPos, fActiveLimit, c); // like c = inputBuf[startPos++]; if ((c<256 && fPattern->fInitialChars8->contains(c)) || (c>=256 && fPattern->fInitialChars->contains(c))) { - MatchChunkAt(pos, FALSE, status); + MatchChunkAt(pos, false, status); if (U_FAILURE(status)) { - return FALSE; + return false; } if (fMatch) { - return TRUE; + return true; } } if (startPos > testLen) { - fMatch = FALSE; - fHitEnd = TRUE; - return FALSE; + fMatch = false; + fHitEnd = true; + return false; } if (findProgressInterrupt(startPos, status)) - return FALSE; + return false; } } UPRV_UNREACHABLE_EXIT; @@ -1052,21 +1052,21 @@ UBool RegexMatcher::findUsingChunk(UErrorCode &status) { int32_t pos = startPos; U16_NEXT(inputBuf, startPos, fActiveLimit, c); // like c = inputBuf[startPos++]; if (c == theChar) { - MatchChunkAt(pos, FALSE, status); + MatchChunkAt(pos, false, status); if (U_FAILURE(status)) { - return FALSE; + return false; } if (fMatch) { - return TRUE; + return true; } } if (startPos > testLen) { - fMatch = FALSE; - fHitEnd = TRUE; - return FALSE; + fMatch = false; + fHitEnd = true; + return false; } if (findProgressInterrupt(startPos, status)) - return FALSE; + return false; } } UPRV_UNREACHABLE_EXIT; @@ -1075,12 +1075,12 @@ UBool RegexMatcher::findUsingChunk(UErrorCode &status) { { UChar32 ch; if (startPos == fAnchorStart) { - MatchChunkAt(startPos, FALSE, status); + MatchChunkAt(startPos, false, status); if (U_FAILURE(status)) { - return FALSE; + return false; } if (fMatch) { - return TRUE; + return true; } U16_FWD_1(inputBuf, startPos, fActiveLimit); } @@ -1089,25 +1089,25 @@ UBool RegexMatcher::findUsingChunk(UErrorCode &status) { for (;;) { ch = inputBuf[startPos-1]; if (ch == 0x0a) { - MatchChunkAt(startPos, FALSE, status); + MatchChunkAt(startPos, false, status); if (U_FAILURE(status)) { - return FALSE; + return false; } if (fMatch) { - return TRUE; + return true; } } if (startPos >= testLen) { - fMatch = FALSE; - fHitEnd = TRUE; - return FALSE; + fMatch = false; + fHitEnd = true; + return false; } U16_FWD_1(inputBuf, startPos, fActiveLimit); // Note that it's perfectly OK for a pattern to have a zero-length // match at the end of a string, so we must make sure that the loop // runs with startPos == testLen the last time through. if (findProgressInterrupt(startPos, status)) - return FALSE; + return false; } } else { for (;;) { @@ -1116,25 +1116,25 @@ UBool RegexMatcher::findUsingChunk(UErrorCode &status) { if (ch == 0x0d && startPos < fActiveLimit && inputBuf[startPos] == 0x0a) { startPos++; } - MatchChunkAt(startPos, FALSE, status); + MatchChunkAt(startPos, false, status); if (U_FAILURE(status)) { - return FALSE; + return false; } if (fMatch) { - return TRUE; + return true; } } if (startPos >= testLen) { - fMatch = FALSE; - fHitEnd = TRUE; - return FALSE; + fMatch = false; + fHitEnd = true; + return false; } U16_FWD_1(inputBuf, startPos, fActiveLimit); // Note that it's perfectly OK for a pattern to have a zero-length // match at the end of a string, so we must make sure that the loop // runs with startPos == testLen the last time through. if (findProgressInterrupt(startPos, status)) - return FALSE; + return false; } } } @@ -1145,7 +1145,7 @@ UBool RegexMatcher::findUsingChunk(UErrorCode &status) { // we have reports of this in production code, don't use UPRV_UNREACHABLE_EXIT. // See ICU-21669. status = U_INTERNAL_PROGRAM_ERROR; - return FALSE; + return false; } UPRV_UNREACHABLE_EXIT; @@ -1175,7 +1175,7 @@ UText *RegexMatcher::group(int32_t groupNum, UText *dest, int64_t &group_len, UE } if (U_FAILURE(fDeferredStatus)) { status = fDeferredStatus; - } else if (fMatch == FALSE) { + } else if (fMatch == false) { status = U_REGEX_INVALID_STATE; } else if (groupNum < 0 || groupNum > fPattern->fGroupMap->size()) { status = U_INDEX_OUTOFBOUNDS_ERROR; @@ -1199,12 +1199,12 @@ UText *RegexMatcher::group(int32_t groupNum, UText *dest, int64_t &group_len, UE if (s < 0) { // A capture group wasn't part of the match - return utext_clone(dest, fInputText, FALSE, TRUE, &status); + return utext_clone(dest, fInputText, false, true, &status); } U_ASSERT(s <= e); group_len = e - s; - dest = utext_clone(dest, fInputText, FALSE, TRUE, &status); + dest = utext_clone(dest, fInputText, false, true, &status); if (dest) UTEXT_SETNATIVEINDEX(dest, s); return dest; @@ -1255,7 +1255,7 @@ int64_t RegexMatcher::appendGroup(int32_t groupNum, UText *dest, UErrorCode &sta } int64_t destLen = utext_nativeLength(dest); - if (fMatch == FALSE) { + if (fMatch == false) { status = U_REGEX_INVALID_STATE; return utext_replace(dest, destLen, destLen, NULL, 0, &status); } @@ -1425,14 +1425,14 @@ UText *RegexMatcher::getInput (UText *dest, UErrorCode &status) const { } return dest; } else { - return utext_clone(NULL, fInputText, FALSE, TRUE, &status); + return utext_clone(NULL, fInputText, false, true, &status); } } static UBool compat_SyncMutableUTextContents(UText *ut); static UBool compat_SyncMutableUTextContents(UText *ut) { - UBool retVal = FALSE; + UBool retVal = false; // In the following test, we're really only interested in whether the UText should switch // between heap and stack allocation. If length hasn't changed, we won't, so the chunkContents @@ -1450,7 +1450,7 @@ static UBool compat_SyncMutableUTextContents(UText *ut) { ut->chunkLength = newLength; ut->chunkNativeLimit = newLength; ut->nativeIndexingLimit = newLength; - retVal = TRUE; + retVal = true; } return retVal; @@ -1463,11 +1463,11 @@ static UBool compat_SyncMutableUTextContents(UText *ut) { //-------------------------------------------------------------------------------- UBool RegexMatcher::lookingAt(UErrorCode &status) { if (U_FAILURE(status)) { - return FALSE; + return false; } if (U_FAILURE(fDeferredStatus)) { status = fDeferredStatus; - return FALSE; + return false; } if (fInputUniStrMaybeMutable) { @@ -1480,9 +1480,9 @@ UBool RegexMatcher::lookingAt(UErrorCode &status) { resetPreserveRegion(); } if (UTEXT_FULL_TEXT_IN_CHUNK(fInputText, fInputLength)) { - MatchChunkAt((int32_t)fActiveStart, FALSE, status); + MatchChunkAt((int32_t)fActiveStart, false, status); } else { - MatchAt(fActiveStart, FALSE, status); + MatchAt(fActiveStart, false, status); } return fMatch; } @@ -1490,17 +1490,17 @@ UBool RegexMatcher::lookingAt(UErrorCode &status) { UBool RegexMatcher::lookingAt(int64_t start, UErrorCode &status) { if (U_FAILURE(status)) { - return FALSE; + return false; } if (U_FAILURE(fDeferredStatus)) { status = fDeferredStatus; - return FALSE; + return false; } reset(); if (start < 0) { status = U_INDEX_OUTOFBOUNDS_ERROR; - return FALSE; + return false; } if (fInputUniStrMaybeMutable) { @@ -1514,13 +1514,13 @@ UBool RegexMatcher::lookingAt(int64_t start, UErrorCode &status) { nativeStart = start; if (nativeStart < fActiveStart || nativeStart > fActiveLimit) { status = U_INDEX_OUTOFBOUNDS_ERROR; - return FALSE; + return false; } if (UTEXT_FULL_TEXT_IN_CHUNK(fInputText, fInputLength)) { - MatchChunkAt((int32_t)nativeStart, FALSE, status); + MatchChunkAt((int32_t)nativeStart, false, status); } else { - MatchAt(nativeStart, FALSE, status); + MatchAt(nativeStart, false, status); } return fMatch; } @@ -1534,11 +1534,11 @@ UBool RegexMatcher::lookingAt(int64_t start, UErrorCode &status) { //-------------------------------------------------------------------------------- UBool RegexMatcher::matches(UErrorCode &status) { if (U_FAILURE(status)) { - return FALSE; + return false; } if (U_FAILURE(fDeferredStatus)) { status = fDeferredStatus; - return FALSE; + return false; } if (fInputUniStrMaybeMutable) { @@ -1552,9 +1552,9 @@ UBool RegexMatcher::matches(UErrorCode &status) { } if (UTEXT_FULL_TEXT_IN_CHUNK(fInputText, fInputLength)) { - MatchChunkAt((int32_t)fActiveStart, TRUE, status); + MatchChunkAt((int32_t)fActiveStart, true, status); } else { - MatchAt(fActiveStart, TRUE, status); + MatchAt(fActiveStart, true, status); } return fMatch; } @@ -1562,17 +1562,17 @@ UBool RegexMatcher::matches(UErrorCode &status) { UBool RegexMatcher::matches(int64_t start, UErrorCode &status) { if (U_FAILURE(status)) { - return FALSE; + return false; } if (U_FAILURE(fDeferredStatus)) { status = fDeferredStatus; - return FALSE; + return false; } reset(); if (start < 0) { status = U_INDEX_OUTOFBOUNDS_ERROR; - return FALSE; + return false; } if (fInputUniStrMaybeMutable) { @@ -1586,13 +1586,13 @@ UBool RegexMatcher::matches(int64_t start, UErrorCode &status) { nativeStart = start; if (nativeStart < fActiveStart || nativeStart > fActiveLimit) { status = U_INDEX_OUTOFBOUNDS_ERROR; - return FALSE; + return false; } if (UTEXT_FULL_TEXT_IN_CHUNK(fInputText, fInputLength)) { - MatchChunkAt((int32_t)nativeStart, TRUE, status); + MatchChunkAt((int32_t)nativeStart, true, status); } else { - MatchAt(nativeStart, TRUE, status); + MatchAt(nativeStart, true, status); } return fMatch; } @@ -1731,7 +1731,7 @@ UText *RegexMatcher::replaceAll(UText *replacement, UText *dest, UErrorCode &sta UText empty = UTEXT_INITIALIZER; utext_openUnicodeString(&empty, &emptyString, &status); - dest = utext_clone(NULL, &empty, TRUE, FALSE, &status); + dest = utext_clone(NULL, &empty, true, false, &status); utext_close(&empty); } @@ -1793,7 +1793,7 @@ UText *RegexMatcher::replaceFirst(UText *replacement, UText *dest, UErrorCode &s UText empty = UTEXT_INITIALIZER; utext_openUnicodeString(&empty, &emptyString, &status); - dest = utext_clone(NULL, &empty, TRUE, FALSE, &status); + dest = utext_clone(NULL, &empty, true, false, &status); utext_close(&empty); } @@ -1839,9 +1839,9 @@ void RegexMatcher::resetPreserveRegion() { fMatchEnd = 0; fLastMatchEnd = -1; fAppendPosition = 0; - fMatch = FALSE; - fHitEnd = FALSE; - fRequireEnd = FALSE; + fMatch = false; + fHitEnd = false; + fRequireEnd = false; fTime = 0; fTickCounter = TIMER_INITIAL_VALUE; //resetStack(); // more expensive than it looks... @@ -1851,7 +1851,7 @@ void RegexMatcher::resetPreserveRegion() { RegexMatcher &RegexMatcher::reset(const UnicodeString &input) { fInputText = utext_openConstUnicodeString(fInputText, &input, &fDeferredStatus); if (fPattern->fNeedsAltInput) { - fAltInputText = utext_clone(fAltInputText, fInputText, FALSE, TRUE, &fDeferredStatus); + fAltInputText = utext_clone(fAltInputText, fInputText, false, true, &fDeferredStatus); } if (U_FAILURE(fDeferredStatus)) { return *this; @@ -1864,7 +1864,7 @@ RegexMatcher &RegexMatcher::reset(const UnicodeString &input) { // Do the following for any UnicodeString. // This is for compatibility for those clients who modify the input string "live" during regex operations. - fInputUniStrMaybeMutable = TRUE; + fInputUniStrMaybeMutable = true; #if UCONFIG_NO_BREAK_ITERATION==0 if (fWordBreakItr) { @@ -1881,8 +1881,8 @@ RegexMatcher &RegexMatcher::reset(const UnicodeString &input) { RegexMatcher &RegexMatcher::reset(UText *input) { if (fInputText != input) { - fInputText = utext_clone(fInputText, input, FALSE, TRUE, &fDeferredStatus); - if (fPattern->fNeedsAltInput) fAltInputText = utext_clone(fAltInputText, fInputText, FALSE, TRUE, &fDeferredStatus); + fInputText = utext_clone(fInputText, input, false, true, &fDeferredStatus); + if (fPattern->fNeedsAltInput) fAltInputText = utext_clone(fAltInputText, fInputText, false, true, &fDeferredStatus); if (U_FAILURE(fDeferredStatus)) { return *this; } @@ -1901,7 +1901,7 @@ RegexMatcher &RegexMatcher::reset(UText *input) { #endif } reset(); - fInputUniStrMaybeMutable = FALSE; + fInputUniStrMaybeMutable = false; return *this; } @@ -1945,7 +1945,7 @@ RegexMatcher &RegexMatcher::refreshInputText(UText *input, UErrorCode &status) { } int64_t pos = utext_getNativeIndex(fInputText); // Shallow read-only clone of the new UText into the existing input UText - fInputText = utext_clone(fInputText, input, FALSE, TRUE, &status); + fInputText = utext_clone(fInputText, input, false, true, &status); if (U_FAILURE(status)) { return *this; } @@ -1953,7 +1953,7 @@ RegexMatcher &RegexMatcher::refreshInputText(UText *input, UErrorCode &status) { if (fAltInputText != NULL) { pos = utext_getNativeIndex(fAltInputText); - fAltInputText = utext_clone(fAltInputText, input, FALSE, TRUE, &status); + fAltInputText = utext_clone(fAltInputText, input, false, true, &status); if (U_FAILURE(status)) { return *this; } @@ -2126,7 +2126,7 @@ int32_t RegexMatcher::split(UText *input, UText remainingText = UTEXT_INITIALIZER; utext_openUChars(&remainingText, input->chunkContents+nextOutputStringStart, fActiveLimit-nextOutputStringStart, &status); - dest[i] = utext_clone(NULL, &remainingText, TRUE, FALSE, &status); + dest[i] = utext_clone(NULL, &remainingText, true, false, &status); utext_close(&remainingText); } } else { @@ -2145,7 +2145,7 @@ int32_t RegexMatcher::split(UText *input, } else { UText remainingText = UTEXT_INITIALIZER; utext_openUChars(&remainingText, remainingChars, remaining16Length, &status); - dest[i] = utext_clone(NULL, &remainingText, TRUE, FALSE, &status); + dest[i] = utext_clone(NULL, &remainingText, true, false, &status); utext_close(&remainingText); } @@ -2166,7 +2166,7 @@ int32_t RegexMatcher::split(UText *input, UText remainingText = UTEXT_INITIALIZER; utext_openUChars(&remainingText, input->chunkContents+nextOutputStringStart, fMatchStart-nextOutputStringStart, &status); - dest[i] = utext_clone(NULL, &remainingText, TRUE, FALSE, &status); + dest[i] = utext_clone(NULL, &remainingText, true, false, &status); utext_close(&remainingText); } } else { @@ -2183,7 +2183,7 @@ int32_t RegexMatcher::split(UText *input, } else { UText remainingText = UTEXT_INITIALIZER; utext_openUChars(&remainingText, remainingChars, remaining16Length, &status); - dest[i] = utext_clone(NULL, &remainingText, TRUE, FALSE, &status); + dest[i] = utext_clone(NULL, &remainingText, true, false, &status); utext_close(&remainingText); } @@ -2236,7 +2236,7 @@ int32_t RegexMatcher::split(UText *input, UText remainingText = UTEXT_INITIALIZER; utext_openUChars(&remainingText, input->chunkContents+nextOutputStringStart, fActiveLimit-nextOutputStringStart, &status); - dest[i] = utext_clone(NULL, &remainingText, TRUE, FALSE, &status); + dest[i] = utext_clone(NULL, &remainingText, true, false, &status); utext_close(&remainingText); } } else { @@ -2254,7 +2254,7 @@ int32_t RegexMatcher::split(UText *input, } else { UText remainingText = UTEXT_INITIALIZER; utext_openUChars(&remainingText, remainingChars, remaining16Length, &status); - dest[i] = utext_clone(NULL, &remainingText, TRUE, FALSE, &status); + dest[i] = utext_clone(NULL, &remainingText, true, false, &status); utext_close(&remainingText); } @@ -2297,7 +2297,7 @@ int64_t RegexMatcher::start64(int32_t group, UErrorCode &status) const { status = fDeferredStatus; return -1; } - if (fMatch == FALSE) { + if (fMatch == false) { status = U_REGEX_INVALID_STATE; return -1; } @@ -2534,7 +2534,7 @@ REStackFrame *RegexMatcher::resetStack() { // in perl, "xab..cd..", \b is true at positions 0,3,5,7 // For us, // If the current char is a combining mark, -// \b is FALSE. +// \b is false. // Else Scan backwards to the first non-combining char. // We are at a boundary if the this char and the original chars are // opposite in membership in \w set @@ -2545,11 +2545,11 @@ REStackFrame *RegexMatcher::resetStack() { // //-------------------------------------------------------------------------------- UBool RegexMatcher::isWordBoundary(int64_t pos) { - UBool isBoundary = FALSE; - UBool cIsWord = FALSE; + UBool isBoundary = false; + UBool cIsWord = false; if (pos >= fLookLimit) { - fHitEnd = TRUE; + fHitEnd = true; } else { // Determine whether char c at current position is a member of the word set of chars. // If we're off the end of the string, behave as though we're not at a word char. @@ -2557,14 +2557,14 @@ UBool RegexMatcher::isWordBoundary(int64_t pos) { UChar32 c = UTEXT_CURRENT32(fInputText); if (u_hasBinaryProperty(c, UCHAR_GRAPHEME_EXTEND) || u_charType(c) == U_FORMAT_CHAR) { // Current char is a combining one. Not a boundary. - return FALSE; + return false; } cIsWord = RegexStaticSets::gStaticSets->fPropSets[URX_ISWORD_SET].contains(c); } // Back up until we come to a non-combining char, determine whether // that char is a word char. - UBool prevCIsWord = FALSE; + UBool prevCIsWord = false; for (;;) { if (UTEXT_GETNATIVEINDEX(fInputText) <= fLookStart) { break; @@ -2581,13 +2581,13 @@ UBool RegexMatcher::isWordBoundary(int64_t pos) { } UBool RegexMatcher::isChunkWordBoundary(int32_t pos) { - UBool isBoundary = FALSE; - UBool cIsWord = FALSE; + UBool isBoundary = false; + UBool cIsWord = false; const UChar *inputBuf = fInputText->chunkContents; if (pos >= fLookLimit) { - fHitEnd = TRUE; + fHitEnd = true; } else { // Determine whether char c at current position is a member of the word set of chars. // If we're off the end of the string, behave as though we're not at a word char. @@ -2595,14 +2595,14 @@ UBool RegexMatcher::isChunkWordBoundary(int32_t pos) { U16_GET(inputBuf, fLookStart, pos, fLookLimit, c); if (u_hasBinaryProperty(c, UCHAR_GRAPHEME_EXTEND) || u_charType(c) == U_FORMAT_CHAR) { // Current char is a combining one. Not a boundary. - return FALSE; + return false; } cIsWord = RegexStaticSets::gStaticSets->fPropSets[URX_ISWORD_SET].contains(c); } // Back up until we come to a non-combining char, determine whether // that char is a word char. - UBool prevCIsWord = FALSE; + UBool prevCIsWord = false; for (;;) { if (pos <= fLookStart) { break; @@ -2629,7 +2629,7 @@ UBool RegexMatcher::isChunkWordBoundary(int32_t pos) { // //-------------------------------------------------------------------------------- UBool RegexMatcher::isUWordBoundary(int64_t pos, UErrorCode &status) { - UBool returnVal = FALSE; + UBool returnVal = false; #if UCONFIG_NO_BREAK_ITERATION==0 // Note: this point will never be reached if break iteration is configured out. @@ -2639,7 +2639,7 @@ UBool RegexMatcher::isUWordBoundary(int64_t pos, UErrorCode &status) { if (fWordBreakItr == nullptr) { fWordBreakItr = BreakIterator::createWordInstance(Locale::getEnglish(), status); if (U_FAILURE(status)) { - return FALSE; + return false; } fWordBreakItr->setText(fInputText, status); } @@ -2647,8 +2647,8 @@ UBool RegexMatcher::isUWordBoundary(int64_t pos, UErrorCode &status) { // Note: zero width boundary tests like \b see through transparent region bounds, // which is why fLookLimit is used here, rather than fActiveLimit. if (pos >= fLookLimit) { - fHitEnd = TRUE; - returnVal = TRUE; // With Unicode word rules, only positions within the interior of "real" + fHitEnd = true; + returnVal = true; // With Unicode word rules, only positions within the interior of "real" // words are not boundaries. All non-word chars stand by themselves, // with word boundaries on both sides. } else { @@ -2697,7 +2697,7 @@ void RegexMatcher::IncrementTime(UErrorCode &status) { fTickCounter = TIMER_INITIAL_VALUE; fTime++; if (fCallbackFn != NULL) { - if ((*fCallbackFn)(fCallbackContext, fTime) == FALSE) { + if ((*fCallbackFn)(fCallbackContext, fTime) == false) { status = U_REGEX_STOPPED_BY_CALLER; return; } @@ -2787,7 +2787,7 @@ UnicodeString StringFromUText(UText *ut) { // //-------------------------------------------------------------------------------- void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { - UBool isMatch = FALSE; // True if the we have a match. + UBool isMatch = false; // True if the we have a match. int64_t backSearchIndex = U_INT64_MAX; // used after greedy single-character matches for searching backwards @@ -2872,7 +2872,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { break; } } else { - fHitEnd = TRUE; + fHitEnd = true; } fp = (REStackFrame *)fStack->popFrame(fFrameSize); break; @@ -2897,17 +2897,17 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); UChar32 inputChar; UChar32 patternChar; - UBool success = TRUE; + UBool success = true; while (patternStringIndex < stringLen) { if (UTEXT_GETNATIVEINDEX(fInputText) >= fActiveLimit) { - success = FALSE; - fHitEnd = TRUE; + success = false; + fHitEnd = true; break; } inputChar = UTEXT_NEXT32(fInputText); U16_NEXT(patternString, patternStringIndex, stringLen, patternChar); if (patternChar != inputChar) { - success = FALSE; + success = false; break; } } @@ -2934,7 +2934,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { fp = (REStackFrame *)fStack->popFrame(fFrameSize); break; } - isMatch = TRUE; + isMatch = true; goto breakFromLoop; // Start and End Capture stack frame variables are laid out out like this: @@ -2962,8 +2962,8 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { { if (fp->fInputIdx >= fAnchorLimit) { // We really are at the end of input. Success. - fHitEnd = TRUE; - fRequireEnd = TRUE; + fHitEnd = true; + fRequireEnd = true; break; } @@ -2977,8 +2977,8 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { // If not in the middle of a CR/LF sequence if ( !(c==0x0a && fp->fInputIdx>fAnchorStart && ((void)UTEXT_PREVIOUS32(fInputText), UTEXT_PREVIOUS32(fInputText))==0x0d)) { // At new-line at end of input. Success - fHitEnd = TRUE; - fRequireEnd = TRUE; + fHitEnd = true; + fRequireEnd = true; break; } @@ -2986,8 +2986,8 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { } else { UChar32 nextC = UTEXT_NEXT32(fInputText); if (c == 0x0d && nextC == 0x0a && UTEXT_GETNATIVEINDEX(fInputText) >= fAnchorLimit) { - fHitEnd = TRUE; - fRequireEnd = TRUE; + fHitEnd = true; + fRequireEnd = true; break; // At CR/LF at end of input. Success } } @@ -3000,16 +3000,16 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { case URX_DOLLAR_D: // $, test for End of Line, in UNIX_LINES mode. if (fp->fInputIdx >= fAnchorLimit) { // Off the end of input. Success. - fHitEnd = TRUE; - fRequireEnd = TRUE; + fHitEnd = true; + fRequireEnd = true; break; } else { UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); UChar32 c = UTEXT_NEXT32(fInputText); // Either at the last character of input, or off the end. if (c == 0x0a && UTEXT_GETNATIVEINDEX(fInputText) == fAnchorLimit) { - fHitEnd = TRUE; - fRequireEnd = TRUE; + fHitEnd = true; + fRequireEnd = true; break; } } @@ -3023,8 +3023,8 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { { if (fp->fInputIdx >= fAnchorLimit) { // We really are at the end of input. Success. - fHitEnd = TRUE; - fRequireEnd = TRUE; + fHitEnd = true; + fRequireEnd = true; break; } // If we are positioned just before a new-line, succeed. @@ -3049,8 +3049,8 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { { if (fp->fInputIdx >= fAnchorLimit) { // We really are at the end of input. Success. - fHitEnd = TRUE; - fRequireEnd = TRUE; // Java set requireEnd in this case, even though + fHitEnd = true; + fRequireEnd = true; // Java set requireEnd in this case, even though break; // adding a new-line would not lose the match. } // If we are not positioned just before a new-line, the test fails; backtrack out. @@ -3134,7 +3134,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { case URX_BACKSLASH_D: // Test for decimal digit { if (fp->fInputIdx >= fActiveLimit) { - fHitEnd = TRUE; + fHitEnd = true; fp = (REStackFrame *)fStack->popFrame(fFrameSize); break; } @@ -3155,7 +3155,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { case URX_BACKSLASH_G: // Test for position at end of previous match - if (!((fMatch && fp->fInputIdx==fMatchEnd) || (fMatch==FALSE && fp->fInputIdx==fActiveStart))) { + if (!((fMatch && fp->fInputIdx==fMatchEnd) || (fMatch==false && fp->fInputIdx==fActiveStart))) { fp = (REStackFrame *)fStack->popFrame(fFrameSize); } break; @@ -3164,7 +3164,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { case URX_BACKSLASH_H: // Test for \h, horizontal white space. { if (fp->fInputIdx >= fActiveLimit) { - fHitEnd = TRUE; + fHitEnd = true; fp = (REStackFrame *)fStack->popFrame(fFrameSize); break; } @@ -3185,7 +3185,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { case URX_BACKSLASH_R: // Test for \R, any line break sequence. { if (fp->fInputIdx >= fActiveLimit) { - fHitEnd = TRUE; + fHitEnd = true; fp = (REStackFrame *)fStack->popFrame(fFrameSize); break; } @@ -3206,7 +3206,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { case URX_BACKSLASH_V: // \v, any single line ending character. { if (fp->fInputIdx >= fActiveLimit) { - fHitEnd = TRUE; + fHitEnd = true; fp = (REStackFrame *)fStack->popFrame(fFrameSize); break; } @@ -3228,14 +3228,14 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { // Fail if at end of input if (fp->fInputIdx >= fActiveLimit) { - fHitEnd = TRUE; + fHitEnd = true; fp = (REStackFrame *)fStack->popFrame(fFrameSize); break; } fp->fInputIdx = followingGCBoundary(fp->fInputIdx, status); if (fp->fInputIdx >= fActiveLimit) { - fHitEnd = TRUE; + fHitEnd = true; fp->fInputIdx = fActiveLimit; } break; @@ -3245,8 +3245,8 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { if (fp->fInputIdx < fAnchorLimit) { fp = (REStackFrame *)fStack->popFrame(fFrameSize); } else { - fHitEnd = TRUE; - fRequireEnd = TRUE; + fHitEnd = true; + fRequireEnd = true; } break; @@ -3260,7 +3260,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { // 0: success if input char is in set. // 1: success if input char is not in set. if (fp->fInputIdx >= fActiveLimit) { - fHitEnd = TRUE; + fHitEnd = true; fp = (REStackFrame *)fStack->popFrame(fFrameSize); break; } @@ -3297,7 +3297,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { // Test input character for NOT being a member of one of // the predefined sets (Word Characters, for example) if (fp->fInputIdx >= fActiveLimit) { - fHitEnd = TRUE; + fHitEnd = true; fp = (REStackFrame *)fStack->popFrame(fFrameSize); break; } @@ -3309,13 +3309,13 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { UChar32 c = UTEXT_NEXT32(fInputText); if (c < 256) { Regex8BitSet &s8 = RegexStaticSets::gStaticSets->fPropSets8[opValue]; - if (s8.contains(c) == FALSE) { + if (s8.contains(c) == false) { fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); break; } } else { const UnicodeSet &s = RegexStaticSets::gStaticSets->fPropSets[opValue]; - if (s.contains(c) == FALSE) { + if (s.contains(c) == false) { fp->fInputIdx = UTEXT_GETNATIVEINDEX(fInputText); break; } @@ -3328,7 +3328,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { case URX_SETREF: if (fp->fInputIdx >= fActiveLimit) { - fHitEnd = TRUE; + fHitEnd = true; fp = (REStackFrame *)fStack->popFrame(fFrameSize); break; } else { @@ -3363,7 +3363,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { // . matches anything, but stops at end-of-line. if (fp->fInputIdx >= fActiveLimit) { // At end of input. Match failed. Backtrack out. - fHitEnd = TRUE; + fHitEnd = true; fp = (REStackFrame *)fStack->popFrame(fFrameSize); break; } @@ -3387,7 +3387,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { // ., in dot-matches-all (including new lines) mode if (fp->fInputIdx >= fActiveLimit) { // At end of input. Match failed. Backtrack out. - fHitEnd = TRUE; + fHitEnd = true; fp = (REStackFrame *)fStack->popFrame(fFrameSize); break; } @@ -3417,7 +3417,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { // UNIX_LINES mode, so 0x0a is the only recognized line ending. if (fp->fInputIdx >= fActiveLimit) { // At end of input. Match failed. Backtrack out. - fHitEnd = TRUE; + fHitEnd = true; fp = (REStackFrame *)fStack->popFrame(fFrameSize); break; } @@ -3441,7 +3441,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { break; case URX_FAIL: - isMatch = FALSE; + isMatch = false; goto breakFromLoop; case URX_JMP_SAV: @@ -3658,21 +3658,21 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { // match succeeds. Verified by testing: Perl matches succeed // in this case, so we do too. - UBool success = TRUE; + UBool success = true; for (;;) { if (utext_getNativeIndex(fAltInputText) >= groupEndIdx) { - success = TRUE; + success = true; break; } if (utext_getNativeIndex(fInputText) >= fActiveLimit) { - success = FALSE; - fHitEnd = TRUE; + success = false; + fHitEnd = true; break; } UChar32 captureGroupChar = utext_next32(fAltInputText); UChar32 inputChar = utext_next32(fInputText); if (inputChar != captureGroupChar) { - success = FALSE; + success = false; break; } } @@ -3707,21 +3707,21 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { // match succeeds. Verified by testing: Perl matches succeed // in this case, so we do too. - UBool success = TRUE; + UBool success = true; for (;;) { if (!captureGroupItr.inExpansion() && utext_getNativeIndex(fAltInputText) >= groupEndIdx) { - success = TRUE; + success = true; break; } if (!inputItr.inExpansion() && utext_getNativeIndex(fInputText) >= fActiveLimit) { - success = FALSE; - fHitEnd = TRUE; + success = false; + fHitEnd = true; break; } UChar32 captureGroupChar = captureGroupItr.next(); UChar32 inputChar = inputItr.next(); if (inputChar != captureGroupChar) { - success = FALSE; + success = false; break; } } @@ -3730,7 +3730,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { // We obtained a match by consuming part of a string obtained from // case-folding a single code point of the input text. // This does not count as an overall match. - success = FALSE; + success = false; } if (success) { @@ -3823,7 +3823,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { break; } } else { - fHitEnd = TRUE; + fHitEnd = true; } fp = (REStackFrame *)fStack->popFrame(fFrameSize); @@ -3849,25 +3849,25 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { UChar32 cPattern; UChar32 cText; - UBool success = TRUE; + UBool success = true; UTEXT_SETNATIVEINDEX(fInputText, fp->fInputIdx); CaseFoldingUTextIterator inputIterator(*fInputText); while (patternStringIdx < patternStringLen) { if (!inputIterator.inExpansion() && UTEXT_GETNATIVEINDEX(fInputText) >= fActiveLimit) { - success = FALSE; - fHitEnd = TRUE; + success = false; + fHitEnd = true; break; } U16_NEXT(patternString, patternStringIdx, patternStringLen, cPattern); cText = inputIterator.next(); if (cText != cPattern) { - success = FALSE; + success = false; break; } } if (inputIterator.inExpansion()) { - success = FALSE; + success = false; } if (success) { @@ -4099,16 +4099,16 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { UTEXT_SETNATIVEINDEX(fInputText, ix); for (;;) { if (ix >= fActiveLimit) { - fHitEnd = TRUE; + fHitEnd = true; break; } UChar32 c = UTEXT_NEXT32(fInputText); if (c<256) { - if (s8->contains(c) == FALSE) { + if (s8->contains(c) == false) { break; } } else { - if (s->contains(c) == FALSE) { + if (s->contains(c) == false) { break; } } @@ -4152,7 +4152,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { if ((opValue & 1) == 1) { // Dot-matches-All mode. Jump straight to the end of the string. ix = fActiveLimit; - fHitEnd = TRUE; + fHitEnd = true; } else { // NOT DOT ALL mode. Line endings do not match '.' // Scan forward until a line ending or end of input. @@ -4160,7 +4160,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { UTEXT_SETNATIVEINDEX(fInputText, ix); for (;;) { if (ix >= fActiveLimit) { - fHitEnd = TRUE; + fHitEnd = true; break; } UChar32 c = UTEXT_NEXT32(fInputText); @@ -4252,7 +4252,7 @@ void RegexMatcher::MatchAt(int64_t startIdx, UBool toEnd, UErrorCode &status) { } if (U_FAILURE(status)) { - isMatch = FALSE; + isMatch = false; break; } } @@ -4295,7 +4295,7 @@ breakFromLoop: // //-------------------------------------------------------------------------------- void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &status) { - UBool isMatch = FALSE; // True if the we have a match. + UBool isMatch = false; // True if the we have a match. int32_t backSearchIndex = INT32_MAX; // used after greedy single-character matches for searching backwards @@ -4381,7 +4381,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu break; } } else { - fHitEnd = TRUE; + fHitEnd = true; } fp = (REStackFrame *)fStack->popFrame(fFrameSize); break; @@ -4406,15 +4406,15 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu const UChar * pInpLimit = inputBuf + fActiveLimit; const UChar * pPat = litText+stringStartIdx; const UChar * pEnd = pInp + stringLen; - UBool success = TRUE; + UBool success = true; while (pInp < pEnd) { if (pInp >= pInpLimit) { - fHitEnd = TRUE; - success = FALSE; + fHitEnd = true; + success = false; break; } if (*pInp++ != *pPat++) { - success = FALSE; + success = false; break; } } @@ -4441,7 +4441,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu fp = (REStackFrame *)fStack->popFrame(fFrameSize); break; } - isMatch = TRUE; + isMatch = true; goto breakFromLoop; // Start and End Capture stack frame variables are laid out out like this: @@ -4474,8 +4474,8 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu } if (fp->fInputIdx >= fAnchorLimit) { // We really are at the end of input. Success. - fHitEnd = TRUE; - fRequireEnd = TRUE; + fHitEnd = true; + fRequireEnd = true; break; } @@ -4488,15 +4488,15 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu if (isLineTerminator(c)) { if ( !(c==0x0a && fp->fInputIdx>fAnchorStart && inputBuf[fp->fInputIdx-1]==0x0d)) { // At new-line at end of input. Success - fHitEnd = TRUE; - fRequireEnd = TRUE; + fHitEnd = true; + fRequireEnd = true; break; } } } else if (fp->fInputIdx == fAnchorLimit-2 && inputBuf[fp->fInputIdx]==0x0d && inputBuf[fp->fInputIdx+1]==0x0a) { - fHitEnd = TRUE; - fRequireEnd = TRUE; + fHitEnd = true; + fRequireEnd = true; break; // At CR/LF at end of input. Success } @@ -4511,14 +4511,14 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu if (fp->fInputIdx == fAnchorLimit-1) { // At last char of input. Success if it's a new line. if (inputBuf[fp->fInputIdx] == 0x0a) { - fHitEnd = TRUE; - fRequireEnd = TRUE; + fHitEnd = true; + fRequireEnd = true; break; } } else { // Off the end of input. Success. - fHitEnd = TRUE; - fRequireEnd = TRUE; + fHitEnd = true; + fRequireEnd = true; break; } } @@ -4532,8 +4532,8 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu { if (fp->fInputIdx >= fAnchorLimit) { // We really are at the end of input. Success. - fHitEnd = TRUE; - fRequireEnd = TRUE; + fHitEnd = true; + fRequireEnd = true; break; } // If we are positioned just before a new-line, succeed. @@ -4557,8 +4557,8 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu { if (fp->fInputIdx >= fAnchorLimit) { // We really are at the end of input. Success. - fHitEnd = TRUE; - fRequireEnd = TRUE; // Java set requireEnd in this case, even though + fHitEnd = true; + fRequireEnd = true; // Java set requireEnd in this case, even though break; // adding a new-line would not lose the match. } // If we are not positioned just before a new-line, the test fails; backtrack out. @@ -4640,7 +4640,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu case URX_BACKSLASH_D: // Test for decimal digit { if (fp->fInputIdx >= fActiveLimit) { - fHitEnd = TRUE; + fHitEnd = true; fp = (REStackFrame *)fStack->popFrame(fFrameSize); break; } @@ -4658,7 +4658,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu case URX_BACKSLASH_G: // Test for position at end of previous match - if (!((fMatch && fp->fInputIdx==fMatchEnd) || (fMatch==FALSE && fp->fInputIdx==fActiveStart))) { + if (!((fMatch && fp->fInputIdx==fMatchEnd) || (fMatch==false && fp->fInputIdx==fActiveStart))) { fp = (REStackFrame *)fStack->popFrame(fFrameSize); } break; @@ -4667,7 +4667,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu case URX_BACKSLASH_H: // Test for \h, horizontal white space. { if (fp->fInputIdx >= fActiveLimit) { - fHitEnd = TRUE; + fHitEnd = true; fp = (REStackFrame *)fStack->popFrame(fFrameSize); break; } @@ -4686,7 +4686,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu case URX_BACKSLASH_R: // Test for \R, any line break sequence. { if (fp->fInputIdx >= fActiveLimit) { - fHitEnd = TRUE; + fHitEnd = true; fp = (REStackFrame *)fStack->popFrame(fFrameSize); break; } @@ -4711,7 +4711,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu case URX_BACKSLASH_V: // Any single code point line ending. { if (fp->fInputIdx >= fActiveLimit) { - fHitEnd = TRUE; + fHitEnd = true; fp = (REStackFrame *)fStack->popFrame(fFrameSize); break; } @@ -4731,14 +4731,14 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu // Fail if at end of input if (fp->fInputIdx >= fActiveLimit) { - fHitEnd = TRUE; + fHitEnd = true; fp = (REStackFrame *)fStack->popFrame(fFrameSize); break; } fp->fInputIdx = followingGCBoundary(fp->fInputIdx, status); if (fp->fInputIdx >= fActiveLimit) { - fHitEnd = TRUE; + fHitEnd = true; fp->fInputIdx = fActiveLimit; } break; @@ -4748,8 +4748,8 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu if (fp->fInputIdx < fAnchorLimit) { fp = (REStackFrame *)fStack->popFrame(fFrameSize); } else { - fHitEnd = TRUE; - fRequireEnd = TRUE; + fHitEnd = true; + fRequireEnd = true; } break; @@ -4763,7 +4763,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu // 0: success if input char is in set. // 1: success if input char is not in set. if (fp->fInputIdx >= fActiveLimit) { - fHitEnd = TRUE; + fHitEnd = true; fp = (REStackFrame *)fStack->popFrame(fFrameSize); break; } @@ -4797,7 +4797,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu // Test input character for NOT being a member of one of // the predefined sets (Word Characters, for example) if (fp->fInputIdx >= fActiveLimit) { - fHitEnd = TRUE; + fHitEnd = true; fp = (REStackFrame *)fStack->popFrame(fFrameSize); break; } @@ -4808,12 +4808,12 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu U16_NEXT(inputBuf, fp->fInputIdx, fActiveLimit, c); if (c < 256) { Regex8BitSet &s8 = RegexStaticSets::gStaticSets->fPropSets8[opValue]; - if (s8.contains(c) == FALSE) { + if (s8.contains(c) == false) { break; } } else { const UnicodeSet &s = RegexStaticSets::gStaticSets->fPropSets[opValue]; - if (s.contains(c) == FALSE) { + if (s.contains(c) == false) { break; } } @@ -4825,7 +4825,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu case URX_SETREF: { if (fp->fInputIdx >= fActiveLimit) { - fHitEnd = TRUE; + fHitEnd = true; fp = (REStackFrame *)fStack->popFrame(fFrameSize); break; } @@ -4860,7 +4860,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu // . matches anything, but stops at end-of-line. if (fp->fInputIdx >= fActiveLimit) { // At end of input. Match failed. Backtrack out. - fHitEnd = TRUE; + fHitEnd = true; fp = (REStackFrame *)fStack->popFrame(fFrameSize); break; } @@ -4882,7 +4882,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu // . in dot-matches-all (including new lines) mode if (fp->fInputIdx >= fActiveLimit) { // At end of input. Match failed. Backtrack out. - fHitEnd = TRUE; + fHitEnd = true; fp = (REStackFrame *)fStack->popFrame(fFrameSize); break; } @@ -4907,7 +4907,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu // UNIX_LINES mode, so 0x0a is the only recognized line ending. if (fp->fInputIdx >= fActiveLimit) { // At end of input. Match failed. Backtrack out. - fHitEnd = TRUE; + fHitEnd = true; fp = (REStackFrame *)fStack->popFrame(fFrameSize); break; } @@ -4928,7 +4928,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu break; case URX_FAIL: - isMatch = FALSE; + isMatch = false; goto breakFromLoop; case URX_JMP_SAV: @@ -5137,15 +5137,15 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu fp = (REStackFrame *)fStack->popFrame(fFrameSize); // FAIL, no match. break; } - UBool success = TRUE; + UBool success = true; for (int64_t groupIndex = groupStartIdx; groupIndex < groupEndIdx; ++groupIndex,++inputIndex) { if (inputIndex >= fActiveLimit) { - success = FALSE; - fHitEnd = TRUE; + success = false; + fHitEnd = true; break; } if (inputBuf[groupIndex] != inputBuf[inputIndex]) { - success = FALSE; + success = false; break; } } @@ -5153,7 +5153,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu inputIndex < fActiveLimit && U16_IS_TRAIL(inputBuf[inputIndex])) { // Capture group ended with an unpaired lead surrogate. // Back reference is not permitted to match lead only of a surrogatge pair. - success = FALSE; + success = false; } if (success) { fp->fInputIdx = inputIndex; @@ -5181,21 +5181,21 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu // match succeeds. Verified by testing: Perl matches succeed // in this case, so we do too. - UBool success = TRUE; + UBool success = true; for (;;) { UChar32 captureGroupChar = captureGroupItr.next(); if (captureGroupChar == U_SENTINEL) { - success = TRUE; + success = true; break; } UChar32 inputChar = inputItr.next(); if (inputChar == U_SENTINEL) { - success = FALSE; - fHitEnd = TRUE; + success = false; + fHitEnd = true; break; } if (inputChar != captureGroupChar) { - success = FALSE; + success = false; break; } } @@ -5204,7 +5204,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu // We obtained a match by consuming part of a string obtained from // case-folding a single code point of the input text. // This does not count as an overall match. - success = FALSE; + success = false; } if (success) { @@ -5291,7 +5291,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu break; } } else { - fHitEnd = TRUE; + fHitEnd = true; } fp = (REStackFrame *)fStack->popFrame(fFrameSize); break; @@ -5313,22 +5313,22 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu UChar32 cText; UChar32 cPattern; - UBool success = TRUE; + UBool success = true; int32_t patternStringIdx = 0; CaseFoldingUCharIterator inputIterator(inputBuf, fp->fInputIdx, fActiveLimit); while (patternStringIdx < patternStringLen) { U16_NEXT(patternString, patternStringIdx, patternStringLen, cPattern); cText = inputIterator.next(); if (cText != cPattern) { - success = FALSE; + success = false; if (cText == U_SENTINEL) { - fHitEnd = TRUE; + fHitEnd = true; } break; } } if (inputIterator.inExpansion()) { - success = FALSE; + success = false; } if (success) { @@ -5540,18 +5540,18 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu int32_t ix = (int32_t)fp->fInputIdx; for (;;) { if (ix >= fActiveLimit) { - fHitEnd = TRUE; + fHitEnd = true; break; } UChar32 c; U16_NEXT(inputBuf, ix, fActiveLimit, c); if (c<256) { - if (s8->contains(c) == FALSE) { + if (s8->contains(c) == false) { U16_BACK_1(inputBuf, 0, ix); break; } } else { - if (s->contains(c) == FALSE) { + if (s->contains(c) == false) { U16_BACK_1(inputBuf, 0, ix); break; } @@ -5595,14 +5595,14 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu if ((opValue & 1) == 1) { // Dot-matches-All mode. Jump straight to the end of the string. ix = (int32_t)fActiveLimit; - fHitEnd = TRUE; + fHitEnd = true; } else { // NOT DOT ALL mode. Line endings do not match '.' // Scan forward until a line ending or end of input. ix = (int32_t)fp->fInputIdx; for (;;) { if (ix >= fActiveLimit) { - fHitEnd = TRUE; + fHitEnd = true; break; } UChar32 c; @@ -5694,7 +5694,7 @@ void RegexMatcher::MatchChunkAt(int32_t startIdx, UBool toEnd, UErrorCode &statu } if (U_FAILURE(status)) { - isMatch = FALSE; + isMatch = false; break; } } diff --git a/icu4c/source/i18n/remtrans.cpp b/icu4c/source/i18n/remtrans.cpp index 03b878575ca..957ac480fbf 100644 --- a/icu4c/source/i18n/remtrans.cpp +++ b/icu4c/source/i18n/remtrans.cpp @@ -37,14 +37,14 @@ static Transliterator* RemoveTransliterator_create(const UnicodeString& /*ID*/, */ void RemoveTransliterator::registerIDs() { - Transliterator::_registerFactory(UnicodeString(TRUE, ::CURR_ID, -1), + Transliterator::_registerFactory(UnicodeString(true, ::CURR_ID, -1), RemoveTransliterator_create, integerToken(0)); Transliterator::_registerSpecialInverse(UNICODE_STRING_SIMPLE("Remove"), - UNICODE_STRING_SIMPLE("Null"), FALSE); + UNICODE_STRING_SIMPLE("Null"), false); } -RemoveTransliterator::RemoveTransliterator() : Transliterator(UnicodeString(TRUE, ::CURR_ID, -1), 0) {} +RemoveTransliterator::RemoveTransliterator() : Transliterator(UnicodeString(true, ::CURR_ID, -1), 0) {} RemoveTransliterator::~RemoveTransliterator() {} diff --git a/icu4c/source/i18n/repattrn.cpp b/icu4c/source/i18n/repattrn.cpp index 8c94948d29a..0ef85bdf6ce 100644 --- a/icu4c/source/i18n/repattrn.cpp +++ b/icu4c/source/i18n/repattrn.cpp @@ -79,7 +79,7 @@ RegexPattern &RegexPattern::operator = (const RegexPattern &other) { if (other.fPatternString == NULL) { fPatternString = NULL; - fPattern = utext_clone(fPattern, other.fPattern, FALSE, TRUE, &fDeferredStatus); + fPattern = utext_clone(fPattern, other.fPattern, false, true, &fDeferredStatus); } else { fPatternString = new UnicodeString(*(other.fPatternString)); if (fPatternString == NULL) { @@ -179,7 +179,7 @@ void RegexPattern::init() { fInitialChars = NULL; fInitialChar = 0; fInitialChars8 = NULL; - fNeedsAltInput = FALSE; + fNeedsAltInput = false; fNamedCaptureMap = NULL; fPattern = NULL; // will be set later @@ -524,7 +524,7 @@ UBool U_EXPORT2 RegexPattern::matches(const UnicodeString ®ex, UParseError &pe, UErrorCode &status) { - if (U_FAILURE(status)) {return FALSE;} + if (U_FAILURE(status)) {return false;} UBool retVal; RegexPattern *pat = NULL; @@ -548,9 +548,9 @@ UBool U_EXPORT2 RegexPattern::matches(UText *regex, UParseError &pe, UErrorCode &status) { - if (U_FAILURE(status)) {return FALSE;} + if (U_FAILURE(status)) {return false;} - UBool retVal = FALSE; + UBool retVal = false; RegexPattern *pat = NULL; RegexMatcher *matcher = NULL; @@ -788,7 +788,7 @@ void RegexPattern::dumpOp(int32_t index) const { { UnicodeString s; UnicodeSet *set = (UnicodeSet *)fSets->elementAt(val); - set->toPattern(s, TRUE); + set->toPattern(s, true); printf("%s", CStr(s)()); } break; @@ -802,7 +802,7 @@ void RegexPattern::dumpOp(int32_t index) const { val &= ~URX_NEG_SET; } UnicodeSet &set = RegexStaticSets::gStaticSets->fPropSets[val]; - set.toPattern(s, TRUE); + set.toPattern(s, true); printf("%s", CStr(s)()); } break; @@ -833,7 +833,7 @@ void RegexPattern::dumpPattern() const { printf(" Initial match string: \"%s\"\n", CStr(initialString)()); } else if (fStartType == START_SET) { UnicodeString s; - fInitialChars->toPattern(s, TRUE); + fInitialChars->toPattern(s, true); printf(" Match First Chars: %s\n", CStr(s)()); } else if (fStartType == START_CHAR) { diff --git a/icu4c/source/i18n/rulebasedcollator.cpp b/icu4c/source/i18n/rulebasedcollator.cpp index 5f771468d1a..a240295b679 100644 --- a/icu4c/source/i18n/rulebasedcollator.cpp +++ b/icu4c/source/i18n/rulebasedcollator.cpp @@ -84,7 +84,7 @@ FixedSortKeyByteSink::AppendBeyondCapacity(const char *bytes, int32_t /*n*/, int UBool FixedSortKeyByteSink::Resize(int32_t /*appendCapacity*/, int32_t /*length*/) { - return FALSE; + return false; } } // namespace @@ -117,7 +117,7 @@ CollationKeyByteSink::AppendBeyondCapacity(const char *bytes, int32_t n, int32_t UBool CollationKeyByteSink::Resize(int32_t appendCapacity, int32_t length) { if (buffer_ == NULL) { - return FALSE; // allocation failed before already + return false; // allocation failed before already } int32_t newCapacity = 2 * capacity_; int32_t altCapacity = length + 2 * appendCapacity; @@ -130,11 +130,11 @@ CollationKeyByteSink::Resize(int32_t appendCapacity, int32_t length) { uint8_t *newBuffer = key_.reallocate(newCapacity, length); if (newBuffer == NULL) { SetNotOk(); - return FALSE; + return false; } buffer_ = reinterpret_cast(newBuffer); capacity_ = newCapacity; - return TRUE; + return true; } RuleBasedCollator::RuleBasedCollator(const RuleBasedCollator &other) @@ -158,7 +158,7 @@ RuleBasedCollator::RuleBasedCollator(const uint8_t *bin, int32_t length, cacheEntry(NULL), validLocale(""), explicitlySetAttributes(0), - actualLocaleIsSameAsValid(FALSE) { + actualLocaleIsSameAsValid(false) { if(U_FAILURE(errorCode)) { return; } if(bin == NULL || length == 0 || base == NULL) { errorCode = U_ILLEGAL_ARGUMENT_ERROR; @@ -188,7 +188,7 @@ RuleBasedCollator::RuleBasedCollator(const CollationCacheEntry *entry) cacheEntry(entry), validLocale(entry->validLocale), explicitlySetAttributes(0), - actualLocaleIsSameAsValid(FALSE) { + actualLocaleIsSameAsValid(false) { settings->addRef(); cacheEntry->addRef(); } @@ -217,7 +217,7 @@ RuleBasedCollator::adoptTailoring(CollationTailoring *t, UErrorCode &errorCode) tailoring = t; cacheEntry->addRef(); validLocale = t->actualLocale; - actualLocaleIsSameAsValid = FALSE; + actualLocaleIsSameAsValid = false; } RuleBasedCollator * @@ -290,10 +290,10 @@ void RuleBasedCollator::setLocales(const Locale &requested, const Locale &valid, const Locale &actual) { if(actual == tailoring->actualLocale) { - actualLocaleIsSameAsValid = FALSE; + actualLocaleIsSameAsValid = false; } else { U_ASSERT(actual == valid); - actualLocaleIsSameAsValid = TRUE; + actualLocaleIsSameAsValid = true; } // Do not modify tailoring.actualLocale: // We cannot be sure that that would be thread-safe. @@ -399,7 +399,7 @@ RuleBasedCollator::internalGetContractionsAndExpansions( void RuleBasedCollator::internalAddContractions(UChar32 c, UnicodeSet &set, UErrorCode &errorCode) const { if(U_FAILURE(errorCode)) { return; } - ContractionsAndExpansions(&set, NULL, NULL, FALSE).forCodePoint(data, c, errorCode); + ContractionsAndExpansions(&set, NULL, NULL, false).forCodePoint(data, c, errorCode); } const CollationSettings & @@ -898,7 +898,7 @@ protected: class FCDUTF8NFDIterator : public NFDIterator { public: FCDUTF8NFDIterator(const CollationData *data, const uint8_t *text, int32_t textLength) - : u8ci(data, FALSE, text, 0, textLength) {} + : u8ci(data, false, text, 0, textLength) {} protected: virtual UChar32 nextRawCodePoint() override { UErrorCode errorCode = U_ZERO_ERROR; @@ -922,7 +922,7 @@ private: class FCDUIterNFDIterator : public NFDIterator { public: FCDUIterNFDIterator(const CollationData *data, UCharIterator &it, int32_t startIndex) - : uici(data, FALSE, it, startIndex) {} + : uici(data, false, it, startIndex) {} protected: virtual UChar32 nextRawCodePoint() override { UErrorCode errorCode = U_ZERO_ERROR; @@ -1122,7 +1122,7 @@ RuleBasedCollator::doCompare(const uint8_t *left, int32_t leftLength, UBool numeric = settings->isNumeric(); if(equalPrefixLength > 0) { - UBool unsafe = FALSE; + UBool unsafe = false; if(equalPrefixLength != leftLength) { int32_t i = equalPrefixLength; UChar32 c; @@ -1340,12 +1340,12 @@ RuleBasedCollator::writeSortKey(const UChar *s, int32_t length, UTF16CollationIterator iter(data, numeric, s, s, limit); CollationKeys::writeSortKeyUpToQuaternary(iter, data->compressibleBytes, *settings, sink, Collation::PRIMARY_LEVEL, - callback, TRUE, errorCode); + callback, true, errorCode); } else { FCDUTF16CollationIterator iter(data, numeric, s, s, limit); CollationKeys::writeSortKeyUpToQuaternary(iter, data->compressibleBytes, *settings, sink, Collation::PRIMARY_LEVEL, - callback, TRUE, errorCode); + callback, true, errorCode); } if(settings->getStrength() == UCOL_IDENTICAL) { writeIdenticalLevel(s, limit, sink, errorCode); @@ -1404,9 +1404,9 @@ public: // Remember a level that will be at least partially written. level = l; levelCapacity = sink.GetRemainingCapacity(); - return TRUE; + return true; } else { - return FALSE; + return false; } } Collation::Level getLevel() const { return level; } @@ -1441,11 +1441,11 @@ RuleBasedCollator::internalNextSortKeyPart(UCharIterator *iter, uint32_t state[2 if(settings->dontCheckFCD()) { UIterCollationIterator ci(data, numeric, *iter); CollationKeys::writeSortKeyUpToQuaternary(ci, data->compressibleBytes, *settings, - sink, level, callback, FALSE, errorCode); + sink, level, callback, false, errorCode); } else { FCDUIterCollationIterator ci(data, numeric, *iter, 0); CollationKeys::writeSortKeyUpToQuaternary(ci, data->compressibleBytes, *settings, - sink, level, callback, FALSE, errorCode); + sink, level, callback, false, errorCode); } if(U_FAILURE(errorCode)) { return 0; } if(sink.NumberOfBytesAppended() > count) { diff --git a/icu4c/source/i18n/scientificnumberformatter.cpp b/icu4c/source/i18n/scientificnumberformatter.cpp index 6c2cb3aeed2..99b990708ab 100644 --- a/icu4c/source/i18n/scientificnumberformatter.cpp +++ b/icu4c/source/i18n/scientificnumberformatter.cpp @@ -42,19 +42,19 @@ static UBool copyAsSuperscript( UnicodeString &result, UErrorCode &status) { if (U_FAILURE(status)) { - return FALSE; + return false; } for (int32_t i = beginIndex; i < endIndex;) { UChar32 c = s.char32At(i); int32_t digit = u_charDigitValue(c); if (digit < 0) { status = U_INVALID_CHAR_FOUND; - return FALSE; + return false; } result.append(kSuperscriptDigits[digit]); i += U16_LENGTH(c); } - return TRUE; + return true; } ScientificNumberFormatter *ScientificNumberFormatter::createSuperscriptInstance( diff --git a/icu4c/source/i18n/scriptset.cpp b/icu4c/source/i18n/scriptset.cpp index 6a1db8c01c3..236bf9d37f1 100644 --- a/icu4c/source/i18n/scriptset.cpp +++ b/icu4c/source/i18n/scriptset.cpp @@ -55,11 +55,11 @@ bool ScriptSet::operator == (const ScriptSet &other) const { UBool ScriptSet::test(UScriptCode script, UErrorCode &status) const { if (U_FAILURE(status)) { - return FALSE; + return false; } if (script < 0 || (int32_t)script >= SCRIPT_LIMIT) { status = U_ILLEGAL_ARGUMENT_ERROR; - return FALSE; + return false; } uint32_t index = script / 32; uint32_t bit = 1 << (script & 31); @@ -188,19 +188,19 @@ int32_t ScriptSet::nextSetBit(int32_t fromIndex) const { UBool ScriptSet::isEmpty() const { for (uint32_t i=0; i= 0; i = nextSetBit(i + 1)) { if (!firstTime) { dest.append((UChar)0x20); } - firstTime = FALSE; + firstTime = false; const char *scriptName = uscript_getShortName((UScriptCode(i))); dest.append(UnicodeString(scriptName, -1, US_INV)); } @@ -248,7 +248,7 @@ void ScriptSet::setScriptExtensions(UChar32 codePoint, UErrorCode& status) { UErrorCode internalStatus = U_ZERO_ERROR; int32_t script_count = -1; - while (TRUE) { + while (true) { script_count = uscript_getScriptExtensions( codePoint, scripts.getAlias(), scripts.getCapacity(), &internalStatus); if (internalStatus == U_BUFFER_OVERFLOW_ERROR) { diff --git a/icu4c/source/i18n/search.cpp b/icu4c/source/i18n/search.cpp index 9e559bcc71f..56d9b744098 100644 --- a/icu4c/source/i18n/search.cpp +++ b/icu4c/source/i18n/search.cpp @@ -55,10 +55,10 @@ void SearchIterator::setAttribute(USearchAttribute attribute, switch (attribute) { case USEARCH_OVERLAP : - m_search_->isOverlap = (value == USEARCH_ON ? TRUE : FALSE); + m_search_->isOverlap = (value == USEARCH_ON ? true : false); break; case USEARCH_CANONICAL_MATCH : - m_search_->isCanonicalMatch = (value == USEARCH_ON ? TRUE : FALSE); + m_search_->isCanonicalMatch = (value == USEARCH_ON ? true : false); break; case USEARCH_ELEMENT_COMPARISON : if (value == USEARCH_PATTERN_BASE_WEIGHT_IS_WILDCARD || value == USEARCH_ANY_BASE_WEIGHT_IS_WILDCARD) { @@ -81,9 +81,9 @@ USearchAttributeValue SearchIterator::getAttribute( { switch (attribute) { case USEARCH_OVERLAP : - return (m_search_->isOverlap == TRUE ? USEARCH_ON : USEARCH_OFF); + return (m_search_->isOverlap == true ? USEARCH_ON : USEARCH_OFF); case USEARCH_CANONICAL_MATCH : - return (m_search_->isCanonicalMatch == TRUE ? USEARCH_ON : + return (m_search_->isCanonicalMatch == true ? USEARCH_ON : USEARCH_OFF); case USEARCH_ELEMENT_COMPARISON : { @@ -241,8 +241,8 @@ int32_t SearchIterator::next(UErrorCode &status) int32_t offset = getOffset(); int32_t matchindex = m_search_->matchedIndex; int32_t matchlength = m_search_->matchedLength; - m_search_->reset = FALSE; - if (m_search_->isForwardSearching == TRUE) { + m_search_->reset = false; + if (m_search_->isForwardSearching == true) { int32_t textlength = m_search_->textLength; if (offset == textlength || matchindex == textlength || (matchindex != USEARCH_DONE && @@ -258,7 +258,7 @@ int32_t SearchIterator::next(UErrorCode &status) // setOffset has been called or that previous ran off the text // string. the iterator would have been set to offset 0 if a // match is not found. - m_search_->isForwardSearching = TRUE; + m_search_->isForwardSearching = true; if (m_search_->matchedIndex != USEARCH_DONE) { // there's no need to set the collation element iterator // the next call to next will set the offset. @@ -286,8 +286,8 @@ int32_t SearchIterator::previous(UErrorCode &status) int32_t offset; if (m_search_->reset) { offset = m_search_->textLength; - m_search_->isForwardSearching = FALSE; - m_search_->reset = FALSE; + m_search_->isForwardSearching = false; + m_search_->reset = false; setOffset(offset, status); } else { @@ -295,13 +295,13 @@ int32_t SearchIterator::previous(UErrorCode &status) } int32_t matchindex = m_search_->matchedIndex; - if (m_search_->isForwardSearching == TRUE) { + if (m_search_->isForwardSearching == true) { // switching direction. // if matchedIndex == USEARCH_DONE, it means that either a // setOffset has been called or that next ran off the text // string. the iterator would have been set to offset textLength if // a match is not found. - m_search_->isForwardSearching = FALSE; + m_search_->isForwardSearching = false; if (matchindex != USEARCH_DONE) { return matchindex; } @@ -333,11 +333,11 @@ void SearchIterator::reset() UErrorCode status = U_ZERO_ERROR; setMatchNotFound(); setOffset(0, status); - m_search_->isOverlap = FALSE; - m_search_->isCanonicalMatch = FALSE; + m_search_->isOverlap = false; + m_search_->isCanonicalMatch = false; m_search_->elementComparisonType = 0; - m_search_->isForwardSearching = TRUE; - m_search_->reset = TRUE; + m_search_->isForwardSearching = true; + m_search_->reset = true; } // protected constructors and destructors ----------------------------- @@ -346,11 +346,11 @@ SearchIterator::SearchIterator() { m_search_ = (USearch *)uprv_malloc(sizeof(USearch)); m_search_->breakIter = NULL; - m_search_->isOverlap = FALSE; - m_search_->isCanonicalMatch = FALSE; + m_search_->isOverlap = false; + m_search_->isCanonicalMatch = false; m_search_->elementComparisonType = 0; - m_search_->isForwardSearching = TRUE; - m_search_->reset = TRUE; + m_search_->isForwardSearching = true; + m_search_->reset = true; m_search_->matchedIndex = USEARCH_DONE; m_search_->matchedLength = 0; m_search_->text = NULL; @@ -365,11 +365,11 @@ SearchIterator::SearchIterator(const UnicodeString &text, { m_search_ = (USearch *)uprv_malloc(sizeof(USearch)); m_search_->breakIter = NULL; - m_search_->isOverlap = FALSE; - m_search_->isCanonicalMatch = FALSE; + m_search_->isOverlap = false; + m_search_->isCanonicalMatch = false; m_search_->elementComparisonType = 0; - m_search_->isForwardSearching = TRUE; - m_search_->reset = TRUE; + m_search_->isForwardSearching = true; + m_search_->reset = true; m_search_->matchedIndex = USEARCH_DONE; m_search_->matchedLength = 0; m_search_->text = m_text_.getBuffer(); @@ -382,11 +382,11 @@ SearchIterator::SearchIterator(CharacterIterator &text, { m_search_ = (USearch *)uprv_malloc(sizeof(USearch)); m_search_->breakIter = NULL; - m_search_->isOverlap = FALSE; - m_search_->isCanonicalMatch = FALSE; + m_search_->isOverlap = false; + m_search_->isCanonicalMatch = false; m_search_->elementComparisonType = 0; - m_search_->isForwardSearching = TRUE; - m_search_->reset = TRUE; + m_search_->isForwardSearching = true; + m_search_->reset = true; m_search_->matchedIndex = USEARCH_DONE; m_search_->matchedLength = 0; text.getText(m_text_); diff --git a/icu4c/source/i18n/selfmt.cpp b/icu4c/source/i18n/selfmt.cpp index bb18e84ef65..9928d284c9f 100644 --- a/icu4c/source/i18n/selfmt.cpp +++ b/icu4c/source/i18n/selfmt.cpp @@ -129,7 +129,7 @@ int32_t SelectFormat::findSubMessage(const MessagePattern& pattern, int32_t part if (U_FAILURE(ec)) { return 0; } - UnicodeString other(FALSE, SELECT_KEYWORD_OTHER, 5); + UnicodeString other(false, SELECT_KEYWORD_OTHER, 5); int32_t count = pattern.countParts(); int32_t msgStart=0; // Iterate over (ARG_SELECTOR, message) pairs until ARG_LIMIT or end of select-only pattern. diff --git a/icu4c/source/i18n/simpletz.cpp b/icu4c/source/i18n/simpletz.cpp index 0036effcd84..77403e48074 100644 --- a/icu4c/source/i18n/simpletz.cpp +++ b/icu4c/source/i18n/simpletz.cpp @@ -76,7 +76,7 @@ SimpleTimeZone::SimpleTimeZone(int32_t rawOffsetGMT, const UnicodeString& ID) endTime(0), startYear(0), rawOffset(rawOffsetGMT), - useDaylight(FALSE), + useDaylight(false), startMode(DOM_MODE), endMode(DOM_MODE), dstSavings(U_MILLIS_PER_HOUR) @@ -262,7 +262,7 @@ void SimpleTimeZone::setStartYear(int32_t year) { startYear = year; - transitionRulesInitialized = FALSE; + transitionRulesInitialized = false; } // ------------------------------------- @@ -316,7 +316,7 @@ SimpleTimeZone::setStartRule(int32_t month, int32_t dayOfWeekInMonth, int32_t da startTime = time; startTimeMode = mode; decodeStartRule(status); - transitionRulesInitialized = FALSE; + transitionRulesInitialized = false; } // ------------------------------------- @@ -368,7 +368,7 @@ SimpleTimeZone::setEndRule(int32_t month, int32_t dayOfWeekInMonth, int32_t dayO endTime = time; endTimeMode = mode; decodeEndRule(status); - transitionRulesInitialized = FALSE; + transitionRulesInitialized = false; } // ------------------------------------- @@ -531,20 +531,20 @@ SimpleTimeZone::getOffsetFromLocal(UDate date, UTimeZoneLocalOption nonExistingT return; } - UBool recalc = FALSE; + UBool recalc = false; // Now we need some adjustment if (savingsDST > 0) { if ((nonExistingTimeOpt & kStdDstMask) == kStandard || ((nonExistingTimeOpt & kStdDstMask) != kDaylight && (nonExistingTimeOpt & kFormerLatterMask) != kLatter)) { date -= getDSTSavings(); - recalc = TRUE; + recalc = true; } } else { if ((duplicatedTimeOpt & kStdDstMask) == kDaylight || ((duplicatedTimeOpt & kStdDstMask) != kStandard && (duplicatedTimeOpt & kFormerLatterMask) == kFormer)) { date -= getDSTSavings(); - recalc = TRUE; + recalc = true; } } if (recalc) { @@ -679,7 +679,7 @@ void SimpleTimeZone::setRawOffset(int32_t offsetMillis) { rawOffset = offsetMillis; - transitionRulesInitialized = FALSE; + transitionRulesInitialized = false; } // ------------------------------------- @@ -693,7 +693,7 @@ SimpleTimeZone::setDSTSavings(int32_t millisSavedDuringDST, UErrorCode& status) else { dstSavings = millisSavedDuringDST; } - transitionRulesInitialized = FALSE; + transitionRulesInitialized = false; } // ------------------------------------- @@ -723,12 +723,12 @@ UBool SimpleTimeZone::inDaylightTime(UDate date, UErrorCode& status) const // This method is wasteful since it creates a new GregorianCalendar and // deletes it each time it is called. However, this is a deprecated method // and provided only for Java compatibility as of 8/6/97 [LIU]. - if (U_FAILURE(status)) return FALSE; + if (U_FAILURE(status)) return false; GregorianCalendar *gc = new GregorianCalendar(*this, status); /* test for NULL */ if (gc == 0) { status = U_MEMORY_ALLOCATION_ERROR; - return FALSE; + return false; } gc->setTime(date, status); UBool result = gc->inDaylightTime(status); @@ -746,8 +746,8 @@ UBool SimpleTimeZone::inDaylightTime(UDate date, UErrorCode& status) const UBool SimpleTimeZone::hasSameRules(const TimeZone& other) const { - if (this == &other) return TRUE; - if (typeid(*this) != typeid(other)) return FALSE; + if (this == &other) return true; + if (typeid(*this) != typeid(other)) return false; SimpleTimeZone *that = (SimpleTimeZone*)&other; return rawOffset == that->rawOffset && useDaylight == that->useDaylight && @@ -870,7 +870,7 @@ SimpleTimeZone::decodeStartRule(UErrorCode& status) { if(U_FAILURE(status)) return; - useDaylight = (UBool)((startDay != 0) && (endDay != 0) ? TRUE : FALSE); + useDaylight = (UBool)((startDay != 0) && (endDay != 0) ? true : false); if (useDaylight && dstSavings == 0) { dstSavings = U_MILLIS_PER_HOUR; } @@ -925,7 +925,7 @@ SimpleTimeZone::decodeEndRule(UErrorCode& status) { if(U_FAILURE(status)) return; - useDaylight = (UBool)((startDay != 0) && (endDay != 0) ? TRUE : FALSE); + useDaylight = (UBool)((startDay != 0) && (endDay != 0) ? true : false); if (useDaylight && dstSavings == 0) { dstSavings = U_MILLIS_PER_HOUR; } @@ -973,13 +973,13 @@ SimpleTimeZone::decodeEndRule(UErrorCode& status) UBool SimpleTimeZone::getNextTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const { if (!useDaylight) { - return FALSE; + return false; } UErrorCode status = U_ZERO_ERROR; checkTransitionRules(status); if (U_FAILURE(status)) { - return FALSE; + return false; } UDate firstTransitionTime = firstTransition->getTime(); @@ -993,32 +993,32 @@ SimpleTimeZone::getNextTransition(UDate base, UBool inclusive, TimeZoneTransitio result.setTime(stdDate); result.setFrom((const TimeZoneRule&)*dstRule); result.setTo((const TimeZoneRule&)*stdRule); - return TRUE; + return true; } if (dstAvail && (!stdAvail || dstDate < stdDate)) { result.setTime(dstDate); result.setFrom((const TimeZoneRule&)*stdRule); result.setTo((const TimeZoneRule&)*dstRule); - return TRUE; + return true; } - return FALSE; + return false; } UBool SimpleTimeZone::getPreviousTransition(UDate base, UBool inclusive, TimeZoneTransition& result) const { if (!useDaylight) { - return FALSE; + return false; } UErrorCode status = U_ZERO_ERROR; checkTransitionRules(status); if (U_FAILURE(status)) { - return FALSE; + return false; } UDate firstTransitionTime = firstTransition->getTime(); if (base < firstTransitionTime || (!inclusive && base == firstTransitionTime)) { - return FALSE; + return false; } UDate stdDate, dstDate; UBool stdAvail = stdRule->getPreviousStart(base, dstRule->getRawOffset(), dstRule->getDSTSavings(), inclusive, stdDate); @@ -1027,15 +1027,15 @@ SimpleTimeZone::getPreviousTransition(UDate base, UBool inclusive, TimeZoneTrans result.setTime(stdDate); result.setFrom((const TimeZoneRule&)*dstRule); result.setTo((const TimeZoneRule&)*stdRule); - return TRUE; + return true; } if (dstAvail && (!stdAvail || dstDate > stdDate)) { result.setTime(dstDate); result.setFrom((const TimeZoneRule&)*stdRule); result.setTo((const TimeZoneRule&)*dstRule); - return TRUE; + return true; } - return FALSE; + return false; } void @@ -1044,7 +1044,7 @@ SimpleTimeZone::clearTransitionRules(void) { firstTransition = NULL; stdRule = NULL; dstRule = NULL; - transitionRulesInitialized = FALSE; + transitionRulesInitialized = false; } void @@ -1222,7 +1222,7 @@ SimpleTimeZone::initTransitionRules(UErrorCode& status) { } } - transitionRulesInitialized = TRUE; + transitionRulesInitialized = true; } int32_t diff --git a/icu4c/source/i18n/smpdtfmt.cpp b/icu4c/source/i18n/smpdtfmt.cpp index 841bb725fa6..72ba0c0bfc7 100644 --- a/icu4c/source/i18n/smpdtfmt.cpp +++ b/icu4c/source/i18n/smpdtfmt.cpp @@ -263,12 +263,12 @@ void SimpleDateFormat::NSOverride::free() { // to modify it so that it doesn't use thousands separators, doesn't always // show the decimal point, and recognizes integers only when parsing static void fixNumberFormatForDates(NumberFormat &nf) { - nf.setGroupingUsed(FALSE); + nf.setGroupingUsed(false); DecimalFormat* decfmt = dynamic_cast(&nf); if (decfmt != NULL) { - decfmt->setDecimalSeparatorAlwaysShown(FALSE); + decfmt->setDecimalSeparatorAlwaysShown(false); } - nf.setParseIntegerOnly(TRUE); + nf.setParseIntegerOnly(true); nf.setMinimumFractionDigits(0); // To prevent "Jan 1.00, 1997.00" } @@ -701,7 +701,7 @@ void SimpleDateFormat::construct(EStyle timeStyle, LocalUResourceBundlePointer bundle(ures_open(NULL, locale.getBaseName(), &status)); if (U_FAILURE(status)) return; - UBool cTypeIsGregorian = TRUE; + UBool cTypeIsGregorian = true; LocalUResourceBundlePointer dateTimePatterns; if (cType != NULL && uprv_strcmp(cType, "gregorian") != 0) { CharString resourcePath("calendar/", status); @@ -709,7 +709,7 @@ void SimpleDateFormat::construct(EStyle timeStyle, dateTimePatterns.adoptInstead( ures_getByKeyWithFallback(bundle.getAlias(), resourcePath.data(), (UResourceBundle*)NULL, &status)); - cTypeIsGregorian = FALSE; + cTypeIsGregorian = false; } // Check for "gregorian" fallback. @@ -776,7 +776,7 @@ void SimpleDateFormat::construct(EStyle timeStyle, // region preferences anyway. LocalPointer dtpg(DateTimePatternGenerator::createInstanceNoStdPat(locale, useStatus)); if (U_SUCCESS(useStatus)) { - UnicodeString timeSkeleton(TRUE, timeSkeletons[timeStyle], -1); + UnicodeString timeSkeleton(true, timeSkeletons[timeStyle], -1); timePattern = dtpg->getBestPattern(timeSkeleton, useStatus); } } @@ -805,7 +805,7 @@ void SimpleDateFormat::construct(EStyle timeStyle, case URES_ARRAY: { resStr = ures_getStringByIndex(currentBundle.getAlias(), 0, &resStrLen, &status); ovrStr = ures_getStringByIndex(currentBundle.getAlias(), 1, &ovrStrLen, &status); - fTimeOverride.setTo(TRUE, ovrStr, ovrStrLen); + fTimeOverride.setTo(true, ovrStr, ovrStrLen); break; } default: { @@ -814,7 +814,7 @@ void SimpleDateFormat::construct(EStyle timeStyle, } } - tempus1.setTo(TRUE, resStr, resStrLen); + tempus1.setTo(true, resStr, resStrLen); } currentBundle.adoptInstead( @@ -831,7 +831,7 @@ void SimpleDateFormat::construct(EStyle timeStyle, case URES_ARRAY: { resStr = ures_getStringByIndex(currentBundle.getAlias(), 0, &resStrLen, &status); ovrStr = ures_getStringByIndex(currentBundle.getAlias(), 1, &ovrStrLen, &status); - fDateOverride.setTo(TRUE, ovrStr, ovrStrLen); + fDateOverride.setTo(true, ovrStr, ovrStrLen); break; } default: { @@ -840,7 +840,7 @@ void SimpleDateFormat::construct(EStyle timeStyle, } } - UnicodeString tempus2(TRUE, resStr, resStrLen); + UnicodeString tempus2(true, resStr, resStrLen); // Currently, for compatibility with pre-CLDR-42 data, we default to the "atTime" // combining patterns. Depending on guidance in CLDR 42 spec and on DisplayOptions, @@ -873,7 +873,7 @@ void SimpleDateFormat::construct(EStyle timeStyle, resStr = ures_getStringByIndex(dateTimePatterns.getAlias(), glueIndex, &resStrLen, &status); } - SimpleFormatter(UnicodeString(TRUE, resStr, resStrLen), 2, 2, status). + SimpleFormatter(UnicodeString(true, resStr, resStrLen), 2, 2, status). format(tempus1, tempus2, fPattern, status); } // if the pattern includes just time data or just date date, load the appropriate @@ -896,7 +896,7 @@ void SimpleDateFormat::construct(EStyle timeStyle, case URES_ARRAY: { resStr = ures_getStringByIndex(currentBundle.getAlias(), 0, &resStrLen, &status); ovrStr = ures_getStringByIndex(currentBundle.getAlias(), 1, &ovrStrLen, &status); - fDateOverride.setTo(TRUE, ovrStr, ovrStrLen); + fDateOverride.setTo(true, ovrStr, ovrStrLen); break; } default: { @@ -904,7 +904,7 @@ void SimpleDateFormat::construct(EStyle timeStyle, return; } } - fPattern.setTo(TRUE, resStr, resStrLen); + fPattern.setTo(true, resStr, resStrLen); } } else if (dateStyle != kNone) { @@ -922,7 +922,7 @@ void SimpleDateFormat::construct(EStyle timeStyle, case URES_ARRAY: { resStr = ures_getStringByIndex(currentBundle.getAlias(), 0, &resStrLen, &status); ovrStr = ures_getStringByIndex(currentBundle.getAlias(), 1, &ovrStrLen, &status); - fDateOverride.setTo(TRUE, ovrStr, ovrStrLen); + fDateOverride.setTo(true, ovrStr, ovrStrLen); break; } default: { @@ -930,7 +930,7 @@ void SimpleDateFormat::construct(EStyle timeStyle, return; } } - fPattern.setTo(TRUE, resStr, resStrLen); + fPattern.setTo(true, resStr, resStrLen); } // and if it includes _neither_, that's an error @@ -976,7 +976,7 @@ SimpleDateFormat::initialize(const Locale& locale, if (fNumberFormat != NULL && U_SUCCESS(status)) { fixNumberFormatForDates(*fNumberFormat); - //fNumberFormat->setLenient(TRUE); // Java uses a custom DateNumberFormat to format/parse + //fNumberFormat->setLenient(true); // Java uses a custom DateNumberFormat to format/parse initNumberFormatters(locale, status); initFastNumberFormatters(status); @@ -1033,7 +1033,7 @@ void SimpleDateFormat::parseAmbiguousDatesAsAfter(UDate startDate, UErrorCode& s fCalendar->setTime(startDate, status); if(U_SUCCESS(status)) { - fHaveDefaultCentury = TRUE; + fHaveDefaultCentury = true; fDefaultCenturyStart = startDate; fDefaultCenturyStartYear = fCalendar->get(UCAL_YEAR, status); } @@ -1086,7 +1086,7 @@ SimpleDateFormat::_format(Calendar& cal, UnicodeString& appendTo, } } - UBool inQuote = FALSE; + UBool inQuote = false; UChar prevCh = 0; int32_t count = 0; int32_t fieldNum = 0; @@ -1192,45 +1192,45 @@ int32_t SimpleDateFormat::getLevelFromChar(UChar ch) { UBool SimpleDateFormat::isSyntaxChar(UChar ch) { static const UBool mapCharToIsSyntax[] = { // - FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, + false, false, false, false, false, false, false, false, // - FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, + false, false, false, false, false, false, false, false, // - FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, + false, false, false, false, false, false, false, false, // - FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, + false, false, false, false, false, false, false, false, // ! " # $ % & ' - FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, + false, false, false, false, false, false, false, false, // ( ) * + , - . / - FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, + false, false, false, false, false, false, false, false, // 0 1 2 3 4 5 6 7 - FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, + false, false, false, false, false, false, false, false, #if UDAT_HAS_PATTERN_CHAR_FOR_TIME_SEPARATOR // 8 9 : ; < = > ? - FALSE, FALSE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, + false, false, true, false, false, false, false, false, #else // 8 9 : ; < = > ? - FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, + false, false, false, false, false, false, false, false, #endif // @ A B C D E F G - FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, + false, true, true, true, true, true, true, true, // H I J K L M N O - TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, + true, true, true, true, true, true, true, true, // P Q R S T U V W - TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, + true, true, true, true, true, true, true, true, // X Y Z [ \ ] ^ _ - TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE, + true, true, true, false, false, false, false, false, // ` a b c d e f g - FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, + false, true, true, true, true, true, true, true, // h i j k l m n o - TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, + true, true, true, true, true, true, true, true, // p q r s t u v w - TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, TRUE, + true, true, true, true, true, true, true, true, // x y z { | } ~ - TRUE, TRUE, TRUE, FALSE, FALSE, FALSE, FALSE, FALSE + true, true, true, false, false, false, false, false }; - return ch < UPRV_LENGTHOF(mapCharToIsSyntax) ? mapCharToIsSyntax[ch] : FALSE; + return ch < UPRV_LENGTHOF(mapCharToIsSyntax) ? mapCharToIsSyntax[ch] : false; } // Map index into pattern character string to Calendar field number. @@ -1399,13 +1399,13 @@ SimpleDateFormat::processOverrideString(const Locale &locale, const UnicodeStrin int32_t len; UnicodeString nsName; UnicodeString ovrField; - UBool moreToProcess = TRUE; + UBool moreToProcess = true; NSOverride *overrideList = NULL; while (moreToProcess) { int32_t delimiterPosition = str.indexOf((UChar)ULOC_KEYWORD_ITEM_SEPARATOR_UNICODE,start); if (delimiterPosition == -1) { - moreToProcess = FALSE; + moreToProcess = false; len = str.length() - start; } else { len = delimiterPosition - start; @@ -1424,11 +1424,11 @@ SimpleDateFormat::processOverrideString(const Locale &locale, const UnicodeStrin // See if the numbering system is in the override list, if not, then add it. NSOverride *curr = overrideList; const SharedNumberFormat *snf = NULL; - UBool found = FALSE; + UBool found = false; while ( curr && !found ) { if ( curr->hash == nsNameHash ) { snf = curr->snf; - found = TRUE; + found = true; } curr = curr->next; } @@ -2085,10 +2085,10 @@ SimpleDateFormat::subFormat(UnicodeString &appendTo, // if first field, check to see whether we need to and are able to titlecase it if (fieldNum == 0 && fCapitalizationBrkIter != NULL && appendTo.length() > beginOffset && u_islower(appendTo.char32At(beginOffset))) { - UBool titlecase = FALSE; + UBool titlecase = false; switch (capitalizationContext) { case UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE: - titlecase = TRUE; + titlecase = true; break; case UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU: titlecase = fSymbols->fCapitalization[capContextUsageType][0]; @@ -2097,7 +2097,7 @@ SimpleDateFormat::subFormat(UnicodeString &appendTo, titlecase = fSymbols->fCapitalization[capContextUsageType][1]; break; default: - // titlecase = FALSE; + // titlecase = false; break; } if (titlecase) { @@ -2251,13 +2251,13 @@ UBool SimpleDateFormat::isAtNumericField(const UnicodeString &pattern, int32_t patternOffset) { if (patternOffset >= pattern.length()) { // not at any field - return FALSE; + return false; } UChar ch = pattern.charAt(patternOffset); UDateFormatField f = DateFormatSymbols::getPatternCharIndex(ch); if (f == UDAT_FIELD_COUNT) { // not at any field - return FALSE; + return false; } int32_t i = patternOffset; while (pattern.charAt(++i) == ch) {} @@ -2268,13 +2268,13 @@ UBool SimpleDateFormat::isAfterNonNumericField(const UnicodeString &pattern, int32_t patternOffset) { if (patternOffset <= 0) { // not after any field - return FALSE; + return false; } UChar ch = pattern.charAt(--patternOffset); UDateFormatField f = DateFormatSymbols::getPatternCharIndex(ch); if (f == UDAT_FIELD_COUNT) { // not after any field - return FALSE; + return false; } int32_t i = patternOffset; while (pattern.charAt(--i) == ch) {} @@ -2296,7 +2296,7 @@ SimpleDateFormat::parse(const UnicodeString& text, Calendar& cal, ParsePosition& // the hour to interpret time correctly. int32_t dayPeriodInt = -1; - UBool ambiguousYear[] = { FALSE }; + UBool ambiguousYear[] = { false }; int32_t saveHebrewMonth = -1; int32_t count = 0; UTimeZoneFormatTimeType tzTimeType = UTZFMT_TIME_TYPE_UNKNOWN; @@ -2309,7 +2309,7 @@ SimpleDateFormat::parse(const UnicodeString& text, Calendar& cal, ParsePosition& int32_t abutPat = -1; // If >=0, we are in a run of abutting numeric fields int32_t abutStart = 0; int32_t abutPass = 0; - UBool inQuote = FALSE; + UBool inQuote = false; MessageFormat * numericLeapMonthFormatter = NULL; @@ -2393,7 +2393,7 @@ SimpleDateFormat::parse(const UnicodeString& text, Calendar& cal, ParsePosition& } pos = subParse(text, pos, ch, count, - TRUE, FALSE, ambiguousYear, saveHebrewMonth, *workCal, i, numericLeapMonthFormatter, &tzTimeType); + true, false, ambiguousYear, saveHebrewMonth, *workCal, i, numericLeapMonthFormatter, &tzTimeType); // If the parse fails anywhere in the run, back up to the // start of the run and retry. @@ -2408,7 +2408,7 @@ SimpleDateFormat::parse(const UnicodeString& text, Calendar& cal, ParsePosition& // fields. else if (ch != 0x6C) { // pattern char 'l' (SMALL LETTER L) just gets ignored int32_t s = subParse(text, pos, ch, count, - FALSE, TRUE, ambiguousYear, saveHebrewMonth, *workCal, i, numericLeapMonthFormatter, &tzTimeType, &dayPeriodInt); + false, true, ambiguousYear, saveHebrewMonth, *workCal, i, numericLeapMonthFormatter, &tzTimeType, &dayPeriodInt); if (s == -pos-1) { // era not present, in special cases allow this to continue @@ -2617,7 +2617,7 @@ SimpleDateFormat::parse(const UnicodeString& text, Calendar& cal, ParsePosition& } else { // No good way to resolve ambiguous time at transition, // but following code work in most case. - tz.getOffset(localMillis, TRUE, raw, dst, status); + tz.getOffset(localMillis, true, raw, dst, status); } // Now, compare the results with parsed type, either standard or daylight saving time @@ -2640,7 +2640,7 @@ SimpleDateFormat::parse(const UnicodeString& text, Calendar& cal, ParsePosition& // Search for DST rule after the given time while (time < limit) { - trsAvail = btz->getNextTransition(time, FALSE, trs); + trsAvail = btz->getNextTransition(time, false, trs); if (!trsAvail) { break; } @@ -2657,7 +2657,7 @@ SimpleDateFormat::parse(const UnicodeString& text, Calendar& cal, ParsePosition& time = baseTime; limit = baseTime - MAX_DAYLIGHT_DETECTION_RANGE; while (time > limit) { - trsAvail = btz->getPreviousTransition(time, TRUE, trs); + trsAvail = btz->getPreviousTransition(time, true, trs); if (!trsAvail) { break; } @@ -2782,7 +2782,7 @@ UBool SimpleDateFormat::matchLiterals(const UnicodeString &pattern, UBool partialMatchLenient, UBool oldLeniency) { - UBool inQuote = FALSE; + UBool inQuote = false; UnicodeString literal; int32_t i = patternOffset; @@ -2824,10 +2824,10 @@ UBool SimpleDateFormat::matchLiterals(const UnicodeString &pattern, } for (p = 0; p < literal.length() && t < text.length();) { - UBool needWhitespace = FALSE; + UBool needWhitespace = false; while (p < literal.length() && PatternProps::isWhiteSpace(literal.charAt(p))) { - needWhitespace = TRUE; + needWhitespace = true; p += 1; } @@ -2850,7 +2850,7 @@ UBool SimpleDateFormat::matchLiterals(const UnicodeString &pattern, if (!whitespaceLenient && t == tStart) { // didn't find matching whitespace: // an error in strict mode - return FALSE; + return false; } // In strict mode, this run of whitespace @@ -2884,7 +2884,7 @@ UBool SimpleDateFormat::matchLiterals(const UnicodeString &pattern, break; } - return FALSE; + return false; } ++p; ++t; @@ -2915,7 +2915,7 @@ UBool SimpleDateFormat::matchLiterals(const UnicodeString &pattern, patternOffset = i - 1; textOffset = t; - return TRUE; + return true; } //---------------------------------------------------------------------- @@ -3079,7 +3079,7 @@ int32_t SimpleDateFormat::subParse(const UnicodeString& text, int32_t& start, UC UDateFormatField patternCharIndex = DateFormatSymbols::getPatternCharIndex(ch); const NumberFormat *currentNumberFormat; UnicodeString temp; - UBool gotNumber = FALSE; + UBool gotNumber = false; #if defined (U_DEBUG_CAL) //fprintf(stderr, "%s:%d - [%c] st=%d \n", __FILE__, __LINE__, (char) ch, start); @@ -3140,12 +3140,12 @@ int32_t SimpleDateFormat::subParse(const UnicodeString& text, int32_t& start, UC // but that's going to be difficult. const UnicodeString* src; - UBool parsedNumericLeapMonth = FALSE; + UBool parsedNumericLeapMonth = false; if (numericLeapMonthFormatter != NULL && (patternCharIndex == UDAT_MONTH_FIELD || patternCharIndex == UDAT_STANDALONE_MONTH_FIELD)) { int32_t argCount; Formattable * args = numericLeapMonthFormatter->parse(text, pos, argCount); if (args != NULL && argCount == 1 && pos.getIndex() > parseStart && args[0].isNumeric()) { - parsedNumericLeapMonth = TRUE; + parsedNumericLeapMonth = true; number.setLong(args[0].getLong()); cal.set(UCAL_IS_LEAP_MONTH, 1); delete[] args; @@ -3174,17 +3174,17 @@ int32_t SimpleDateFormat::subParse(const UnicodeString& text, int32_t& start, UC if (txtLoc > parseStart) { value = number.getLong(); - gotNumber = TRUE; + gotNumber = true; // suffix processing if (value < 0 ) { - txtLoc = checkIntSuffix(text, txtLoc, patLoc+1, TRUE); + txtLoc = checkIntSuffix(text, txtLoc, patLoc+1, true); if (txtLoc != pos.getIndex()) { value *= -1; } } else { - txtLoc = checkIntSuffix(text, txtLoc, patLoc+1, FALSE); + txtLoc = checkIntSuffix(text, txtLoc, patLoc+1, false); } if (!getBooleanAttribute(UDAT_PARSE_ALLOW_WHITESPACE, status)) { @@ -3968,7 +3968,7 @@ void SimpleDateFormat::parseInt(const UnicodeString& text, // Memory allocation error return; } - df->setNegativePrefix(UnicodeString(TRUE, SUPPRESS_NEGATIVE_PREFIX, -1)); + df->setNegativePrefix(UnicodeString(true, SUPPRESS_NEGATIVE_PREFIX, -1)); fmt = df.getAlias(); } int32_t oldPos = pos.getIndex(); @@ -4023,16 +4023,16 @@ void SimpleDateFormat::translatePattern(const UnicodeString& originalPattern, } translatedPattern.remove(); - UBool inQuote = FALSE; + UBool inQuote = false; for (int32_t i = 0; i < originalPattern.length(); ++i) { UChar c = originalPattern[i]; if (inQuote) { if (c == QUOTE) { - inQuote = FALSE; + inQuote = false; } } else { if (c == QUOTE) { - inQuote = TRUE; + inQuote = true; } else if (isSyntaxChar(c)) { int32_t ci = from.indexOf(c); if (ci == -1) { @@ -4241,7 +4241,7 @@ SimpleDateFormat::isFieldUnitIgnored(const UnicodeString& pattern, int32_t fieldLevel = fgCalendarFieldToLevel[field]; int32_t level; UChar ch; - UBool inQuote = FALSE; + UBool inQuote = false; UChar prevCh = 0; int32_t count = 0; @@ -4251,7 +4251,7 @@ SimpleDateFormat::isFieldUnitIgnored(const UnicodeString& pattern, level = getLevelFromChar(prevCh); // the larger the level, the smaller the field unit. if (fieldLevel <= level) { - return FALSE; + return false; } count = 0; } @@ -4271,10 +4271,10 @@ SimpleDateFormat::isFieldUnitIgnored(const UnicodeString& pattern, // last item level = getLevelFromChar(prevCh); if (fieldLevel <= level) { - return FALSE; + return false; } } - return TRUE; + return true; } //---------------------------------------------------------------------- @@ -4358,10 +4358,10 @@ SimpleDateFormat::compareSimpleAffix(const UnicodeString& affix, // U+0020 is UWhiteSpace. So we have to first do a direct // match of the run of Pattern_White_Space in the pattern, // then match any extra characters. - UBool literalMatch = FALSE; + UBool literalMatch = false; while (pos < input.length() && input.char32At(pos) == c) { - literalMatch = TRUE; + literalMatch = true; i += len; pos += len; if (i == affix.length()) { @@ -4439,26 +4439,26 @@ SimpleDateFormat::tzFormat(UErrorCode &status) const { } void SimpleDateFormat::parsePattern() { - fHasMinute = FALSE; - fHasSecond = FALSE; - fHasHanYearChar = FALSE; + fHasMinute = false; + fHasSecond = false; + fHasHanYearChar = false; int len = fPattern.length(); - UBool inQuote = FALSE; + UBool inQuote = false; for (int32_t i = 0; i < len; ++i) { UChar ch = fPattern[i]; if (ch == QUOTE) { inQuote = !inQuote; } if (ch == 0x5E74) { // don't care whether this is inside quotes - fHasHanYearChar = TRUE; + fHasHanYearChar = true; } if (!inQuote) { if (ch == 0x6D) { // 0x6D == 'm' - fHasMinute = TRUE; + fHasMinute = true; } if (ch == 0x73) { // 0x73 == 's' - fHasSecond = TRUE; + fHasSecond = true; } } } diff --git a/icu4c/source/i18n/smpdtfst.cpp b/icu4c/source/i18n/smpdtfst.cpp index 2c8278df236..bbf6e9eddf9 100644 --- a/icu4c/source/i18n/smpdtfst.cpp +++ b/icu4c/source/i18n/smpdtfst.cpp @@ -81,7 +81,7 @@ SimpleDateFormatStaticSets::cleanup(void) delete gStaticSets; gStaticSets = NULL; gSimpleDateFormatStaticSetsInitOnce.reset(); - return TRUE; + return true; } U_CDECL_BEGIN diff --git a/icu4c/source/i18n/string_segment.cpp b/icu4c/source/i18n/string_segment.cpp index 5d19ac57f5e..2ddb738f4d0 100644 --- a/icu4c/source/i18n/string_segment.cpp +++ b/icu4c/source/i18n/string_segment.cpp @@ -64,7 +64,7 @@ UnicodeString StringSegment::toUnicodeString() const { const UnicodeString StringSegment::toTempUnicodeString() const { // Use the readonly-aliasing constructor for efficiency. - return UnicodeString(FALSE, fStr.getBuffer() + fStart, fEnd - fStart); + return UnicodeString(false, fStr.getBuffer() + fStart, fEnd - fStart); } UChar32 StringSegment::getCodePoint() const { @@ -131,8 +131,8 @@ bool StringSegment::codePointsEqual(UChar32 cp1, UChar32 cp2, bool foldCase) { if (!foldCase) { return false; } - cp1 = u_foldCase(cp1, TRUE); - cp2 = u_foldCase(cp2, TRUE); + cp1 = u_foldCase(cp1, true); + cp2 = u_foldCase(cp2, true); return cp1 == cp2; } diff --git a/icu4c/source/i18n/strmatch.cpp b/icu4c/source/i18n/strmatch.cpp index a20f7873fec..93febc708d5 100644 --- a/icu4c/source/i18n/strmatch.cpp +++ b/icu4c/source/i18n/strmatch.cpp @@ -131,7 +131,7 @@ UMatchDegree StringMatcher::matches(const Replaceable& text, UnicodeMatcher* subm = data->lookupMatcher(keyChar); if (subm == 0) { // Don't need the cursor < limit check if - // incremental is TRUE (because it's done above); do need + // incremental is true (because it's done above); do need // it otherwise. if (cursor < limit && keyChar == text.charAt(cursor)) { @@ -171,10 +171,10 @@ UnicodeString& StringMatcher::toPattern(UnicodeString& result, UChar keyChar = pattern.charAt(i); const UnicodeMatcher* m = data->lookupMatcher(keyChar); if (m == 0) { - ICU_Utility::appendToRule(result, keyChar, FALSE, escapeUnprintable, quoteBuf); + ICU_Utility::appendToRule(result, keyChar, false, escapeUnprintable, quoteBuf); } else { ICU_Utility::appendToRule(result, m->toPattern(str, escapeUnprintable), - TRUE, escapeUnprintable, quoteBuf); + true, escapeUnprintable, quoteBuf); } } if (segmentNumber > 0) { @@ -182,7 +182,7 @@ UnicodeString& StringMatcher::toPattern(UnicodeString& result, } // Flush quoteBuf out to result ICU_Utility::appendToRule(result, -1, - TRUE, escapeUnprintable, quoteBuf); + true, escapeUnprintable, quoteBuf); return result; } @@ -191,7 +191,7 @@ UnicodeString& StringMatcher::toPattern(UnicodeString& result, */ UBool StringMatcher::matchesIndexValue(uint8_t v) const { if (pattern.length() == 0) { - return TRUE; + return true; } UChar32 c = pattern.char32At(0); const UnicodeMatcher *m = data->lookupMatcher(c); diff --git a/icu4c/source/i18n/strrepl.cpp b/icu4c/source/i18n/strrepl.cpp index 9fafeb2659c..23dab55430b 100644 --- a/icu4c/source/i18n/strrepl.cpp +++ b/icu4c/source/i18n/strrepl.cpp @@ -41,9 +41,9 @@ StringReplacer::StringReplacer(const UnicodeString& theOutput, const TransliterationRuleData* theData) { output = theOutput; cursorPos = theCursorPos; - hasCursor = TRUE; + hasCursor = true; data = theData; - isComplex = TRUE; + isComplex = true; } /** @@ -59,9 +59,9 @@ StringReplacer::StringReplacer(const UnicodeString& theOutput, const TransliterationRuleData* theData) { output = theOutput; cursorPos = 0; - hasCursor = FALSE; + hasCursor = false; data = theData; - isComplex = TRUE; + isComplex = true; } /** @@ -131,7 +131,7 @@ int32_t StringReplacer::replace(Replaceable& text, */ UnicodeString buf; int32_t oOutput; // offset into 'output' - isComplex = FALSE; + isComplex = false; // The temporary buffer starts at tempStart, and extends // to destLimit. The start of the buffer has a single @@ -166,7 +166,7 @@ int32_t StringReplacer::replace(Replaceable& text, // Accumulate straight (non-segment) text. buf.append(c); } else { - isComplex = TRUE; + isComplex = true; // Insert any accumulated straight text. if (buf.length() > 0) { @@ -249,27 +249,27 @@ UnicodeString& StringReplacer::toReplacerPattern(UnicodeString& rule, // Handle a cursor preceding the output if (hasCursor && cursor < 0) { while (cursor++ < 0) { - ICU_Utility::appendToRule(rule, (UChar)0x0040 /*@*/, TRUE, escapeUnprintable, quoteBuf); + ICU_Utility::appendToRule(rule, (UChar)0x0040 /*@*/, true, escapeUnprintable, quoteBuf); } // Fall through and append '|' below } for (int32_t i=0; ilookupReplacer(c); if (r == NULL) { - ICU_Utility::appendToRule(rule, c, FALSE, escapeUnprintable, quoteBuf); + ICU_Utility::appendToRule(rule, c, false, escapeUnprintable, quoteBuf); } else { UnicodeString buf; r->toReplacerPattern(buf, escapeUnprintable); buf.insert(0, (UChar)0x20); buf.append((UChar)0x20); ICU_Utility::appendToRule(rule, buf, - TRUE, escapeUnprintable, quoteBuf); + true, escapeUnprintable, quoteBuf); } } @@ -279,13 +279,13 @@ UnicodeString& StringReplacer::toReplacerPattern(UnicodeString& rule, if (hasCursor && cursor > output.length()) { cursor -= output.length(); while (cursor-- > 0) { - ICU_Utility::appendToRule(rule, (UChar)0x0040 /*@*/, TRUE, escapeUnprintable, quoteBuf); + ICU_Utility::appendToRule(rule, (UChar)0x0040 /*@*/, true, escapeUnprintable, quoteBuf); } - ICU_Utility::appendToRule(rule, (UChar)0x007C /*|*/, TRUE, escapeUnprintable, quoteBuf); + ICU_Utility::appendToRule(rule, (UChar)0x007C /*|*/, true, escapeUnprintable, quoteBuf); } // Flush quoteBuf out to result ICU_Utility::appendToRule(rule, -1, - TRUE, escapeUnprintable, quoteBuf); + true, escapeUnprintable, quoteBuf); return rule; } diff --git a/icu4c/source/i18n/taiwncal.cpp b/icu4c/source/i18n/taiwncal.cpp index c790605ed3a..48f0b99e18d 100644 --- a/icu4c/source/i18n/taiwncal.cpp +++ b/icu4c/source/i18n/taiwncal.cpp @@ -144,7 +144,7 @@ static icu::UInitOnce gSystemDefaultCenturyInit {}; UBool TaiwanCalendar::haveDefaultCentury() const { - return TRUE; + return true; } static void U_CALLCONV initializeSystemDefaultCentury() diff --git a/icu4c/source/i18n/timezone.cpp b/icu4c/source/i18n/timezone.cpp index b5a1aec0c9a..00b44bfe902 100644 --- a/icu4c/source/i18n/timezone.cpp +++ b/icu4c/source/i18n/timezone.cpp @@ -122,7 +122,7 @@ alignas(icu::SimpleTimeZone) static char gRawUNKNOWN[sizeof(icu::SimpleTimeZone)]; static icu::UInitOnce gStaticZonesInitOnce {}; -static UBool gStaticZonesInitialized = FALSE; // Whether the static zones are initialized and ready to use. +static UBool gStaticZonesInitialized = false; // Whether the static zones are initialized and ready to use. static char TZDATA_VERSION[16]; static icu::UInitOnce gTZDataVersionInitOnce {}; @@ -150,7 +150,7 @@ static UBool U_CALLCONV timeZone_cleanup(void) if (gStaticZonesInitialized) { reinterpret_cast(gRawGMT)->~SimpleTimeZone(); reinterpret_cast(gRawUNKNOWN)->~SimpleTimeZone(); - gStaticZonesInitialized = FALSE; + gStaticZonesInitialized = false; gStaticZonesInitOnce.reset(); } @@ -172,7 +172,7 @@ static UBool U_CALLCONV timeZone_cleanup(void) MAP_CANONICAL_SYSTEM_LOCATION_ZONES = 0; gCanonicalLocationZonesInitOnce.reset(); - return TRUE; + return true; } U_CDECL_END @@ -204,7 +204,7 @@ static int32_t findInStringArray(UResourceBundle* array, const UnicodeString& id break; } U_DEBUG_TZ_MSG(("tz: compare to %s, %d .. [%d] .. %d\n", U_DEBUG_TZ_STR(u), start, mid, limit)); - copy.setTo(TRUE, u, len); + copy.setTo(true, u, len); int r = id.compare(copy); if(r==0) { U_DEBUG_TZ_MSG(("fisa: found at %d\n", mid)); @@ -312,10 +312,10 @@ void U_CALLCONV initStaticTimeZones() { ucln_i18n_registerCleanup(UCLN_I18N_TIMEZONE, timeZone_cleanup); // new can't fail below, as we use placement new into statically allocated space. - new(gRawGMT) SimpleTimeZone(0, UnicodeString(TRUE, GMT_ID, GMT_ID_LENGTH)); - new(gRawUNKNOWN) SimpleTimeZone(0, UnicodeString(TRUE, UNKNOWN_ZONE_ID, UNKNOWN_ZONE_ID_LENGTH)); + new(gRawGMT) SimpleTimeZone(0, UnicodeString(true, GMT_ID, GMT_ID_LENGTH)); + new(gRawUNKNOWN) SimpleTimeZone(0, UnicodeString(true, UNKNOWN_ZONE_ID, UNKNOWN_ZONE_ID_LENGTH)); - gStaticZonesInitialized = TRUE; + gStaticZonesInitialized = true; } } // anonymous namespace @@ -460,7 +460,7 @@ TimeZone::detectHostTimeZone() // which have platform specific implementations in putil.cpp int32_t rawOffset = 0; const char *hostID; - UBool hostDetectionSucceeded = TRUE; + UBool hostDetectionSucceeded = true; // First, try to create a system timezone, based // on the string ID in tzname[0]. @@ -484,8 +484,8 @@ TimeZone::detectHostTimeZone() if (hostStrID.length() == 0) { // The host time zone detection (or remapping) above has failed and // we have no name at all. Fallback to using the Unknown zone. - hostStrID = UnicodeString(TRUE, UNKNOWN_ZONE_ID, UNKNOWN_ZONE_ID_LENGTH); - hostDetectionSucceeded = FALSE; + hostStrID = UnicodeString(true, UNKNOWN_ZONE_ID, UNKNOWN_ZONE_ID_LENGTH); + hostDetectionSucceeded = false; } hostZone = createSystemTimeZone(hostStrID); @@ -716,12 +716,12 @@ void TimeZone::getOffset(UDate date, UBool local, int32_t& rawOffset, date += rawOffset; // now in local standard millis } - // When local == TRUE, date might not be in local standard + // When local == true, date might not be in local standard // millis. getOffset taking 7 parameters used here assume // the given time in day is local standard time. // At STD->DST transition, there is a range of time which // does not exist. When 'date' is in this time range - // (and local == TRUE), this method interprets the specified + // (and local == true), this method interprets the specified // local time as DST. At DST->STD transition, there is a // range of time which occurs twice. In this case, this // method interprets the specified local time as STD. @@ -739,7 +739,7 @@ void TimeZone::getOffset(UDate date, UBool local, int32_t& rawOffset, Grego::monthLength(year, month), ec) - rawOffset; - // Recompute if local==TRUE, dstOffset!=0. + // Recompute if local==true, dstOffset!=0. if (pass!=0 || !local || dstOffset == 0) { break; } @@ -780,7 +780,7 @@ private: unistr.truncate(0); } else { - unistr.fastCopyFrom(UnicodeString(TRUE, id, idLen)); + unistr.fastCopyFrom(UnicodeString(true, id, idLen)); } ures_close(top); return U_SUCCESS(ec); @@ -910,9 +910,9 @@ public: if (U_SUCCESS(ec)) { // Finally, create a new enumeration instance if (filteredMap == NULL) { - result = new TZEnumeration(baseMap, baseLen, FALSE); + result = new TZEnumeration(baseMap, baseLen, false); } else { - result = new TZEnumeration(filteredMap, numEntries, TRUE); + result = new TZEnumeration(filteredMap, numEntries, true); filteredMap = NULL; } if (result == NULL) { @@ -1074,7 +1074,7 @@ TimeZone::getEquivalentID(const UnicodeString& id, int32_t index) { if (U_SUCCESS(ec)) { int32_t idLen = 0; const UChar* id2 = ures_getStringByIndex(ares, zone, &idLen, &ec); - result.fastCopyFrom(UnicodeString(TRUE, id2, idLen)); + result.fastCopyFrom(UnicodeString(true, id2, idLen)); U_DEBUG_TZ_MSG(("gei(%d) -> %d, len%d, %s\n", index, zone, result.length(), u_errorName(ec))); } ures_close(ares); @@ -1213,13 +1213,13 @@ TimeZone::getRegion(const UnicodeString& id, char *region, int32_t capacity, UEr UnicodeString& TimeZone::getDisplayName(UnicodeString& result) const { - return getDisplayName(FALSE,LONG,Locale::getDefault(), result); + return getDisplayName(false,LONG,Locale::getDefault(), result); } UnicodeString& TimeZone::getDisplayName(const Locale& locale, UnicodeString& result) const { - return getDisplayName(FALSE, LONG, locale, result); + return getDisplayName(false, LONG, locale, result); } UnicodeString& @@ -1287,7 +1287,7 @@ TimeZone::getDisplayName(UBool inDaylight, EDisplayType style, const Locale& loc tzfmt->formatOffsetLocalizedGMT(offset, result, status); break; case SHORT_GMT: - tzfmt->formatOffsetISO8601Basic(offset, FALSE, FALSE, FALSE, result, status); + tzfmt->formatOffsetISO8601Basic(offset, false, false, false, result, status); break; default: UPRV_UNREACHABLE_EXIT; @@ -1387,17 +1387,17 @@ TimeZone::parseCustomID(const UnicodeString& id, int32_t& sign, if (id[pos.getIndex()] == MINUS /*'-'*/) { sign = -1; } else if (id[pos.getIndex()] != PLUS /*'+'*/) { - return FALSE; + return false; } pos.setIndex(pos.getIndex() + 1); UErrorCode success = U_ZERO_ERROR; numberFormat = NumberFormat::createInstance(success); if(U_FAILURE(success)){ - return FALSE; + return false; } - numberFormat->setParseIntegerOnly(TRUE); - //numberFormat->setLenient(TRUE); // TODO: May need to set this, depends on latest timezone parsing + numberFormat->setParseIntegerOnly(true); + //numberFormat->setLenient(true); // TODO: May need to set this, depends on latest timezone parsing // Look for either hh:mm, hhmm, or hh int32_t start = pos.getIndex(); @@ -1405,7 +1405,7 @@ TimeZone::parseCustomID(const UnicodeString& id, int32_t& sign, numberFormat->parse(id, n, pos); if (pos.getIndex() == start) { delete numberFormat; - return FALSE; + return false; } hour = n.getLong(); @@ -1413,7 +1413,7 @@ TimeZone::parseCustomID(const UnicodeString& id, int32_t& sign, if (pos.getIndex() - start > 2 || id[pos.getIndex()] != COLON) { delete numberFormat; - return FALSE; + return false; } // hh:mm pos.setIndex(pos.getIndex() + 1); @@ -1423,13 +1423,13 @@ TimeZone::parseCustomID(const UnicodeString& id, int32_t& sign, if ((pos.getIndex() - oldPos) != 2) { // must be 2 digits delete numberFormat; - return FALSE; + return false; } min = n.getLong(); if (pos.getIndex() < id.length()) { if (id[pos.getIndex()] != COLON) { delete numberFormat; - return FALSE; + return false; } // [:ss] pos.setIndex(pos.getIndex() + 1); @@ -1439,7 +1439,7 @@ TimeZone::parseCustomID(const UnicodeString& id, int32_t& sign, if (pos.getIndex() != id.length() || (pos.getIndex() - oldPos) != 2) { delete numberFormat; - return FALSE; + return false; } sec = n.getLong(); } @@ -1457,7 +1457,7 @@ TimeZone::parseCustomID(const UnicodeString& id, int32_t& sign, if (length <= 0 || 6 < length) { // invalid length delete numberFormat; - return FALSE; + return false; } switch (length) { case 1: @@ -1481,11 +1481,11 @@ TimeZone::parseCustomID(const UnicodeString& id, int32_t& sign, delete numberFormat; if (hour > kMAX_CUSTOM_HOUR || min > kMAX_CUSTOM_MIN || sec > kMAX_CUSTOM_SEC) { - return FALSE; + return false; } - return TRUE; + return true; } - return FALSE; + return false; } UnicodeString& @@ -1561,7 +1561,7 @@ TimeZone::getTZDataVersion(UErrorCode& status) UnicodeString& TimeZone::getCanonicalID(const UnicodeString& id, UnicodeString& canonicalID, UErrorCode& status) { - UBool isSystemID = FALSE; + UBool isSystemID = false; return getCanonicalID(id, canonicalID, isSystemID, status); } @@ -1570,18 +1570,18 @@ TimeZone::getCanonicalID(const UnicodeString& id, UnicodeString& canonicalID, UB UErrorCode& status) { canonicalID.remove(); - isSystemID = FALSE; + isSystemID = false; if (U_FAILURE(status)) { return canonicalID; } if (id.compare(UNKNOWN_ZONE_ID, UNKNOWN_ZONE_ID_LENGTH) == 0) { // special case - Etc/Unknown is a canonical ID, but not system ID canonicalID.fastCopyFrom(id); - isSystemID = FALSE; + isSystemID = false; } else { ZoneMeta::getCanonicalCLDRID(id, canonicalID, status); if (U_SUCCESS(status)) { - isSystemID = TRUE; + isSystemID = true; } else { // Not a system ID status = U_ZERO_ERROR; @@ -1600,7 +1600,7 @@ TimeZone::getWindowsID(const UnicodeString& id, UnicodeString& winid, UErrorCode // canonicalize the input ID UnicodeString canonicalID; - UBool isSystemID = FALSE; + UBool isSystemID = false; getCanonicalID(id, canonicalID, isSystemID, status); if (U_FAILURE(status) || !isSystemID) { @@ -1621,7 +1621,7 @@ TimeZone::getWindowsID(const UnicodeString& id, UnicodeString& winid, UErrorCode } UResourceBundle *winzone = NULL; - UBool found = FALSE; + UBool found = false; while (ures_hasNext(mapTimezones) && !found) { winzone = ures_getNextResource(mapTimezones, winzone, &status); if (U_FAILURE(status)) { @@ -1646,16 +1646,16 @@ TimeZone::getWindowsID(const UnicodeString& id, UnicodeString& winid, UErrorCode } const UChar *start = tzids; - UBool hasNext = TRUE; + UBool hasNext = true; while (hasNext) { const UChar *end = u_strchr(start, (UChar)0x20); if (end == NULL) { end = tzids + len; - hasNext = FALSE; + hasNext = false; } if (canonicalID.compare(start, static_cast(end - start)) == 0) { winid = UnicodeString(ures_getKey(winzone), -1 , US_INV); - found = TRUE; + found = true; break; } start = end + 1; @@ -1704,7 +1704,7 @@ TimeZone::getIDForWindowsID(const UnicodeString& winid, const char* region, Unic const UChar *tzid = NULL; int32_t len = 0; - UBool gotID = FALSE; + UBool gotID = false; if (region) { const UChar *tzids = ures_getStringByKey(zones, region, &len, &tmperr); // use tmperr, because // regional mapping is optional @@ -1716,7 +1716,7 @@ TimeZone::getIDForWindowsID(const UnicodeString& winid, const char* region, Unic } else { id.setTo(tzids, static_cast(end - tzids)); } - gotID = TRUE; + gotID = true; } } diff --git a/icu4c/source/i18n/titletrn.cpp b/icu4c/source/i18n/titletrn.cpp index 9c39b4676ad..62e41f920cb 100644 --- a/icu4c/source/i18n/titletrn.cpp +++ b/icu4c/source/i18n/titletrn.cpp @@ -87,7 +87,7 @@ void TitlecaseTransliterator::handleTransliterate( // Our mode; we are either converting letter toTitle or // toLower. - UBool doTitle = TRUE; + UBool doTitle = true; // Determine if there is a preceding context of cased case-ignorable*, // in which case we want to start in toLower mode. If the @@ -99,7 +99,7 @@ void TitlecaseTransliterator::handleTransliterate( c = text.char32At(start); type=ucase_getTypeOrIgnorable(c); if(type>0) { // cased - doTitle=FALSE; + doTitle=false; break; } else if(type==0) { // uncased but not ignorable break; @@ -146,7 +146,7 @@ void TitlecaseTransliterator::handleTransliterate( // see UCASE_MAX_STRING_LENGTH if(result<=UCASE_MAX_STRING_LENGTH) { // string s[result] - tmp.setTo(FALSE, s, result); + tmp.setTo(false, s, result); delta=result-U16_LENGTH(c); } else { // single code point diff --git a/icu4c/source/i18n/tmutfmt.cpp b/icu4c/source/i18n/tmutfmt.cpp index f0335a81f50..37e56b26a10 100644 --- a/icu4c/source/i18n/tmutfmt.cpp +++ b/icu4c/source/i18n/tmutfmt.cpp @@ -358,7 +358,7 @@ struct TimeUnitFormatReadSink : public ResourceSink { TimeUnitFormatReadSink(TimeUnitFormat *timeUnitFormatObj, const UVector &pluralCounts, UTimeUnitFormatStyle style) : timeUnitFormatObj(timeUnitFormatObj), pluralCounts(pluralCounts), - style(style), beenHere(FALSE){} + style(style), beenHere(false){} virtual ~TimeUnitFormatReadSink(); @@ -367,7 +367,7 @@ struct TimeUnitFormatReadSink : public ResourceSink { if (beenHere) { return; } else { - beenHere = TRUE; + beenHere = true; } ResourceTable units = value.getTable(errorCode); @@ -573,7 +573,7 @@ TimeUnitFormat::searchInLocaleChain(UTimeUnitFormatStyle style, const char* key, if (U_SUCCESS(status)) { //found LocalPointer messageFormat( - new MessageFormat(UnicodeString(TRUE, pattern, ptLength), getLocale(err), err), err); + new MessageFormat(UnicodeString(true, pattern, ptLength), getLocale(err), err), err); if (U_FAILURE(err)) { return; } @@ -643,7 +643,7 @@ TimeUnitFormat::searchInLocaleChain(UTimeUnitFormatStyle style, const char* key, } if (pattern != NULL) { messageFormat.adoptInsteadAndCheckErrorCode( - new MessageFormat(UnicodeString(TRUE, pattern, -1), getLocale(err), err), err); + new MessageFormat(UnicodeString(true, pattern, -1), getLocale(err), err), err); } if (U_FAILURE(err)) { return; @@ -742,7 +742,7 @@ U_CDECL_BEGIN * * @param val1 one value in comparison * @param val2 the other value in comparison - * @return TRUE if 2 values are the same, FALSE otherwise + * @return true if 2 values are the same, false otherwise */ static UBool U_CALLCONV tmutfmtHashTableValueComparator(UHashTok val1, UHashTok val2); @@ -761,7 +761,7 @@ TimeUnitFormat::initHash(UErrorCode& status) { return NULL; } Hashtable* hTable; - if ( (hTable = new Hashtable(TRUE, status)) == NULL ) { + if ( (hTable = new Hashtable(true, status)) == NULL ) { status = U_MEMORY_ALLOCATION_ERROR; return NULL; } diff --git a/icu4c/source/i18n/translit.cpp b/icu4c/source/i18n/translit.cpp index c7d6b510576..4d74d0b6128 100644 --- a/icu4c/source/i18n/translit.cpp +++ b/icu4c/source/i18n/translit.cpp @@ -107,7 +107,7 @@ U_NAMESPACE_BEGIN UOBJECT_DEFINE_ABSTRACT_RTTI_IMPLEMENTATION(Transliterator) /** - * Return TRUE if the given UTransPosition is valid for text of + * Return true if the given UTransPosition is valid for text of * the given length. */ static inline UBool positionIsValid(UTransPosition& index, int32_t len) { @@ -122,7 +122,7 @@ static inline UBool positionIsValid(UTransPosition& index, int32_t len) { * Default constructor. * @param theID the string identifier for this transliterator * @param theFilter the filter. Any character for which - * filter.contains() returns FALSE will not be + * filter.contains() returns false will not be * altered by this transliterator. If filter is * null then no filtering is applied. */ @@ -202,7 +202,7 @@ int32_t Transliterator::transliterate(Replaceable& text, offsets.contextLimit = limit; offsets.start = start; offsets.limit = limit; - filteredTransliterate(text, offsets, FALSE, TRUE); + filteredTransliterate(text, offsets, false, true); return offsets.limit; } @@ -341,7 +341,7 @@ void Transliterator::finishTransliteration(Replaceable& text, return; } - filteredTransliterate(text, index, FALSE, TRUE); + filteredTransliterate(text, index, false, true); } /** @@ -380,7 +380,7 @@ void Transliterator::_transliterate(Replaceable& text, return; } - filteredTransliterate(text, index, TRUE, TRUE); + filteredTransliterate(text, index, true, true); #if 0 // TODO @@ -440,7 +440,7 @@ void Transliterator::filteredTransliterate(Replaceable& text, // This method processes text in two groupings: // // RUNS -- A run is a contiguous group of characters which are contained - // in the filter for this transliterator (filter.contains(ch) == TRUE). + // in the filter for this transliterator (filter.contains(ch) == true). // Text outside of runs may appear as context but it is not modified. // The start and limit Position values are narrowed to each run. // @@ -503,10 +503,10 @@ void Transliterator::filteredTransliterate(Replaceable& text, // Is this run incremental? If there is additional // filtered text (if limit < globalLimit) then we pass in - // an incremental value of FALSE to force the subclass to + // an incremental value of false to force the subclass to // complete the transliteration for this run. UBool isIncrementalRun = - (index.limit < globalLimit ? FALSE : incremental); + (index.limit < globalLimit ? false : incremental); int32_t delta; @@ -585,7 +585,7 @@ void Transliterator::filteredTransliterate(Replaceable& text, // return, start will be updated to point after the // transliterated text, and limit and contextLimit will be // adjusted for length changes. - handleTransliterate(text, index, TRUE); + handleTransliterate(text, index, true); delta = index.limit - passLimit; // change in length @@ -682,7 +682,7 @@ void Transliterator::filteredTransliterate(Replaceable& text, void Transliterator::filteredTransliterate(Replaceable& text, UTransPosition& index, UBool incremental) const { - filteredTransliterate(text, index, incremental, FALSE); + filteredTransliterate(text, index, incremental, false); } /** @@ -1070,7 +1070,7 @@ Transliterator::createFromRules(const UnicodeString& ID, t = new NullTransliterator(); } else if (parser.idBlockVector.size() == 0 && parser.dataVector.size() == 1) { - t = new RuleBasedTransliterator(ID, (TransliterationRuleData*)parser.dataVector.orphanElementAt(0), TRUE); + t = new RuleBasedTransliterator(ID, (TransliterationRuleData*)parser.dataVector.orphanElementAt(0), true); } else if (parser.idBlockVector.size() == 1 && parser.dataVector.size() == 0) { // idBlock, no data -- this is an alias. The ID has @@ -1079,7 +1079,7 @@ Transliterator::createFromRules(const UnicodeString& ID, // direction. if (parser.compoundFilter != NULL) { UnicodeString filterPattern; - parser.compoundFilter->toPattern(filterPattern, FALSE); + parser.compoundFilter->toPattern(filterPattern, false); t = createInstance(filterPattern + UnicodeString(ID_DELIM) + *((UnicodeString*)parser.idBlockVector.elementAt(0)), UTRANS_FORWARD, parseError, status); } @@ -1125,7 +1125,7 @@ Transliterator::createFromRules(const UnicodeString& ID, TransliterationRuleData* data = (TransliterationRuleData*)parser.dataVector.orphanElementAt(0); // TODO: Should passNumber be turned into a decimal-string representation (1 -> "1")? RuleBasedTransliterator* temprbt = new RuleBasedTransliterator(UnicodeString(CompoundTransliterator::PASS_STRING) + UnicodeString(passNumber++), - data, TRUE); + data, true); // Check if NULL before adding it to transliterators to avoid future usage of NULL pointer. if (temprbt == NULL) { if (U_SUCCESS(status)) { @@ -1203,7 +1203,7 @@ UnicodeSet& Transliterator::getSourceSet(UnicodeSet& result) const { handleGetSourceSet(result); if (filter != NULL) { UnicodeSet* filterSet = dynamic_cast(filter); - UBool deleteFilterSet = FALSE; + UBool deleteFilterSet = false; // Most, but not all filters will be UnicodeSets. Optimize for // the high-runner case. if (filterSet == NULL) { @@ -1212,7 +1212,7 @@ UnicodeSet& Transliterator::getSourceSet(UnicodeSet& result) const { if (filterSet == NULL) { return result; } - deleteFilterSet = TRUE; + deleteFilterSet = true; filter->addMatchSetTo(*filterSet); } result.retainAll(*filterSet); @@ -1248,7 +1248,7 @@ void Transliterator::_registerFactory(const UnicodeString& id, Transliterator::Factory factory, Transliterator::Token context) { UErrorCode ec = U_ZERO_ERROR; - registry->put(id, factory, context, TRUE, ec); + registry->put(id, factory, context, true, ec); } // To be called only by Transliterator subclasses that are called @@ -1283,7 +1283,7 @@ void U_EXPORT2 Transliterator::registerInstance(Transliterator* adoptedPrototype void Transliterator::_registerInstance(Transliterator* adoptedPrototype) { UErrorCode ec = U_ZERO_ERROR; - registry->put(adoptedPrototype, TRUE, ec); + registry->put(adoptedPrototype, true, ec); } void U_EXPORT2 Transliterator::registerAlias(const UnicodeString& aliasID, @@ -1298,7 +1298,7 @@ void U_EXPORT2 Transliterator::registerAlias(const UnicodeString& aliasID, void Transliterator::_registerAlias(const UnicodeString& aliasID, const UnicodeString& realID) { UErrorCode ec = U_ZERO_ERROR; - registry->put(aliasID, realID, FALSE, TRUE, ec); + registry->put(aliasID, realID, false, true, ec); } /** @@ -1466,9 +1466,9 @@ UChar Transliterator::filteredCharAt(const Replaceable& text, int32_t i) const { #endif /** - * If the registry is initialized, return TRUE. If not, initialize it - * and return TRUE. If the registry cannot be initialized, return - * FALSE (rare). + * If the registry is initialized, return true. If not, initialize it + * and return true. If the registry cannot be initialized, return + * false (rare). * * IMPORTANT: Upon entry, registryMutex must be LOCKED. The entire * initialization is done with the lock held. There is NO REASON to @@ -1477,14 +1477,14 @@ UChar Transliterator::filteredCharAt(const Replaceable& text, int32_t i) const { */ UBool Transliterator::initializeRegistry(UErrorCode &status) { if (registry != 0) { - return TRUE; + return true; } registry = new TransliteratorRegistry(status); if (registry == 0 || U_FAILURE(status)) { delete registry; registry = 0; - return FALSE; // can't create registry, no recovery + return false; // can't create registry, no recovery } /* The following code parses the index table located in @@ -1534,7 +1534,7 @@ UBool Transliterator::initializeRegistry(UErrorCode &status) { delete registry; registry = nullptr; status = U_MEMORY_ALLOCATION_ERROR; - return FALSE; + return false; } if (U_SUCCESS(lstatus)) { maxRows = ures_getSize(transIDs); @@ -1567,13 +1567,13 @@ UBool Transliterator::initializeRegistry(UErrorCode &status) { (ures_getUnicodeStringByKey(res, "direction", &lstatus).charAt(0) == 0x0046 /*F*/) ? UTRANS_FORWARD : UTRANS_REVERSE; - registry->put(id, UnicodeString(TRUE, resString, len), dir, TRUE, visible, lstatus); + registry->put(id, UnicodeString(true, resString, len), dir, true, visible, lstatus); } break; case 0x61: // 'a' // 'alias'; row[2]=createInstance argument resString = ures_getString(res, &len, &lstatus); - registry->put(id, UnicodeString(TRUE, resString, len), TRUE, TRUE, lstatus); + registry->put(id, UnicodeString(true, resString, len), true, true, lstatus); break; } } @@ -1626,14 +1626,14 @@ UBool Transliterator::initializeRegistry(UErrorCode &status) { return 0; } - registry->put(tempNullTranslit, TRUE, status); - registry->put(tempLowercaseTranslit, TRUE, status); - registry->put(tempUppercaseTranslit, TRUE, status); - registry->put(tempTitlecaseTranslit, TRUE, status); - registry->put(tempUnicodeTranslit, TRUE, status); - registry->put(tempNameUnicodeTranslit, TRUE, status); + registry->put(tempNullTranslit, true, status); + registry->put(tempLowercaseTranslit, true, status); + registry->put(tempUppercaseTranslit, true, status); + registry->put(tempTitlecaseTranslit, true, status); + registry->put(tempUnicodeTranslit, true, status); + registry->put(tempNameUnicodeTranslit, true, status); #if !UCONFIG_NO_BREAK_ITERATION - registry->put(tempBreakTranslit, FALSE, status); // FALSE means invisible. + registry->put(tempBreakTranslit, false, status); // false means invisible. #endif RemoveTransliterator::registerIDs(); // Must be within mutex @@ -1643,15 +1643,15 @@ UBool Transliterator::initializeRegistry(UErrorCode &status) { AnyTransliterator::registerIDs(); _registerSpecialInverse(UNICODE_STRING_SIMPLE("Null"), - UNICODE_STRING_SIMPLE("Null"), FALSE); + UNICODE_STRING_SIMPLE("Null"), false); _registerSpecialInverse(UNICODE_STRING_SIMPLE("Upper"), - UNICODE_STRING_SIMPLE("Lower"), TRUE); + UNICODE_STRING_SIMPLE("Lower"), true); _registerSpecialInverse(UNICODE_STRING_SIMPLE("Title"), - UNICODE_STRING_SIMPLE("Lower"), FALSE); + UNICODE_STRING_SIMPLE("Lower"), false); ucln_i18n_registerCleanup(UCLN_I18N_TRANSLITERATOR, utrans_transliterator_cleanup); - return TRUE; + return true; } U_NAMESPACE_END @@ -1670,7 +1670,7 @@ U_CFUNC UBool utrans_transliterator_cleanup(void) { delete registry; registry = NULL; } - return TRUE; + return true; } #endif /* #if !UCONFIG_NO_TRANSLITERATION */ diff --git a/icu4c/source/i18n/transreg.cpp b/icu4c/source/i18n/transreg.cpp index 2d371f27c37..32040c63a64 100644 --- a/icu4c/source/i18n/transreg.cpp +++ b/icu4c/source/i18n/transreg.cpp @@ -181,7 +181,7 @@ Transliterator* TransliteratorAlias::create(UParseError& pe, } break; case RULES: - UPRV_UNREACHABLE_EXIT; // don't call create() if isRuleBased() returns TRUE! + UPRV_UNREACHABLE_EXIT; // don't call create() if isRuleBased() returns true! } return t; } @@ -242,8 +242,8 @@ class TransliteratorSpec : public UMemory { UnicodeString spec; UnicodeString nextSpec; UnicodeString scriptName; - UBool isSpecLocale; // TRUE if spec is a locale - UBool isNextLocale; // TRUE if nextSpec is a locale + UBool isSpecLocale; // true if spec is a locale + UBool isNextLocale; // true if nextSpec is a locale ResourceBundle* res; TransliteratorSpec(const TransliteratorSpec &other); // forbid copying of this class @@ -313,7 +313,7 @@ void TransliteratorSpec::reset() { } void TransliteratorSpec::setupNext() { - isNextLocale = FALSE; + isNextLocale = false; if (isSpecLocale) { nextSpec = spec; int32_t i = nextSpec.lastIndexOf(LOCALE_SEP); @@ -321,7 +321,7 @@ void TransliteratorSpec::setupNext() { // to the scriptName. if (i > 0) { nextSpec.truncate(i); - isNextLocale = TRUE; + isNextLocale = true; } else { nextSpec = scriptName; // scriptName may be empty } @@ -528,8 +528,8 @@ U_CDECL_END //---------------------------------------------------------------------- TransliteratorRegistry::TransliteratorRegistry(UErrorCode& status) : - registry(TRUE, status), - specDAG(TRUE, SPECDAG_INIT_SIZE, status), + registry(true, status), + specDAG(true, SPECDAG_INIT_SIZE, status), variantList(VARIANT_LIST_INIT_SIZE, status), availableIDs(AVAILABLE_IDS_INIT_SIZE, status) { @@ -574,7 +574,7 @@ Transliterator* TransliteratorRegistry::reget(const UnicodeString& ID, // The usage model for the caller is that they will first call // reg->get() inside the mutex, they'll get back an alias, they call - // alias->isRuleBased(), and if they get TRUE, they call alias->parse() + // alias->isRuleBased(), and if they get true, they call alias->parse() // outside the mutex, then reg->reget() inside the mutex again. A real // mess, but it gets things working for ICU 3.0. [alan]. @@ -678,7 +678,7 @@ void TransliteratorRegistry::put(const UnicodeString& ID, entry->entryType = (dir == UTRANS_FORWARD) ? TransliteratorEntry::RULES_FORWARD : TransliteratorEntry::RULES_REVERSE; if (readonlyResourceAlias) { - entry->stringArg.setTo(TRUE, resourceName.getBuffer(), -1); + entry->stringArg.setTo(true, resourceName.getBuffer(), -1); } else { entry->stringArg = resourceName; @@ -696,7 +696,7 @@ void TransliteratorRegistry::put(const UnicodeString& ID, if (entry != NULL) { entry->entryType = TransliteratorEntry::ALIAS; if (readonlyAliasAlias) { - entry->stringArg.setTo(TRUE, alias.getBuffer(), -1); + entry->stringArg.setTo(true, alias.getBuffer(), -1); } else { entry->stringArg = alias; @@ -910,7 +910,7 @@ void TransliteratorRegistry::registerEntry(const UnicodeString& source, UnicodeString ID; UnicodeString s(source); if (s.length() == 0) { - s.setTo(TRUE, ANY, 3); + s.setTo(true, ANY, 3); } TransliteratorIDParser::STVtoID(source, target, variant, ID); registerEntry(ID, s, target, variant, adopted, visible); @@ -978,7 +978,7 @@ void TransliteratorRegistry::registerSTV(const UnicodeString& source, } else if (source.compare(LAT,3) == 0) { size = LAT_TARGETS_INIT_SIZE; } - targets = new Hashtable(TRUE, size, status); + targets = new Hashtable(true, size, status); if (U_FAILURE(status) || targets == NULL) { return; } @@ -1079,7 +1079,7 @@ TransliteratorEntry* TransliteratorRegistry::findInStaticStore(const Translitera // If we found an entry, store it in the Hashtable for next // time. if (entry != 0) { - registerEntry(src.getTop(), trg.getTop(), variant, entry, FALSE); + registerEntry(src.getTop(), trg.getTop(), variant, entry, false); } return entry; @@ -1330,7 +1330,7 @@ Transliterator* TransliteratorRegistry::instantiateEntry(const UnicodeString& ID for (int32_t i = 0; U_SUCCESS(status) && i < entry->u.dataVector->size(); i++) { // TODO: Should passNumber be turned into a decimal-string representation (1 -> "1")? Transliterator* tl = new RuleBasedTransliterator(UnicodeString(CompoundTransliterator::PASS_STRING) + UnicodeString(passNumber++), - (TransliterationRuleData*)(entry->u.dataVector->elementAt(i)), FALSE); + (TransliterationRuleData*)(entry->u.dataVector->elementAt(i)), false); if (tl == 0) status = U_MEMORY_ALLOCATION_ERROR; else diff --git a/icu4c/source/i18n/tridpars.cpp b/icu4c/source/i18n/tridpars.cpp index 873a159f766..a52f928759c 100644 --- a/icu4c/source/i18n/tridpars.cpp +++ b/icu4c/source/i18n/tridpars.cpp @@ -77,7 +77,7 @@ TransliteratorIDParser::SingleID::SingleID(const UnicodeString& c, const Unicode Transliterator* TransliteratorIDParser::SingleID::createInstance() { Transliterator* t; if (basicID.length() == 0) { - t = createBasicInstance(UnicodeString(TRUE, ANY_NULL, 8), &canonID); + t = createBasicInstance(UnicodeString(true, ANY_NULL, 8), &canonID); } else { t = createBasicInstance(basicID, &canonID); } @@ -118,22 +118,22 @@ TransliteratorIDParser::parseSingleID(const UnicodeString& id, int32_t& pos, // A and B are filter IDs. Specs* specsA = NULL; Specs* specsB = NULL; - UBool sawParen = FALSE; + UBool sawParen = false; // On the first pass, look for (B) or (). If this fails, then // on the second pass, look for A, A(B), or A(). for (int32_t pass=1; pass<=2; ++pass) { if (pass == 2) { - specsA = parseFilterID(id, pos, TRUE); + specsA = parseFilterID(id, pos, true); if (specsA == NULL) { pos = start; return NULL; } } if (ICU_Utility::parseChar(id, pos, OPEN_REV)) { - sawParen = TRUE; + sawParen = true; if (!ICU_Utility::parseChar(id, pos, CLOSE_REV)) { - specsB = parseFilterID(id, pos, TRUE); + specsB = parseFilterID(id, pos, true); // Must close with a ')' if (specsB == NULL || !ICU_Utility::parseChar(id, pos, CLOSE_REV)) { delete specsA; @@ -219,7 +219,7 @@ TransliteratorIDParser::parseFilterID(const UnicodeString& id, int32_t& pos) { int32_t start = pos; - Specs* specs = parseFilterID(id, pos, TRUE); + Specs* specs = parseFilterID(id, pos, true); if (specs == NULL) { pos = start; return NULL; @@ -272,7 +272,7 @@ UnicodeSet* TransliteratorIDParser::parseGlobalFilter(const UnicodeString& id, i } } - ICU_Utility::skipWhitespace(id, pos, TRUE); + ICU_Utility::skipWhitespace(id, pos, true); if (UnicodeSet::resemblesPattern(id, pos)) { ParsePosition ppos(pos); @@ -352,7 +352,7 @@ U_CDECL_END * @param globalFilter OUTPUT parameter that receives a pointer to * a newly created global filter for this ID in this direction, or * NULL if there is none. - * @return TRUE if the parse succeeds, that is, if the entire + * @return true if the parse succeeds, that is, if the entire * id is consumed without syntax error. */ UBool TransliteratorIDParser::parseCompoundID(const UnicodeString& id, int32_t dir, @@ -387,7 +387,7 @@ UBool TransliteratorIDParser::parseCompoundID(const UnicodeString& id, int32_t d filter = NULL; } - UBool sawDelimiter = TRUE; + UBool sawDelimiter = true; for (;;) { SingleID* single = parseSingleID(id, pos, dir, ec); if (single == NULL) { @@ -402,7 +402,7 @@ UBool TransliteratorIDParser::parseCompoundID(const UnicodeString& id, int32_t d goto FAIL; } if (!ICU_Utility::parseChar(id, pos, ID_DELIM)) { - sawDelimiter = FALSE; + sawDelimiter = false; break; } } @@ -439,20 +439,20 @@ UBool TransliteratorIDParser::parseCompoundID(const UnicodeString& id, int32_t d } // Trailing unparsed text is a syntax error - ICU_Utility::skipWhitespace(id, pos, TRUE); + ICU_Utility::skipWhitespace(id, pos, true); if (pos != id.length()) { goto FAIL; } list.setDeleter(save); - return TRUE; + return true; FAIL: list.removeAllElements(); list.setDeleter(save); delete globalFilter; globalFilter = NULL; - return FALSE; + return false; } /** @@ -505,7 +505,7 @@ void TransliteratorIDParser::instantiateList(UVector& list, // An empty list is equivalent to a NULL transliterator. if (tlist.size() == 0) { - t = createBasicInstance(UnicodeString(TRUE, ANY_NULL, 8), NULL); + t = createBasicInstance(UnicodeString(true, ANY_NULL, 8), NULL); if (t == NULL) { // Should never happen ec = U_INTERNAL_TRANSLITERATOR_ERROR; @@ -559,7 +559,7 @@ void TransliteratorIDParser::IDtoSTV(const UnicodeString& id, if (var < 0) { var = id.length(); } - isSourcePresent = FALSE; + isSourcePresent = false; if (sep < 0) { // Form: T/V or T (or /V) @@ -569,7 +569,7 @@ void TransliteratorIDParser::IDtoSTV(const UnicodeString& id, // Form: S-T/V or S-T (or -T/V or -T) if (sep > 0) { id.extractBetween(0, sep, source); - isSourcePresent = TRUE; + isSourcePresent = true; } id.extractBetween(++sep, var, target); id.extractBetween(var, id.length(), variant); @@ -577,7 +577,7 @@ void TransliteratorIDParser::IDtoSTV(const UnicodeString& id, // Form: (S/V-T or /V-T) if (var > 0) { id.extractBetween(0, var, source); - isSourcePresent = TRUE; + isSourcePresent = true; } id.extractBetween(var, sep++, variant); id.extractBetween(sep, id.length(), target); @@ -613,7 +613,7 @@ void TransliteratorIDParser::STVtoID(const UnicodeString& source, /** * Register two targets as being inverses of one another. For - * example, calling registerSpecialInverse("NFC", "NFD", TRUE) causes + * example, calling registerSpecialInverse("NFC", "NFD", true) causes * Transliterator to form the following inverse relationships: * *
NFC => NFD
@@ -640,7 +640,7 @@ void TransliteratorIDParser::STVtoID(const UnicodeString& source,
  * @param target the target against which to register the inverse
  * @param inverseTarget the inverse of target, that is
  * Any-target.getInverse() => Any-inverseTarget
- * @param bidirectional if TRUE, register the reverse relation
+ * @param bidirectional if true, register the reverse relation
  * as well, that is, Any-inverseTarget.getInverse() => Any-target
  */
 void TransliteratorIDParser::registerSpecialInverse(const UnicodeString& target,
@@ -652,9 +652,9 @@ void TransliteratorIDParser::registerSpecialInverse(const UnicodeString& target,
         return;
     }
 
-    // If target == inverseTarget then force bidirectional => FALSE
+    // If target == inverseTarget then force bidirectional => false
     if (bidirectional && 0==target.caseCompare(inverseTarget, U_FOLD_CASE_DEFAULT)) {
-        bidirectional = FALSE;
+        bidirectional = false;
     }
 
     Mutex lock(&LOCK);
@@ -688,12 +688,12 @@ void TransliteratorIDParser::registerSpecialInverse(const UnicodeString& target,
  * offset of the first character to parse in id.  On output,
  * pos is the offset after the last parsed character.  If the
  * parse failed, pos will be unchanged.
- * @param allowFilter2 if TRUE, a UnicodeSet pattern is allowed
+ * @param allowFilter2 if true, a UnicodeSet pattern is allowed
  * at any location between specs or delimiters, and is returned
  * as the fifth string in the array.
  * @return a Specs object, or NULL if the parse failed.  If
  * neither source nor target was seen in the parsed id, then the
- * parse fails.  If allowFilter is TRUE, then the parsed filter
+ * parse fails.  If allowFilter is true, then the parsed filter
  * pattern is returned in the Specs object, otherwise the returned
  * filter reference is NULL.  If the parse fails for any reason
  * NULL is returned.
@@ -714,7 +714,7 @@ TransliteratorIDParser::parseFilterID(const UnicodeString& id, int32_t& pos,
     // pass: a filter, a delimiter character (either '-' or '/'),
     // or a spec (source, target, or variant).
     for (;;) {
-        ICU_Utility::skipWhitespace(id, pos, TRUE);
+        ICU_Utility::skipWhitespace(id, pos, true);
         if (pos == id.length()) {
             break;
         }
@@ -792,10 +792,10 @@ TransliteratorIDParser::parseFilterID(const UnicodeString& id, int32_t& pos,
     }
 
     // Empty source or target defaults to ANY
-    UBool sawSource = TRUE;
+    UBool sawSource = true;
     if (source.length() == 0) {
         source.setTo(ANY, 3);
-        sawSource = FALSE;
+        sawSource = false;
     }
     if (target.length() == 0) {
         target.setTo(ANY, 3);
@@ -878,7 +878,7 @@ TransliteratorIDParser::specsToSpecialInverse(const Specs& specs, UErrorCode &st
         }
         buf.append(*inverseTarget);
 
-        UnicodeString basicID(TRUE, ANY, 3);
+        UnicodeString basicID(true, ANY, 3);
         basicID.append(TARGET_SEP).append(*inverseTarget);
 
         if (specs.variant.length() != 0) {
@@ -906,7 +906,7 @@ void U_CALLCONV TransliteratorIDParser::init(UErrorCode &status) {
     U_ASSERT(SPECIAL_INVERSES == NULL);
     ucln_i18n_registerCleanup(UCLN_I18N_TRANSLITERATOR, utrans_transliterator_cleanup);
 
-    SPECIAL_INVERSES = new Hashtable(TRUE, status);
+    SPECIAL_INVERSES = new Hashtable(true, status);
     if (SPECIAL_INVERSES == NULL) {
     	status = U_MEMORY_ALLOCATION_ERROR;
     	return;
diff --git a/icu4c/source/i18n/tzfmt.cpp b/icu4c/source/i18n/tzfmt.cpp
index 2d08193f268..2199986f615 100644
--- a/icu4c/source/i18n/tzfmt.cpp
+++ b/icu4c/source/i18n/tzfmt.cpp
@@ -170,7 +170,7 @@ static UBool U_CALLCONV tzfmt_cleanup(void)
     gShortZoneIdTrie = NULL;
     gShortZoneIdTrieInitOnce.reset();
 
-    return TRUE;
+    return true;
 }
 U_CDECL_END
 
@@ -365,7 +365,7 @@ TimeZoneFormat::TimeZoneFormat(const Locale& locale, UErrorCode& status)
         }
         resStr = ures_getStringByKeyWithFallback(zoneStringsArray, gGmtZeroFormatTag, &len, &status);
         if (len > 0) {
-            fGMTZeroFormat.setTo(TRUE, resStr, len);
+            fGMTZeroFormat.setTo(true, resStr, len);
         }
         resStr = ures_getStringByKeyWithFallback(zoneStringsArray, gHourFormatTag, &len, &status);
         if (len > 0) {
@@ -378,36 +378,36 @@ TimeZoneFormat::TimeZoneFormat(const Locale& locale, UErrorCode& status)
     if (gmtPattern == NULL) {
         gmtPattern = DEFAULT_GMT_PATTERN;
     }
-    initGMTPattern(UnicodeString(TRUE, gmtPattern, -1), status);
+    initGMTPattern(UnicodeString(true, gmtPattern, -1), status);
 
-    UBool useDefaultOffsetPatterns = TRUE;
+    UBool useDefaultOffsetPatterns = true;
     if (hourFormats) {
         UChar *sep = u_strchr(hourFormats, (UChar)0x003B /* ';' */);
         if (sep != NULL) {
             UErrorCode tmpStatus = U_ZERO_ERROR;
-            fGMTOffsetPatterns[UTZFMT_PAT_POSITIVE_HM].setTo(FALSE, hourFormats, (int32_t)(sep - hourFormats));
-            fGMTOffsetPatterns[UTZFMT_PAT_NEGATIVE_HM].setTo(TRUE, sep + 1, -1);
+            fGMTOffsetPatterns[UTZFMT_PAT_POSITIVE_HM].setTo(false, hourFormats, (int32_t)(sep - hourFormats));
+            fGMTOffsetPatterns[UTZFMT_PAT_NEGATIVE_HM].setTo(true, sep + 1, -1);
             expandOffsetPattern(fGMTOffsetPatterns[UTZFMT_PAT_POSITIVE_HM], fGMTOffsetPatterns[UTZFMT_PAT_POSITIVE_HMS], tmpStatus);
             expandOffsetPattern(fGMTOffsetPatterns[UTZFMT_PAT_NEGATIVE_HM], fGMTOffsetPatterns[UTZFMT_PAT_NEGATIVE_HMS], tmpStatus);
             truncateOffsetPattern(fGMTOffsetPatterns[UTZFMT_PAT_POSITIVE_HM], fGMTOffsetPatterns[UTZFMT_PAT_POSITIVE_H], tmpStatus);
             truncateOffsetPattern(fGMTOffsetPatterns[UTZFMT_PAT_NEGATIVE_HM], fGMTOffsetPatterns[UTZFMT_PAT_NEGATIVE_H], tmpStatus);
             if (U_SUCCESS(tmpStatus)) {
-                useDefaultOffsetPatterns = FALSE;
+                useDefaultOffsetPatterns = false;
             }
         }
     }
     if (useDefaultOffsetPatterns) {
-        fGMTOffsetPatterns[UTZFMT_PAT_POSITIVE_H].setTo(TRUE, DEFAULT_GMT_POSITIVE_H, -1);
-        fGMTOffsetPatterns[UTZFMT_PAT_POSITIVE_HM].setTo(TRUE, DEFAULT_GMT_POSITIVE_HM, -1);
-        fGMTOffsetPatterns[UTZFMT_PAT_POSITIVE_HMS].setTo(TRUE, DEFAULT_GMT_POSITIVE_HMS, -1);
-        fGMTOffsetPatterns[UTZFMT_PAT_NEGATIVE_H].setTo(TRUE, DEFAULT_GMT_NEGATIVE_H, -1);
-        fGMTOffsetPatterns[UTZFMT_PAT_NEGATIVE_HM].setTo(TRUE, DEFAULT_GMT_NEGATIVE_HM, -1);
-        fGMTOffsetPatterns[UTZFMT_PAT_NEGATIVE_HMS].setTo(TRUE, DEFAULT_GMT_NEGATIVE_HMS, -1);
+        fGMTOffsetPatterns[UTZFMT_PAT_POSITIVE_H].setTo(true, DEFAULT_GMT_POSITIVE_H, -1);
+        fGMTOffsetPatterns[UTZFMT_PAT_POSITIVE_HM].setTo(true, DEFAULT_GMT_POSITIVE_HM, -1);
+        fGMTOffsetPatterns[UTZFMT_PAT_POSITIVE_HMS].setTo(true, DEFAULT_GMT_POSITIVE_HMS, -1);
+        fGMTOffsetPatterns[UTZFMT_PAT_NEGATIVE_H].setTo(true, DEFAULT_GMT_NEGATIVE_H, -1);
+        fGMTOffsetPatterns[UTZFMT_PAT_NEGATIVE_HM].setTo(true, DEFAULT_GMT_NEGATIVE_HM, -1);
+        fGMTOffsetPatterns[UTZFMT_PAT_NEGATIVE_HMS].setTo(true, DEFAULT_GMT_NEGATIVE_HMS, -1);
     }
     initGMTOffsetPatterns(status);
 
     NumberingSystem* ns = NumberingSystem::createInstance(locale, status);
-    UBool useDefDigits = TRUE;
+    UBool useDefDigits = true;
     if (ns && !ns->isAlgorithmic()) {
         UnicodeString digits = ns->getDescription();
         useDefDigits = !toCodePoints(digits, fGMTOffsetDigits, 10);
@@ -657,7 +657,7 @@ TimeZoneFormat::format(UTimeZoneFormatStyle style, const TimeZone& tz, UDate dat
         *timeType = UTZFMT_TIME_TYPE_UNKNOWN;
     }
 
-    UBool noOffsetFormatFallback = FALSE;
+    UBool noOffsetFormatFallback = false;
 
     switch (style) {
     case UTZFMT_STYLE_GENERIC_LOCATION:
@@ -678,7 +678,7 @@ TimeZoneFormat::format(UTimeZoneFormatStyle style, const TimeZone& tz, UDate dat
 
     case UTZFMT_STYLE_ZONE_ID:
         tz.getID(name);
-        noOffsetFormatFallback = TRUE;
+        noOffsetFormatFallback = true;
         break;
     case UTZFMT_STYLE_ZONE_ID_SHORT:
         {
@@ -688,12 +688,12 @@ TimeZoneFormat::format(UTimeZoneFormatStyle style, const TimeZone& tz, UDate dat
             }
             name.setTo(shortID, -1);
         }
-        noOffsetFormatFallback = TRUE;
+        noOffsetFormatFallback = true;
         break;
 
     case UTZFMT_STYLE_EXEMPLAR_LOCATION:
         formatExemplarLocation(tz, name);
-        noOffsetFormatFallback = TRUE;
+        noOffsetFormatFallback = true;
         break;
 
     default:
@@ -704,7 +704,7 @@ TimeZoneFormat::format(UTimeZoneFormatStyle style, const TimeZone& tz, UDate dat
     if (name.isEmpty() && !noOffsetFormatFallback) {
         UErrorCode status = U_ZERO_ERROR;
         int32_t rawOffset, dstOffset;
-        tz.getOffset(date, FALSE, rawOffset, dstOffset, status);
+        tz.getOffset(date, false, rawOffset, dstOffset, status);
         int32_t offset = rawOffset + dstOffset;
         if (U_SUCCESS(status)) {
             switch (style) {
@@ -722,43 +722,43 @@ TimeZoneFormat::format(UTimeZoneFormatStyle style, const TimeZone& tz, UDate dat
                 break;
 
             case UTZFMT_STYLE_ISO_BASIC_SHORT:
-                formatOffsetISO8601Basic(offset, TRUE, TRUE, TRUE, name, status);
+                formatOffsetISO8601Basic(offset, true, true, true, name, status);
                 break;
 
             case UTZFMT_STYLE_ISO_BASIC_LOCAL_SHORT:
-                formatOffsetISO8601Basic(offset, FALSE, TRUE, TRUE, name, status);
+                formatOffsetISO8601Basic(offset, false, true, true, name, status);
                 break;
 
             case UTZFMT_STYLE_ISO_BASIC_FIXED:
-                formatOffsetISO8601Basic(offset, TRUE, FALSE, TRUE, name, status);
+                formatOffsetISO8601Basic(offset, true, false, true, name, status);
                 break;
 
             case UTZFMT_STYLE_ISO_BASIC_LOCAL_FIXED:
-                formatOffsetISO8601Basic(offset, FALSE, FALSE, TRUE, name, status);
+                formatOffsetISO8601Basic(offset, false, false, true, name, status);
                 break;
 
             case UTZFMT_STYLE_ISO_EXTENDED_FIXED:
-                formatOffsetISO8601Extended(offset, TRUE, FALSE, TRUE, name, status);
+                formatOffsetISO8601Extended(offset, true, false, true, name, status);
                 break;
 
             case UTZFMT_STYLE_ISO_EXTENDED_LOCAL_FIXED:
-                formatOffsetISO8601Extended(offset, FALSE, FALSE, TRUE, name, status);
+                formatOffsetISO8601Extended(offset, false, false, true, name, status);
                 break;
 
             case UTZFMT_STYLE_ISO_BASIC_FULL:
-                formatOffsetISO8601Basic(offset, TRUE, FALSE, FALSE, name, status);
+                formatOffsetISO8601Basic(offset, true, false, false, name, status);
                 break;
 
             case UTZFMT_STYLE_ISO_BASIC_LOCAL_FULL:
-                formatOffsetISO8601Basic(offset, FALSE, FALSE, FALSE, name, status);
+                formatOffsetISO8601Basic(offset, false, false, false, name, status);
                 break;
 
             case UTZFMT_STYLE_ISO_EXTENDED_FULL:
-                formatOffsetISO8601Extended(offset, TRUE, FALSE, FALSE, name, status);
+                formatOffsetISO8601Extended(offset, true, false, false, name, status);
                 break;
 
             case UTZFMT_STYLE_ISO_EXTENDED_LOCAL_FULL:
-                formatOffsetISO8601Extended(offset, FALSE, FALSE, FALSE, name, status);
+                formatOffsetISO8601Extended(offset, false, false, false, name, status);
                 break;
 
             default:
@@ -794,7 +794,7 @@ TimeZoneFormat::format(const Formattable& obj, UnicodeString& appendTo,
         }
         if (tz != NULL) {
             int32_t rawOffset, dstOffset;
-            tz->getOffset(date, FALSE, rawOffset, dstOffset, status);
+            tz->getOffset(date, false, rawOffset, dstOffset, status);
             UChar buf[ZONE_NAME_U16_MAX];
             UnicodeString result(buf, 0, UPRV_LENGTHOF(buf));
             formatOffsetLocalizedGMT(rawOffset + dstOffset, result, status);
@@ -841,7 +841,7 @@ TimeZoneFormat::parse(UTimeZoneFormatStyle style, const UnicodeString& text, Par
 
     // Try localized GMT format first if necessary
     if (fallbackLocalizedGMT || fallbackShortLocalizedGMT) {
-        UBool hasDigitOffset = FALSE;
+        UBool hasDigitOffset = false;
         offset = parseOffsetLocalizedGMT(text, tmpPos, fallbackShortLocalizedGMT, &hasDigitOffset);
         if (tmpPos.getErrorIndex() == -1) {
             // Even when the input text was successfully parsed as a localized GMT format text,
@@ -931,8 +931,8 @@ TimeZoneFormat::parse(UTimeZoneFormatStyle style, const UnicodeString& text, Par
             tmpPos.setErrorIndex(-1);
 
             // Exclude the case of UTC Indicator "Z" here
-            UBool hasDigitOffset = FALSE;
-            offset = parseOffsetISO8601(text, tmpPos, FALSE, &hasDigitOffset);
+            UBool hasDigitOffset = false;
+            offset = parseOffsetISO8601(text, tmpPos, false, &hasDigitOffset);
             if (tmpPos.getErrorIndex() == -1 && hasDigitOffset) {
                 pos.setIndex(tmpPos.getIndex());
                 return createTimeZoneForOffset(offset);
@@ -1125,8 +1125,8 @@ TimeZoneFormat::parse(UTimeZoneFormatStyle style, const UnicodeString& text, Par
         tmpPos.setIndex(startIdx);
         tmpPos.setErrorIndex(-1);
 
-        UBool hasDigitOffset = FALSE;
-        offset = parseOffsetISO8601(text, tmpPos, FALSE, &hasDigitOffset);
+        UBool hasDigitOffset = false;
+        offset = parseOffsetISO8601(text, tmpPos, false, &hasDigitOffset);
         if (tmpPos.getErrorIndex() == -1) {
             if (tmpPos.getIndex() == maxPos || hasDigitOffset) {
                 pos.setIndex(tmpPos.getIndex());
@@ -1151,8 +1151,8 @@ TimeZoneFormat::parse(UTimeZoneFormatStyle style, const UnicodeString& text, Par
         tmpPos.setIndex(startIdx);
         tmpPos.setErrorIndex(-1);
 
-        UBool hasDigitOffset = FALSE;
-        offset = parseOffsetLocalizedGMT(text, tmpPos, FALSE, &hasDigitOffset);
+        UBool hasDigitOffset = false;
+        offset = parseOffsetLocalizedGMT(text, tmpPos, false, &hasDigitOffset);
         if (tmpPos.getErrorIndex() == -1) {
             if (tmpPos.getIndex() == maxPos || hasDigitOffset) {
                 pos.setIndex(tmpPos.getIndex());
@@ -1173,8 +1173,8 @@ TimeZoneFormat::parse(UTimeZoneFormatStyle style, const UnicodeString& text, Par
         tmpPos.setIndex(startIdx);
         tmpPos.setErrorIndex(-1);
 
-        UBool hasDigitOffset = FALSE;
-        offset = parseOffsetLocalizedGMT(text, tmpPos, TRUE, &hasDigitOffset);
+        UBool hasDigitOffset = false;
+        offset = parseOffsetLocalizedGMT(text, tmpPos, true, &hasDigitOffset);
         if (tmpPos.getErrorIndex() == -1) {
             if (tmpPos.getIndex() == maxPos || hasDigitOffset) {
                 pos.setIndex(tmpPos.getIndex());
@@ -1348,7 +1348,7 @@ TimeZoneFormat::formatGeneric(const TimeZone& tz, int32_t genType, UDate date, U
             name.setToBogus();
             return name;
         }
-        return gnames->getGenericLocationName(UnicodeString(TRUE, canonicalID, -1), name);
+        return gnames->getGenericLocationName(UnicodeString(true, canonicalID, -1), name);
     }
     return gnames->getDisplayName(tz, (UTimeZoneGenericNameType)genType, date, name);
 }
@@ -1371,9 +1371,9 @@ TimeZoneFormat::formatSpecific(const TimeZone& tz, UTimeZoneNameType stdType, UT
     }
 
     if (isDaylight) {
-        fTimeZoneNames->getDisplayName(UnicodeString(TRUE, canonicalID, -1), dstType, date, name);
+        fTimeZoneNames->getDisplayName(UnicodeString(true, canonicalID, -1), dstType, date, name);
     } else {
-        fTimeZoneNames->getDisplayName(UnicodeString(TRUE, canonicalID, -1), stdType, date, name);
+        fTimeZoneNames->getDisplayName(UnicodeString(true, canonicalID, -1), stdType, date, name);
     }
 
     if (timeType && !name.isEmpty()) {
@@ -1426,13 +1426,13 @@ TimeZoneFormat::formatExemplarLocation(const TimeZone& tz, UnicodeString& name)
     const UChar* canonicalID = ZoneMeta::getCanonicalCLDRID(tz);
 
     if (canonicalID) {
-        fTimeZoneNames->getExemplarLocationName(UnicodeString(TRUE, canonicalID, -1), location);
+        fTimeZoneNames->getExemplarLocationName(UnicodeString(true, canonicalID, -1), location);
     }
     if (location.length() > 0) {
         name.setTo(location);
     } else {
         // Use "unknown" location
-        fTimeZoneNames->getExemplarLocationName(UnicodeString(TRUE, UNKNOWN_ZONE_ID, -1), location);
+        fTimeZoneNames->getExemplarLocationName(UnicodeString(true, UNKNOWN_ZONE_ID, -1), location);
         if (location.length() > 0) {
             name.setTo(location);
         } else {
@@ -1450,38 +1450,38 @@ TimeZoneFormat::formatExemplarLocation(const TimeZone& tz, UnicodeString& name)
 UnicodeString&
 TimeZoneFormat::formatOffsetISO8601Basic(int32_t offset, UBool useUtcIndicator, UBool isShort, UBool ignoreSeconds,
         UnicodeString& result, UErrorCode& status) const {
-    return formatOffsetISO8601(offset, TRUE, useUtcIndicator, isShort, ignoreSeconds, result, status);
+    return formatOffsetISO8601(offset, true, useUtcIndicator, isShort, ignoreSeconds, result, status);
 }
 
 UnicodeString&
 TimeZoneFormat::formatOffsetISO8601Extended(int32_t offset, UBool useUtcIndicator, UBool isShort, UBool ignoreSeconds,
         UnicodeString& result, UErrorCode& status) const {
-    return formatOffsetISO8601(offset, FALSE, useUtcIndicator, isShort, ignoreSeconds, result, status);
+    return formatOffsetISO8601(offset, false, useUtcIndicator, isShort, ignoreSeconds, result, status);
 }
 
 UnicodeString&
 TimeZoneFormat::formatOffsetLocalizedGMT(int32_t offset, UnicodeString& result, UErrorCode& status) const {
-    return formatOffsetLocalizedGMT(offset, FALSE, result, status);
+    return formatOffsetLocalizedGMT(offset, false, result, status);
 }
 
 UnicodeString&
 TimeZoneFormat::formatOffsetShortLocalizedGMT(int32_t offset, UnicodeString& result, UErrorCode& status) const {
-    return formatOffsetLocalizedGMT(offset, TRUE, result, status);
+    return formatOffsetLocalizedGMT(offset, true, result, status);
 }
 
 int32_t
 TimeZoneFormat::parseOffsetISO8601(const UnicodeString& text, ParsePosition& pos) const {
-    return parseOffsetISO8601(text, pos, FALSE);
+    return parseOffsetISO8601(text, pos, false);
 }
 
 int32_t
 TimeZoneFormat::parseOffsetLocalizedGMT(const UnicodeString& text, ParsePosition& pos) const {
-    return parseOffsetLocalizedGMT(text, pos, FALSE, NULL);
+    return parseOffsetLocalizedGMT(text, pos, false, NULL);
 }
 
 int32_t
 TimeZoneFormat::parseOffsetShortLocalizedGMT(const UnicodeString& text, ParsePosition& pos) const {
-    return parseOffsetLocalizedGMT(text, pos, TRUE, NULL);
+    return parseOffsetLocalizedGMT(text, pos, true, NULL);
 }
 
 // ------------------------------------------------------------------
@@ -1572,10 +1572,10 @@ TimeZoneFormat::formatOffsetLocalizedGMT(int32_t offset, UBool isShort, UnicodeS
         return result;
     }
 
-    UBool positive = TRUE;
+    UBool positive = true;
     if (offset < 0) {
         offset = -offset;
-        positive = FALSE;
+        positive = false;
     }
 
     int32_t offsetH = offset / MILLIS_PER_HOUR;
@@ -1640,7 +1640,7 @@ TimeZoneFormat::formatOffsetLocalizedGMT(int32_t offset, UBool isShort, UnicodeS
 int32_t
 TimeZoneFormat::parseOffsetISO8601(const UnicodeString& text, ParsePosition& pos, UBool extendedOnly, UBool* hasDigitOffset /* = NULL */) const {
     if (hasDigitOffset) {
-        *hasDigitOffset = FALSE;
+        *hasDigitOffset = false;
     }
     int32_t start = pos.getIndex();
     if (start >= text.length()) {
@@ -1672,7 +1672,7 @@ TimeZoneFormat::parseOffsetISO8601(const UnicodeString& text, ParsePosition& pos
         // as basic format. For example, "0230" can be parsed as offset 2:00 (only first digits are valid for
         // extended format), but it can be parsed as offset 2:30 with basic format. We use longer result.
         ParsePosition posBasic(start + 1);
-        int32_t tmpOffset = parseAbuttingAsciiOffsetFields(text, posBasic, FIELDS_H, FIELDS_HMS, FALSE);
+        int32_t tmpOffset = parseAbuttingAsciiOffsetFields(text, posBasic, FIELDS_H, FIELDS_HMS, false);
         if (posBasic.getErrorIndex() == -1 && posBasic.getIndex() > posOffset.getIndex()) {
             offset = tmpOffset;
             posOffset.setIndex(posBasic.getIndex());
@@ -1686,7 +1686,7 @@ TimeZoneFormat::parseOffsetISO8601(const UnicodeString& text, ParsePosition& pos
 
     pos.setIndex(posOffset.getIndex());
     if (hasDigitOffset) {
-        *hasDigitOffset = TRUE;
+        *hasDigitOffset = true;
     }
     return sign * offset;
 }
@@ -1698,7 +1698,7 @@ TimeZoneFormat::parseOffsetLocalizedGMT(const UnicodeString& text, ParsePosition
     int32_t parsedLength = 0;
 
     if (hasDigitOffset) {
-        *hasDigitOffset = FALSE;
+        *hasDigitOffset = false;
     }
 
     offset = parseOffsetLocalizedGMTPattern(text, start, isShort, parsedLength);
@@ -1715,7 +1715,7 @@ TimeZoneFormat::parseOffsetLocalizedGMT(const UnicodeString& text, ParsePosition
 
     if (parsedLength > 0) {
         if (hasDigitOffset) {
-            *hasDigitOffset = TRUE;
+            *hasDigitOffset = true;
         }
         pos.setIndex(start + parsedLength);
         return offset;
@@ -1725,7 +1725,7 @@ TimeZoneFormat::parseOffsetLocalizedGMT(const UnicodeString& text, ParsePosition
     offset = parseOffsetDefaultLocalizedGMT(text, start, parsedLength);
     if (parsedLength > 0) {
         if (hasDigitOffset) {
-            *hasDigitOffset = TRUE;
+            *hasDigitOffset = true;
         }
         pos.setIndex(start + parsedLength);
         return offset;
@@ -1756,7 +1756,7 @@ int32_t
 TimeZoneFormat::parseOffsetLocalizedGMTPattern(const UnicodeString& text, int32_t start, UBool /*isShort*/, int32_t& parsedLen) const {
     int32_t idx = start;
     int32_t offset = 0;
-    UBool parsed = FALSE;
+    UBool parsed = false;
 
     do {
         // Prefix part
@@ -1768,7 +1768,7 @@ TimeZoneFormat::parseOffsetLocalizedGMTPattern(const UnicodeString& text, int32_
         idx += len;
 
         // Offset part
-        offset = parseOffsetFields(text, idx, FALSE, len);
+        offset = parseOffsetFields(text, idx, false, len);
         if (len == 0) {
             // offset field match failed
             break;
@@ -1781,8 +1781,8 @@ TimeZoneFormat::parseOffsetLocalizedGMTPattern(const UnicodeString& text, int32_
             break;
         }
         idx += len;
-        parsed = TRUE;
-    } while (FALSE);
+        parsed = true;
+    } while (false);
 
     parsedLen = parsed ? idx - start : 0;
     return offset;
@@ -1804,7 +1804,7 @@ TimeZoneFormat::parseOffsetFields(const UnicodeString& text, int32_t start, UBoo
         UVector* items = fGMTOffsetPatternItems[gmtPatType];
         U_ASSERT(items != NULL);
 
-        outLen = parseOffsetFieldsWithPattern(text, start, items, FALSE, offsetH, offsetM, offsetS);
+        outLen = parseOffsetFieldsWithPattern(text, start, items, false, offsetH, offsetM, offsetS);
         if (outLen > 0) {
             sign = (gmtPatType == UTZFMT_PAT_POSITIVE_H || gmtPatType == UTZFMT_PAT_POSITIVE_HM || gmtPatType == UTZFMT_PAT_POSITIVE_HMS) ?
                 1 : -1;
@@ -1829,7 +1829,7 @@ TimeZoneFormat::parseOffsetFields(const UnicodeString& text, int32_t start, UBoo
             U_ASSERT(items != NULL);
 
             // forcing parse to use single hour digit
-            tmpLen = parseOffsetFieldsWithPattern(text, start, items, TRUE, tmpH, tmpM, tmpS);
+            tmpLen = parseOffsetFieldsWithPattern(text, start, items, true, tmpH, tmpM, tmpS);
             if (tmpLen > 0) {
                 tmpSign = (gmtPatType == UTZFMT_PAT_POSITIVE_H || gmtPatType == UTZFMT_PAT_POSITIVE_HM || gmtPatType == UTZFMT_PAT_POSITIVE_HMS) ?
                     1 : -1;
@@ -1857,7 +1857,7 @@ TimeZoneFormat::parseOffsetFields(const UnicodeString& text, int32_t start, UBoo
 int32_t
 TimeZoneFormat::parseOffsetFieldsWithPattern(const UnicodeString& text, int32_t start,
         UVector* patternItems, UBool forceSingleHourDigit, int32_t& hour, int32_t& min, int32_t& sec) const {
-    UBool failed = FALSE;
+    UBool failed = false;
     int32_t offsetH, offsetM, offsetS;
     offsetH = offsetM = offsetS = 0;
     int32_t idx = start;
@@ -1891,7 +1891,7 @@ TimeZoneFormat::parseOffsetFieldsWithPattern(const UnicodeString& text, int32_t
                 }
             }
             if (text.caseCompare(idx, len, patStr, 0) != 0) {
-                failed = TRUE;
+                failed = true;
                 break;
             }
             idx += len;
@@ -1906,7 +1906,7 @@ TimeZoneFormat::parseOffsetFieldsWithPattern(const UnicodeString& text, int32_t
             }
 
             if (len == 0) {
-                failed = TRUE;
+                failed = true;
                 break;
             }
             idx += len;
@@ -2092,7 +2092,7 @@ TimeZoneFormat::parseDefaultOffsetFields(const UnicodeString& text, int32_t star
                 idx += (1 + len);
             }
         }
-    } while (FALSE);
+    } while (false);
 
     if (idx == start) {
         return 0;
@@ -2240,7 +2240,7 @@ TimeZoneFormat::parseAbuttingAsciiOffsetFields(const UnicodeString& text, ParseP
     }
 
     int32_t hour = 0, min = 0, sec = 0;
-    UBool bParsed = FALSE;
+    UBool bParsed = false;
     while (numDigits >= minDigits) {
         switch (numDigits) {
         case 1: //H
@@ -2409,20 +2409,20 @@ TimeZoneFormat::unquote(const UnicodeString& pattern, UnicodeString& result) {
         return result;
     }
     result.remove();
-    UBool isPrevQuote = FALSE;
-    UBool inQuote = FALSE;
+    UBool isPrevQuote = false;
+    UBool inQuote = false;
     for (int32_t i = 0; i < pattern.length(); i++) {
         UChar c = pattern.charAt(i);
         if (c == SINGLEQUOTE) {
             if (isPrevQuote) {
                 result.append(c);
-                isPrevQuote = FALSE;
+                isPrevQuote = false;
             } else {
-                isPrevQuote = TRUE;
+                isPrevQuote = true;
             }
             inQuote = !inQuote;
         } else {
-            isPrevQuote = FALSE;
+            isPrevQuote = false;
             result.append(c);
         }
     }
@@ -2441,8 +2441,8 @@ TimeZoneFormat::parseOffsetPattern(const UnicodeString& pattern, OffsetFields re
     }
 
     int32_t checkBits = 0;
-    UBool isPrevQuote = FALSE;
-    UBool inQuote = FALSE;
+    UBool isPrevQuote = false;
+    UBool inQuote = false;
     UChar textBuf[32];
     UnicodeString text(textBuf, 0, UPRV_LENGTHOF(textBuf));
     GMTOffsetField::FieldType itemType = GMTOffsetField::TEXT;
@@ -2453,9 +2453,9 @@ TimeZoneFormat::parseOffsetPattern(const UnicodeString& pattern, OffsetFields re
         if (ch == SINGLEQUOTE) {
             if (isPrevQuote) {
                 text.append(SINGLEQUOTE);
-                isPrevQuote = FALSE;
+                isPrevQuote = false;
             } else {
-                isPrevQuote = TRUE;
+                isPrevQuote = true;
                 if (itemType != GMTOffsetField::TEXT) {
                     if (GMTOffsetField::isValid(itemType, itemLength)) {
                         GMTOffsetField* fld = GMTOffsetField::createTimeField(itemType, static_cast(itemLength), status);
@@ -2472,7 +2472,7 @@ TimeZoneFormat::parseOffsetPattern(const UnicodeString& pattern, OffsetFields re
             }
             inQuote = !inQuote;
         } else {
-            isPrevQuote = FALSE;
+            isPrevQuote = false;
             if (inQuote) {
                 text.append(ch);
             } else {
@@ -2647,19 +2647,19 @@ TimeZoneFormat::initGMTOffsetPatterns(UErrorCode& status) {
 
 void
 TimeZoneFormat::checkAbuttingHoursAndMinutes() {
-    fAbuttingOffsetHoursAndMinutes= FALSE;
+    fAbuttingOffsetHoursAndMinutes= false;
     for (int32_t type = 0; type < UTZFMT_PAT_COUNT; type++) {
-        UBool afterH = FALSE;
+        UBool afterH = false;
         UVector *items = fGMTOffsetPatternItems[type];
         for (int32_t i = 0; i < items->size(); i++) {
             const GMTOffsetField* item = (GMTOffsetField*)items->elementAt(i);
             GMTOffsetField::FieldType fieldType = item->getType();
             if (fieldType != GMTOffsetField::TEXT) {
                 if (afterH) {
-                    fAbuttingOffsetHoursAndMinutes = TRUE;
+                    fAbuttingOffsetHoursAndMinutes = true;
                     break;
                 } else if (fieldType == GMTOffsetField::HOUR) {
-                    afterH = TRUE;
+                    afterH = true;
                 }
             } else if (afterH) {
                 break;
@@ -2675,7 +2675,7 @@ UBool
 TimeZoneFormat::toCodePoints(const UnicodeString& str, UChar32* codeArray, int32_t size) {
     int32_t count = str.countChar32();
     if (count != size) {
-        return FALSE;
+        return false;
     }
 
     for (int32_t idx = 0, start = 0; idx < size; idx++) {
@@ -2683,14 +2683,14 @@ TimeZoneFormat::toCodePoints(const UnicodeString& str, UChar32* codeArray, int32
         start = str.moveIndex32(start, 1);
     }
 
-    return TRUE;
+    return true;
 }
 
 TimeZone*
 TimeZoneFormat::createTimeZoneForOffset(int32_t offset) const {
     if (offset == 0) {
         // when offset is 0, we should use "Etc/GMT"
-        return TimeZone::createTimeZone(UnicodeString(TRUE, TZID_GMT, -1));
+        return TimeZone::createTimeZone(UnicodeString(true, TZID_GMT, -1));
     }
     return ZoneMeta::createCustomTimeZone(offset);
 }
@@ -2747,7 +2747,7 @@ ZoneIdMatchHandler::~ZoneIdMatchHandler() {
 UBool
 ZoneIdMatchHandler::handleMatch(int32_t matchLength, const CharacterNode *node, UErrorCode &status) {
     if (U_FAILURE(status)) {
-        return FALSE;
+        return false;
     }
     if (node->hasValues()) {
         const UChar* id = (const UChar*)node->getValue(0);
@@ -2758,7 +2758,7 @@ ZoneIdMatchHandler::handleMatch(int32_t matchLength, const CharacterNode *node,
             }
         }
     }
-    return TRUE;
+    return true;
 }
 
 const UChar*
@@ -2775,7 +2775,7 @@ ZoneIdMatchHandler::getMatchLen() {
 static void U_CALLCONV initZoneIdTrie(UErrorCode &status) {
     U_ASSERT(gZoneIdTrie == NULL);
     ucln_i18n_registerCleanup(UCLN_I18N_TIMEZONEFORMAT, tzfmt_cleanup);
-    gZoneIdTrie = new TextTrieMap(TRUE, NULL);    // No deleter, because values are pooled by ZoneMeta
+    gZoneIdTrie = new TextTrieMap(true, NULL);    // No deleter, because values are pooled by ZoneMeta
     if (gZoneIdTrie == NULL) {
         status = U_MEMORY_ALLOCATION_ERROR;
         return;
@@ -2826,7 +2826,7 @@ static void U_CALLCONV initShortZoneIdTrie(UErrorCode &status) {
     ucln_i18n_registerCleanup(UCLN_I18N_TIMEZONEFORMAT, tzfmt_cleanup);
     StringEnumeration *tzenum = TimeZone::createTimeZoneIDEnumeration(UCAL_ZONE_TYPE_CANONICAL, NULL, NULL, status);
     if (U_SUCCESS(status)) {
-        gShortZoneIdTrie = new TextTrieMap(TRUE, NULL);    // No deleter, because values are pooled by ZoneMeta
+        gShortZoneIdTrie = new TextTrieMap(true, NULL);    // No deleter, because values are pooled by ZoneMeta
         if (gShortZoneIdTrie == NULL) {
             status = U_MEMORY_ALLOCATION_ERROR;
         } else {
diff --git a/icu4c/source/i18n/tzgnames.cpp b/icu4c/source/i18n/tzgnames.cpp
index d5ee45ced78..e96dfd2b2f2 100644
--- a/icu4c/source/i18n/tzgnames.cpp
+++ b/icu4c/source/i18n/tzgnames.cpp
@@ -87,10 +87,10 @@ comparePartialLocationKey(const UHashTok key1, const UHashTok key2) {
     PartialLocationKey *p2 = (PartialLocationKey *)key2.pointer;
 
     if (p1 == p2) {
-        return TRUE;
+        return true;
     }
     if (p1 == NULL || p2 == NULL) {
-        return FALSE;
+        return false;
     }
     // We just check identity of tzID/mzID
     return (p1->tzID == p2->tzID && p1->mzID == p2->mzID && p1->isLong == p2->isLong);
@@ -180,7 +180,7 @@ UnicodeString&
 TimeZoneGenericNameMatchInfo::getTimeZoneID(int32_t index, UnicodeString& tzID) const {
     GMatchInfo *minfo = (GMatchInfo *)fMatches->elementAt(index);
     if (minfo != NULL && minfo->gnameInfo->tzID != NULL) {
-        tzID.setTo(TRUE, minfo->gnameInfo->tzID, -1);
+        tzID.setTo(true, minfo->gnameInfo->tzID, -1);
     } else {
         tzID.setToBogus();
     }
@@ -217,7 +217,7 @@ GNameSearchHandler::~GNameSearchHandler() {
 UBool
 GNameSearchHandler::handleMatch(int32_t matchLength, const CharacterNode *node, UErrorCode &status) {
     if (U_FAILURE(status)) {
-        return FALSE;
+        return false;
     }
     if (node->hasValues()) {
         int32_t valuesCount = node->countValues();
@@ -254,7 +254,7 @@ GNameSearchHandler::handleMatch(int32_t matchLength, const CharacterNode *node,
             }
         }
     }
-    return TRUE;
+    return true;
 }
 
 UVector*
@@ -338,8 +338,8 @@ TZGNCore::TZGNCore(const Locale& locale, UErrorCode& status)
   fPartialLocationNamesMap(NULL),
   fLocaleDisplayNames(NULL),
   fStringPool(status),
-  fGNamesTrie(TRUE, deleteGNameInfo),
-  fGNamesTrieFullyLoaded(FALSE) {
+  fGNamesTrie(true, deleteGNameInfo),
+  fGNamesTrieFullyLoaded(false) {
     initialize(locale, status);
 }
 
@@ -360,8 +360,8 @@ TZGNCore::initialize(const Locale& locale, UErrorCode& status) {
     }
 
     // Initialize format patterns
-    UnicodeString rpat(TRUE, gDefRegionPattern, -1);
-    UnicodeString fpat(TRUE, gDefFallbackPattern, -1);
+    UnicodeString rpat(true, gDefRegionPattern, -1);
+    UnicodeString fpat(true, gDefFallbackPattern, -1);
 
     UErrorCode tmpsts = U_ZERO_ERROR;   // OK with fallback warning..
     UResourceBundle *zoneStrings = ures_open(U_ICUDATA_ZONE, locale.getName(), &tmpsts);
@@ -432,7 +432,7 @@ TZGNCore::initialize(const Locale& locale, UErrorCode& status) {
     TimeZone *tz = TimeZone::createDefault();
     const UChar *tzID = ZoneMeta::getCanonicalCLDRID(*tz);
     if (tzID != NULL) {
-        loadStrings(UnicodeString(TRUE, tzID, -1));
+        loadStrings(UnicodeString(true, tzID, -1));
     }
     delete tz;
 }
@@ -459,7 +459,7 @@ TZGNCore::getDisplayName(const TimeZone& tz, UTimeZoneGenericNameType type, UDat
         {
             const UChar* tzCanonicalID = ZoneMeta::getCanonicalCLDRID(tz);
             if (tzCanonicalID != NULL) {
-                getGenericLocationName(UnicodeString(TRUE, tzCanonicalID, -1), name);
+                getGenericLocationName(UnicodeString(true, tzCanonicalID, -1), name);
             }
         }
         break;
@@ -469,7 +469,7 @@ TZGNCore::getDisplayName(const TimeZone& tz, UTimeZoneGenericNameType type, UDat
         if (name.isEmpty()) {
             const UChar* tzCanonicalID = ZoneMeta::getCanonicalCLDRID(tz);
             if (tzCanonicalID != NULL) {
-                getGenericLocationName(UnicodeString(TRUE, tzCanonicalID, -1), name);
+                getGenericLocationName(UnicodeString(true, tzCanonicalID, -1), name);
             }
         }
         break;
@@ -532,7 +532,7 @@ TZGNCore::getGenericLocationName(const UnicodeString& tzCanonicalID) {
     // Construct location name
     UnicodeString name;
     UnicodeString usCountryCode;
-    UBool isPrimary = FALSE;
+    UBool isPrimary = false;
 
     ZoneMeta::getCanonicalCountry(tzCanonicalID, usCountryCode, &isPrimary);
 
@@ -600,7 +600,7 @@ TZGNCore::formatGenericNonLocationName(const TimeZone& tz, UTimeZoneGenericNameT
         return name;
     }
 
-    UnicodeString tzID(TRUE, uID, -1);
+    UnicodeString tzID(true, uID, -1);
 
     // Try to get a name from time zone first
     UTimeZoneNameType nameType = (type == UTZGNM_LONG) ? UTZNM_LONG_GENERIC : UTZNM_SHORT_GENERIC;
@@ -616,17 +616,17 @@ TZGNCore::formatGenericNonLocationName(const TimeZone& tz, UTimeZoneGenericNameT
     fTimeZoneNames->getMetaZoneID(tzID, date, mzID);
     if (!mzID.isEmpty()) {
         UErrorCode status = U_ZERO_ERROR;
-        UBool useStandard = FALSE;
+        UBool useStandard = false;
         int32_t raw, sav;
         UChar tmpNameBuf[ZONE_NAME_U16_MAX];
 
-        tz.getOffset(date, FALSE, raw, sav, status);
+        tz.getOffset(date, false, raw, sav, status);
         if (U_FAILURE(status)) {
             return name;
         }
 
         if (sav == 0) {
-            useStandard = TRUE;
+            useStandard = true;
 
             TimeZone *tmptz = tz.clone();
             // Check if the zone actually uses daylight saving time around the time
@@ -640,30 +640,30 @@ TZGNCore::formatGenericNonLocationName(const TimeZone& tz, UTimeZoneGenericNameT
 
             if (btz != NULL) {
                 TimeZoneTransition before;
-                UBool beforTrs = btz->getPreviousTransition(date, TRUE, before);
+                UBool beforTrs = btz->getPreviousTransition(date, true, before);
                 if (beforTrs
                         && (date - before.getTime() < kDstCheckRange)
                         && before.getFrom()->getDSTSavings() != 0) {
-                    useStandard = FALSE;
+                    useStandard = false;
                 } else {
                     TimeZoneTransition after;
-                    UBool afterTrs = btz->getNextTransition(date, FALSE, after);
+                    UBool afterTrs = btz->getNextTransition(date, false, after);
                     if (afterTrs
                             && (after.getTime() - date < kDstCheckRange)
                             && after.getTo()->getDSTSavings() != 0) {
-                        useStandard = FALSE;
+                        useStandard = false;
                     }
                 }
             } else {
                 // If not BasicTimeZone... only if the instance is not an ICU's implementation.
                 // We may get a wrong answer in edge case, but it should practically work OK.
-                tmptz->getOffset(date - kDstCheckRange, FALSE, raw, sav, status);
+                tmptz->getOffset(date - kDstCheckRange, false, raw, sav, status);
                 if (sav != 0) {
-                    useStandard = FALSE;
+                    useStandard = false;
                 } else {
-                    tmptz->getOffset(date + kDstCheckRange, FALSE, raw, sav, status);
+                    tmptz->getOffset(date + kDstCheckRange, false, raw, sav, status);
                     if (sav != 0){
-                        useStandard = FALSE;
+                        useStandard = false;
                     }
                 }
                 if (U_FAILURE(status)) {
@@ -713,7 +713,7 @@ TZGNCore::formatGenericNonLocationName(const TimeZone& tz, UTimeZoneGenericNameT
                     // With getOffset(date, false, offsets1),
                     // you may get incorrect results because of time overlap at DST->STD
                     // transition.
-                    goldenZone->getOffset(date + raw + sav, TRUE, raw1, sav1, status);
+                    goldenZone->getOffset(date + raw + sav, true, raw1, sav1, status);
                     delete goldenZone;
                     if (U_SUCCESS(status)) {
                         if (raw != raw1 || sav != sav1) {
@@ -752,7 +752,7 @@ TZGNCore::getPartialLocationName(const UnicodeString& tzCanonicalID,
     if (uplname == NULL) {
         name.setToBogus();
     } else {
-        name.setTo(TRUE, uplname, -1);
+        name.setTo(true, uplname, -1);
     }
     return name;
 }
@@ -902,8 +902,8 @@ TZGNCore::findBestMatch(const UnicodeString& text, int32_t start, uint32_t types
     int32_t bestMatchLen = 0;
     UTimeZoneFormatTimeType bestMatchTimeType = UTZFMT_TIME_TYPE_UNKNOWN;
     UnicodeString bestMatchTzID;
-    // UBool isLongStandard = FALSE;   // workaround - see the comments below
-    UBool isStandard = FALSE;       // TODO: Temporary hack (on hack) for short standard name/location name conflict (found in zh_Hant), should be removed after CLDR 21m1 integration
+    // UBool isLongStandard = false;   // workaround - see the comments below
+    UBool isStandard = false;       // TODO: Temporary hack (on hack) for short standard name/location name conflict (found in zh_Hant), should be removed after CLDR 21m1 integration
 
     if (tznamesMatches != NULL) {
         UnicodeString mzID;
@@ -923,9 +923,9 @@ TZGNCore::findBestMatch(const UnicodeString& text, int32_t start, uint32_t types
                 }
                 switch (nameType) {
                 case UTZNM_LONG_STANDARD:
-                    // isLongStandard = TRUE;
+                    // isLongStandard = true;
                 case UTZNM_SHORT_STANDARD:  // this one is never used for generic, but just in case
-                    isStandard = TRUE;      // TODO: Remove this later, see the comments above.
+                    isStandard = true;      // TODO: Remove this later, see the comments above.
                     bestMatchTimeType = UTZFMT_TIME_TYPE_STANDARD;
                     break;
                 case UTZNM_LONG_DAYLIGHT:
@@ -1059,7 +1059,7 @@ TZGNCore::findLocal(const UnicodeString& text, int32_t start, uint32_t types, UE
             }
 
             if (U_SUCCESS(status)) {
-                nonConstThis->fGNamesTrieFullyLoaded = TRUE;
+                nonConstThis->fGNamesTrieFullyLoaded = true;
             }
         }
     }
@@ -1117,7 +1117,7 @@ typedef struct TZGNCoreRef {
 // TZGNCore object cache handling
 static UMutex gTZGNLock;
 static UHashtable *gTZGNCoreCache = NULL;
-static UBool gTZGNCoreCacheInitialized = FALSE;
+static UBool gTZGNCoreCacheInitialized = false;
 
 // Access count - incremented every time up to SWEEP_INTERVAL,
 // then reset to 0
@@ -1142,8 +1142,8 @@ static UBool U_CALLCONV tzgnCore_cleanup(void)
         uhash_close(gTZGNCoreCache);
         gTZGNCoreCache = NULL;
     }
-    gTZGNCoreCacheInitialized = FALSE;
-    return TRUE;
+    gTZGNCoreCacheInitialized = false;
+    return true;
 }
 
 /**
@@ -1211,7 +1211,7 @@ TimeZoneGenericNames::createInstance(const Locale& locale, UErrorCode& status) {
             if (U_SUCCESS(status)) {
                 uhash_setKeyDeleter(gTZGNCoreCache, uprv_free);
                 uhash_setValueDeleter(gTZGNCoreCache, deleteTZGNCoreRef);
-                gTZGNCoreCacheInitialized = TRUE;
+                gTZGNCoreCacheInitialized = true;
                 ucln_i18n_registerCleanup(UCLN_I18N_TIMEZONEGENERICNAMES, tzgnCore_cleanup);
             }
         }
diff --git a/icu4c/source/i18n/tznames.cpp b/icu4c/source/i18n/tznames.cpp
index 781f1cc161f..ef4266718e0 100644
--- a/icu4c/source/i18n/tznames.cpp
+++ b/icu4c/source/i18n/tznames.cpp
@@ -31,7 +31,7 @@ U_NAMESPACE_BEGIN
 // TimeZoneNames object cache handling
 static UMutex gTimeZoneNamesLock;
 static UHashtable *gTimeZoneNamesCache = NULL;
-static UBool gTimeZoneNamesCacheInitialized = FALSE;
+static UBool gTimeZoneNamesCacheInitialized = false;
 
 // Access count - incremented every time up to SWEEP_INTERVAL,
 // then reset to 0
@@ -62,8 +62,8 @@ static UBool U_CALLCONV timeZoneNames_cleanup(void)
         uhash_close(gTimeZoneNamesCache);
         gTimeZoneNamesCache = NULL;
     }
-    gTimeZoneNamesCacheInitialized = FALSE;
-    return TRUE;
+    gTimeZoneNamesCacheInitialized = false;
+    return true;
 }
 
 /**
@@ -139,7 +139,7 @@ TimeZoneNamesDelegate::TimeZoneNamesDelegate(const Locale& locale, UErrorCode& s
         if (U_SUCCESS(status)) {
             uhash_setKeyDeleter(gTimeZoneNamesCache, uprv_free);
             uhash_setValueDeleter(gTimeZoneNamesCache, deleteTimeZoneNamesCacheEntry);
-            gTimeZoneNamesCacheInitialized = TRUE;
+            gTimeZoneNamesCacheInitialized = true;
             ucln_i18n_registerCleanup(UCLN_I18N_TIMEZONENAMES, timeZoneNames_cleanup);
         }
     }
@@ -380,10 +380,10 @@ struct MatchInfo : UMemory {
         this->matchLength = matchLength;
         if (tzID != NULL) {
             this->id.setTo(*tzID);
-            this->isTZID = TRUE;
+            this->isTZID = true;
         } else {
             this->id.setTo(*mzID);
-            this->isTZID = FALSE;
+            this->isTZID = false;
         }
     }
 };
@@ -468,9 +468,9 @@ TimeZoneNames::MatchInfoCollection::getTimeZoneIDAt(int32_t idx, UnicodeString&
     const MatchInfo* match = (const MatchInfo*)fMatches->elementAt(idx);
     if (match && match->isTZID) {
         tzID.setTo(match->id);
-        return TRUE;
+        return true;
     }
-    return FALSE;
+    return false;
 }
 
 UBool
@@ -479,9 +479,9 @@ TimeZoneNames::MatchInfoCollection::getMetaZoneIDAt(int32_t idx, UnicodeString&
     const MatchInfo* match = (const MatchInfo*)fMatches->elementAt(idx);
     if (match && !match->isTZID) {
         mzID.setTo(match->id);
-        return TRUE;
+        return true;
     }
-    return FALSE;
+    return false;
 }
 
 UVector*
diff --git a/icu4c/source/i18n/tznames_impl.cpp b/icu4c/source/i18n/tznames_impl.cpp
index dcddafcd754..2005c07ba81 100644
--- a/icu4c/source/i18n/tznames_impl.cpp
+++ b/icu4c/source/i18n/tznames_impl.cpp
@@ -88,7 +88,7 @@ static UBool U_CALLCONV tzdbTimeZoneNames_cleanup(void) {
     }
     gTZDBNamesTrieInitOnce.reset();
 
-    return TRUE;
+    return true;
 }
 U_CDECL_END
 
@@ -162,7 +162,7 @@ CharacterNode::addValue(void *value, UObjectDeleter *valueDeleter, UErrorCode &s
                 values->addElement(fValues, status);
             }
             fValues = values.orphan();
-            fHasValuesVector = TRUE;
+            fHasValuesVector = true;
         }
         // Add the new value.
         UVector *values = (UVector *)fValues;
@@ -185,7 +185,7 @@ TextTrieMapSearchResultHandler::~TextTrieMapSearchResultHandler(){
 // ---------------------------------------------------
 TextTrieMap::TextTrieMap(UBool ignoreCase, UObjectDeleter *valueDeleter)
 : fIgnoreCase(ignoreCase), fNodes(NULL), fNodesCapacity(0), fNodesCount(0), 
-  fLazyContents(NULL), fIsEmpty(TRUE), fValueDeleter(valueDeleter) {
+  fLazyContents(NULL), fIsEmpty(true), fValueDeleter(valueDeleter) {
 }
 
 TextTrieMap::~TextTrieMap() {
@@ -227,7 +227,7 @@ TextTrieMap::put(const UnicodeString &key, void *value, ZNStringPool &sp, UError
 // resource bundle.
 void
 TextTrieMap::put(const UChar *key, void *value, UErrorCode &status) {
-    fIsEmpty = FALSE;
+    fIsEmpty = false;
     if (fLazyContents == NULL) {
         LocalPointer lpLazyContents(new UVector(status), status);
         fLazyContents = lpLazyContents.orphan();
@@ -289,7 +289,7 @@ TextTrieMap::putImpl(const UnicodeString &key, void *value, UErrorCode &status)
 UBool
 TextTrieMap::growNodes() {
     if (fNodesCapacity == 0xffff) {
-        return FALSE;  // We use 16-bit node indexes.
+        return false;  // We use 16-bit node indexes.
     }
     int32_t newCapacity = fNodesCapacity + 1000;
     if (newCapacity > 0xffff) {
@@ -297,13 +297,13 @@ TextTrieMap::growNodes() {
     }
     CharacterNode *newNodes = (CharacterNode *)uprv_malloc(newCapacity * sizeof(CharacterNode));
     if (newNodes == NULL) {
-        return FALSE;
+        return false;
     }
     uprv_memcpy(newNodes, fNodes, fNodesCount * sizeof(CharacterNode));
     uprv_free(fNodes);
     fNodes = newNodes;
     fNodesCapacity = newCapacity;
-    return TRUE;
+    return true;
 }
 
 CharacterNode*
@@ -377,7 +377,7 @@ void TextTrieMap::buildTrie(UErrorCode &status) {
         for (int32_t i=0; isize(); i+=2) {
             const UChar *key = (UChar *)fLazyContents->elementAt(i);
             void  *val = fLazyContents->elementAt(i+1);
-            UnicodeString keyString(TRUE, key, -1);  // Aliasing UnicodeString constructor.
+            UnicodeString keyString(true, key, -1);  // Aliasing UnicodeString constructor.
             putImpl(keyString, val, status);
         }
         delete fLazyContents;
@@ -617,13 +617,13 @@ private:
     UBool fOwnsLocationName;
 
     ZNames(const UChar* names[], const UChar* locationName)
-            : fDidAddIntoTrie(FALSE) {
+            : fDidAddIntoTrie(false) {
         uprv_memcpy(fNames, names, sizeof(fNames));
         if (locationName != NULL) {
-            fOwnsLocationName = TRUE;
+            fOwnsLocationName = true;
             fNames[UTZNM_INDEX_EXEMPLAR_LOCATION] = locationName;
         } else {
-            fOwnsLocationName = FALSE;
+            fOwnsLocationName = false;
         }
     }
 
@@ -713,7 +713,7 @@ private:
             UErrorCode& status) {
         if (U_FAILURE(status)) { return; }
         if (fDidAddIntoTrie) { return; }
-        fDidAddIntoTrie = TRUE;
+        fDidAddIntoTrie = true;
 
         for (int32_t i = 0; i < UTZNM_INDEX_COUNT; i++) {
             const UChar* name = fNames[i];
@@ -948,7 +948,7 @@ ZNameSearchHandler::~ZNameSearchHandler() {
 UBool
 ZNameSearchHandler::handleMatch(int32_t matchLength, const CharacterNode *node, UErrorCode &status) {
     if (U_FAILURE(status)) {
-        return FALSE;
+        return false;
     }
     if (node->hasValues()) {
         int32_t valuesCount = node->countValues();
@@ -980,7 +980,7 @@ ZNameSearchHandler::handleMatch(int32_t matchLength, const CharacterNode *node,
             }
         }
     }
-    return TRUE;
+    return true;
 }
 
 TimeZoneNames::MatchInfoCollection*
@@ -1028,9 +1028,9 @@ TimeZoneNamesImpl::TimeZoneNamesImpl(const Locale& locale, UErrorCode& status)
   fZoneStrings(NULL),
   fTZNamesMap(NULL),
   fMZNamesMap(NULL),
-  fNamesTrieFullyLoaded(FALSE),
-  fNamesFullyLoaded(FALSE),
-  fNamesTrie(TRUE, deleteZNameInfo) {
+  fNamesTrieFullyLoaded(false),
+  fNamesFullyLoaded(false),
+  fNamesTrie(true, deleteZNameInfo) {
     initialize(locale, status);
 }
 
@@ -1224,7 +1224,7 @@ TimeZoneNamesImpl::getMetaZoneDisplayName(const UnicodeString& mzID,
     if (znames != NULL) {
         const UChar* s = znames->getName(type);
         if (s != NULL) {
-            name.setTo(TRUE, s, -1);
+            name.setTo(true, s, -1);
         }
     }
     return name;
@@ -1250,7 +1250,7 @@ TimeZoneNamesImpl::getTimeZoneDisplayName(const UnicodeString& tzID, UTimeZoneNa
     if (tznames != NULL) {
         const UChar *s = tznames->getName(type);
         if (s != NULL) {
-            name.setTo(TRUE, s, -1);
+            name.setTo(true, s, -1);
         }
     }
     return name;
@@ -1274,7 +1274,7 @@ TimeZoneNamesImpl::getExemplarLocationName(const UnicodeString& tzID, UnicodeStr
         locName = tznames->getName(UTZNM_EXEMPLAR_LOCATION);
     }
     if (locName != NULL) {
-        name.setTo(TRUE, locName, -1);
+        name.setTo(true, locName, -1);
     }
 
     return name;
@@ -1385,7 +1385,7 @@ TimeZoneNamesImpl::find(const UnicodeString& text, int32_t start, uint32_t types
         // Load everything now.
         nonConstThis->internalLoadAllDisplayNames(status);
         nonConstThis->addAllNamesIntoTrie(status);
-        nonConstThis->fNamesTrieFullyLoaded = TRUE;
+        nonConstThis->fNamesTrieFullyLoaded = true;
         if (U_FAILURE(status)) { return NULL; }
 
         // Third try: we must return this one.
@@ -1639,7 +1639,7 @@ void TimeZoneNamesImpl::getDisplayNames(const UnicodeString& tzID,
             }
         }
         if (name != NULL) {
-            dest[i].setTo(TRUE, name, -1);
+            dest[i].setTo(true, name, -1);
         } else {
             dest[i].setToBogus();
         }
@@ -1649,7 +1649,7 @@ void TimeZoneNamesImpl::getDisplayNames(const UnicodeString& tzID,
 // Caller must synchronize.
 void TimeZoneNamesImpl::internalLoadAllDisplayNames(UErrorCode& status) {
     if (!fNamesFullyLoaded) {
-        fNamesFullyLoaded = TRUE;
+        fNamesFullyLoaded = true;
 
         ZoneStringsLoader loader(*this, status);
         loader.load(status);
@@ -1771,7 +1771,7 @@ TZDBNames::createInstance(UResourceBundle* rb, const char* key) {
     }
 
     names = (const UChar **)uprv_malloc(sizeof(const UChar*) * TZDBNAMES_KEYS_SIZE);
-    UBool isEmpty = TRUE;
+    UBool isEmpty = true;
     if (names != NULL) {
         for (int32_t i = 0; i < TZDBNAMES_KEYS_SIZE; i++) {
             status = U_ZERO_ERROR;
@@ -1780,7 +1780,7 @@ TZDBNames::createInstance(UResourceBundle* rb, const char* key) {
                 names[i] = NULL;
             } else {
                 names[i] = value;
-                isEmpty = FALSE;
+                isEmpty = false;
             }
         }
     }
@@ -1793,7 +1793,7 @@ TZDBNames::createInstance(UResourceBundle* rb, const char* key) {
     }
 
     UResourceBundle *regionsRes = ures_getByKey(rbTable, "parseRegions", NULL, &status);
-    UBool regionError = FALSE;
+    UBool regionError = false;
     if (U_SUCCESS(status)) {
         numRegions = ures_getSize(regionsRes);
         if (numRegions > 0) {
@@ -1809,12 +1809,12 @@ TZDBNames::createInstance(UResourceBundle* rb, const char* key) {
                     status = U_ZERO_ERROR;
                     const UChar *uregion = ures_getStringByIndex(regionsRes, i, &len, &status);
                     if (U_FAILURE(status)) {
-                        regionError = TRUE;
+                        regionError = true;
                         break;
                     }
                     *pRegion = (char*)uprv_malloc(sizeof(char) * (len + 1));
                     if (*pRegion == NULL) {
-                        regionError = TRUE;
+                        regionError = true;
                         break;
                     }
                     u_UCharsToChars(uregion, *pRegion, len);
@@ -1915,7 +1915,7 @@ TZDBNameSearchHandler::~TZDBNameSearchHandler() {
 UBool
 TZDBNameSearchHandler::handleMatch(int32_t matchLength, const CharacterNode *node, UErrorCode &status) {
     if (U_FAILURE(status)) {
-        return FALSE;
+        return false;
     }
 
     TZDBNameInfo *match = NULL;
@@ -1943,7 +1943,7 @@ TZDBNameSearchHandler::handleMatch(int32_t matchLength, const CharacterNode *nod
                         match = defaultRegionMatch = ninfo;
                     }
                 } else {
-                    UBool matchRegion = FALSE;
+                    UBool matchRegion = false;
                     // non-default metazone mapping for an abbreviation
                     // comes with applicable regions. For example, the default
                     // metazone mapping for "CST" is America_Central,
@@ -1953,7 +1953,7 @@ TZDBNameSearchHandler::handleMatch(int32_t matchLength, const CharacterNode *nod
                         const char *region = ninfo->parseRegions[j];
                         if (uprv_strcmp(fRegion, region) == 0) {
                             match = ninfo;
-                            matchRegion = TRUE;
+                            matchRegion = true;
                             break;
                         }
                     }
@@ -2004,7 +2004,7 @@ TZDBNameSearchHandler::handleMatch(int32_t matchLength, const CharacterNode *nod
             }
         }
     }
-    return TRUE;
+    return true;
 }
 
 TimeZoneNames::MatchInfoCollection*
@@ -2055,7 +2055,7 @@ static void U_CALLCONV prepareFind(UErrorCode &status) {
     if (U_FAILURE(status)) {
         return;
     }
-    gTZDBNamesTrie = new TextTrieMap(TRUE, deleteTZDBNameInfo);
+    gTZDBNamesTrie = new TextTrieMap(true, deleteTZDBNameInfo);
     if (gTZDBNamesTrie == NULL) {
         status = U_MEMORY_ALLOCATION_ERROR;
         return;
@@ -2131,7 +2131,7 @@ U_CDECL_END
 
 TZDBTimeZoneNames::TZDBTimeZoneNames(const Locale& locale)
 : fLocale(locale) {
-    UBool useWorld = TRUE;
+    UBool useWorld = true;
     const char* region = fLocale.getCountry();
     int32_t regionLen = static_cast(uprv_strlen(region));
     if (regionLen == 0) {
@@ -2143,11 +2143,11 @@ TZDBTimeZoneNames::TZDBTimeZoneNames(const Locale& locale)
         }
         regionLen = uloc_getCountry(loc.data(), fRegion, sizeof(fRegion), &status);
         if (U_SUCCESS(status) && regionLen < (int32_t)sizeof(fRegion)) {
-            useWorld = FALSE;
+            useWorld = false;
         }
     } else if (regionLen < (int32_t)sizeof(fRegion)) {
         uprv_strcpy(fRegion, region);
-        useWorld = FALSE;
+        useWorld = false;
     }
     if (useWorld) {
         uprv_strcpy(fRegion, "001");
@@ -2206,7 +2206,7 @@ TZDBTimeZoneNames::getMetaZoneDisplayName(const UnicodeString& mzID,
         if (tzdbNames != NULL) {
             const UChar *s = tzdbNames->getName(type);
             if (s != NULL) {
-                name.setTo(TRUE, s, -1);
+                name.setTo(true, s, -1);
             }
         }
     }
diff --git a/icu4c/source/i18n/tzrule.cpp b/icu4c/source/i18n/tzrule.cpp
index a60fffbe020..a98ecc8086b 100644
--- a/icu4c/source/i18n/tzrule.cpp
+++ b/icu4c/source/i18n/tzrule.cpp
@@ -135,26 +135,26 @@ InitialTimeZoneRule::operator!=(const TimeZoneRule& that) const {
 UBool
 InitialTimeZoneRule::isEquivalentTo(const TimeZoneRule& other) const {
     if (this == &other) {
-        return TRUE;
+        return true;
     }
-    if (typeid(*this) != typeid(other) || TimeZoneRule::isEquivalentTo(other) == FALSE) {
-        return FALSE;
+    if (typeid(*this) != typeid(other) || TimeZoneRule::isEquivalentTo(other) == false) {
+        return false;
     }
-    return TRUE;
+    return true;
 }
 
 UBool
 InitialTimeZoneRule::getFirstStart(int32_t /*prevRawOffset*/,
                                   int32_t /*prevDSTSavings*/,
                                   UDate& /*result*/) const {
-    return FALSE;
+    return false;
 }
 
 UBool
 InitialTimeZoneRule::getFinalStart(int32_t /*prevRawOffset*/,
                                   int32_t /*prevDSTSavings*/,
                                   UDate& /*result*/) const {
-    return FALSE;
+    return false;
 }
 
 UBool
@@ -163,7 +163,7 @@ InitialTimeZoneRule::getNextStart(UDate /*base*/,
                                  int32_t /*prevDSTSavings*/,
                                  UBool /*inclusive*/,
                                  UDate& /*result*/) const {
-    return FALSE;
+    return false;
 }
 
 UBool
@@ -172,7 +172,7 @@ InitialTimeZoneRule::getPreviousStart(UDate /*base*/,
                                      int32_t /*prevDSTSavings*/,
                                      UBool /*inclusive*/,
                                      UDate& /*result*/) const {
-    return FALSE;
+    return false;
 }
 
 
@@ -266,14 +266,14 @@ AnnualTimeZoneRule::getStartInYear(int32_t year,
                                    int32_t prevDSTSavings,
                                    UDate &result) const {
     if (year < fStartYear || year > fEndYear) {
-        return FALSE;
+        return false;
     }
     double ruleDay;
     DateTimeRule::DateRuleType type = fDateTimeRule->getDateRuleType();
     if (type == DateTimeRule::DOM) {
         ruleDay = Grego::fieldsToDay(year, fDateTimeRule->getRuleMonth(), fDateTimeRule->getRuleDayOfMonth());
     } else {
-        UBool after = TRUE;
+        UBool after = true;
         if (type == DateTimeRule::DOW) {
             // Normalize DOW rule into DOW_GEQ_DOM or DOW_LEQ_DOM
             int32_t weeks = fDateTimeRule->getRuleWeekInMonth();
@@ -281,7 +281,7 @@ AnnualTimeZoneRule::getStartInYear(int32_t year,
                 ruleDay = Grego::fieldsToDay(year, fDateTimeRule->getRuleMonth(), 1);
                 ruleDay += 7 * (weeks - 1);
             } else {
-                after = FALSE;
+                after = false;
                 ruleDay = Grego::fieldsToDay(year, fDateTimeRule->getRuleMonth(),
                     Grego::monthLength(year, fDateTimeRule->getRuleMonth()));
                 ruleDay += 7 * (weeks + 1);
@@ -290,7 +290,7 @@ AnnualTimeZoneRule::getStartInYear(int32_t year,
             int32_t month = fDateTimeRule->getRuleMonth();
             int32_t dom = fDateTimeRule->getRuleDayOfMonth();
             if (type == DateTimeRule::DOW_LEQ_DOM) {
-                after = FALSE;
+                after = false;
                 // Handle Feb <=29
                 if (month == UCAL_FEBRUARY && dom == 29 && !Grego::isLeapYear(year)) {
                     dom--;
@@ -315,16 +315,16 @@ AnnualTimeZoneRule::getStartInYear(int32_t year,
     if (fDateTimeRule->getTimeRuleType() == DateTimeRule::WALL_TIME) {
         result -= prevDSTSavings;
     }
-    return TRUE;
+    return true;
 }
 
 UBool
 AnnualTimeZoneRule::isEquivalentTo(const TimeZoneRule& other) const {
     if (this == &other) {
-        return TRUE;
+        return true;
     }
-    if (typeid(*this) != typeid(other) || TimeZoneRule::isEquivalentTo(other) == FALSE) {
-        return FALSE;
+    if (typeid(*this) != typeid(other) || TimeZoneRule::isEquivalentTo(other) == false) {
+        return false;
     }
     AnnualTimeZoneRule* that = (AnnualTimeZoneRule*)&other;
     return (*fDateTimeRule == *(that->fDateTimeRule) &&
@@ -344,7 +344,7 @@ AnnualTimeZoneRule::getFinalStart(int32_t prevRawOffset,
                                   int32_t prevDSTSavings,
                                   UDate& result) const {
     if (fEndYear == MAX_YEAR) {
-        return FALSE;
+        return false;
     }
     return getStartInYear(fEndYear, prevRawOffset, prevDSTSavings, result);
 }
@@ -367,10 +367,10 @@ AnnualTimeZoneRule::getNextStart(UDate base,
             return getStartInYear(year + 1, prevRawOffset, prevDSTSavings, result);
         } else {
             result = tmp;
-            return TRUE;
+            return true;
         }
     }
-    return FALSE;
+    return false;
 }
 
 UBool
@@ -391,10 +391,10 @@ AnnualTimeZoneRule::getPreviousStart(UDate base,
             return getStartInYear(year - 1, prevRawOffset, prevDSTSavings, result);
         } else {
             result = tmp;
-            return TRUE;
+            return true;
         }
     }
-    return FALSE;
+    return false;
 }
 
 UOBJECT_DEFINE_RTTI_IMPLEMENTATION(TimeArrayTimeZoneRule)
@@ -482,10 +482,10 @@ TimeArrayTimeZoneRule::getTimeType(void) const {
 UBool
 TimeArrayTimeZoneRule::getStartTimeAt(int32_t index, UDate& result) const {
     if (index >= fNumStartTimes || index < 0) {
-        return FALSE;
+        return false;
     }
     result = fStartTimes[index];
-    return TRUE;
+    return true;
 }
 
 int32_t
@@ -496,21 +496,21 @@ TimeArrayTimeZoneRule::countStartTimes(void) const {
 UBool
 TimeArrayTimeZoneRule::isEquivalentTo(const TimeZoneRule& other) const {
     if (this == &other) {
-        return TRUE;
+        return true;
     }
-    if (typeid(*this) != typeid(other) || TimeZoneRule::isEquivalentTo(other) == FALSE) {
-        return FALSE;
+    if (typeid(*this) != typeid(other) || TimeZoneRule::isEquivalentTo(other) == false) {
+        return false;
     }
     TimeArrayTimeZoneRule* that = (TimeArrayTimeZoneRule*)&other;
     if (fTimeRuleType != that->fTimeRuleType ||
         fNumStartTimes != that->fNumStartTimes) {
-        return FALSE;
+        return false;
     }
     // Compare start times
-    UBool res = TRUE;
+    UBool res = true;
     for (int32_t i = 0; i < fNumStartTimes; i++) {
         if (fStartTimes[i] != that->fStartTimes[i]) {
-            res = FALSE;
+            res = false;
             break;
         }
     }
@@ -522,10 +522,10 @@ TimeArrayTimeZoneRule::getFirstStart(int32_t prevRawOffset,
                                              int32_t prevDSTSavings,
                                              UDate& result) const {
     if (fNumStartTimes <= 0 || fStartTimes == NULL) {
-        return FALSE;
+        return false;
     }
     result = getUTC(fStartTimes[0], prevRawOffset, prevDSTSavings);
-    return TRUE;
+    return true;
 }
 
 UBool
@@ -533,10 +533,10 @@ TimeArrayTimeZoneRule::getFinalStart(int32_t prevRawOffset,
                                      int32_t prevDSTSavings,
                                      UDate& result) const {
     if (fNumStartTimes <= 0 || fStartTimes == NULL) {
-        return FALSE;
+        return false;
     }
     result = getUTC(fStartTimes[fNumStartTimes - 1], prevRawOffset, prevDSTSavings);
-    return TRUE;
+    return true;
 }
 
 UBool
@@ -554,9 +554,9 @@ TimeArrayTimeZoneRule::getNextStart(UDate base,
         result = time;
     }
     if (i == fNumStartTimes - 1) {
-        return FALSE;
+        return false;
     }
-    return TRUE;
+    return true;
 }
 
 UBool
@@ -570,10 +570,10 @@ TimeArrayTimeZoneRule::getPreviousStart(UDate base,
         UDate time = getUTC(fStartTimes[i], prevRawOffset, prevDSTSavings);
         if (time < base || (inclusive && time == base)) {
             result = time;
-            return TRUE;
+            return true;
         }
     }
-    return FALSE;
+    return false;
 }
 
 
@@ -591,7 +591,7 @@ TimeArrayTimeZoneRule::initStartTimes(const UDate source[], int32_t size, UError
         if (fStartTimes == NULL) {
             status = U_MEMORY_ALLOCATION_ERROR;
             fNumStartTimes = 0;
-            return FALSE;
+            return false;
         }
     } else {
         fStartTimes = (UDate*)fLocalStartTimes;
@@ -599,15 +599,15 @@ TimeArrayTimeZoneRule::initStartTimes(const UDate source[], int32_t size, UError
     uprv_memcpy(fStartTimes, source, sizeof(UDate)*size);
     fNumStartTimes = size;
     // Sort dates
-    uprv_sortArray(fStartTimes, fNumStartTimes, (int32_t)sizeof(UDate), compareDates, NULL, TRUE, &status);
+    uprv_sortArray(fStartTimes, fNumStartTimes, (int32_t)sizeof(UDate), compareDates, NULL, true, &status);
     if (U_FAILURE(status)) {
         if (fStartTimes != NULL && fStartTimes != fLocalStartTimes) {
             uprv_free(fStartTimes);
         }
         fNumStartTimes = 0;
-        return FALSE;
+        return false;
     }
-    return TRUE;
+    return true;
 }
 
 UDate
diff --git a/icu4c/source/i18n/ucal.cpp b/icu4c/source/i18n/ucal.cpp
index 33f72589c50..36fe9b8f8a9 100644
--- a/icu4c/source/i18n/ucal.cpp
+++ b/icu4c/source/i18n/ucal.cpp
@@ -124,7 +124,7 @@ ucal_getDSTSavings(const UChar* zoneID, UErrorCode* ec) {
             UDate d = Calendar::getNow();
             for (int32_t i=0; i<53; ++i, d+=U_MILLIS_PER_DAY*7.0) {
                 int32_t raw, dst;
-                zone->getOffset(d, FALSE, raw, dst, *ec);
+                zone->getOffset(d, false, raw, dst, *ec);
                 if (U_FAILURE(*ec)) {
                     break;
                 } else if (dst != 0) {
@@ -263,19 +263,19 @@ ucal_getTimeZoneDisplayName(const     UCalendar*                 cal,
 
     switch(type) {
   case UCAL_STANDARD:
-      tz.getDisplayName(FALSE, TimeZone::LONG, Locale(locale), id);
+      tz.getDisplayName(false, TimeZone::LONG, Locale(locale), id);
       break;
 
   case UCAL_SHORT_STANDARD:
-      tz.getDisplayName(FALSE, TimeZone::SHORT, Locale(locale), id);
+      tz.getDisplayName(false, TimeZone::SHORT, Locale(locale), id);
       break;
 
   case UCAL_DST:
-      tz.getDisplayName(TRUE, TimeZone::LONG, Locale(locale), id);
+      tz.getDisplayName(true, TimeZone::LONG, Locale(locale), id);
       break;
 
   case UCAL_SHORT_DST:
-      tz.getDisplayName(TRUE, TimeZone::SHORT, Locale(locale), id);
+      tz.getDisplayName(true, TimeZone::SHORT, Locale(locale), id);
       break;
     }
 
@@ -594,7 +594,7 @@ ucal_getCanonicalTimeZoneID(const UChar* id, int32_t len,
         return 0;
     }
     if (isSystemID) {
-        *isSystemID = FALSE;
+        *isSystemID = false;
     }
     if (id == 0 || len == 0 || result == 0 || resultCapacity <= 0) {
         *status = U_ILLEGAL_ARGUMENT_ERROR;
@@ -602,7 +602,7 @@ ucal_getCanonicalTimeZoneID(const UChar* id, int32_t len,
     }
     int32_t reslen = 0;
     UnicodeString canonical;
-    UBool systemID = FALSE;
+    UBool systemID = false;
     TimeZone::getCanonicalID(UnicodeString(id, len), canonical, systemID, *status);
     if (U_SUCCESS(*status)) {
         if (isSystemID) {
@@ -644,7 +644,7 @@ U_CAPI UBool U_EXPORT2
 ucal_isWeekend(const UCalendar *cal, UDate date, UErrorCode *status)
 {
     if (U_FAILURE(*status)) {
-        return FALSE;
+        return false;
     }
     return ((Calendar*)cal)->isWeekend(date, *status);
 }
@@ -697,7 +697,7 @@ U_CAPI UEnumeration* U_EXPORT2
 ucal_getKeywordValuesForLocale(const char * /* key */, const char* locale, UBool commonlyUsed, UErrorCode *status) {
     // Resolve region
     char prefRegion[ULOC_COUNTRY_CAPACITY];
-    (void)ulocimp_getRegionForSupplementalData(locale, TRUE, prefRegion, sizeof(prefRegion), status);
+    (void)ulocimp_getRegionForSupplementalData(locale, true, prefRegion, sizeof(prefRegion), status);
     
     // Read preferred calendar values from supplementalData calendarPreference
     UResourceBundle *rb = ures_openDirect(nullptr, "supplementalData", status);
@@ -724,7 +724,7 @@ ucal_getKeywordValuesForLocale(const char * /* key */, const char* locale, UBool
                 u_UCharsToChars(type, caltype, len);
                 *(caltype + len) = 0;
 
-                ulist_addItemEndList(values, caltype, TRUE, status);
+                ulist_addItemEndList(values, caltype, true, status);
                 if (U_FAILURE(*status)) {
                     break;
                 }
@@ -734,7 +734,7 @@ ucal_getKeywordValuesForLocale(const char * /* key */, const char* locale, UBool
                 // If not commonlyUsed, add other available values
                 for (int32_t i = 0; CAL_TYPES[i] != nullptr; i++) {
                     if (!ulist_containsString(values, CAL_TYPES[i], (int32_t)uprv_strlen(CAL_TYPES[i]))) {
-                        ulist_addItemEndList(values, CAL_TYPES[i], FALSE, status);
+                        ulist_addItemEndList(values, CAL_TYPES[i], false, status);
                         if (U_FAILURE(*status)) {
                             break;
                         }
@@ -773,7 +773,7 @@ ucal_getTimeZoneTransitionDate(const UCalendar* cal, UTimeZoneTransitionType typ
                                UDate* transition, UErrorCode* status)
 {
     if (U_FAILURE(*status)) {
-        return FALSE;
+        return false;
     }
     UDate base = ((Calendar*)cal)->getTime(*status);
     const TimeZone& tz = ((Calendar*)cal)->getTimeZone();
@@ -786,10 +786,10 @@ ucal_getTimeZoneTransitionDate(const UCalendar* cal, UTimeZoneTransitionType typ
                         btz->getPreviousTransition(base, inclusive, tzt);
         if (result) {
             *transition = tzt.getTime();
-            return TRUE;
+            return true;
         }
     }
-    return FALSE;
+    return false;
 }
 
 U_CAPI int32_t U_EXPORT2
diff --git a/icu4c/source/i18n/ucln_in.cpp b/icu4c/source/i18n/ucln_in.cpp
index f29cbe41dde..cdbd16a65e5 100644
--- a/icu4c/source/i18n/ucln_in.cpp
+++ b/icu4c/source/i18n/ucln_in.cpp
@@ -45,7 +45,7 @@ static UBool U_CALLCONV i18n_cleanup(void)
 #if !UCLN_NO_AUTO_CLEANUP && (defined(UCLN_AUTO_ATEXIT) || defined(UCLN_AUTO_LOCAL))
     ucln_unRegisterAutomaticCleanup();
 #endif
-    return TRUE;
+    return true;
 }
 
 void ucln_i18n_registerCleanup(ECleanupI18NType type,
diff --git a/icu4c/source/i18n/ucol_res.cpp b/icu4c/source/i18n/ucol_res.cpp
index 65cc5e19bd9..8308d99c290 100644
--- a/icu4c/source/i18n/ucol_res.cpp
+++ b/icu4c/source/i18n/ucol_res.cpp
@@ -75,7 +75,7 @@ ucol_res_cleanup() {
     ures_close(rootBundle);
     rootBundle = NULL;
     gInitOnceUcolRes.reset();
-    return TRUE;
+    return true;
 }
 
 void U_CALLCONV
@@ -168,7 +168,7 @@ CollationLoader::CollationLoader(const CollationCacheEntry *re, const Locale &re
                                  UErrorCode &errorCode)
         : cache(UnifiedCache::getInstance(errorCode)), rootEntry(re),
           validLocale(re->validLocale), locale(requested),
-          typesTried(0), typeFallback(FALSE),
+          typesTried(0), typeFallback(false),
           bundle(NULL), collations(NULL), data(NULL) {
     type[0] = 0;
     defaultType[0] = 0;
@@ -321,7 +321,7 @@ CollationLoader::loadFromCollations(UErrorCode &errorCode) {
     int32_t typeLength = static_cast(uprv_strlen(type));
     if(errorCode == U_MISSING_RESOURCE_ERROR) {
         errorCode = U_USING_DEFAULT_WARNING;
-        typeFallback = TRUE;
+        typeFallback = true;
         if((typesTried & TRIED_SEARCH) == 0 &&
                 typeLength > 6 && uprv_strncmp(type, "search", 6) == 0) {
             // fall back from something like "searchjl" to "search"
@@ -404,7 +404,7 @@ CollationLoader::loadFromData(UErrorCode &errorCode) {
         const UChar *s = ures_getStringByKey(data, "Sequence", &len,
                                              &internalErrorCode);
         if(U_SUCCESS(internalErrorCode)) {
-            t->rules.setTo(TRUE, s, len);
+            t->rules.setTo(true, s, len);
         }
     }
 
@@ -619,7 +619,7 @@ namespace {
 struct KeywordsSink : public ResourceSink {
 public:
     KeywordsSink(UErrorCode &errorCode) :
-            values(ulist_createEmptyList(&errorCode)), hasDefault(FALSE) {}
+            values(ulist_createEmptyList(&errorCode)), hasDefault(false) {}
     virtual ~KeywordsSink();
 
     virtual void put(const char *key, ResourceValue &value, UBool /*noFallback*/,
@@ -639,13 +639,13 @@ public:
                             return;
                         }
                         ulist_removeString(values, defcoll.data());
-                        ulist_addItemBeginList(values, ownedDefault, TRUE, &errorCode);
-                        hasDefault = TRUE;
+                        ulist_addItemBeginList(values, ownedDefault, true, &errorCode);
+                        hasDefault = true;
                     }
                 }
             } else if (type == URES_TABLE && uprv_strncmp(key, "private-", 8) != 0) {
                 if (!ulist_containsString(values, key, (int32_t)uprv_strlen(key))) {
-                    ulist_addItemEndList(values, key, FALSE, &errorCode);
+                    ulist_addItemEndList(values, key, false, &errorCode);
                 }
             }
             if (U_FAILURE(errorCode)) { return; }
@@ -695,7 +695,7 @@ ucol_getFunctionalEquivalent(char* result, int32_t resultCapacity,
     // N.B.: Resource name is "collations" but keyword is "collation"
     return ures_getFunctionalEquivalent(result, resultCapacity, U_ICUDATA_COLL,
         "collations", keyword, locale,
-        isAvailable, TRUE, status);
+        isAvailable, true, status);
 }
 
 #endif /* #if !UCONFIG_NO_COLLATION */
diff --git a/icu4c/source/i18n/ucol_sit.cpp b/icu4c/source/i18n/ucol_sit.cpp
index 4dc81aebcc9..19281e43522 100644
--- a/icu4c/source/i18n/ucol_sit.cpp
+++ b/icu4c/source/i18n/ucol_sit.cpp
@@ -109,7 +109,7 @@ CollatorSpec::CollatorSpec() :
 locale(),
 variableTopValue(0),
 variableTopString(),
-variableTopSet(FALSE)
+variableTopSet(false)
  {
     // set collation options to default
     for(int32_t i = 0; i < UCOL_ATTRIBUTE_COUNT; i++) {
@@ -270,7 +270,7 @@ _processVariableTop(CollatorSpec *spec, uint32_t value1, const char* string, UEr
         spec->variableTopValue = readHexCodeUnit(&string, status);
     }
     if(U_SUCCESS(*status)) {
-        spec->variableTopSet = TRUE;
+        spec->variableTopSet = true;
     }
     return string;
 }
@@ -618,7 +618,7 @@ ucol_getContractions( const UCollator *coll,
                   USet *contractions,
                   UErrorCode *status)
 {
-  ucol_getContractionsAndExpansions(coll, contractions, NULL, FALSE, status);
+  ucol_getContractionsAndExpansions(coll, contractions, NULL, false, status);
   return uset_getItemCount(contractions);
 }
 
diff --git a/icu4c/source/i18n/ucoleitr.cpp b/icu4c/source/i18n/ucoleitr.cpp
index 596ce032956..53649c01bc1 100644
--- a/icu4c/source/i18n/ucoleitr.cpp
+++ b/icu4c/source/i18n/ucoleitr.cpp
@@ -205,7 +205,7 @@ void UCollationPCE::init(const Collator &coll)
 
     strength    = coll.getAttribute(UCOL_STRENGTH, status);
     toShift     = coll.getAttribute(UCOL_ALTERNATE_HANDLING, status) == UCOL_SHIFTED;
-    isShifted   = FALSE;
+    isShifted   = false;
     variableTop = coll.getVariableTop(status);
 }
 
@@ -254,13 +254,13 @@ uint64_t UCollationPCE::processCE(uint32_t ce)
         }
 
         primary = secondary = tertiary = 0;
-        isShifted = TRUE;
+        isShifted = true;
     } else {
         if (strength >= UCOL_QUATERNARY) {
             quaternary = 0xFFFF;
         }
 
-        isShifted = FALSE;
+        isShifted = false;
     }
 
     return primary << 48 | secondary << 32 | tertiary << 16 | quaternary;
diff --git a/icu4c/source/i18n/ucsdet.cpp b/icu4c/source/i18n/ucsdet.cpp
index 63f204d0e10..8de10d101f3 100644
--- a/icu4c/source/i18n/ucsdet.cpp
+++ b/icu4c/source/i18n/ucsdet.cpp
@@ -148,7 +148,7 @@ ucsdet_isInputFilterEnabled(const UCharsetDetector *ucsd)
 {
     // todo: could use an error return...
     if (ucsd == NULL) {
-        return FALSE;
+        return false;
     }
 
     return ((CharsetDetector *) ucsd)->getStripTagsFlag();
@@ -159,7 +159,7 @@ ucsdet_enableInputFilter(UCharsetDetector *ucsd, UBool filter)
 {
     // todo: could use an error return...
     if (ucsd == NULL) {
-        return FALSE;
+        return false;
     }
 
     CharsetDetector *csd = (CharsetDetector *) ucsd;
diff --git a/icu4c/source/i18n/udat.cpp b/icu4c/source/i18n/udat.cpp
index d9549d04c57..426eb7ebf2a 100644
--- a/icu4c/source/i18n/udat.cpp
+++ b/icu4c/source/i18n/udat.cpp
@@ -429,9 +429,9 @@ udat_getBooleanAttribute(const UDateFormat* fmt,
                          UDateFormatBooleanAttribute attr, 
                          UErrorCode* status)
 {
-    if(U_FAILURE(*status)) return FALSE;
+    if(U_FAILURE(*status)) return false;
     return ((DateFormat*)fmt)->getBooleanAttribute(attr, *status);
-    //return FALSE;
+    //return false;
 }
 
 U_CAPI void U_EXPORT2
diff --git a/icu4c/source/i18n/uitercollationiterator.cpp b/icu4c/source/i18n/uitercollationiterator.cpp
index 103c91cac8b..26cd75a6bd9 100644
--- a/icu4c/source/i18n/uitercollationiterator.cpp
+++ b/icu4c/source/i18n/uitercollationiterator.cpp
@@ -303,7 +303,7 @@ FCDUIterCollationIterator::switchToForward() {
 
 UBool
 FCDUIterCollationIterator::nextSegment(UErrorCode &errorCode) {
-    if(U_FAILURE(errorCode)) { return FALSE; }
+    if(U_FAILURE(errorCode)) { return false; }
     U_ASSERT(state == ITER_CHECK_FWD);
     // The input text [start..(iter index)[ passes the FCD check.
     pos = iter.getIndex(&iter, UITER_CURRENT);
@@ -333,12 +333,12 @@ FCDUIterCollationIterator::nextSegment(UErrorCode &errorCode) {
                 }
                 s.append(c);
             }
-            if(!normalize(s, errorCode)) { return FALSE; }
+            if(!normalize(s, errorCode)) { return false; }
             start = pos;
             limit = pos + s.length();
             state = IN_NORM_ITER_AT_LIMIT;
             pos = 0;
-            return TRUE;
+            return true;
         }
         prevCC = (uint8_t)fcd16;
         if(prevCC == 0) {
@@ -350,7 +350,7 @@ FCDUIterCollationIterator::nextSegment(UErrorCode &errorCode) {
     U_ASSERT(pos != limit);
     iter.move(&iter, -s.length(), UITER_CURRENT);
     state = ITER_IN_FCD_SEGMENT;
-    return TRUE;
+    return true;
 }
 
 void
@@ -384,7 +384,7 @@ FCDUIterCollationIterator::switchToBackward() {
 
 UBool
 FCDUIterCollationIterator::previousSegment(UErrorCode &errorCode) {
-    if(U_FAILURE(errorCode)) { return FALSE; }
+    if(U_FAILURE(errorCode)) { return false; }
     U_ASSERT(state == ITER_CHECK_BWD);
     // The input text [(iter index)..limit[ passes the FCD check.
     pos = iter.getIndex(&iter, UITER_CURRENT);
@@ -417,12 +417,12 @@ FCDUIterCollationIterator::previousSegment(UErrorCode &errorCode) {
                 s.append(c);
             }
             s.reverse();
-            if(!normalize(s, errorCode)) { return FALSE; }
+            if(!normalize(s, errorCode)) { return false; }
             limit = pos;
             start = pos - s.length();
             state = IN_NORM_ITER_AT_START;
             pos = normalized.length();
-            return TRUE;
+            return true;
         }
         nextCC = (uint8_t)(fcd16 >> 8);
         if(nextCC == 0) {
@@ -434,7 +434,7 @@ FCDUIterCollationIterator::previousSegment(UErrorCode &errorCode) {
     U_ASSERT(pos != start);
     iter.move(&iter, s.length(), UITER_CURRENT);
     state = ITER_IN_FCD_SEGMENT;
-    return TRUE;
+    return true;
 }
 
 UBool
diff --git a/icu4c/source/i18n/ulistformatter.cpp b/icu4c/source/i18n/ulistformatter.cpp
index bfb7cf96bd4..7e8b385c96b 100644
--- a/icu4c/source/i18n/ulistformatter.cpp
+++ b/icu4c/source/i18n/ulistformatter.cpp
@@ -88,7 +88,7 @@ static UnicodeString* getUnicodeStrings(
     }
     if (stringLengths == NULL) {
         for (int32_t stringIndex = 0; stringIndex < stringCount; stringIndex++) {
-            ustrings[stringIndex].setTo(TRUE, strings[stringIndex], -1);
+            ustrings[stringIndex].setTo(true, strings[stringIndex], -1);
         }
     } else {
         for (int32_t stringIndex = 0; stringIndex < stringCount; stringIndex++) {
diff --git a/icu4c/source/i18n/ulocdata.cpp b/icu4c/source/i18n/ulocdata.cpp
index c7eb8c3c423..48efe9d55ad 100644
--- a/icu4c/source/i18n/ulocdata.cpp
+++ b/icu4c/source/i18n/ulocdata.cpp
@@ -66,7 +66,7 @@ ulocdata_open(const char *localeID, UErrorCode *status)
 
    uld->langBundle = NULL;
 
-   uld->noSubstitute = FALSE;
+   uld->noSubstitute = false;
    uld->bundle = ures_open(NULL, localeID, status);
    uld->langBundle = ures_open(U_ICUDATA_LANG, localeID, status);
 
@@ -196,7 +196,7 @@ static UResourceBundle * measurementTypeBundleForLocale(const char *localeID, co
     UResourceBundle *rb;
     UResourceBundle *measTypeBundle = NULL;
     
-    ulocimp_getRegionForSupplementalData(localeID, TRUE, region, ULOC_COUNTRY_CAPACITY, status);
+    ulocimp_getRegionForSupplementalData(localeID, true, region, ULOC_COUNTRY_CAPACITY, status);
     
     rb = ures_openDirect(NULL, "supplementalData", status);
     ures_getByKey(rb, "measurementData", rb, status);
diff --git a/icu4c/source/i18n/unesctrn.cpp b/icu4c/source/i18n/unesctrn.cpp
index d57e9c84708..fb431ffa2e8 100644
--- a/icu4c/source/i18n/unesctrn.cpp
+++ b/icu4c/source/i18n/unesctrn.cpp
@@ -193,7 +193,7 @@ void UnescapeTransliterator::handleTransliterate(Replaceable& text, UTransPositi
             // s is a copy of start that is advanced over the
             // characters as we parse them.
             int32_t s = start;
-            UBool match = TRUE;
+            UBool match = true;
 
             for (i=0; i= limit) {
@@ -205,13 +205,13 @@ void UnescapeTransliterator::handleTransliterate(Replaceable& text, UTransPositi
                         if (isIncremental) {
                             goto exit;
                         }
-                        match = FALSE;
+                        match = false;
                         break;
                     }
                 }
                 UChar c = text.charAt(s++);
                 if (c != spec[ipat + i]) {
-                    match = FALSE;
+                    match = false;
                     break;
                 }
             }
@@ -248,12 +248,12 @@ void UnescapeTransliterator::handleTransliterate(Replaceable& text, UTransPositi
                             if (s > start && isIncremental) {
                                 goto exit;
                             }
-                            match = FALSE;
+                            match = false;
                             break;
                         }
                         UChar c = text.charAt(s++);
                         if (c != spec[ipat + prefixLen + i]) {
-                            match = FALSE;
+                            match = false;
                             break;
                         }
                     }
diff --git a/icu4c/source/i18n/uni2name.cpp b/icu4c/source/i18n/uni2name.cpp
index 904da0207bc..97df92b0971 100644
--- a/icu4c/source/i18n/uni2name.cpp
+++ b/icu4c/source/i18n/uni2name.cpp
@@ -91,7 +91,7 @@ void UnicodeNameTransliterator::handleTransliterate(Replaceable& text, UTransPos
     int32_t cursor = offsets.start;
     int32_t limit = offsets.limit;
 
-    UnicodeString str(FALSE, OPEN_DELIM, OPEN_DELIM_LEN);
+    UnicodeString str(false, OPEN_DELIM, OPEN_DELIM_LEN);
     UErrorCode status;
     int32_t len;
 
diff --git a/icu4c/source/i18n/uregex.cpp b/icu4c/source/i18n/uregex.cpp
index 514159e8b7a..dd2ad2a81e8 100644
--- a/icu4c/source/i18n/uregex.cpp
+++ b/icu4c/source/i18n/uregex.cpp
@@ -58,7 +58,7 @@ RegularExpression::RegularExpression() {
     fMatcher      = NULL;
     fText         = NULL;
     fTextLength   = 0;
-    fOwnsText     = FALSE;
+    fOwnsText     = false;
 }
 
 RegularExpression::~RegularExpression() {
@@ -82,22 +82,22 @@ U_NAMESPACE_USE
 //----------------------------------------------------------------------------------------
 //
 //   validateRE    Do boilerplate style checks on API function parameters.
-//                 Return TRUE if they look OK.
+//                 Return true if they look OK.
 //----------------------------------------------------------------------------------------
 static UBool validateRE(const RegularExpression *re, UBool requiresText, UErrorCode *status) {
     if (U_FAILURE(*status)) {
-        return FALSE;
+        return false;
     }
     if (re == NULL || re->fMagic != REXP_MAGIC) {
         *status = U_ILLEGAL_ARGUMENT_ERROR;
-        return FALSE;
+        return false;
     }
     // !!! Not sure how to update this with the new UText backing, which is stored in re->fMatcher anyway
     if (requiresText && re->fText == NULL && !re->fOwnsText) {
         *status = U_REGEX_INVALID_STATE;
-        return FALSE;
+        return false;
     }
-    return TRUE;
+    return true;
 }
 
 //----------------------------------------------------------------------------------------
@@ -270,7 +270,7 @@ U_CAPI void  U_EXPORT2
 uregex_close(URegularExpression  *re2) {
     RegularExpression *re = (RegularExpression*)re2;
     UErrorCode  status = U_ZERO_ERROR;
-    if (validateRE(re, FALSE, &status) == FALSE) {
+    if (validateRE(re, false, &status) == false) {
         return;
     }
     delete re;
@@ -285,7 +285,7 @@ uregex_close(URegularExpression  *re2) {
 U_CAPI URegularExpression * U_EXPORT2
 uregex_clone(const URegularExpression *source2, UErrorCode *status)  {
     RegularExpression *source = (RegularExpression*)source2;
-    if (validateRE(source, FALSE, status) == FALSE) {
+    if (validateRE(source, false, status) == false) {
         return NULL;
     }
 
@@ -325,7 +325,7 @@ uregex_pattern(const  URegularExpression *regexp2,
                       UErrorCode         *status)  {
     RegularExpression *regexp = (RegularExpression*)regexp2;
 
-    if (validateRE(regexp, FALSE, status) == FALSE) {
+    if (validateRE(regexp, false, status) == false) {
         return NULL;
     }
     if (patLength != NULL) {
@@ -356,7 +356,7 @@ uregex_patternUText(const URegularExpression *regexp2,
 U_CAPI int32_t U_EXPORT2
 uregex_flags(const URegularExpression *regexp2, UErrorCode *status)  {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    if (validateRE(regexp, FALSE, status) == FALSE) {
+    if (validateRE(regexp, false, status) == false) {
         return 0;
     }
     int32_t flags = regexp->fPat->flags();
@@ -375,7 +375,7 @@ uregex_setText(URegularExpression *regexp2,
                int32_t             textLength,
                UErrorCode         *status)  {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    if (validateRE(regexp, FALSE, status) == FALSE) {
+    if (validateRE(regexp, false, status) == false) {
         return;
     }
     if (text == NULL || textLength < -1) {
@@ -389,7 +389,7 @@ uregex_setText(URegularExpression *regexp2,
 
     regexp->fText       = text;
     regexp->fTextLength = textLength;
-    regexp->fOwnsText   = FALSE;
+    regexp->fOwnsText   = false;
 
     UText input = UTEXT_INITIALIZER;
     utext_openUChars(&input, text, textLength, status);
@@ -408,7 +408,7 @@ uregex_setUText(URegularExpression *regexp2,
                 UText              *text,
                 UErrorCode         *status) {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    if (validateRE(regexp, FALSE, status) == FALSE) {
+    if (validateRE(regexp, false, status) == false) {
         return;
     }
     if (text == NULL) {
@@ -422,7 +422,7 @@ uregex_setUText(URegularExpression *regexp2,
 
     regexp->fText       = NULL; // only fill it in on request
     regexp->fTextLength = -1;
-    regexp->fOwnsText   = TRUE;
+    regexp->fOwnsText   = true;
     regexp->fMatcher->reset(text);
 }
 
@@ -438,7 +438,7 @@ uregex_getText(URegularExpression *regexp2,
                int32_t            *textLength,
                UErrorCode         *status)  {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    if (validateRE(regexp, FALSE, status) == FALSE) {
+    if (validateRE(regexp, false, status) == false) {
         return NULL;
     }
 
@@ -449,7 +449,7 @@ uregex_getText(URegularExpression *regexp2,
         if (UTEXT_FULL_TEXT_IN_CHUNK(inputText, inputNativeLength)) {
             regexp->fText = inputText->chunkContents;
             regexp->fTextLength = (int32_t)inputNativeLength;
-            regexp->fOwnsText = FALSE; // because the UText owns it
+            regexp->fOwnsText = false; // because the UText owns it
         } else {
             UErrorCode lengthStatus = U_ZERO_ERROR;
             regexp->fTextLength = utext_extract(inputText, 0, inputNativeLength, NULL, 0, &lengthStatus); // buffer overflow error
@@ -457,7 +457,7 @@ uregex_getText(URegularExpression *regexp2,
 
             utext_extract(inputText, 0, inputNativeLength, inputChars, regexp->fTextLength+1, status);
             regexp->fText = inputChars;
-            regexp->fOwnsText = TRUE; // should already be set but just in case
+            regexp->fOwnsText = true; // should already be set but just in case
         }
     }
 
@@ -478,7 +478,7 @@ uregex_getUText(URegularExpression *regexp2,
                 UText              *dest,
                 UErrorCode         *status)  {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    if (validateRE(regexp, FALSE, status) == FALSE) {
+    if (validateRE(regexp, false, status) == false) {
         return dest;
     }
     return regexp->fMatcher->getInput(dest, *status);
@@ -495,7 +495,7 @@ uregex_refreshUText(URegularExpression *regexp2,
                     UText              *text,
                     UErrorCode         *status) {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    if (validateRE(regexp, FALSE, status) == FALSE) {
+    if (validateRE(regexp, false, status) == false) {
         return;
     }
     regexp->fMatcher->refreshInputText(text, *status);
@@ -519,8 +519,8 @@ uregex_matches64(URegularExpression *regexp2,
                  int64_t            startIndex,
                  UErrorCode        *status)  {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    UBool result = FALSE;
-    if (validateRE(regexp, TRUE, status) == FALSE) {
+    UBool result = false;
+    if (validateRE(regexp, true, status) == false) {
         return result;
     }
     if (startIndex == -1) {
@@ -549,8 +549,8 @@ uregex_lookingAt64(URegularExpression *regexp2,
                    int64_t             startIndex,
                    UErrorCode         *status)  {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    UBool result = FALSE;
-    if (validateRE(regexp, TRUE, status) == FALSE) {
+    UBool result = false;
+    if (validateRE(regexp, true, status) == false) {
         return result;
     }
     if (startIndex == -1) {
@@ -580,8 +580,8 @@ uregex_find64(URegularExpression *regexp2,
               int64_t             startIndex,
               UErrorCode         *status)  {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    UBool result = FALSE;
-    if (validateRE(regexp, TRUE, status) == FALSE) {
+    UBool result = false;
+    if (validateRE(regexp, true, status) == false) {
         return result;
     }
     if (startIndex == -1) {
@@ -603,8 +603,8 @@ U_CAPI UBool U_EXPORT2
 uregex_findNext(URegularExpression *regexp2,
                 UErrorCode         *status)  {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    if (validateRE(regexp, TRUE, status) == FALSE) {
-        return FALSE;
+    if (validateRE(regexp, true, status) == false) {
+        return false;
     }
     UBool result = regexp->fMatcher->find(*status);
     return result;
@@ -619,7 +619,7 @@ U_CAPI int32_t U_EXPORT2
 uregex_groupCount(URegularExpression *regexp2,
                   UErrorCode         *status)  {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    if (validateRE(regexp, FALSE, status) == FALSE) {
+    if (validateRE(regexp, false, status) == false) {
         return 0;
     }
     int32_t  result = regexp->fMatcher->groupCount();
@@ -638,7 +638,7 @@ uregex_groupNumberFromName(URegularExpression *regexp2,
                            int32_t             nameLength,
                            UErrorCode          *status) {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    if (validateRE(regexp, FALSE, status) == FALSE) {
+    if (validateRE(regexp, false, status) == false) {
         return 0;
     }
     int32_t  result = regexp->fPat->groupNumberFromName(UnicodeString(groupName, nameLength), *status);
@@ -651,7 +651,7 @@ uregex_groupNumberFromCName(URegularExpression *regexp2,
                             int32_t             nameLength,
                             UErrorCode          *status) {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    if (validateRE(regexp, FALSE, status) == FALSE) {
+    if (validateRE(regexp, false, status) == false) {
         return 0;
     }
     return regexp->fPat->groupNumberFromName(groupName, nameLength, *status);
@@ -669,7 +669,7 @@ uregex_group(URegularExpression *regexp2,
              int32_t             destCapacity,
              UErrorCode          *status)  {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    if (validateRE(regexp, TRUE, status) == FALSE) {
+    if (validateRE(regexp, true, status) == false) {
         return 0;
     }
     if (destCapacity < 0 || (destCapacity > 0 && dest == NULL)) {
@@ -739,7 +739,7 @@ uregex_groupUText(URegularExpression *regexp2,
                   int64_t            *groupLength,
                   UErrorCode         *status)  {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    if (validateRE(regexp, TRUE, status) == FALSE) {
+    if (validateRE(regexp, true, status) == false) {
         UErrorCode emptyTextStatus = U_ZERO_ERROR;
         return (dest ? dest : utext_openUChars(NULL, NULL, 0, &emptyTextStatus));
     }
@@ -764,7 +764,7 @@ uregex_start64(URegularExpression *regexp2,
                int32_t             groupNum,
                UErrorCode          *status)  {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    if (validateRE(regexp, TRUE, status) == FALSE) {
+    if (validateRE(regexp, true, status) == false) {
         return 0;
     }
     int64_t result = regexp->fMatcher->start64(groupNum, *status);
@@ -788,7 +788,7 @@ uregex_end64(URegularExpression   *regexp2,
              int32_t               groupNum,
              UErrorCode           *status)  {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    if (validateRE(regexp, TRUE, status) == FALSE) {
+    if (validateRE(regexp, true, status) == false) {
         return 0;
     }
     int64_t result = regexp->fMatcher->end64(groupNum, *status);
@@ -812,7 +812,7 @@ uregex_reset64(URegularExpression    *regexp2,
                int64_t               index,
                UErrorCode            *status)  {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    if (validateRE(regexp, TRUE, status) == FALSE) {
+    if (validateRE(regexp, true, status) == false) {
         return;
     }
     regexp->fMatcher->reset(index, *status);
@@ -838,7 +838,7 @@ uregex_setRegion64(URegularExpression   *regexp2,
                    int64_t               regionLimit,
                    UErrorCode           *status)  {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    if (validateRE(regexp, TRUE, status) == FALSE) {
+    if (validateRE(regexp, true, status) == false) {
         return;
     }
     regexp->fMatcher->region(regionStart, regionLimit, *status);
@@ -857,7 +857,7 @@ uregex_setRegionAndStart(URegularExpression   *regexp2,
                  int64_t               startIndex,
                  UErrorCode           *status)  {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    if (validateRE(regexp, TRUE, status) == FALSE) {
+    if (validateRE(regexp, true, status) == false) {
         return;
     }
     regexp->fMatcher->region(regionStart, regionLimit, startIndex, *status);
@@ -878,7 +878,7 @@ U_CAPI int64_t U_EXPORT2
 uregex_regionStart64(const  URegularExpression   *regexp2,
                             UErrorCode           *status)  {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    if (validateRE(regexp, TRUE, status) == FALSE) {
+    if (validateRE(regexp, true, status) == false) {
         return 0;
     }
     return regexp->fMatcher->regionStart();
@@ -900,7 +900,7 @@ U_CAPI int64_t U_EXPORT2
 uregex_regionEnd64(const  URegularExpression   *regexp2,
                           UErrorCode           *status)  {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    if (validateRE(regexp, TRUE, status) == FALSE) {
+    if (validateRE(regexp, true, status) == false) {
         return 0;
     }
     return regexp->fMatcher->regionEnd();
@@ -916,8 +916,8 @@ U_CAPI UBool U_EXPORT2
 uregex_hasTransparentBounds(const  URegularExpression   *regexp2,
                                    UErrorCode           *status)  {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    if (validateRE(regexp, FALSE, status) == FALSE) {
-        return FALSE;
+    if (validateRE(regexp, false, status) == false) {
+        return false;
     }
     return regexp->fMatcher->hasTransparentBounds();
 }
@@ -933,7 +933,7 @@ uregex_useTransparentBounds(URegularExpression    *regexp2,
                             UBool                  b,
                             UErrorCode            *status)  {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    if (validateRE(regexp, FALSE, status) == FALSE) {
+    if (validateRE(regexp, false, status) == false) {
         return;
     }
     regexp->fMatcher->useTransparentBounds(b);
@@ -949,8 +949,8 @@ U_CAPI UBool U_EXPORT2
 uregex_hasAnchoringBounds(const  URegularExpression   *regexp2,
                                  UErrorCode           *status)  {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    if (validateRE(regexp, FALSE, status) == FALSE) {
-        return FALSE;
+    if (validateRE(regexp, false, status) == false) {
+        return false;
     }
     return regexp->fMatcher->hasAnchoringBounds();
 }
@@ -966,7 +966,7 @@ uregex_useAnchoringBounds(URegularExpression    *regexp2,
                           UBool                  b,
                           UErrorCode            *status)  {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    if (validateRE(regexp, FALSE, status) == FALSE) {
+    if (validateRE(regexp, false, status) == false) {
         return;
     }
     regexp->fMatcher->useAnchoringBounds(b);
@@ -982,8 +982,8 @@ U_CAPI UBool U_EXPORT2
 uregex_hitEnd(const  URegularExpression   *regexp2,
                      UErrorCode           *status)  {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    if (validateRE(regexp, TRUE, status) == FALSE) {
-        return FALSE;
+    if (validateRE(regexp, true, status) == false) {
+        return false;
     }
     return regexp->fMatcher->hitEnd();
 }
@@ -998,8 +998,8 @@ U_CAPI UBool U_EXPORT2
 uregex_requireEnd(const  URegularExpression   *regexp2,
                          UErrorCode           *status)  {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    if (validateRE(regexp, TRUE, status) == FALSE) {
-        return FALSE;
+    if (validateRE(regexp, true, status) == false) {
+        return false;
     }
     return regexp->fMatcher->requireEnd();
 }
@@ -1015,7 +1015,7 @@ uregex_setTimeLimit(URegularExpression   *regexp2,
                     int32_t               limit,
                     UErrorCode           *status) {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    if (validateRE(regexp, FALSE, status)) {
+    if (validateRE(regexp, false, status)) {
         regexp->fMatcher->setTimeLimit(limit, *status);
     }
 }
@@ -1032,7 +1032,7 @@ uregex_getTimeLimit(const  URegularExpression   *regexp2,
                            UErrorCode           *status) {
     int32_t retVal = 0;
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    if (validateRE(regexp, FALSE, status)) {
+    if (validateRE(regexp, false, status)) {
         retVal = regexp->fMatcher->getTimeLimit();
     }
     return retVal;
@@ -1050,7 +1050,7 @@ uregex_setStackLimit(URegularExpression   *regexp2,
                      int32_t               limit,
                      UErrorCode           *status) {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    if (validateRE(regexp, FALSE, status)) {
+    if (validateRE(regexp, false, status)) {
         regexp->fMatcher->setStackLimit(limit, *status);
     }
 }
@@ -1067,7 +1067,7 @@ uregex_getStackLimit(const  URegularExpression   *regexp2,
                             UErrorCode           *status) {
     int32_t retVal = 0;
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    if (validateRE(regexp, FALSE, status)) {
+    if (validateRE(regexp, false, status)) {
         retVal = regexp->fMatcher->getStackLimit();
     }
     return retVal;
@@ -1085,7 +1085,7 @@ uregex_setMatchCallback(URegularExpression      *regexp2,
                         const void              *context,
                         UErrorCode              *status) {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    if (validateRE(regexp, FALSE, status)) {
+    if (validateRE(regexp, false, status)) {
         regexp->fMatcher->setMatchCallback(callback, context, *status);
     }
 }
@@ -1102,7 +1102,7 @@ uregex_getMatchCallback(const URegularExpression    *regexp2,
                         const void                 **context,
                         UErrorCode                  *status) {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-     if (validateRE(regexp, FALSE, status)) {
+     if (validateRE(regexp, false, status)) {
          regexp->fMatcher->getMatchCallback(*callback, *context, *status);
      }
 }
@@ -1119,7 +1119,7 @@ uregex_setFindProgressCallback(URegularExpression              *regexp2,
                                 const void                      *context,
                                 UErrorCode                      *status) {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    if (validateRE(regexp, FALSE, status)) {
+    if (validateRE(regexp, false, status)) {
         regexp->fMatcher->setFindProgressCallback(callback, context, *status);
     }
 }
@@ -1136,7 +1136,7 @@ uregex_getFindProgressCallback(const URegularExpression          *regexp2,
                                 const void                        **context,
                                 UErrorCode                        *status) {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-     if (validateRE(regexp, FALSE, status)) {
+     if (validateRE(regexp, false, status)) {
          regexp->fMatcher->getFindProgressCallback(*callback, *context, *status);
      }
 }
@@ -1155,7 +1155,7 @@ uregex_replaceAll(URegularExpression    *regexp2,
                   int32_t                destCapacity,
                   UErrorCode            *status)  {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    if (validateRE(regexp, TRUE, status) == FALSE) {
+    if (validateRE(regexp, true, status) == false) {
         return 0;
     }
     if (replacementText == NULL || replacementLength < -1 ||
@@ -1203,7 +1203,7 @@ uregex_replaceAllUText(URegularExpression    *regexp2,
                        UText                 *dest,
                        UErrorCode            *status)  {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    if (validateRE(regexp, TRUE, status) == FALSE) {
+    if (validateRE(regexp, true, status) == false) {
         return 0;
     }
     if (replacementText == NULL) {
@@ -1229,7 +1229,7 @@ uregex_replaceFirst(URegularExpression  *regexp2,
                     int32_t              destCapacity,
                     UErrorCode          *status)  {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    if (validateRE(regexp, TRUE, status) == FALSE) {
+    if (validateRE(regexp, true, status) == false) {
         return 0;
     }
     if (replacementText == NULL || replacementLength < -1 ||
@@ -1264,7 +1264,7 @@ uregex_replaceFirstUText(URegularExpression  *regexp2,
                          UText                 *dest,
                          UErrorCode            *status)  {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    if (validateRE(regexp, TRUE, status) == FALSE) {
+    if (validateRE(regexp, true, status) == false) {
         return 0;
     }
     if (replacementText == NULL) {
@@ -1346,16 +1346,16 @@ int32_t RegexCImpl::appendReplacement(RegularExpression    *regexp,
     // If we come in with a buffer overflow error, don't suppress the operation.
     //  A series of appendReplacements, appendTail need to correctly preflight
     //  the buffer size when an overflow happens somewhere in the middle.
-    UBool pendingBufferOverflow = FALSE;
+    UBool pendingBufferOverflow = false;
     if (*status == U_BUFFER_OVERFLOW_ERROR && destCapacity != NULL && *destCapacity == 0) {
-        pendingBufferOverflow = TRUE;
+        pendingBufferOverflow = true;
         *status = U_ZERO_ERROR;
     }
 
     //
     // Validate all parameters
     //
-    if (validateRE(regexp, TRUE, status) == FALSE) {
+    if (validateRE(regexp, true, status) == false) {
         return 0;
     }
     if (replacementText == NULL || replacementLength < -1 ||
@@ -1367,7 +1367,7 @@ int32_t RegexCImpl::appendReplacement(RegularExpression    *regexp,
     }
 
     RegexMatcher *m = regexp->fMatcher;
-    if (m->fMatch == FALSE) {
+    if (m->fMatch == false) {
         *status = U_REGEX_INVALID_STATE;
         return 0;
     }
@@ -1477,7 +1477,7 @@ int32_t RegexCImpl::appendReplacement(RegularExpression    *regexp,
                     break;
                 }
                 U16_GET(replacementText, 0, replIdx, replacementLength, c32);
-                if (u_isdigit(c32) == FALSE) {
+                if (u_isdigit(c32) == false) {
                     break;
                 }
 
@@ -1623,13 +1623,13 @@ int32_t RegexCImpl::appendTail(RegularExpression    *regexp,
     // If we come in with a buffer overflow error, don't suppress the operation.
     //  A series of appendReplacements, appendTail need to correctly preflight
     //  the buffer size when an overflow happens somewhere in the middle.
-    UBool pendingBufferOverflow = FALSE;
+    UBool pendingBufferOverflow = false;
     if (*status == U_BUFFER_OVERFLOW_ERROR && destCapacity != NULL && *destCapacity == 0) {
-        pendingBufferOverflow = TRUE;
+        pendingBufferOverflow = true;
         *status = U_ZERO_ERROR;
     }
 
-    if (validateRE(regexp, TRUE, status) == FALSE) {
+    if (validateRE(regexp, true, status) == false) {
         return 0;
     }
 
@@ -1948,7 +1948,7 @@ uregex_split(URegularExpression      *regexp2,
              int32_t                  destFieldsCapacity,
              UErrorCode              *status) {
     RegularExpression *regexp = (RegularExpression*)regexp2;
-    if (validateRE(regexp, TRUE, status) == FALSE) {
+    if (validateRE(regexp, true, status) == false) {
         return 0;
     }
     if ((destBuf == NULL && destCapacity > 0) ||
diff --git a/icu4c/source/i18n/usearch.cpp b/icu4c/source/i18n/usearch.cpp
index 80b80fa3b43..0fecd709e74 100644
--- a/icu4c/source/i18n/usearch.cpp
+++ b/icu4c/source/i18n/usearch.cpp
@@ -76,7 +76,7 @@ U_CDECL_BEGIN
 static UBool U_CALLCONV
 usearch_cleanup(void) {
     g_nfcImpl = nullptr;
-    return TRUE;
+    return true;
 }
 U_CDECL_END
 
@@ -502,7 +502,7 @@ inline void setMatchNotFound(UStringSearch *strsrch, UErrorCode &status)
 * Checks if the offset runs out of the text string
 * @param offset
 * @param textlength of the text string
-* @return TRUE if offset is out of bounds, FALSE otherwise
+* @return true if offset is out of bounds, false otherwise
 */
 static
 inline UBool isOutOfBounds(int32_t textlength, int32_t offset)
@@ -515,13 +515,13 @@ inline UBool isOutOfBounds(int32_t textlength, int32_t offset)
 * @param strsrch string search data
 * @param start offset of possible match
 * @param end offset of possible match
-* @return TRUE if identical match is found
+* @return true if identical match is found
 */
 static
 inline UBool checkIdentical(const UStringSearch *strsrch, int32_t start, int32_t end)
 {
     if (strsrch->strength != UCOL_IDENTICAL) {
-        return TRUE;
+        return true;
     }
 
     // Note: We could use Normalizer::compare() or similar, but for short strings
@@ -529,10 +529,10 @@ inline UBool checkIdentical(const UStringSearch *strsrch, int32_t start, int32_t
     UErrorCode status = U_ZERO_ERROR;
     UnicodeString t2, p2;
     strsrch->nfd->normalize(
-        UnicodeString(FALSE, strsrch->search->text + start, end - start), t2, status);
+        UnicodeString(false, strsrch->search->text + start, end - start), t2, status);
     strsrch->nfd->normalize(
-        UnicodeString(FALSE, strsrch->pattern.text, strsrch->pattern.textLength), p2, status);
-    // return FALSE if NFD failed
+        UnicodeString(false, strsrch->pattern.text, strsrch->pattern.textLength), p2, status);
+    // return false if NFD failed
     return U_SUCCESS(status) && t2 == p2;
 }
 
@@ -570,7 +570,7 @@ U_CAPI UStringSearch * U_EXPORT2 usearch_open(const UChar *pattern,
             return nullptr;
         }
         else {
-            result->ownCollator = TRUE;
+            result->ownCollator = true;
         }
         return result;
     }
@@ -669,7 +669,7 @@ U_CAPI UStringSearch * U_EXPORT2 usearch_openFromCollator(
         }
 #endif
 
-        result->ownCollator           = FALSE;
+        result->ownCollator           = false;
         result->search->matchedLength = 0;
         result->search->matchedIndex  = USEARCH_DONE;
         result->utilIter              = nullptr;
@@ -681,11 +681,11 @@ U_CAPI UStringSearch * U_EXPORT2 usearch_openFromCollator(
             return nullptr;
         }
 
-        result->search->isOverlap          = FALSE;
-        result->search->isCanonicalMatch   = FALSE;
+        result->search->isOverlap          = false;
+        result->search->isCanonicalMatch   = false;
         result->search->elementComparisonType = 0;
-        result->search->isForwardSearching = TRUE;
-        result->search->reset              = TRUE;
+        result->search->isForwardSearching = true;
+        result->search->reset              = true;
 
         initialize(result, status);
 
@@ -734,17 +734,17 @@ U_CAPI void U_EXPORT2 usearch_close(UStringSearch *strsrch)
 namespace {
 
 UBool initTextProcessedIter(UStringSearch *strsrch, UErrorCode *status) {
-    if (U_FAILURE(*status)) { return FALSE; }
+    if (U_FAILURE(*status)) { return false; }
     if (strsrch->textProcessedIter == nullptr) {
         strsrch->textProcessedIter = new icu::UCollationPCE(strsrch->textIter);
         if (strsrch->textProcessedIter == nullptr) {
             *status = U_MEMORY_ALLOCATION_ERROR;
-            return FALSE;
+            return false;
         }
     } else {
         strsrch->textProcessedIter->init(strsrch->textIter);
     }
-    return TRUE;
+    return true;
 }
 
 }
@@ -764,7 +764,7 @@ U_CAPI void U_EXPORT2 usearch_setOffset(UStringSearch *strsrch,
         }
         strsrch->search->matchedIndex  = USEARCH_DONE;
         strsrch->search->matchedLength = 0;
-        strsrch->search->reset         = FALSE;
+        strsrch->search->reset         = false;
     }
 }
 
@@ -789,11 +789,11 @@ U_CAPI void U_EXPORT2 usearch_setAttribute(UStringSearch        *strsrch,
         switch (attribute)
         {
         case USEARCH_OVERLAP :
-            strsrch->search->isOverlap = (value == USEARCH_ON ? TRUE : FALSE);
+            strsrch->search->isOverlap = (value == USEARCH_ON ? true : false);
             break;
         case USEARCH_CANONICAL_MATCH :
-            strsrch->search->isCanonicalMatch = (value == USEARCH_ON ? TRUE :
-                                                                      FALSE);
+            strsrch->search->isCanonicalMatch = (value == USEARCH_ON ? true :
+                                                                      false);
             break;
         case USEARCH_ELEMENT_COMPARISON :
             if (value == USEARCH_PATTERN_BASE_WEIGHT_IS_WILDCARD || value == USEARCH_ANY_BASE_WEIGHT_IS_WILDCARD) {
@@ -819,10 +819,10 @@ U_CAPI USearchAttributeValue U_EXPORT2 usearch_getAttribute(
     if (strsrch) {
         switch (attribute) {
         case USEARCH_OVERLAP :
-            return (strsrch->search->isOverlap == TRUE ? USEARCH_ON :
+            return (strsrch->search->isOverlap == true ? USEARCH_ON :
                                                         USEARCH_OFF);
         case USEARCH_CANONICAL_MATCH :
-            return (strsrch->search->isCanonicalMatch == TRUE ? USEARCH_ON :
+            return (strsrch->search->isCanonicalMatch == true ? USEARCH_ON :
                                                                USEARCH_OFF);
         case USEARCH_ELEMENT_COMPARISON :
             {
@@ -936,7 +936,7 @@ U_CAPI void U_EXPORT2 usearch_setText(      UStringSearch *strsrch,
             ucol_setText(strsrch->textIter, text, textlength, status);
             strsrch->search->matchedIndex  = USEARCH_DONE;
             strsrch->search->matchedLength = 0;
-            strsrch->search->reset         = TRUE;
+            strsrch->search->reset         = true;
 #if !UCONFIG_NO_BREAK_ITERATION
             if (strsrch->search->breakIter != nullptr) {
                 ubrk_setText(strsrch->search->breakIter, text,
@@ -978,7 +978,7 @@ U_CAPI void U_EXPORT2 usearch_setCollator(      UStringSearch *strsrch,
             strsrch->textIter = strsrch->utilIter = nullptr;
             if (strsrch->ownCollator && (strsrch->collator != collator)) {
                 ucol_close((UCollator *)strsrch->collator);
-                strsrch->ownCollator = FALSE;
+                strsrch->ownCollator = false;
             }
             strsrch->collator    = collator;
             strsrch->strength    = ucol_getStrength(collator);
@@ -1064,7 +1064,7 @@ U_CAPI int32_t U_EXPORT2 usearch_first(UStringSearch *strsrch,
                                        UErrorCode    *status)
 {
     if (strsrch && U_SUCCESS(*status)) {
-        strsrch->search->isForwardSearching = TRUE;
+        strsrch->search->isForwardSearching = true;
         usearch_setOffset(strsrch, 0, status);
         if (U_SUCCESS(*status)) {
             return usearch_next(strsrch, status);
@@ -1078,7 +1078,7 @@ U_CAPI int32_t U_EXPORT2 usearch_following(UStringSearch *strsrch,
                                            UErrorCode    *status)
 {
     if (strsrch && U_SUCCESS(*status)) {
-        strsrch->search->isForwardSearching = TRUE;
+        strsrch->search->isForwardSearching = true;
         // position checked in usearch_setOffset
         usearch_setOffset(strsrch, position, status);
         if (U_SUCCESS(*status)) {
@@ -1092,7 +1092,7 @@ U_CAPI int32_t U_EXPORT2 usearch_last(UStringSearch *strsrch,
                                       UErrorCode    *status)
 {
     if (strsrch && U_SUCCESS(*status)) {
-        strsrch->search->isForwardSearching = FALSE;
+        strsrch->search->isForwardSearching = false;
         usearch_setOffset(strsrch, strsrch->search->textLength, status);
         if (U_SUCCESS(*status)) {
             return usearch_previous(strsrch, status);
@@ -1106,7 +1106,7 @@ U_CAPI int32_t U_EXPORT2 usearch_preceding(UStringSearch *strsrch,
                                            UErrorCode    *status)
 {
     if (strsrch && U_SUCCESS(*status)) {
-        strsrch->search->isForwardSearching = FALSE;
+        strsrch->search->isForwardSearching = false;
         // position checked in usearch_setOffset
         usearch_setOffset(strsrch, position, status);
         if (U_SUCCESS(*status)) {
@@ -1146,7 +1146,7 @@ U_CAPI int32_t U_EXPORT2 usearch_next(UStringSearch *strsrch,
         // or is set by the user
         int32_t      offset       = usearch_getOffset(strsrch);
         USearch     *search       = strsrch->search;
-        search->reset             = FALSE;
+        search->reset             = false;
         int32_t      textlength   = search->textLength;
         if (search->isForwardSearching) {
             if (offset == textlength ||
@@ -1164,7 +1164,7 @@ U_CAPI int32_t U_EXPORT2 usearch_next(UStringSearch *strsrch,
             // setOffset has been called or that previous ran off the text
             // string. the iterator would have been set to offset 0 if a
             // match is not found.
-            search->isForwardSearching = TRUE;
+            search->isForwardSearching = true;
             if (search->matchedIndex != USEARCH_DONE) {
                 // there's no need to set the collation element iterator
                 // the next call to next will set the offset.
@@ -1240,8 +1240,8 @@ U_CAPI int32_t U_EXPORT2 usearch_previous(UStringSearch *strsrch,
         USearch *search = strsrch->search;
         if (search->reset) {
             offset                     = search->textLength;
-            search->isForwardSearching = FALSE;
-            search->reset              = FALSE;
+            search->isForwardSearching = false;
+            search->reset              = false;
             setColEIterOffset(strsrch->textIter, offset, *status);
         }
         else {
@@ -1249,13 +1249,13 @@ U_CAPI int32_t U_EXPORT2 usearch_previous(UStringSearch *strsrch,
         }
 
         int32_t matchedindex = search->matchedIndex;
-        if (search->isForwardSearching == TRUE) {
+        if (search->isForwardSearching == true) {
             // switching direction.
             // if matchedIndex == USEARCH_DONE, it means that either a
             // setOffset has been called or that next ran off the text
             // string. the iterator would have been set to offset textLength if
             // a match is not found.
-            search->isForwardSearching = FALSE;
+            search->isForwardSearching = false;
             if (matchedindex != USEARCH_DONE) {
                 return matchedindex;
             }
@@ -1318,7 +1318,7 @@ U_CAPI void U_EXPORT2 usearch_reset(UStringSearch *strsrch)
     */
     if (strsrch) {
         UErrorCode status            = U_ZERO_ERROR;
-        UBool      sameCollAttribute = TRUE;
+        UBool      sameCollAttribute = true;
         uint32_t   ceMask;
         UBool      shift;
         uint32_t   varTop;
@@ -1327,14 +1327,14 @@ U_CAPI void U_EXPORT2 usearch_reset(UStringSearch *strsrch)
         UCollationStrength newStrength = ucol_getStrength(strsrch->collator);
         if ((strsrch->strength < UCOL_QUATERNARY && newStrength >= UCOL_QUATERNARY) ||
             (strsrch->strength >= UCOL_QUATERNARY && newStrength < UCOL_QUATERNARY)) {
-                sameCollAttribute = FALSE;
+                sameCollAttribute = false;
         }
 
         strsrch->strength    = ucol_getStrength(strsrch->collator);
         ceMask = getMask(strsrch->strength);
         if (strsrch->ceMask != ceMask) {
             strsrch->ceMask = ceMask;
-            sameCollAttribute = FALSE;
+            sameCollAttribute = false;
         }
 
         // if status is a failure, ucol_getAttribute returns UCOL_DEFAULT
@@ -1342,14 +1342,14 @@ U_CAPI void U_EXPORT2 usearch_reset(UStringSearch *strsrch)
                                   &status) == UCOL_SHIFTED;
         if (strsrch->toShift != shift) {
             strsrch->toShift  = shift;
-            sameCollAttribute = FALSE;
+            sameCollAttribute = false;
         }
 
         // if status is a failure, ucol_getVariableTop returns 0
         varTop = ucol_getVariableTop(strsrch->collator, &status);
         if (strsrch->variableTop != varTop) {
             strsrch->variableTop = varTop;
-            sameCollAttribute    = FALSE;
+            sameCollAttribute    = false;
         }
         if (!sameCollAttribute) {
             initialize(strsrch, &status);
@@ -1359,11 +1359,11 @@ U_CAPI void U_EXPORT2 usearch_reset(UStringSearch *strsrch)
                               &status);
         strsrch->search->matchedLength      = 0;
         strsrch->search->matchedIndex       = USEARCH_DONE;
-        strsrch->search->isOverlap          = FALSE;
-        strsrch->search->isCanonicalMatch   = FALSE;
+        strsrch->search->isOverlap          = false;
+        strsrch->search->isCanonicalMatch   = false;
         strsrch->search->elementComparisonType = 0;
-        strsrch->search->isForwardSearching = TRUE;
-        strsrch->search->reset              = TRUE;
+        strsrch->search->isForwardSearching = true;
+        strsrch->search->reset              = true;
     }
 }
 
@@ -1610,13 +1610,13 @@ static int32_t nextBoundaryAfter(UStringSearch *strsrch, int32_t startIndex, UEr
 }
 
 /*
- * Returns TRUE if index is on a break boundary. If the UStringSearch
+ * Returns true if index is on a break boundary. If the UStringSearch
  * has an external break iterator, test using that, otherwise test
  * using the internal character break iterator.
  */
 static UBool isBreakBoundary(UStringSearch *strsrch, int32_t index, UErrorCode &status) {
     if (U_FAILURE(status)) {
-        return TRUE;
+        return true;
     }
 #if 0
     const UChar *text = strsrch->search->text;
@@ -1626,7 +1626,7 @@ static UBool isBreakBoundary(UStringSearch *strsrch, int32_t index, UErrorCode &
     U_ASSERT(index<=textLen);
 
     if (index>=textLen || index<=0) {
-        return TRUE;
+        return true;
     }
 
     // If the character at the current index is not a GRAPHEME_EXTEND
@@ -1635,7 +1635,7 @@ static UBool isBreakBoundary(UStringSearch *strsrch, int32_t index, UErrorCode &
     U16_GET(text, 0, index, textLen, c);
     int32_t gcProperty = u_getIntPropertyValue(c, UCHAR_GRAPHEME_CLUSTER_BREAK);
     if (gcProperty != U_GCB_EXTEND && gcProperty != U_GCB_SPACING_MARK) {
-        return TRUE;
+        return true;
     }
 
     // We are at a combining mark.  If the preceding character is anything
@@ -1647,13 +1647,13 @@ static UBool isBreakBoundary(UStringSearch *strsrch, int32_t index, UErrorCode &
 #elif !UCONFIG_NO_BREAK_ITERATION
     UBreakIterator *breakiterator = getBreakIterator(strsrch, status);
     if (U_FAILURE(status)) {
-        return TRUE;
+        return true;
     }
 
     return ubrk_isBoundary(breakiterator, index);
 #else
     // **** or use the original code? ****
-    return TRUE;
+    return true;
 #endif
 }
 
@@ -1661,7 +1661,7 @@ static UBool isBreakBoundary(UStringSearch *strsrch, int32_t index, UErrorCode &
 static UBool onBreakBoundaries(const UStringSearch *strsrch, int32_t start, int32_t end, UErrorCode &status)
 {
     if (U_FAILURE(status)) {
-        return TRUE;
+        return true;
     }
 
 #if !UCONFIG_NO_BREAK_ITERATION
@@ -1673,7 +1673,7 @@ static UBool onBreakBoundaries(const UStringSearch *strsrch, int32_t start, int3
         // out-of-range indexes are never boundary positions
         if (start < startindex || start > endindex ||
             end < startindex || end > endindex) {
-            return FALSE;
+            return false;
         }
 
         return ubrk_isBoundary(breakiterator, start) &&
@@ -1681,7 +1681,7 @@ static UBool onBreakBoundaries(const UStringSearch *strsrch, int32_t start, int3
     }
 #endif
 
-    return TRUE;
+    return true;
 }
 #endif
 
@@ -1773,7 +1773,7 @@ U_CAPI UBool U_EXPORT2 usearch_search(UStringSearch  *strsrch,
                                        UErrorCode     *status)
 {
     if (U_FAILURE(*status)) {
-        return FALSE;
+        return false;
     }
 
     // TODO:  reject search patterns beginning with a combining char.
@@ -1796,7 +1796,7 @@ U_CAPI UBool U_EXPORT2 usearch_search(UStringSearch  *strsrch,
        startIdx > strsrch->search->textLength ||
        strsrch->pattern.ces == nullptr) {
            *status = U_ILLEGAL_ARGUMENT_ERROR;
-           return FALSE;
+           return false;
     }
 
     if (strsrch->pattern.pces == nullptr) {
@@ -1809,7 +1809,7 @@ U_CAPI UBool U_EXPORT2 usearch_search(UStringSearch  *strsrch,
     // An out-of-memory (OOM) failure can occur in the initializePatternPCETable function
     // or CEIBuffer constructor above, so we need to check the status.
     if (U_FAILURE(*status)) {
-        return FALSE;
+        return false;
     }
 
     int32_t    targetIx = 0;
@@ -1840,7 +1840,7 @@ U_CAPI UBool U_EXPORT2 usearch_search(UStringSearch  *strsrch,
     //
     for(targetIx=0; ; targetIx++)
     {
-        found = TRUE;
+        found = true;
         //  Inner loop checks for a match beginning at each
         //  position from the outer loop.
         int32_t targetIxOffset = 0;
@@ -1851,7 +1851,7 @@ U_CAPI UBool U_EXPORT2 usearch_search(UStringSearch  *strsrch,
         const CEI *firstCEI = ceb.get(targetIx);
         if (firstCEI == nullptr) {
             *status = U_INTERNAL_PROGRAM_ERROR;
-            found = FALSE;
+            found = false;
             break;
         }
         
@@ -1863,7 +1863,7 @@ U_CAPI UBool U_EXPORT2 usearch_search(UStringSearch  *strsrch,
             //    which will fail the compare, below.
             UCompareCEsResult ceMatch = compareCE64s(targetCEI->ce, patCE, strsrch->search->elementComparisonType);
             if ( ceMatch == U_CE_NO_MATCH ) {
-                found = FALSE;
+                found = false;
                 break;
             } else if ( ceMatch > U_CE_NO_MATCH ) {
                 if ( ceMatch == U_CE_SKIP_TARG ) {
@@ -1912,7 +1912,7 @@ U_CAPI UBool U_EXPORT2 usearch_search(UStringSearch  *strsrch,
             nextCEI  = ceb.get(targetIx + targetIxOffset);
             maxLimit = nextCEI->lowIndex;
             if (nextCEI->lowIndex == nextCEI->highIndex && nextCEI->ce != UCOL_PROCESSED_NULLORDER) {
-                found = FALSE;
+                found = false;
             }
         } else {
             for ( ; ; ++targetIxOffset ) {
@@ -1928,7 +1928,7 @@ U_CAPI UBool U_EXPORT2 usearch_search(UStringSearch  *strsrch,
                 if ( (((nextCEI->ce) >> 32) & 0xFFFF0000UL) == 0 ) {
                     UCompareCEsResult ceMatch = compareCE64s(nextCEI->ce, patCE, strsrch->search->elementComparisonType);
                     if ( ceMatch == U_CE_NO_MATCH || ceMatch == U_CE_SKIP_PATN ) {
-                        found = FALSE;
+                        found = false;
                         break;
                     }
                 // If lowIndex == highIndex, this target CE is part of an expansion of the last matched
@@ -1951,7 +1951,7 @@ U_CAPI UBool U_EXPORT2 usearch_search(UStringSearch  *strsrch,
         //   This type of match should be rejected for not completely consuming a
         //   combining sequence.
         if (!isBreakBoundary(strsrch, mStart, *status)) {
-            found = FALSE;
+            found = false;
         }
         if (U_FAILURE(*status)) {
             break;
@@ -1964,7 +1964,7 @@ U_CAPI UBool U_EXPORT2 usearch_search(UStringSearch  *strsrch,
         //    _following_ character.
         int32_t secondIx = firstCEI->highIndex;
         if (mStart == secondIx) {
-            found = FALSE;
+            found = false;
         }
 
         // Allow matches to end in the middle of a grapheme cluster if the following
@@ -1978,7 +1978,7 @@ U_CAPI UBool U_EXPORT2 usearch_search(UStringSearch  *strsrch,
         //   subsequent check for normalization boundary; however they are likely much faster
         //   tests in any case)
         // * the match limit is a normalization boundary
-        UBool allowMidclusterMatch = FALSE;
+        UBool allowMidclusterMatch = false;
         if (strsrch->search->text != nullptr && strsrch->search->textLength > maxLimit) {
             allowMidclusterMatch =
                     strsrch->search->breakIter == nullptr &&
@@ -2032,11 +2032,11 @@ U_CAPI UBool U_EXPORT2 usearch_search(UStringSearch  *strsrch,
             // If advancing to the end of a combining sequence in character indexing space
             //   advanced us beyond the end of the match in CE space, reject this match.
             if (mLimit > maxLimit) {
-                found = FALSE;
+                found = false;
             }
 
             if (!isBreakBoundary(strsrch, mLimit, *status)) {
-                found = FALSE;
+                found = false;
             }
             if (U_FAILURE(*status)) {
                 break;
@@ -2044,7 +2044,7 @@ U_CAPI UBool U_EXPORT2 usearch_search(UStringSearch  *strsrch,
         }
 
         if (! checkIdentical(strsrch, mStart, mLimit)) {
-            found = FALSE;
+            found = false;
         }
 
         if (found) {
@@ -2067,10 +2067,10 @@ U_CAPI UBool U_EXPORT2 usearch_search(UStringSearch  *strsrch,
     //
 
     if (U_FAILURE(*status)) {
-        found = FALSE; // No match if a failure occured.
+        found = false; // No match if a failure occured.
     }
 
-    if (found==FALSE) {
+    if (found==false) {
         mLimit = -1;
         mStart = -1;
     }
@@ -2093,7 +2093,7 @@ U_CAPI UBool U_EXPORT2 usearch_searchBackwards(UStringSearch  *strsrch,
                                                 UErrorCode     *status)
 {
     if (U_FAILURE(*status)) {
-        return FALSE;
+        return false;
     }
 
     // TODO:  reject search patterns beginning with a combining char.
@@ -2116,7 +2116,7 @@ U_CAPI UBool U_EXPORT2 usearch_searchBackwards(UStringSearch  *strsrch,
        startIdx > strsrch->search->textLength ||
        strsrch->pattern.ces == nullptr) {
            *status = U_ILLEGAL_ARGUMENT_ERROR;
-           return FALSE;
+           return false;
     }
 
     if (strsrch->pattern.pces == nullptr) {
@@ -2138,7 +2138,7 @@ U_CAPI UBool U_EXPORT2 usearch_searchBackwards(UStringSearch  *strsrch,
     if (startIdx < strsrch->search->textLength) {
         UBreakIterator *breakiterator = getBreakIterator(strsrch, *status);
         if (U_FAILURE(*status)) {
-            return FALSE;
+            return false;
         }
         int32_t next = ubrk_following(breakiterator, startIdx);
 
@@ -2155,7 +2155,7 @@ U_CAPI UBool U_EXPORT2 usearch_searchBackwards(UStringSearch  *strsrch,
 
     // An out-of-memory (OOM) failure can occur above, so we need to check the status.
     if (U_FAILURE(*status)) {
-        return FALSE;
+        return false;
     }
 
     const CEI *targetCEI = nullptr;
@@ -2178,14 +2178,14 @@ U_CAPI UBool U_EXPORT2 usearch_searchBackwards(UStringSearch  *strsrch,
     // and the beginning of the base text.
     for(targetIx = limitIx; ; targetIx += 1)
     {
-        found = TRUE;
+        found = true;
         // For targetIx > limitIx, this ceb.getPrevious gets a CE that is as far back in the ring buffer
         // (compared to the last CE fetched for the previous targetIx value) as we need to go
         // for this targetIx value, so if it is non-nullptr then other ceb.getPrevious calls should be OK.
         const CEI *lastCEI  = ceb.getPrevious(targetIx);
         if (lastCEI == nullptr) {
             *status = U_INTERNAL_PROGRAM_ERROR;
-            found = FALSE;
+            found = false;
              break;
         }
         //  Inner loop checks for a match beginning at each
@@ -2200,7 +2200,7 @@ U_CAPI UBool U_EXPORT2 usearch_searchBackwards(UStringSearch  *strsrch,
             //    which will fail the compare, below.
             UCompareCEsResult ceMatch = compareCE64s(targetCEI->ce, patCE, strsrch->search->elementComparisonType);
             if ( ceMatch == U_CE_NO_MATCH ) {
-                found = FALSE;
+                found = false;
                 break;
             } else if ( ceMatch > U_CE_NO_MATCH ) {
                 if ( ceMatch == U_CE_SKIP_TARG ) {
@@ -2240,7 +2240,7 @@ U_CAPI UBool U_EXPORT2 usearch_searchBackwards(UStringSearch  *strsrch,
         //   This type of match should be rejected for not completely consuming a
         //   combining sequence.
         if (!isBreakBoundary(strsrch, mStart, *status)) {
-            found = FALSE;
+            found = false;
         }
         if (U_FAILURE(*status)) {
             break;
@@ -2249,7 +2249,7 @@ U_CAPI UBool U_EXPORT2 usearch_searchBackwards(UStringSearch  *strsrch,
         // Look at the high index of the first CE in the match. If it's the same as the
         // low index, the first CE in the match is in the middle of an expansion.
         if (mStart == firstCEI->highIndex) {
-            found = FALSE;
+            found = false;
         }
 
 
@@ -2267,7 +2267,7 @@ U_CAPI UBool U_EXPORT2 usearch_searchBackwards(UStringSearch  *strsrch,
             const CEI *nextCEI  = ceb.getPrevious(targetIx - 1);
 
             if (nextCEI->lowIndex == nextCEI->highIndex && nextCEI->ce != UCOL_PROCESSED_NULLORDER) {
-                found = FALSE;
+                found = false;
             }
 
             mLimit = maxLimit = nextCEI->lowIndex;
@@ -2283,7 +2283,7 @@ U_CAPI UBool U_EXPORT2 usearch_searchBackwards(UStringSearch  *strsrch,
             //   subsequent check for normalization boundary; however they are likely much faster
             //   tests in any case)
             // * the match limit is a normalization boundary
-            UBool allowMidclusterMatch = FALSE;
+            UBool allowMidclusterMatch = false;
             if (strsrch->search->text != nullptr && strsrch->search->textLength > maxLimit) {
                 allowMidclusterMatch =
                         strsrch->search->breakIter == nullptr &&
@@ -2316,12 +2316,12 @@ U_CAPI UBool U_EXPORT2 usearch_searchBackwards(UStringSearch  *strsrch,
                 // If advancing to the end of a combining sequence in character indexing space
                 //   advanced us beyond the end of the match in CE space, reject this match.
                 if (mLimit > maxLimit) {
-                    found = FALSE;
+                    found = false;
                 }
 
                 // Make sure the end of the match is on a break boundary
                 if (!isBreakBoundary(strsrch, mLimit, *status)) {
-                    found = FALSE;
+                    found = false;
                 }
                 if (U_FAILURE(*status)) {
                     break;
@@ -2345,7 +2345,7 @@ U_CAPI UBool U_EXPORT2 usearch_searchBackwards(UStringSearch  *strsrch,
 
 
         if (! checkIdentical(strsrch, mStart, mLimit)) {
-            found = FALSE;
+            found = false;
         }
 
         if (found) {
@@ -2368,10 +2368,10 @@ U_CAPI UBool U_EXPORT2 usearch_searchBackwards(UStringSearch  *strsrch,
     //
 
     if (U_FAILURE(*status)) {
-        found = FALSE; // No match if a failure occured.
+        found = false; // No match if a failure occured.
     }
 
-    if (found==FALSE) {
+    if (found==false) {
         mLimit = -1;
         mStart = -1;
     }
@@ -2393,7 +2393,7 @@ UBool usearch_handleNextExact(UStringSearch *strsrch, UErrorCode *status)
 {
     if (U_FAILURE(*status)) {
         setMatchNotFound(strsrch, *status);
-        return FALSE;
+        return false;
     }
 
     int32_t textOffset = ucol_getOffset(strsrch->textIter);
@@ -2403,10 +2403,10 @@ UBool usearch_handleNextExact(UStringSearch *strsrch, UErrorCode *status)
     if (usearch_search(strsrch, textOffset, &start, &end, status)) {
         strsrch->search->matchedIndex  = start;
         strsrch->search->matchedLength = end - start;
-        return TRUE;
+        return true;
     } else {
         setMatchNotFound(strsrch, *status);
-        return FALSE;
+        return false;
     }
 }
 
@@ -2414,7 +2414,7 @@ UBool usearch_handleNextCanonical(UStringSearch *strsrch, UErrorCode *status)
 {
     if (U_FAILURE(*status)) {
         setMatchNotFound(strsrch, *status);
-        return FALSE;
+        return false;
     }
 
     int32_t textOffset = ucol_getOffset(strsrch->textIter);
@@ -2424,10 +2424,10 @@ UBool usearch_handleNextCanonical(UStringSearch *strsrch, UErrorCode *status)
     if (usearch_search(strsrch, textOffset, &start, &end, status)) {
         strsrch->search->matchedIndex  = start;
         strsrch->search->matchedLength = end - start;
-        return TRUE;
+        return true;
     } else {
         setMatchNotFound(strsrch, *status);
-        return FALSE;
+        return false;
     }
 }
 
@@ -2435,7 +2435,7 @@ UBool usearch_handlePreviousExact(UStringSearch *strsrch, UErrorCode *status)
 {
     if (U_FAILURE(*status)) {
         setMatchNotFound(strsrch, *status);
-        return FALSE;
+        return false;
     }
 
     int32_t textOffset;
@@ -2448,7 +2448,7 @@ UBool usearch_handlePreviousExact(UStringSearch *strsrch, UErrorCode *status)
             initializePatternPCETable(strsrch, status);
             if (!initTextProcessedIter(strsrch, status)) {
                 setMatchNotFound(strsrch, *status);
-                return FALSE;
+                return false;
             }
             for (int32_t nPCEs = 0; nPCEs < strsrch->pattern.pcesLength - 1; nPCEs++) {
                 int64_t pce = strsrch->textProcessedIter->nextProcessed(nullptr, nullptr, status);
@@ -2459,7 +2459,7 @@ UBool usearch_handlePreviousExact(UStringSearch *strsrch, UErrorCode *status)
             }
             if (U_FAILURE(*status)) {
                 setMatchNotFound(strsrch, *status);
-                return FALSE;
+                return false;
             }
             textOffset = ucol_getOffset(strsrch->textIter);
         }
@@ -2473,10 +2473,10 @@ UBool usearch_handlePreviousExact(UStringSearch *strsrch, UErrorCode *status)
     if (usearch_searchBackwards(strsrch, textOffset, &start, &end, status)) {
         strsrch->search->matchedIndex = start;
         strsrch->search->matchedLength = end - start;
-        return TRUE;
+        return true;
     } else {
         setMatchNotFound(strsrch, *status);
-        return FALSE;
+        return false;
     }
 }
 
@@ -2485,7 +2485,7 @@ UBool usearch_handlePreviousCanonical(UStringSearch *strsrch,
 {
     if (U_FAILURE(*status)) {
         setMatchNotFound(strsrch, *status);
-        return FALSE;
+        return false;
     }
 
     int32_t textOffset;
@@ -2498,7 +2498,7 @@ UBool usearch_handlePreviousCanonical(UStringSearch *strsrch,
             initializePatternPCETable(strsrch, status);
             if (!initTextProcessedIter(strsrch, status)) {
                 setMatchNotFound(strsrch, *status);
-                return FALSE;
+                return false;
             }
             for (int32_t nPCEs = 0; nPCEs < strsrch->pattern.pcesLength - 1; nPCEs++) {
                 int64_t pce = strsrch->textProcessedIter->nextProcessed(nullptr, nullptr, status);
@@ -2509,7 +2509,7 @@ UBool usearch_handlePreviousCanonical(UStringSearch *strsrch,
             }
             if (U_FAILURE(*status)) {
                 setMatchNotFound(strsrch, *status);
-                return FALSE;
+                return false;
             }
             textOffset = ucol_getOffset(strsrch->textIter);
         }
@@ -2523,10 +2523,10 @@ UBool usearch_handlePreviousCanonical(UStringSearch *strsrch,
     if (usearch_searchBackwards(strsrch, textOffset, &start, &end, status)) {
         strsrch->search->matchedIndex = start;
         strsrch->search->matchedLength = end - start;
-        return TRUE;
+        return true;
     } else {
         setMatchNotFound(strsrch, *status);
-        return FALSE;
+        return false;
     }
 }
 
diff --git a/icu4c/source/i18n/uspoof.cpp b/icu4c/source/i18n/uspoof.cpp
index ae4add65ab2..f894dc44cac 100644
--- a/icu4c/source/i18n/uspoof.cpp
+++ b/icu4c/source/i18n/uspoof.cpp
@@ -53,7 +53,7 @@ uspoof_cleanup(void) {
     gRecommendedSet = NULL;
     gNfdNormalizer = NULL;
     gSpoofInitStaticsOnce.reset();
-    return TRUE;
+    return true;
 }
 
 void U_CALLCONV initializeStatics(UErrorCode &status) {
@@ -612,7 +612,7 @@ int32_t checkImpl(const SpoofImpl* This, const UnicodeString& id, CheckResult* c
         int32_t     i;
         UChar32     c;
         UChar32     firstNonspacingMark = 0;
-        UBool       haveMultipleMarks = FALSE;  
+        UBool       haveMultipleMarks = false;  
         UnicodeSet  marksSeenSoFar;   // Set of combining marks in a single combining sequence.
         
         for (i=0; ifSpoofData->fDataOwned == TRUE);
+    U_ASSERT(fSpoofImpl->fSpoofData->fDataOwned == true);
 
     //  The Key Table
     //     While copying the keys to the runtime array,
diff --git a/icu4c/source/i18n/uspoof_impl.cpp b/icu4c/source/i18n/uspoof_impl.cpp
index 3e2386e09aa..e50344c4696 100644
--- a/icu4c/source/i18n/uspoof_impl.cpp
+++ b/icu4c/source/i18n/uspoof_impl.cpp
@@ -320,10 +320,10 @@ URestrictionLevel SpoofImpl::getRestrictionLevel(const UnicodeString& input, UEr
     // Section 5.2 step 2
     // Java use a static UnicodeSet for this test.  In C++, avoid the static variable
     // and just do a simple for loop.
-    UBool allASCII = TRUE;
+    UBool allASCII = true;
     for (int32_t i=0, length=input.length(); i 0x7f) {
-            allASCII = FALSE;
+            allASCII = false;
             break;
         }
     }
@@ -495,9 +495,9 @@ UBool SpoofData::validateDataVersion(UErrorCode &status) const {
         fRawData->fFormatVersion[2] != 0 ||
         fRawData->fFormatVersion[3] != 0) {
             status = U_INVALID_FORMAT_ERROR;
-            return FALSE;
+            return false;
     }
-    return TRUE;
+    return true;
 }
 
 static UBool U_CALLCONV
@@ -518,9 +518,9 @@ spoofDataIsAcceptable(void *context,
         if(version != NULL) {
             uprv_memcpy(version, pInfo->dataVersion, 4);
         }
-        return TRUE;
+        return true;
     } else {
-        return FALSE;
+        return false;
     }
 }
 
@@ -549,7 +549,7 @@ uspoof_cleanupDefaultData(void) {
         gDefaultSpoofData = nullptr;
         gSpoofInitDefaultOnce.reset();
     }
-    return TRUE;
+    return true;
 }
 
 static void U_CALLCONV uspoof_loadDefaultData(UErrorCode& status) {
@@ -655,7 +655,7 @@ SpoofData::SpoofData(UErrorCode &status) {
 //           Called by constructors to put things in a known initial state.
 void SpoofData::reset() {
    fRawData = NULL;
-   fDataOwned = FALSE;
+   fDataOwned = false;
    fUDM      = NULL;
    fMemLimit = 0;
    fRefCount = 1;
diff --git a/icu4c/source/i18n/utf16collationiterator.cpp b/icu4c/source/i18n/utf16collationiterator.cpp
index f1bdfabe738..912163a0a34 100644
--- a/icu4c/source/i18n/utf16collationiterator.cpp
+++ b/icu4c/source/i18n/utf16collationiterator.cpp
@@ -78,9 +78,9 @@ UBool
 UTF16CollationIterator::foundNULTerminator() {
     if(limit == NULL) {
         limit = --pos;
-        return TRUE;
+        return true;
     } else {
-        return FALSE;
+        return false;
     }
 }
 
@@ -241,9 +241,9 @@ UBool
 FCDUTF16CollationIterator::foundNULTerminator() {
     if(limit == NULL) {
         limit = rawLimit = --pos;
-        return TRUE;
+        return true;
     } else {
-        return FALSE;
+        return false;
     }
 }
 
@@ -361,7 +361,7 @@ FCDUTF16CollationIterator::switchToForward() {
             // Switch to checking forward from it.
             pos = start = segmentStart = segmentLimit;
             // Note: If this segment is at the end of the input text,
-            // then it might help to return FALSE to indicate that, so that
+            // then it might help to return false to indicate that, so that
             // we do not have to re-check and normalize when we turn around and go backwards.
             // However, that would complicate the call sites for an optimization of an unusual case.
         }
@@ -372,7 +372,7 @@ FCDUTF16CollationIterator::switchToForward() {
 
 UBool
 FCDUTF16CollationIterator::nextSegment(UErrorCode &errorCode) {
-    if(U_FAILURE(errorCode)) { return FALSE; }
+    if(U_FAILURE(errorCode)) { return false; }
     U_ASSERT(checkDir > 0 && pos != limit);
     // The input text [segmentStart..pos[ passes the FCD check.
     const UChar *p = pos;
@@ -392,7 +392,7 @@ FCDUTF16CollationIterator::nextSegment(UErrorCode &errorCode) {
             do {
                 q = p;
             } while(p != rawLimit && nfcImpl.nextFCD16(p, rawLimit) > 0xff);
-            if(!normalize(pos, q, errorCode)) { return FALSE; }
+            if(!normalize(pos, q, errorCode)) { return false; }
             pos = start;
             break;
         }
@@ -405,7 +405,7 @@ FCDUTF16CollationIterator::nextSegment(UErrorCode &errorCode) {
     }
     U_ASSERT(pos != limit);
     checkDir = 0;
-    return TRUE;
+    return true;
 }
 
 void
@@ -436,7 +436,7 @@ FCDUTF16CollationIterator::switchToBackward() {
 
 UBool
 FCDUTF16CollationIterator::previousSegment(UErrorCode &errorCode) {
-    if(U_FAILURE(errorCode)) { return FALSE; }
+    if(U_FAILURE(errorCode)) { return false; }
     U_ASSERT(checkDir < 0 && pos != start);
     // The input text [pos..segmentLimit[ passes the FCD check.
     const UChar *p = pos;
@@ -458,7 +458,7 @@ FCDUTF16CollationIterator::previousSegment(UErrorCode &errorCode) {
                 q = p;
             } while(fcd16 > 0xff && p != rawStart &&
                     (fcd16 = nfcImpl.previousFCD16(rawStart, p)) != 0);
-            if(!normalize(q, pos, errorCode)) { return FALSE; }
+            if(!normalize(q, pos, errorCode)) { return false; }
             pos = limit;
             break;
         }
@@ -471,7 +471,7 @@ FCDUTF16CollationIterator::previousSegment(UErrorCode &errorCode) {
     }
     U_ASSERT(pos != start);
     checkDir = 0;
-    return TRUE;
+    return true;
 }
 
 UBool
@@ -479,14 +479,14 @@ FCDUTF16CollationIterator::normalize(const UChar *from, const UChar *to, UErrorC
     // NFD without argument checking.
     U_ASSERT(U_SUCCESS(errorCode));
     nfcImpl.decompose(from, to, normalized, (int32_t)(to - from), errorCode);
-    if(U_FAILURE(errorCode)) { return FALSE; }
+    if(U_FAILURE(errorCode)) { return false; }
     // Switch collation processing into the FCD buffer
     // with the result of normalizing [segmentStart, segmentLimit[.
     segmentStart = from;
     segmentLimit = to;
     start = normalized.getBuffer();
     limit = start + normalized.length();
-    return TRUE;
+    return true;
 }
 
 U_NAMESPACE_END
diff --git a/icu4c/source/i18n/utf8collationiterator.cpp b/icu4c/source/i18n/utf8collationiterator.cpp
index 345b1994ef0..5a6cf7fd1ba 100644
--- a/icu4c/source/i18n/utf8collationiterator.cpp
+++ b/icu4c/source/i18n/utf8collationiterator.cpp
@@ -80,15 +80,15 @@ UBool
 UTF8CollationIterator::foundNULTerminator() {
     if(length < 0) {
         length = --pos;
-        return TRUE;
+        return true;
     } else {
-        return FALSE;
+        return false;
     }
 }
 
 UBool
 UTF8CollationIterator::forbidSurrogateCodePoints() const {
-    return TRUE;
+    return true;
 }
 
 UChar32
@@ -224,7 +224,7 @@ FCDUTF8CollationIterator::nextHasLccc() const {
     // The lowest code point with ccc!=0 is U+0300 which is CC 80 in UTF-8.
     // CJK U+4000..U+DFFF except U+Axxx are also FCD-inert. (Lead bytes E4..ED except EA.)
     UChar32 c = u8[pos];
-    if(c < 0xcc || (0xe4 <= c && c <= 0xed && c != 0xea)) { return FALSE; }
+    if(c < 0xcc || (0xe4 <= c && c <= 0xed && c != 0xea)) { return false; }
     int32_t i = pos;
     U8_NEXT_OR_FFFD(u8, i, length, c);
     if(c > 0xffff) { c = U16_LEAD(c); }
@@ -235,7 +235,7 @@ UBool
 FCDUTF8CollationIterator::previousHasTccc() const {
     U_ASSERT(state == CHECK_BWD && pos != 0);
     UChar32 c = u8[pos - 1];
-    if(U8_IS_SINGLE(c)) { return FALSE; }
+    if(U8_IS_SINGLE(c)) { return false; }
     int32_t i = pos;
     U8_PREV_OR_FFFD(u8, 0, i, c);
     if(c > 0xffff) { c = U16_LEAD(c); }
@@ -255,9 +255,9 @@ UBool
 FCDUTF8CollationIterator::foundNULTerminator() {
     if(state == CHECK_FWD && length < 0) {
         length = --pos;
-        return TRUE;
+        return true;
     } else {
-        return FALSE;
+        return false;
     }
 }
 
@@ -383,7 +383,7 @@ FCDUTF8CollationIterator::switchToForward() {
 
 UBool
 FCDUTF8CollationIterator::nextSegment(UErrorCode &errorCode) {
-    if(U_FAILURE(errorCode)) { return FALSE; }
+    if(U_FAILURE(errorCode)) { return false; }
     U_ASSERT(state == CHECK_FWD && pos != length);
     // The input text [start..pos[ passes the FCD check.
     int32_t segmentStart = pos;
@@ -414,12 +414,12 @@ FCDUTF8CollationIterator::nextSegment(UErrorCode &errorCode) {
                 }
                 s.append(c);
             }
-            if(!normalize(s, errorCode)) { return FALSE; }
+            if(!normalize(s, errorCode)) { return false; }
             start = segmentStart;
             limit = pos;
             state = IN_NORMALIZED;
             pos = 0;
-            return TRUE;
+            return true;
         }
         prevCC = (uint8_t)fcd16;
         if(pos == length || prevCC == 0) {
@@ -431,7 +431,7 @@ FCDUTF8CollationIterator::nextSegment(UErrorCode &errorCode) {
     pos = segmentStart;
     U_ASSERT(pos != limit);
     state = IN_FCD_SEGMENT;
-    return TRUE;
+    return true;
 }
 
 void
@@ -462,7 +462,7 @@ FCDUTF8CollationIterator::switchToBackward() {
 
 UBool
 FCDUTF8CollationIterator::previousSegment(UErrorCode &errorCode) {
-    if(U_FAILURE(errorCode)) { return FALSE; }
+    if(U_FAILURE(errorCode)) { return false; }
     U_ASSERT(state == CHECK_BWD && pos != 0);
     // The input text [pos..limit[ passes the FCD check.
     int32_t segmentLimit = pos;
@@ -496,12 +496,12 @@ FCDUTF8CollationIterator::previousSegment(UErrorCode &errorCode) {
                 s.append(c);
             }
             s.reverse();
-            if(!normalize(s, errorCode)) { return FALSE; }
+            if(!normalize(s, errorCode)) { return false; }
             limit = segmentLimit;
             start = pos;
             state = IN_NORMALIZED;
             pos = normalized.length();
-            return TRUE;
+            return true;
         }
         nextCC = (uint8_t)(fcd16 >> 8);
         if(pos == 0 || nextCC == 0) {
@@ -513,7 +513,7 @@ FCDUTF8CollationIterator::previousSegment(UErrorCode &errorCode) {
     pos = segmentLimit;
     U_ASSERT(pos != start);
     state = IN_FCD_SEGMENT;
-    return TRUE;
+    return true;
 }
 
 UBool
diff --git a/icu4c/source/i18n/vtzone.cpp b/icu4c/source/i18n/vtzone.cpp
index 06f0b84c0f5..bd81ee73e69 100644
--- a/icu4c/source/i18n/vtzone.cpp
+++ b/icu4c/source/i18n/vtzone.cpp
@@ -110,12 +110,12 @@ static int32_t parseAsciiDigits(const UnicodeString& str, int32_t start, int32_t
 }
 
 static UnicodeString& appendAsciiDigits(int32_t number, uint8_t length, UnicodeString& str) {
-    UBool negative = FALSE;
+    UBool negative = false;
     int32_t digits[10]; // max int32_t is 10 decimal digits
     int32_t i;
 
     if (number < 0) {
-        negative = TRUE;
+        negative = true;
         number *= -1;
     }
 
@@ -145,7 +145,7 @@ static UnicodeString& appendAsciiDigits(int32_t number, uint8_t length, UnicodeS
 }
 
 static UnicodeString& appendMillis(UDate date, UnicodeString& str) {
-    UBool negative = FALSE;
+    UBool negative = false;
     int32_t digits[20]; // max int64_t is 20 decimal digits
     int32_t i;
     int64_t number;
@@ -158,7 +158,7 @@ static UnicodeString& appendMillis(UDate date, UnicodeString& str) {
         number = (int64_t)date;
     }
     if (number < 0) {
-        negative = TRUE;
+        negative = true;
         number *= -1;
     }
     i = 0;
@@ -222,8 +222,8 @@ static UDate parseDateTimeString(const UnicodeString& str, int32_t offset, UErro
     }
 
     int32_t year = 0, month = 0, day = 0, hour = 0, min = 0, sec = 0;
-    UBool isUTC = FALSE;
-    UBool isValid = FALSE;
+    UBool isUTC = false;
+    UBool isValid = false;
     do {
         int length = str.length();
         if (length != 15 && length != 16) {
@@ -240,7 +240,7 @@ static UDate parseDateTimeString(const UnicodeString& str, int32_t offset, UErro
                 // invalid format
                 break;
             }
-            isUTC = TRUE;
+            isUTC = true;
         }
 
         year = parseAsciiDigits(str, 0, 4, status);
@@ -261,7 +261,7 @@ static UDate parseDateTimeString(const UnicodeString& str, int32_t offset, UErro
             break;
         }
 
-        isValid = TRUE;
+        isValid = true;
     } while(false);
 
     if (!isValid) {
@@ -285,7 +285,7 @@ static int32_t offsetStrToMillis(const UnicodeString& str, UErrorCode& status) {
         return 0;
     }
 
-    UBool isValid = FALSE;
+    UBool isValid = false;
     int32_t sign = 0, hour = 0, min = 0, sec = 0;
 
     do {
@@ -383,19 +383,19 @@ static void parseRRULE(const UnicodeString& rrule, int32_t& month, int32_t& dow,
     wim = 0;
     until = MIN_MILLIS;
 
-    UBool yearly = FALSE;
-    //UBool parseError = FALSE;
+    UBool yearly = false;
+    //UBool parseError = false;
 
     int32_t prop_start = 0;
     int32_t prop_end;
     UnicodeString prop, attr, value;
-    UBool nextProp = TRUE;
+    UBool nextProp = true;
 
     while (nextProp) {
         prop_end = rrule.indexOf(SEMICOLON, prop_start);
         if (prop_end == -1) {
             prop.setTo(rrule, prop_start);
-            nextProp = FALSE;
+            nextProp = false;
         } else {
             prop.setTo(rrule, prop_start, prop_end - prop_start);
             prop_start = prop_end + 1;
@@ -411,7 +411,7 @@ static void parseRRULE(const UnicodeString& rrule, int32_t& month, int32_t& dow,
         if (attr.compare(ICAL_FREQ, -1) == 0) {
             // only support YEARLY frequency type
             if (value.compare(ICAL_YEARLY, -1) == 0) {
-                yearly = TRUE;
+                yearly = true;
             } else {
                 goto rruleParseError;
             }
@@ -478,12 +478,12 @@ static void parseRRULE(const UnicodeString& rrule, int32_t& month, int32_t& dow,
             int32_t dom_idx = 0;
             int32_t dom_start = 0;
             int32_t dom_end;
-            UBool nextDOM = TRUE;
+            UBool nextDOM = true;
             while (nextDOM) {
                 dom_end = value.indexOf(COMMA, dom_start);
                 if (dom_end == -1) {
                     dom_end = value.length();
-                    nextDOM = FALSE;
+                    nextDOM = false;
                 }
                 if (dom_idx < domCount) {
                     dom[dom_idx] = parseAsciiDigits(value, dom_start, dom_end - dom_start, status);
@@ -563,10 +563,10 @@ static TimeZoneRule* createRuleByRRULE(const UnicodeString& zonename, int rawOff
             }
             // Make sure days are continuous
             for (i = 1; i < 7; i++) {
-                UBool found = FALSE;
+                UBool found = false;
                 for (j = 0; j < 7; j++) {
                     if (days[j] == firstDay + i) {
-                        found = TRUE;
+                        found = true;
                         break;
                     }
                 }
@@ -703,7 +703,7 @@ static TimeZoneRule* createRuleByRRULE(const UnicodeString& zonename, int rawOff
     } else if (dayOfWeek != 0 && nthDayOfWeek == 0 && dayOfMonth != 0) {
         // First day of week after day of month rule, for example,
         // first Sunday after 15th day in the month
-        adtr = new DateTimeRule(month, dayOfMonth, dayOfWeek, TRUE, startMID, DateTimeRule::WALL_TIME);
+        adtr = new DateTimeRule(month, dayOfMonth, dayOfWeek, true, startMID, DateTimeRule::WALL_TIME);
     }
     if (adtr == nullptr) {
         goto unsupportedRRule;
@@ -759,36 +759,36 @@ static TimeZoneRule* createRuleByRDATE(const UnicodeString& zonename, int32_t ra
  */
 static UBool isEquivalentDateRule(int32_t month, int32_t weekInMonth, int32_t dayOfWeek, const DateTimeRule *dtrule) {
     if (month != dtrule->getRuleMonth() || dayOfWeek != dtrule->getRuleDayOfWeek()) {
-        return FALSE;
+        return false;
     }
     if (dtrule->getTimeRuleType() != DateTimeRule::WALL_TIME) {
         // Do not try to do more intelligent comparison for now.
-        return FALSE;
+        return false;
     }
     if (dtrule->getDateRuleType() == DateTimeRule::DOW
             && dtrule->getRuleWeekInMonth() == weekInMonth) {
-        return TRUE;
+        return true;
     }
     int32_t ruleDOM = dtrule->getRuleDayOfMonth();
     if (dtrule->getDateRuleType() == DateTimeRule::DOW_GEQ_DOM) {
         if (ruleDOM%7 == 1 && (ruleDOM + 6)/7 == weekInMonth) {
-            return TRUE;
+            return true;
         }
         if (month != UCAL_FEBRUARY && (MONTHLENGTH[month] - ruleDOM)%7 == 6
                 && weekInMonth == -1*((MONTHLENGTH[month]-ruleDOM+1)/7)) {
-            return TRUE;
+            return true;
         }
     }
     if (dtrule->getDateRuleType() == DateTimeRule::DOW_LEQ_DOM) {
         if (ruleDOM%7 == 0 && ruleDOM/7 == weekInMonth) {
-            return TRUE;
+            return true;
         }
         if (month != UCAL_FEBRUARY && (MONTHLENGTH[month] - ruleDOM)%7 == 0
                 && weekInMonth == -1*((MONTHLENGTH[month] - ruleDOM)/7 + 1)) {
-            return TRUE;
+            return true;
         }
     }
-    return FALSE;
+    return false;
 }
 
 /*
@@ -1139,9 +1139,9 @@ UBool
 VTimeZone::getTZURL(UnicodeString& url) const {
     if (tzurl.length() > 0) {
         url = tzurl;
-        return TRUE;
+        return true;
     }
-    return FALSE;
+    return false;
 }
 
 void
@@ -1153,9 +1153,9 @@ UBool
 VTimeZone::getLastModified(UDate& lastModified) const {
     if (lastmod != MAX_MILLIS) {
         lastModified = lastmod;
-        return TRUE;
+        return true;
     }
-    return FALSE;
+    return false;
 }
 
 void
@@ -1269,12 +1269,12 @@ VTimeZone::load(VTZReader& reader, UErrorCode& status) {
     if (U_FAILURE(status)) {
         return;
     }
-    UBool eol = FALSE;
-    UBool start = FALSE;
-    UBool success = FALSE;
+    UBool eol = false;
+    UBool start = false;
+    UBool success = false;
     UnicodeString line;
 
-    while (TRUE) {
+    while (true) {
         UChar ch = reader.read();
         if (ch == 0xFFFF) {
             // end of file
@@ -1284,7 +1284,7 @@ VTimeZone::load(VTZReader& reader, UErrorCode& status) {
                 if (U_FAILURE(status)) {
                     return;
                 }
-                success = TRUE;
+                success = true;
             }
             break;
         }
@@ -1309,11 +1309,11 @@ VTimeZone::load(VTZReader& reader, UErrorCode& status) {
                     line.append(ch);
                 }
             }
-            eol = FALSE;
+            eol = false;
         } else {
             if (ch == 0x000A) {
                 // LF
-                eol = TRUE;
+                eol = true;
                 if (start) {
                     if (line.startsWith(ICAL_END_VTIMEZONE, -1)) {
                         LocalPointer element(new UnicodeString(line), status);
@@ -1321,7 +1321,7 @@ VTimeZone::load(VTZReader& reader, UErrorCode& status) {
                         if (U_FAILURE(status)) {
                             return;
                         }
-                        success = TRUE;
+                        success = true;
                         break;
                     }
                 } else {
@@ -1332,8 +1332,8 @@ VTimeZone::load(VTZReader& reader, UErrorCode& status) {
                             return;
                         }
                         line.remove();
-                        start = TRUE;
-                        eol = FALSE;
+                        start = true;
+                        eol = false;
                     }
                 }
             } else {
@@ -1374,12 +1374,12 @@ VTimeZone::parse(UErrorCode& status) {
 
     int32_t state = INI;
     int32_t n = 0;
-    UBool dst = FALSE;      // current zone type
+    UBool dst = false;      // current zone type
     UnicodeString from;     // current zone from offset
     UnicodeString to;       // current zone offset
     UnicodeString zonename;   // current zone name
     UnicodeString dtstart;  // current zone starts
-    UBool isRRULE = FALSE;  // true if the rule is described by RRULE
+    UBool isRRULE = false;  // true if the rule is described by RRULE
     int32_t initialRawOffset = 0;   // initial offset
     int32_t initialDSTSavings = 0;  // initial offset
     UDate firstStart = MAX_MILLIS;  // the earliest rule start time
@@ -1438,7 +1438,7 @@ VTimeZone::parse(UErrorCode& status) {
                     if (dates.size() != 0) {
                         dates.removeAllElements();
                     }
-                    isRRULE = FALSE;
+                    isRRULE = false;
                     from.remove();
                     to.remove();
                     zonename.remove();
@@ -1469,14 +1469,14 @@ VTimeZone::parse(UErrorCode& status) {
                 }
                 // RDATE value may contain multiple date delimited
                 // by comma
-                UBool nextDate = TRUE;
+                UBool nextDate = true;
                 int32_t dstart = 0;
                 LocalPointer dstr;
                 while (nextDate) {
                     int32_t dend = value.indexOf(COMMA, dstart);
                     if (dend == -1) {
                         dstr.adoptInsteadAndCheckErrorCode(new UnicodeString(value, dstart), status);
-                        nextDate = FALSE;
+                        nextDate = false;
                     } else {
                         dstr.adoptInsteadAndCheckErrorCode(new UnicodeString(value, dstart, dend - dstart), status);
                     }
@@ -1591,7 +1591,7 @@ VTimeZone::parse(UErrorCode& status) {
     }
 
     // Create a initial rule
-    getDefaultTZName(tzid, FALSE, zonename);
+    getDefaultTZName(tzid, false, zonename);
     LocalPointer initialRule(
         new InitialTimeZoneRule(zonename, initialRawOffset, initialDSTSavings), status);
     if (U_FAILURE(status)) {
@@ -1652,7 +1652,7 @@ VTimeZone::parse(UErrorCode& status) {
                     finalRule->getNextStart(lastStart,
                         r->getRawOffset(),
                         r->getDSTSavings(),
-                        FALSE,
+                        false,
                         start);
                 }
             }
@@ -1898,19 +1898,19 @@ VTimeZone::writeZone(VTZWriter& w, BasicTimeZone& basictz,
     AnnualTimeZoneRule *finalStdRule = nullptr;
 
     int32_t year, month, dom, dow, doy, mid;
-    UBool hasTransitions = FALSE;
+    UBool hasTransitions = false;
     TimeZoneTransition tzt;
     UBool tztAvail;
     UnicodeString name;
     UBool isDst;
 
     // Going through all transitions
-    while (TRUE) {
-        tztAvail = basictz.getNextTransition(t, FALSE, tzt);
+    while (true) {
+        tztAvail = basictz.getNextTransition(t, false, tzt);
         if (!tztAvail) {
             break;
         }
-        hasTransitions = TRUE;
+        hasTransitions = true;
         t = tzt.getTime();
         tzt.getTo()->getName(name);
         isDst = (tzt.getTo()->getDSTSavings() != 0);
@@ -1919,7 +1919,7 @@ VTimeZone::writeZone(VTZWriter& w, BasicTimeZone& basictz,
         int32_t toOffset = tzt.getTo()->getRawOffset() + tzt.getTo()->getDSTSavings();
         Grego::timeToFields(tzt.getTime() + fromOffset, year, month, dom, dow, doy, mid);
         int32_t weekInMonth = Grego::dayOfWeekInMonth(year, month, dom);
-        UBool sameRule = FALSE;
+        UBool sameRule = false;
         const AnnualTimeZoneRule *atzrule;
         if (isDst) {
             if (finalDstRule == nullptr
@@ -1940,14 +1940,14 @@ VTimeZone::writeZone(VTZWriter& w, BasicTimeZone& basictz,
                     // Update until time
                     dstUntilTime = t;
                     dstCount++;
-                    sameRule = TRUE;
+                    sameRule = true;
                 }
                 if (!sameRule) {
                     if (dstCount == 1) {
-                        writeZonePropsByTime(w, TRUE, dstName, dstFromOffset, dstToOffset, dstStartTime,
-                                TRUE, status);
+                        writeZonePropsByTime(w, true, dstName, dstFromOffset, dstToOffset, dstStartTime,
+                                true, status);
                     } else {
-                        writeZonePropsByDOW(w, TRUE, dstName, dstFromOffset, dstToOffset,
+                        writeZonePropsByDOW(w, true, dstName, dstFromOffset, dstToOffset,
                                 dstMonth, dstWeekInMonth, dstDayOfWeek, dstStartTime, dstUntilTime, status);
                     }
                     if (U_FAILURE(status)) {
@@ -1991,14 +1991,14 @@ VTimeZone::writeZone(VTZWriter& w, BasicTimeZone& basictz,
                     // Update until time
                     stdUntilTime = t;
                     stdCount++;
-                    sameRule = TRUE;
+                    sameRule = true;
                 }
                 if (!sameRule) {
                     if (stdCount == 1) {
-                        writeZonePropsByTime(w, FALSE, stdName, stdFromOffset, stdToOffset, stdStartTime,
-                                TRUE, status);
+                        writeZonePropsByTime(w, false, stdName, stdFromOffset, stdToOffset, stdStartTime,
+                                true, status);
                     } else {
-                        writeZonePropsByDOW(w, FALSE, stdName, stdFromOffset, stdToOffset,
+                        writeZonePropsByDOW(w, false, stdName, stdFromOffset, stdToOffset,
                                 stdMonth, stdWeekInMonth, stdDayOfWeek, stdStartTime, stdUntilTime, status);
                     }
                     if (U_FAILURE(status)) {
@@ -2028,7 +2028,7 @@ VTimeZone::writeZone(VTZWriter& w, BasicTimeZone& basictz,
     if (!hasTransitions) {
         // No transition - put a single non transition RDATE
         int32_t raw, dst, offset;
-        basictz.getOffset(0.0/*any time*/, FALSE, raw, dst, status);
+        basictz.getOffset(0.0/*any time*/, false, raw, dst, status);
         if (U_FAILURE(status)) {
             goto cleanupWriteZone;
         }
@@ -2038,7 +2038,7 @@ VTimeZone::writeZone(VTZWriter& w, BasicTimeZone& basictz,
         basictz.getID(tzid);
         getDefaultTZName(tzid, isDst, name);        
         writeZonePropsByTime(w, isDst, name,
-                offset, offset, DEF_TZSTARTTIME - offset, FALSE, status);    
+                offset, offset, DEF_TZSTARTTIME - offset, false, status);    
         if (U_FAILURE(status)) {
             goto cleanupWriteZone;
         }
@@ -2046,10 +2046,10 @@ VTimeZone::writeZone(VTZWriter& w, BasicTimeZone& basictz,
         if (dstCount > 0) {
             if (finalDstRule == nullptr) {
                 if (dstCount == 1) {
-                    writeZonePropsByTime(w, TRUE, dstName, dstFromOffset, dstToOffset, dstStartTime,
-                            TRUE, status);
+                    writeZonePropsByTime(w, true, dstName, dstFromOffset, dstToOffset, dstStartTime,
+                            true, status);
                 } else {
-                    writeZonePropsByDOW(w, TRUE, dstName, dstFromOffset, dstToOffset,
+                    writeZonePropsByDOW(w, true, dstName, dstFromOffset, dstToOffset,
                             dstMonth, dstWeekInMonth, dstDayOfWeek, dstStartTime, dstUntilTime, status);
                 }
                 if (U_FAILURE(status)) {
@@ -2057,16 +2057,16 @@ VTimeZone::writeZone(VTZWriter& w, BasicTimeZone& basictz,
                 }
             } else {
                 if (dstCount == 1) {
-                    writeFinalRule(w, TRUE, finalDstRule,
+                    writeFinalRule(w, true, finalDstRule,
                             dstFromOffset - dstFromDSTSavings, dstFromDSTSavings, dstStartTime, status);
                 } else {
                     // Use a single rule if possible
                     if (isEquivalentDateRule(dstMonth, dstWeekInMonth, dstDayOfWeek, finalDstRule->getRule())) {
-                        writeZonePropsByDOW(w, TRUE, dstName, dstFromOffset, dstToOffset,
+                        writeZonePropsByDOW(w, true, dstName, dstFromOffset, dstToOffset,
                                 dstMonth, dstWeekInMonth, dstDayOfWeek, dstStartTime, MAX_MILLIS, status);
                     } else {
                         // Not equivalent rule - write out two different rules
-                        writeZonePropsByDOW(w, TRUE, dstName, dstFromOffset, dstToOffset,
+                        writeZonePropsByDOW(w, true, dstName, dstFromOffset, dstToOffset,
                                 dstMonth, dstWeekInMonth, dstDayOfWeek, dstStartTime, dstUntilTime, status);
                         if (U_FAILURE(status)) {
                             goto cleanupWriteZone;
@@ -2075,7 +2075,7 @@ VTimeZone::writeZone(VTZWriter& w, BasicTimeZone& basictz,
                         UBool nextStartAvail = finalDstRule->getNextStart(dstUntilTime, dstFromOffset - dstFromDSTSavings, dstFromDSTSavings, false, nextStart);
                         U_ASSERT(nextStartAvail);
                         if (nextStartAvail) {
-                            writeFinalRule(w, TRUE, finalDstRule,
+                            writeFinalRule(w, true, finalDstRule,
                                     dstFromOffset - dstFromDSTSavings, dstFromDSTSavings, nextStart, status);
                         }
                     }
@@ -2088,10 +2088,10 @@ VTimeZone::writeZone(VTZWriter& w, BasicTimeZone& basictz,
         if (stdCount > 0) {
             if (finalStdRule == nullptr) {
                 if (stdCount == 1) {
-                    writeZonePropsByTime(w, FALSE, stdName, stdFromOffset, stdToOffset, stdStartTime,
-                            TRUE, status);
+                    writeZonePropsByTime(w, false, stdName, stdFromOffset, stdToOffset, stdStartTime,
+                            true, status);
                 } else {
-                    writeZonePropsByDOW(w, FALSE, stdName, stdFromOffset, stdToOffset,
+                    writeZonePropsByDOW(w, false, stdName, stdFromOffset, stdToOffset,
                             stdMonth, stdWeekInMonth, stdDayOfWeek, stdStartTime, stdUntilTime, status);
                 }
                 if (U_FAILURE(status)) {
@@ -2099,16 +2099,16 @@ VTimeZone::writeZone(VTZWriter& w, BasicTimeZone& basictz,
                 }
             } else {
                 if (stdCount == 1) {
-                    writeFinalRule(w, FALSE, finalStdRule,
+                    writeFinalRule(w, false, finalStdRule,
                             stdFromOffset - stdFromDSTSavings, stdFromDSTSavings, stdStartTime, status);
                 } else {
                     // Use a single rule if possible
                     if (isEquivalentDateRule(stdMonth, stdWeekInMonth, stdDayOfWeek, finalStdRule->getRule())) {
-                        writeZonePropsByDOW(w, FALSE, stdName, stdFromOffset, stdToOffset,
+                        writeZonePropsByDOW(w, false, stdName, stdFromOffset, stdToOffset,
                                 stdMonth, stdWeekInMonth, stdDayOfWeek, stdStartTime, MAX_MILLIS, status);
                     } else {
                         // Not equivalent rule - write out two different rules
-                        writeZonePropsByDOW(w, FALSE, stdName, stdFromOffset, stdToOffset,
+                        writeZonePropsByDOW(w, false, stdName, stdFromOffset, stdToOffset,
                                 stdMonth, stdWeekInMonth, stdDayOfWeek, stdStartTime, stdUntilTime, status);
                         if (U_FAILURE(status)) {
                             goto cleanupWriteZone;
@@ -2117,7 +2117,7 @@ VTimeZone::writeZone(VTZWriter& w, BasicTimeZone& basictz,
                         UBool nextStartAvail = finalStdRule->getNextStart(stdUntilTime, stdFromOffset - stdFromDSTSavings, stdFromDSTSavings, false, nextStart);
                         U_ASSERT(nextStartAvail);
                         if (nextStartAvail) {
-                            writeFinalRule(w, FALSE, finalStdRule,
+                            writeFinalRule(w, false, finalStdRule,
                                     stdFromOffset - stdFromDSTSavings, stdFromDSTSavings, nextStart, status);
                         }
                     }
@@ -2447,13 +2447,13 @@ VTimeZone::writeFinalRule(VTZWriter& writer, UBool isDst, const AnnualTimeZoneRu
     if (U_FAILURE(status)) {
         return;
     }
-    UBool modifiedRule = TRUE;
+    UBool modifiedRule = true;
     const DateTimeRule *dtrule = toWallTimeRule(rule->getRule(), fromRawOffset, fromDSTSavings, status);
     if (U_FAILURE(status)) {
         return;
     }
     if (dtrule == nullptr) {
-        modifiedRule = FALSE;
+        modifiedRule = false;
         dtrule = rule->getRule();
     }
 
diff --git a/icu4c/source/i18n/windtfmt.cpp b/icu4c/source/i18n/windtfmt.cpp
index f6a990ea29e..4676fd0aa1c 100644
--- a/icu4c/source/i18n/windtfmt.cpp
+++ b/icu4c/source/i18n/windtfmt.cpp
@@ -84,7 +84,7 @@ UnicodeString* Win32DateFormat::getTimeDateFormat(const Calendar *cal, const Loc
     }
     const UChar *resStr = ures_getStringByIndex(patBundle, glueIndex, &resStrLen, &status);
 
-    result = new UnicodeString(TRUE, resStr, resStrLen);
+    result = new UnicodeString(true, resStr, resStrLen);
 
     ures_close(patBundle);
     ures_close(typBundle);
@@ -102,7 +102,7 @@ static UErrorCode GetEquivalentWindowsLocaleName(const Locale& locale, UnicodeSt
     char asciiBCP47Tag[LOCALE_NAME_MAX_LENGTH] = {};
 
     // Convert from names like "en_CA" and "de_DE@collation=phonebook" to "en-CA" and "de-DE-u-co-phonebk".
-    (void)uloc_toLanguageTag(locale.getName(), asciiBCP47Tag, UPRV_LENGTHOF(asciiBCP47Tag), FALSE, &status);
+    (void)uloc_toLanguageTag(locale.getName(), asciiBCP47Tag, UPRV_LENGTHOF(asciiBCP47Tag), false, &status);
 
     if (U_SUCCESS(status))
     {
@@ -380,7 +380,7 @@ UnicodeString Win32DateFormat::setTimeZoneInfo(TIME_ZONE_INFORMATION *tzi, const
 
         zone.getID(icuid);
         if (! uprv_getWindowsTimeZoneInfo(tzi, icuid.getBuffer(), icuid.length())) {
-            UBool found = FALSE;
+            UBool found = false;
             int32_t ec = TimeZone::countEquivalentIDs(icuid);
 
             for (int z = 0; z < ec; z += 1) {
diff --git a/icu4c/source/i18n/winnmfmt.cpp b/icu4c/source/i18n/winnmfmt.cpp
index 8b2a9a4f958..377d1af9bd2 100644
--- a/icu4c/source/i18n/winnmfmt.cpp
+++ b/icu4c/source/i18n/winnmfmt.cpp
@@ -147,7 +147,7 @@ static UErrorCode GetEquivalentWindowsLocaleName(const Locale& locale, UnicodeSt
     char asciiBCP47Tag[LOCALE_NAME_MAX_LENGTH] = {};
 
     // Convert from names like "en_CA" and "de_DE@collation=phonebook" to "en-CA" and "de-DE-u-co-phonebk".
-    (void) uloc_toLanguageTag(locale.getName(), asciiBCP47Tag, UPRV_LENGTHOF(asciiBCP47Tag), FALSE, &status);
+    (void) uloc_toLanguageTag(locale.getName(), asciiBCP47Tag, UPRV_LENGTHOF(asciiBCP47Tag), false, &status);
 
     if (U_SUCCESS(status))
     {
@@ -204,7 +204,7 @@ static UErrorCode GetEquivalentWindowsLocaleName(const Locale& locale, UnicodeSt
 }
 
 Win32NumberFormat::Win32NumberFormat(const Locale &locale, UBool currency, UErrorCode &status)
-  : NumberFormat(), fCurrency(currency), fFormatInfo(NULL), fFractionDigitsSet(FALSE), fWindowsLocaleName(nullptr)
+  : NumberFormat(), fCurrency(currency), fFormatInfo(NULL), fFractionDigitsSet(false), fWindowsLocaleName(nullptr)
 {
     if (!U_FAILURE(status)) {
         fLCID = locale.getLCID();
@@ -325,13 +325,13 @@ void Win32NumberFormat::parse(const UnicodeString& text, Formattable& result, Pa
 }
 void Win32NumberFormat::setMaximumFractionDigits(int32_t newValue)
 {
-    fFractionDigitsSet = TRUE;
+    fFractionDigitsSet = true;
     NumberFormat::setMaximumFractionDigits(newValue);
 }
 
 void Win32NumberFormat::setMinimumFractionDigits(int32_t newValue)
 {
-    fFractionDigitsSet = TRUE;
+    fFractionDigitsSet = true;
     NumberFormat::setMinimumFractionDigits(newValue);
 }
 
diff --git a/icu4c/source/i18n/wintzimpl.cpp b/icu4c/source/i18n/wintzimpl.cpp
index a6d93300638..5f70d091bec 100644
--- a/icu4c/source/i18n/wintzimpl.cpp
+++ b/icu4c/source/i18n/wintzimpl.cpp
@@ -39,7 +39,7 @@ U_NAMESPACE_USE
 
 static UBool getSystemTimeInformation(TimeZone *tz, SYSTEMTIME &daylightDate, SYSTEMTIME &standardDate, int32_t &bias, int32_t &daylightBias, int32_t &standardBias) {
     UErrorCode status = U_ZERO_ERROR;
-    UBool result = TRUE;
+    UBool result = true;
     BasicTimeZone *btz = (BasicTimeZone*)tz; // we should check type
     InitialTimeZoneRule *initial = NULL;
     AnnualTimeZoneRule *std = NULL, *dst = NULL;
@@ -107,7 +107,7 @@ static UBool getSystemTimeInformation(TimeZone *tz, SYSTEMTIME &daylightDate, SY
             daylightDate.wMilliseconds = static_cast(mil);
         }
     } else {
-        result = FALSE;
+        result = false;
     }
 
     delete initial;
@@ -118,7 +118,7 @@ static UBool getSystemTimeInformation(TimeZone *tz, SYSTEMTIME &daylightDate, SY
 }
 
 static UBool getWindowsTimeZoneInfo(TIME_ZONE_INFORMATION *zoneInfo, const UChar *icuid, int32_t length) {
-    UBool result = FALSE;
+    UBool result = false;
     UnicodeString id = UnicodeString(icuid, length);
     TimeZone *tz = TimeZone::createTimeZone(id);
     
@@ -137,7 +137,7 @@ static UBool getWindowsTimeZoneInfo(TIME_ZONE_INFORMATION *zoneInfo, const UChar
             zoneInfo->DaylightDate  = daylightDate;
             zoneInfo->StandardDate  = standardDate;
 
-            result = TRUE;
+            result = true;
         }
     }
 
@@ -152,9 +152,9 @@ U_CAPI UBool U_EXPORT2
 uprv_getWindowsTimeZoneInfo(TIME_ZONE_INFORMATION *zoneInfo, const UChar *icuid, int32_t length)
 {
     if (getWindowsTimeZoneInfo(zoneInfo, icuid, length)) {
-        return TRUE;
+        return true;
     } else {
-        return FALSE;
+        return false;
     }
 }
 
diff --git a/icu4c/source/i18n/zonemeta.cpp b/icu4c/source/i18n/zonemeta.cpp
index 2522ebc3d05..7cf3a5e1312 100644
--- a/icu4c/source/i18n/zonemeta.cpp
+++ b/icu4c/source/i18n/zonemeta.cpp
@@ -85,7 +85,7 @@ static UBool U_CALLCONV zoneMeta_cleanup(void)
     gMultiZonesCountries = NULL;
     gCountryInfoVectorsInitOnce.reset();
 
-    return TRUE;
+    return true;
 }
 
 /**
@@ -266,7 +266,7 @@ ZoneMeta::getCanonicalCLDRID(const UnicodeString &tzid, UErrorCode& status) {
     }
 
     // If not, resolve CLDR canonical ID with resource data
-    UBool isInputCanonical = FALSE;
+    UBool isInputCanonical = false;
     char id[ZID_KEY_MAX + 1];
     tzid.extract(0, 0x7fffffff, id, UPRV_LENGTHOF(id), US_INV);
 
@@ -286,7 +286,7 @@ ZoneMeta::getCanonicalCLDRID(const UnicodeString &tzid, UErrorCode& status) {
         // type entry (canonical) found
         // the input is the canonical ID. resolve to const UChar*
         canonicalID = TimeZone::findID(tzid);
-        isInputCanonical = TRUE;
+        isInputCanonical = true;
     }
 
     if (canonicalID == NULL) {
@@ -328,7 +328,7 @@ ZoneMeta::getCanonicalCLDRID(const UnicodeString &tzid, UErrorCode& status) {
                     canonicalID = canonical;
                 } else {
                     canonicalID = derefer;
-                    isInputCanonical = TRUE;
+                    isInputCanonical = true;
                 }
             }
         }
@@ -373,7 +373,7 @@ ZoneMeta::getCanonicalCLDRID(const UnicodeString &tzid, UnicodeString &systemID,
         systemID.setToBogus();
         return systemID;
     }
-    systemID.setTo(TRUE, canonicalID, -1);
+    systemID.setTo(true, canonicalID, -1);
     return systemID;
 }
 
@@ -414,7 +414,7 @@ static void U_CALLCONV countryInfoVectorsInit(UErrorCode &status) {
 UnicodeString& U_EXPORT2
 ZoneMeta::getCanonicalCountry(const UnicodeString &tzid, UnicodeString &country, UBool *isPrimary /* = NULL */) {
     if (isPrimary != NULL) {
-        *isPrimary = FALSE;
+        *isPrimary = false;
     }
 
     const UChar *region = TimeZone::getRegion(tzid);
@@ -436,8 +436,8 @@ ZoneMeta::getCanonicalCountry(const UnicodeString &tzid, UnicodeString &country,
         }
 
         // Check if it was already cached
-        UBool cached = FALSE;
-        UBool singleZone = FALSE;
+        UBool cached = false;
+        UBool singleZone = false;
         umtx_lock(&gZoneMetaLock);
         {
             singleZone = cached = gSingleZoneCountries->contains((void*)region);
@@ -459,7 +459,7 @@ ZoneMeta::getCanonicalCountry(const UnicodeString &tzid, UnicodeString &country,
             int32_t idsLen = ids->count(status);
             if (U_SUCCESS(status) && idsLen == 1) {
                 // only the single zone is available for the region
-                singleZone = TRUE;
+                singleZone = true;
             }
             delete ids;
 
@@ -481,7 +481,7 @@ ZoneMeta::getCanonicalCountry(const UnicodeString &tzid, UnicodeString &country,
         }
 
         if (singleZone) {
-            *isPrimary = TRUE;
+            *isPrimary = true;
         } else {
             // Note: We may cache the primary zone map in future.
 
@@ -497,13 +497,13 @@ ZoneMeta::getCanonicalCountry(const UnicodeString &tzid, UnicodeString &country,
             const UChar *primaryZone = ures_getStringByKey(rb, regionBuf, &idLen, &status);
             if (U_SUCCESS(status)) {
                 if (tzid.compare(primaryZone, idLen) == 0) {
-                    *isPrimary = TRUE;
+                    *isPrimary = true;
                 } else {
                     // The given ID might not be a canonical ID
                     UnicodeString canonicalID;
                     TimeZone::getCanonicalID(tzid, canonicalID, status);
                     if (U_SUCCESS(status) && canonicalID.compare(primaryZone, idLen) == 0) {
-                        *isPrimary = TRUE;
+                        *isPrimary = true;
                     }
                 }
             }
@@ -516,14 +516,14 @@ ZoneMeta::getCanonicalCountry(const UnicodeString &tzid, UnicodeString &country,
 
 UnicodeString& U_EXPORT2
 ZoneMeta::getMetazoneID(const UnicodeString &tzid, UDate date, UnicodeString &result) {
-    UBool isSet = FALSE;
+    UBool isSet = false;
     const UVector *mappings = getMetazoneMappings(tzid);
     if (mappings != NULL) {
         for (int32_t i = 0; i < mappings->size(); i++) {
             OlsonToMetaMappingEntry *mzm = (OlsonToMetaMappingEntry*)mappings->elementAt(i);
             if (mzm->from <= date && mzm->to > date) {
                 result.setTo(mzm->mzid, -1);
-                isSet = TRUE;
+                isSet = true;
                 break;
             }
         }
@@ -828,10 +828,10 @@ ZoneMeta::findTimeZoneID(const UnicodeString& tzid) {
 
 TimeZone*
 ZoneMeta::createCustomTimeZone(int32_t offset) {
-    UBool negative = FALSE;
+    UBool negative = false;
     int32_t tmp = offset;
     if (offset < 0) {
-        negative = TRUE;
+        negative = true;
         tmp = -offset;
     }
     uint8_t hour, min, sec;
diff --git a/icu4c/source/io/locbund.cpp b/icu4c/source/io/locbund.cpp
index 46c97bc043e..6c79b610180 100644
--- a/icu4c/source/io/locbund.cpp
+++ b/icu4c/source/io/locbund.cpp
@@ -41,7 +41,7 @@ static UBool U_CALLCONV locbund_cleanup(void) {
         unum_close(gPosixNumberFormat[style]);
         gPosixNumberFormat[style] = NULL;
     }
-    return TRUE;
+    return true;
 }
 U_CDECL_END
 
diff --git a/icu4c/source/io/sscanf.cpp b/icu4c/source/io/sscanf.cpp
index 47c0bace27e..03c747c8614 100644
--- a/icu4c/source/io/sscanf.cpp
+++ b/icu4c/source/io/sscanf.cpp
@@ -105,7 +105,7 @@ u_vsscanf_u(const UChar *buffer,
 
     inStr.fConverter = NULL;
     inStr.fFile = NULL;
-    inStr.fOwnFile = FALSE;
+    inStr.fOwnFile = false;
 #if !UCONFIG_NO_TRANSLITERATION
     inStr.fTranslit = NULL;
 #endif
diff --git a/icu4c/source/io/ucln_io.cpp b/icu4c/source/io/ucln_io.cpp
index c1307b5d97f..cf7d88be4c8 100644
--- a/icu4c/source/io/ucln_io.cpp
+++ b/icu4c/source/io/ucln_io.cpp
@@ -51,7 +51,7 @@ static UBool U_CALLCONV io_cleanup(void)
 #if !UCLN_NO_AUTO_CLEANUP && (defined(UCLN_AUTO_ATEXIT) || defined(UCLN_AUTO_LOCAL))
     ucln_unRegisterAutomaticCleanup();
 #endif
-    return TRUE;
+    return true;
 }
 
 void ucln_io_registerCleanup(ECleanupIOType type,
diff --git a/icu4c/source/io/ufile.cpp b/icu4c/source/io/ufile.cpp
index 685f4904372..afd672faa0b 100644
--- a/icu4c/source/io/ufile.cpp
+++ b/icu4c/source/io/ufile.cpp
@@ -119,7 +119,7 @@ u_finit(FILE          *f,
         const char    *locale,
         const char    *codepage)
 {
-    return finit_owner(f, locale, codepage, FALSE);
+    return finit_owner(f, locale, codepage, false);
 }
 
 U_CAPI UFILE* U_EXPORT2
@@ -127,7 +127,7 @@ u_fadopt(FILE         *f,
         const char    *locale,
         const char    *codepage)
 {
-    return finit_owner(f, locale, codepage, TRUE);
+    return finit_owner(f, locale, codepage, true);
 }
 
 U_CAPI UFILE* U_EXPORT2 /* U_CAPI ... U_EXPORT2 added by Peter Kirk 17 Nov 2001 */
@@ -142,7 +142,7 @@ u_fopen(const char    *filename,
         return 0;
     }
 
-    result = finit_owner(systemFile, locale, codepage, TRUE);
+    result = finit_owner(systemFile, locale, codepage, true);
 
     if (!result) {
         /* Something bad happened.
@@ -198,7 +198,7 @@ u_fopen_u(const UChar   *filename,
         mbstowcs_s(&retVal, wperm, UPRV_LENGTHOF(wperm), perm, _TRUNCATE);
         FILE *systemFile = _wfopen(reinterpret_cast(filename), wperm); // may return NULL for long filename
         if (systemFile) {
-            result = finit_owner(systemFile, locale, codepage, TRUE);
+            result = finit_owner(systemFile, locale, codepage, true);
         }
         if (!result && systemFile) {
             /* Something bad happened.
@@ -253,7 +253,7 @@ u_feof(UFILE  *f)
 {
     UBool endOfBuffer;
     if (f == NULL) {
-        return TRUE;
+        return true;
     }
     endOfBuffer = (UBool)(f->str.fPos >= f->str.fLimit);
     if (f->fFile != NULL) {
diff --git a/icu4c/source/io/ufmt_cmn.cpp b/icu4c/source/io/ufmt_cmn.cpp
index a475175f378..9c7bedf2be8 100644
--- a/icu4c/source/io/ufmt_cmn.cpp
+++ b/icu4c/source/io/ufmt_cmn.cpp
@@ -243,7 +243,7 @@ ufmt_defaultCPToUnicode(const char *s, int32_t sSize,
         
         alias = target;
         ucnv_toUnicode(defConverter, &alias, alias + tSize, &s, s + sSize - 1, 
-            NULL, TRUE, &status);
+            NULL, true, &status);
         
         
         /* add the null terminator */
diff --git a/icu4c/source/io/uprintf.cpp b/icu4c/source/io/uprintf.cpp
index 18dbc8f28cb..5bbe59ed50e 100644
--- a/icu4c/source/io/uprintf.cpp
+++ b/icu4c/source/io/uprintf.cpp
@@ -50,7 +50,7 @@ static UBool U_CALLCONV uprintf_cleanup(void)
         gStdOut = NULL;
     }
     gStdOutInitOnce.reset();
-    return TRUE;
+    return true;
 }
 
 static void U_CALLCONV u_stdout_init() {
diff --git a/icu4c/source/io/uprntf_p.cpp b/icu4c/source/io/uprntf_p.cpp
index 1fbaf06c957..ba30fbcaf48 100644
--- a/icu4c/source/io/uprntf_p.cpp
+++ b/icu4c/source/io/uprntf_p.cpp
@@ -473,7 +473,7 @@ u_printf_octal_handler(const u_printf_stream_handler  *handler,
 
     /* format the number, preserving the minimum # of digits */
     ufmt_64tou(result, &len, num, 8,
-        FALSE, /* doesn't matter for octal */
+        false, /* doesn't matter for octal */
         info->fPrecision == -1 && info->fZero ? info->fWidth : info->fPrecision);
 
     /* convert to alt form, if desired */
@@ -552,7 +552,7 @@ u_printf_pointer_handler(const u_printf_stream_handler  *handler,
     int32_t         len  = UPRINTF_BUFFER_SIZE;
 
     /* format the pointer in hex */
-    ufmt_ptou(result, &len, args[0].ptrValue, TRUE/*, info->fPrecision*/);
+    ufmt_ptou(result, &len, args[0].ptrValue, true/*, info->fPrecision*/);
 
     return handler->pad_and_justify(context, info, result, len);
 }
@@ -851,12 +851,12 @@ u_printf_scidbl_handler(const u_printf_stream_handler  *handler,
         if (significantDigits == -1) {
             significantDigits = 6;
         }
-        unum_setAttribute(format, UNUM_SIGNIFICANT_DIGITS_USED, TRUE);
+        unum_setAttribute(format, UNUM_SIGNIFICANT_DIGITS_USED, true);
         unum_setAttribute(format, UNUM_MAX_SIGNIFICANT_DIGITS, significantDigits);
         /* call the double handler */
         retVal = u_printf_double_handler(handler, context, formatBundle, &scidbl_info, args);
         unum_setAttribute(format, UNUM_MAX_SIGNIFICANT_DIGITS, maxSigDecimalDigits);
-        unum_setAttribute(format, UNUM_SIGNIFICANT_DIGITS_USED, FALSE);
+        unum_setAttribute(format, UNUM_SIGNIFICANT_DIGITS_USED, false);
     }
     return retVal;
 }
@@ -1160,11 +1160,11 @@ static ufmt_args* parseArguments(const UChar *alias, va_list ap, UErrorCode *sta
         /* skip over everything except for the type */
         while (ISMOD(*alias) || ISFLAG(*alias) || ISDIGIT(*alias) || 
             *alias == SPEC_ASTERISK || *alias == SPEC_PERIOD || *alias == SPEC_DOLLARSIGN) {
-                islonglong[pos] = FALSE;
+                islonglong[pos] = false;
                 if (ISMOD(*alias)) {
                     alias++;
                     if (*alias == MOD_LOWERL) {
-                        islonglong[pos] = TRUE;
+                        islonglong[pos] = true;
                     } 
                 } 
                 alias++;
@@ -1315,28 +1315,28 @@ u_printf_parse(const u_printf_stream_handler *streamHandler,
 
                 /* left justify */
             case FLAG_MINUS:
-                info->fLeft = TRUE;
+                info->fLeft = true;
                 break;
 
                 /* always show sign */
             case FLAG_PLUS:
-                info->fShowSign = TRUE;
+                info->fShowSign = true;
                 break;
 
                 /* use space if no sign present */
             case FLAG_SPACE:
-                info->fShowSign = TRUE;
-                info->fSpace = TRUE;
+                info->fShowSign = true;
+                info->fSpace = true;
                 break;
 
                 /* use alternate form */
             case FLAG_POUND:
-                info->fAlt = TRUE;
+                info->fAlt = true;
                 break;
 
                 /* pad with leading zeroes */
             case FLAG_ZERO:
-                info->fZero = TRUE;
+                info->fZero = true;
                 info->fPadChar = 0x0030;
                 break;
 
@@ -1454,23 +1454,23 @@ u_printf_parse(const u_printf_stream_handler *streamHandler,
 
                 /* short */
             case MOD_H:
-                info->fIsShort = TRUE;
+                info->fIsShort = true;
                 break;
 
                 /* long or long long */
             case MOD_LOWERL:
                 if(*alias == MOD_LOWERL) {
-                    info->fIsLongLong = TRUE;
+                    info->fIsLongLong = true;
                     /* skip over the next 'l' */
                     alias++;
                 }
                 else
-                    info->fIsLong = TRUE;
+                    info->fIsLong = true;
                 break;
 
                 /* long double */
             case MOD_L:
-                info->fIsLongDouble = TRUE;
+                info->fIsLongDouble = true;
                 break;
             }
         }
@@ -1492,7 +1492,7 @@ u_printf_parse(const u_printf_stream_handler *streamHandler,
             /* if it's negative, take the absolute value and set left alignment */
             if(info->fWidth < 0) {
                 info->fWidth *= -1; /* Make positive */
-                info->fLeft = TRUE;
+                info->fLeft = true;
             }
         }
 
diff --git a/icu4c/source/io/uscanf_p.cpp b/icu4c/source/io/uscanf_p.cpp
index 5bf3e5b7a84..9b27e2ebf8d 100644
--- a/icu4c/source/io/uscanf_p.cpp
+++ b/icu4c/source/io/uscanf_p.cpp
@@ -87,12 +87,12 @@ typedef struct u_scanf_spec_info {
 
     UChar   fPadChar;       /* Padding character  */
 
-    UBool   fSkipArg;       /* TRUE if arg should be skipped */
+    UBool   fSkipArg;       /* true if arg should be skipped */
     UBool   fIsLongDouble;  /* L flag  */
     UBool   fIsShort;       /* h flag  */
     UBool   fIsLong;        /* l flag  */
     UBool   fIsLongLong;    /* ll flag  */
-    UBool   fIsString;      /* TRUE if this is a NULL-terminated string. */
+    UBool   fIsString;      /* true if this is a NULL-terminated string. */
 } u_scanf_spec_info;
 
 
@@ -125,12 +125,12 @@ u_scanf_parse_spec (const UChar     *fmt,
     info->fWidth        = -1;
     info->fSpec         = 0x0000;
     info->fPadChar      = 0x0020;
-    info->fSkipArg      = FALSE;
-    info->fIsLongDouble = FALSE;
-    info->fIsShort      = FALSE;
-    info->fIsLong       = FALSE;
-    info->fIsLongLong   = FALSE;
-    info->fIsString     = TRUE;
+    info->fSkipArg      = false;
+    info->fIsLongDouble = false;
+    info->fIsShort      = false;
+    info->fIsLong       = false;
+    info->fIsLongLong   = false;
+    info->fIsString     = true;
 
 
     /* skip over the initial '%' */
@@ -168,7 +168,7 @@ u_scanf_parse_spec (const UChar     *fmt,
 
             /* skip argument */
         case FLAG_ASTERISK:
-            info->fSkipArg = TRUE;
+            info->fSkipArg = true;
             break;
 
             /* pad character specified */
@@ -203,23 +203,23 @@ u_scanf_parse_spec (const UChar     *fmt,
 
             /* short */
         case MOD_H:
-            info->fIsShort = TRUE;
+            info->fIsShort = true;
             break;
 
             /* long or long long */
         case MOD_LOWERL:
             if(*s == MOD_LOWERL) {
-                info->fIsLongLong = TRUE;
+                info->fIsLongLong = true;
                 /* skip over the next 'l' */
                 s++;
             }
             else
-                info->fIsLong = TRUE;
+                info->fIsLong = true;
             break;
 
             /* long double */
         case MOD_L:
-            info->fIsLongDouble = TRUE;
+            info->fIsLongDouble = true;
             break;
         }
     }
@@ -323,7 +323,7 @@ u_scanf_skip_leading_ws(UFILE   *input,
     UBool isNotEOF;
 
     /* skip all leading ws in the input */
-    while( ((isNotEOF = ufile_getch(input, &c)) == TRUE) && (c == pad || u_isWhitespace(c)) )
+    while( ((isNotEOF = ufile_getch(input, &c)) == true) && (c == pad || u_isWhitespace(c)) )
     {
         count++;
     }
@@ -357,7 +357,7 @@ u_scanf_skip_leading_positive_sign(UFILE   *input,
 
         if (U_SUCCESS(localStatus)) {
             /* skip all leading ws in the input */
-            while( ((isNotEOF = ufile_getch(input, &c)) == TRUE) && (count < symbolLen && c == plusSymbol[count]) )
+            while( ((isNotEOF = ufile_getch(input, &c)) == true) && (count < symbolLen && c == plusSymbol[count]) )
             {
                 count++;
             }
@@ -851,7 +851,7 @@ u_scanf_string_handler(UFILE        *input,
     int32_t     count;
     int32_t     skipped = 0;
     UChar       c;
-    UBool       isNotEOF = FALSE;
+    UBool       isNotEOF = false;
 
     /* skip all ws in the input */
     if (info->fIsString) {
@@ -868,7 +868,7 @@ u_scanf_string_handler(UFILE        *input,
         return -1;
 
     while( (info->fWidth == -1 || count < info->fWidth) 
-        && ((isNotEOF = ufile_getch(input, &c)) == TRUE)
+        && ((isNotEOF = ufile_getch(input, &c)) == true)
         && (!info->fIsString || (c != info->fPadChar && !u_isWhitespace(c))))
     {
 
@@ -885,7 +885,7 @@ u_scanf_string_handler(UFILE        *input,
 
             /* convert the character to the default codepage */
             ucnv_fromUnicode(conv, &alias, limit, &source, source + 1,
-                NULL, TRUE, &status);
+                NULL, true, &status);
 
             if(U_FAILURE(status)) {
                 /* clean up */
@@ -928,7 +928,7 @@ u_scanf_char_handler(UFILE          *input,
     if (info->fWidth < 0) {
         info->fWidth = 1;
     }
-    info->fIsString = FALSE;
+    info->fIsString = false;
     return u_scanf_string_handler(input, info, args, fmt, fmtConsumed, argConverted);
 }
 
@@ -948,7 +948,7 @@ u_scanf_ustring_handler(UFILE       *input,
     int32_t count;
     int32_t skipped = 0;
     UChar   c;
-    UBool   isNotEOF = FALSE;
+    UBool   isNotEOF = false;
 
     /* skip all ws in the input */
     if (info->fIsString) {
@@ -959,7 +959,7 @@ u_scanf_ustring_handler(UFILE       *input,
     count = 0;
 
     while( (info->fWidth == -1 || count < info->fWidth)
-        && ((isNotEOF = ufile_getch(input, &c)) == TRUE)
+        && ((isNotEOF = ufile_getch(input, &c)) == true)
         && (!info->fIsString || (c != info->fPadChar && !u_isWhitespace(c))))
     {
 
@@ -1000,7 +1000,7 @@ u_scanf_uchar_handler(UFILE         *input,
     if (info->fWidth < 0) {
         info->fWidth = 1;
     }
-    info->fIsString = FALSE;
+    info->fIsString = false;
     return u_scanf_ustring_handler(input, info, args, fmt, fmtConsumed, argConverted);
 }
 
@@ -1239,8 +1239,8 @@ u_scanf_scanset_handler(UFILE       *input,
     int32_t     chLeft = INT32_MAX;
     UChar32     c;
     UChar       *alias = (UChar*) (args[0].ptrValue);
-    UBool       isNotEOF = FALSE;
-    UBool       readCharacter = FALSE;
+    UBool       isNotEOF = false;
+    UBool       readCharacter = false;
 
     /* Create an empty set */
     scanset = uset_open(0, -1);
@@ -1262,11 +1262,11 @@ u_scanf_scanset_handler(UFILE       *input,
 
         /* grab characters one at a time and make sure they are in the scanset */
         while(chLeft > 0) {
-            if ( ((isNotEOF = ufile_getch32(input, &c)) == TRUE) && uset_contains(scanset, c) ) {
-                readCharacter = TRUE;
+            if ( ((isNotEOF = ufile_getch32(input, &c)) == true) && uset_contains(scanset, c) ) {
+                readCharacter = true;
                 if (!info->fSkipArg) {
                     int32_t idx = 0;
-                    UBool isError = FALSE;
+                    UBool isError = false;
 
                     U16_APPEND(alias, idx, chLeft, c, isError);
                     if (isError) {
diff --git a/icu4c/source/io/ustdio.cpp b/icu4c/source/io/ustdio.cpp
index a3cb2a5d9cb..502a7dc2105 100644
--- a/icu4c/source/io/ustdio.cpp
+++ b/icu4c/source/io/ustdio.cpp
@@ -182,7 +182,7 @@ static const UChar * u_file_translit(UFILE *f, const UChar *src, int32_t *count,
     f->fTranslit->length += *count;
 
     /* Now, translit in place as much as we can  */
-    if(flush == FALSE)
+    if(flush == false)
     {
         textLength = f->fTranslit->length;
         pos.contextStart = 0;
@@ -239,7 +239,7 @@ ufile_flush_translit(UFILE *f)
         return;
 #endif
 
-    u_file_write_flush(NULL, 0, f, FALSE, TRUE);
+    u_file_write_flush(NULL, 0, f, false, true);
 }
 
 
@@ -250,7 +250,7 @@ ufile_flush_io(UFILE *f)
     return; /* skip if no file */
   }
 
-  u_file_write_flush(NULL, 0, f, TRUE, FALSE);
+  u_file_write_flush(NULL, 0, f, true, false);
 }
 
 
@@ -296,7 +296,7 @@ u_fputc(UChar32      uc,
 {
     UChar buf[2];
     int32_t idx = 0;
-    UBool isError = FALSE;
+    UBool isError = false;
 
     U16_APPEND(buf, idx, UPRV_LENGTHOF(buf), uc, isError);
     if (isError) {
@@ -396,7 +396,7 @@ u_file_write(    const UChar     *chars,
              int32_t        count,
              UFILE         *f)
 {
-    return u_file_write_flush(chars,count,f,FALSE,FALSE);
+    return u_file_write_flush(chars,count,f,false,false);
 }
 
 
@@ -589,13 +589,13 @@ u_fgets(UChar        *s,
 U_CFUNC UBool U_EXPORT2
 ufile_getch(UFILE *f, UChar *ch)
 {
-    UBool isValidChar = FALSE;
+    UBool isValidChar = false;
 
     *ch = U_EOF;
     /* if we have an available character in the buffer, return it */
     if(f->str.fPos < f->str.fLimit){
         *ch = *(f->str.fPos)++;
-        isValidChar = TRUE;
+        isValidChar = true;
     }
     else {
         /* otherwise, fill the buffer and return the next character */
@@ -604,7 +604,7 @@ ufile_getch(UFILE *f, UChar *ch)
         }
         if(f->str.fPos < f->str.fLimit) {
             *ch = *(f->str.fPos)++;
-            isValidChar = TRUE;
+            isValidChar = true;
         }
     }
     return isValidChar;
@@ -621,7 +621,7 @@ u_fgetc(UFILE        *f)
 U_CFUNC UBool U_EXPORT2
 ufile_getch32(UFILE *f, UChar32 *c32)
 {
-    UBool isValidChar = FALSE;
+    UBool isValidChar = false;
     u_localized_string *str;
 
     *c32 = U_EOF;
@@ -639,14 +639,14 @@ ufile_getch32(UFILE *f, UChar32 *c32)
             if (str->fPos < str->fLimit) {
                 UChar c16 = *(str->fPos)++;
                 *c32 = U16_GET_SUPPLEMENTARY(*c32, c16);
-                isValidChar = TRUE;
+                isValidChar = true;
             }
             else {
                 *c32 = U_EOF;
             }
         }
         else {
-            isValidChar = TRUE;
+            isValidChar = true;
         }
     }
 
diff --git a/icu4c/source/io/ustream.cpp b/icu4c/source/io/ustream.cpp
index 51676ea0f54..af8b36965da 100644
--- a/icu4c/source/io/ustream.cpp
+++ b/icu4c/source/io/ustream.cpp
@@ -53,7 +53,7 @@ operator<<(STD_OSTREAM& stream, const UnicodeString& str)
             do {
                 errorCode = U_ZERO_ERROR;
                 s = buffer;
-                ucnv_fromUnicode(converter, &s, sLimit, &us, uLimit, 0, FALSE, &errorCode);
+                ucnv_fromUnicode(converter, &s, sLimit, &us, uLimit, 0, false, &errorCode);
                 *s = 0;
 
                 // write this chunk
@@ -92,8 +92,8 @@ operator>>(STD_ISTREAM& stream, UnicodeString& str)
         const char *s, *sLimit;
         char ch;
         UChar ch32;
-        UBool initialWhitespace = TRUE;
-        UBool continueReading = TRUE;
+        UBool initialWhitespace = true;
+        UBool continueReading = true;
 
         /* We need to consume one byte at a time to see what is considered whitespace. */
         while (continueReading) {
@@ -103,7 +103,7 @@ operator>>(STD_ISTREAM& stream, UnicodeString& str)
                 if (!initialWhitespace) {
                     stream.clear(stream.eofbit);
                 }
-                continueReading = FALSE;
+                continueReading = false;
             }
             sLimit = &ch + (int)continueReading;
             us = uBuffer;
@@ -140,13 +140,13 @@ operator>>(STD_ISTREAM& stream, UnicodeString& str)
                     else {
                         if (initialWhitespace) {
                             /*
-                            When initialWhitespace is TRUE, we haven't appended any
+                            When initialWhitespace is true, we haven't appended any
                             character yet.  This is where we truncate the string,
                             to avoid modifying the string before we know if we can
                             actually read from the stream.
                             */
                             str.truncate(0);
-                            initialWhitespace = FALSE;
+                            initialWhitespace = false;
                         }
                         str.append(ch32);
                     }
diff --git a/icu4c/source/layoutex/ParagraphLayout.cpp b/icu4c/source/layoutex/ParagraphLayout.cpp
index 0a765a34c9e..11257506699 100644
--- a/icu4c/source/layoutex/ParagraphLayout.cpp
+++ b/icu4c/source/layoutex/ParagraphLayout.cpp
@@ -132,146 +132,146 @@ le_int32 StyleRuns::getRuns(le_int32 runLimits[], le_int32 styleIndices[])
 }
 
 /*
- * NOTE: This table only has "TRUE" values for
+ * NOTE: This table only has "true" values for
  * those scripts which the LayoutEngine can currently
  * process, rather for all scripts which require
  * complex processing for correct rendering.
  */
 static const le_bool complexTable[] = {
-    FALSE , /* Zyyy */
-    FALSE,  /* Qaai */
-    TRUE,   /* Arab */
-    FALSE,  /* Armn */
-    TRUE,   /* Beng */
-    FALSE,  /* Bopo */
-    FALSE,  /* Cher */
-    FALSE,  /* Copt=Qaac */
-    FALSE,  /* Cyrl */
-    FALSE,  /* Dsrt */
-    TRUE,   /* Deva */
-    FALSE,  /* Ethi */
-    FALSE,  /* Geor */
-    FALSE,  /* Goth */
-    FALSE,  /* Grek */
-    TRUE,   /* Gujr */
-    TRUE,   /* Guru */
-    FALSE,  /* Hani */
-    FALSE,  /* Hang */
-    TRUE,   /* Hebr */
-    FALSE,  /* Hira */
-    TRUE,   /* Knda */
-    FALSE,  /* Kana */
-    FALSE,  /* Khmr */
-    FALSE,  /* Laoo */
-    FALSE,  /* Latn */
-    TRUE,   /* Mlym */
-    FALSE,  /* Mong */
-    FALSE,  /* Mymr */
-    FALSE,  /* Ogam */
-    FALSE,  /* Ital */
-    TRUE,   /* Orya */
-    FALSE,  /* Runr */
-    FALSE,  /* Sinh */
-    FALSE,  /* Syrc */
-    TRUE,   /* Taml */
-    TRUE,   /* Telu */
-    FALSE,  /* Thaa */
-    TRUE,   /* Thai */
-    FALSE,  /* Tibt */
-    FALSE,  /* Cans */
-    FALSE,  /* Yiii */
-    FALSE,  /* Tglg */
-    FALSE,  /* Hano */
-    FALSE,  /* Buhd */
-    FALSE,  /* Tagb */
-    FALSE,  /* Brai */
-    FALSE,  /* Cprt */
-    FALSE,  /* Limb */
-    FALSE,  /* Linb */
-    FALSE,  /* Osma */
-    FALSE,  /* Shaw */
-    FALSE,  /* Tale */
-    FALSE,  /* Ugar */
-    FALSE,  /* Hrkt */
-    FALSE,  /* Bugi */
-    FALSE,  /* Glag */
-    FALSE,  /* Khar */
-    FALSE,  /* Sylo */
-    FALSE,  /* Talu */
-    FALSE,  /* Tfng */
-    FALSE,  /* Xpeo */
-    FALSE,  /* Bali */
-    FALSE,  /* Batk */
-    FALSE,  /* Blis */
-    FALSE,  /* Brah */
-    FALSE,  /* Cham */
-    FALSE,  /* Cirt */
-    FALSE,  /* Cyrs */
-    FALSE,  /* Egyd */
-    FALSE,  /* Egyh */
-    FALSE,  /* Egyp */
-    FALSE,  /* Geok */
-    FALSE,  /* Hans */
-    FALSE,  /* Hant */
-    FALSE,  /* Hmng */
-    FALSE,  /* Hung */
-    FALSE,  /* Inds */
-    FALSE,  /* Java */
-    FALSE,  /* Kali */
-    FALSE,  /* Latf */
-    FALSE,  /* Latg */
-    FALSE,  /* Lepc */
-    FALSE,  /* Lina */
-    FALSE,  /* Mand */
-    FALSE,  /* Maya */
-    FALSE,  /* Mero */
-    FALSE,  /* Nkoo */
-    FALSE,  /* Orkh */
-    FALSE,  /* Perm */
-    FALSE,  /* Phag */
-    FALSE,  /* Phnx */
-    FALSE,  /* Plrd */
-    FALSE,  /* Roro */
-    FALSE,  /* Sara */
-    FALSE,  /* Syre */
-    FALSE,  /* Syrj */
-    FALSE,  /* Syrn */
-    FALSE,  /* Teng */
-    FALSE,  /* Taii */
-    FALSE,  /* Visp */
-    FALSE,  /* Xsux */
-    FALSE,  /* Zxxx */
-    FALSE,  /* Zzzz */
-    FALSE,  /* Cari */
-    FALSE,  /* Jpan */
-    FALSE,  /* Lana */
-    FALSE,  /* Lyci */
-    FALSE,  /* Lydi */
-    FALSE,  /* Olck */
-    FALSE,  /* Rjng */
-    FALSE,  /* Saur */
-    FALSE,  /* Sgnw */
-    FALSE,  /* Sund */
-    FALSE,  /* Moon */
-    FALSE,  /* Mtei */
-    FALSE,  /* Armi */
-    FALSE,  /* Avst */
-    FALSE,  /* Cakm */
-    FALSE,  /* Kore */
-    FALSE,  /* Kthi */
-    FALSE,  /* Mani */
-    FALSE,  /* Phli */
-    FALSE,  /* Phlp */
-    FALSE,  /* Phlv */
-    FALSE,  /* Prti */
-    FALSE,  /* Samr */
-    FALSE,  /* Tavt */
-    FALSE,  /* Zmth */
-    FALSE,  /* Zsym */
-    FALSE,  /* Bamu */
-    FALSE,  /* Lisu */
-    FALSE,  /* Nkgb */
-    FALSE   /* Sarb */
+    false , /* Zyyy */
+    false,  /* Qaai */
+    true,   /* Arab */
+    false,  /* Armn */
+    true,   /* Beng */
+    false,  /* Bopo */
+    false,  /* Cher */
+    false,  /* Copt=Qaac */
+    false,  /* Cyrl */
+    false,  /* Dsrt */
+    true,   /* Deva */
+    false,  /* Ethi */
+    false,  /* Geor */
+    false,  /* Goth */
+    false,  /* Grek */
+    true,   /* Gujr */
+    true,   /* Guru */
+    false,  /* Hani */
+    false,  /* Hang */
+    true,   /* Hebr */
+    false,  /* Hira */
+    true,   /* Knda */
+    false,  /* Kana */
+    false,  /* Khmr */
+    false,  /* Laoo */
+    false,  /* Latn */
+    true,   /* Mlym */
+    false,  /* Mong */
+    false,  /* Mymr */
+    false,  /* Ogam */
+    false,  /* Ital */
+    true,   /* Orya */
+    false,  /* Runr */
+    false,  /* Sinh */
+    false,  /* Syrc */
+    true,   /* Taml */
+    true,   /* Telu */
+    false,  /* Thaa */
+    true,   /* Thai */
+    false,  /* Tibt */
+    false,  /* Cans */
+    false,  /* Yiii */
+    false,  /* Tglg */
+    false,  /* Hano */
+    false,  /* Buhd */
+    false,  /* Tagb */
+    false,  /* Brai */
+    false,  /* Cprt */
+    false,  /* Limb */
+    false,  /* Linb */
+    false,  /* Osma */
+    false,  /* Shaw */
+    false,  /* Tale */
+    false,  /* Ugar */
+    false,  /* Hrkt */
+    false,  /* Bugi */
+    false,  /* Glag */
+    false,  /* Khar */
+    false,  /* Sylo */
+    false,  /* Talu */
+    false,  /* Tfng */
+    false,  /* Xpeo */
+    false,  /* Bali */
+    false,  /* Batk */
+    false,  /* Blis */
+    false,  /* Brah */
+    false,  /* Cham */
+    false,  /* Cirt */
+    false,  /* Cyrs */
+    false,  /* Egyd */
+    false,  /* Egyh */
+    false,  /* Egyp */
+    false,  /* Geok */
+    false,  /* Hans */
+    false,  /* Hant */
+    false,  /* Hmng */
+    false,  /* Hung */
+    false,  /* Inds */
+    false,  /* Java */
+    false,  /* Kali */
+    false,  /* Latf */
+    false,  /* Latg */
+    false,  /* Lepc */
+    false,  /* Lina */
+    false,  /* Mand */
+    false,  /* Maya */
+    false,  /* Mero */
+    false,  /* Nkoo */
+    false,  /* Orkh */
+    false,  /* Perm */
+    false,  /* Phag */
+    false,  /* Phnx */
+    false,  /* Plrd */
+    false,  /* Roro */
+    false,  /* Sara */
+    false,  /* Syre */
+    false,  /* Syrj */
+    false,  /* Syrn */
+    false,  /* Teng */
+    false,  /* Taii */
+    false,  /* Visp */
+    false,  /* Xsux */
+    false,  /* Zxxx */
+    false,  /* Zzzz */
+    false,  /* Cari */
+    false,  /* Jpan */
+    false,  /* Lana */
+    false,  /* Lyci */
+    false,  /* Lydi */
+    false,  /* Olck */
+    false,  /* Rjng */
+    false,  /* Saur */
+    false,  /* Sgnw */
+    false,  /* Sund */
+    false,  /* Moon */
+    false,  /* Mtei */
+    false,  /* Armi */
+    false,  /* Avst */
+    false,  /* Cakm */
+    false,  /* Kore */
+    false,  /* Kthi */
+    false,  /* Mani */
+    false,  /* Phli */
+    false,  /* Phlp */
+    false,  /* Phlv */
+    false,  /* Prti */
+    false,  /* Samr */
+    false,  /* Tavt */
+    false,  /* Zmth */
+    false,  /* Zsym */
+    false,  /* Bamu */
+    false,  /* Lisu */
+    false,  /* Nkgb */
+    false   /* Sarb */
 };
 
 
@@ -319,7 +319,7 @@ ParagraphLayout::ParagraphLayout(const LEUnicode chars[], le_int32 count,
                                  LEErrorCode &status)
                                  : fChars(chars), fCharCount(count),
                                    fFontRuns(NULL), fLevelRuns(levelRuns), fScriptRuns(scriptRuns), fLocaleRuns(localeRuns),
-                                   fVertical(vertical), fClientLevels(TRUE), fClientScripts(TRUE), fClientLocales(TRUE), fEmbeddingLevels(NULL),
+                                   fVertical(vertical), fClientLevels(true), fClientScripts(true), fClientLocales(true), fEmbeddingLevels(NULL),
                                    fAscent(0), fDescent(0), fLeading(0),
                                    fGlyphToCharMap(NULL), fCharToMinGlyphMap(NULL), fCharToMaxGlyphMap(NULL), fGlyphWidths(NULL), fGlyphCount(0),
                                    fParaBidi(NULL), fLineBidi(NULL),
@@ -533,21 +533,21 @@ ParagraphLayout::~ParagraphLayout()
         delete (ValueRuns *) fLevelRuns;
         fLevelRuns = NULL;
 
-        fClientLevels = TRUE;
+        fClientLevels = true;
     }
 
     if (! fClientScripts) {
         delete (ValueRuns *) fScriptRuns;
         fScriptRuns = NULL;
 
-        fClientScripts = TRUE;
+        fClientScripts = true;
     }
 
     if (! fClientLocales) {
         delete (LocaleRuns *) fLocaleRuns;
         fLocaleRuns = NULL;
 
-        fClientLocales = TRUE;
+        fClientLocales = true;
     }
 
     if (fEmbeddingLevels != NULL) {
@@ -619,11 +619,11 @@ le_bool ParagraphLayout::isComplex(const LEUnicode chars[], le_int32 count)
     UErrorCode scriptStatus = U_ZERO_ERROR;
     UScriptCode scriptCode  = USCRIPT_INVALID_CODE;
     UScriptRun *sr = uscript_openRun(chars, count, &scriptStatus);
-    le_bool result = FALSE;
+    le_bool result = false;
 
     while (uscript_nextRun(sr, NULL, NULL, &scriptCode)) {
         if (isComplex(scriptCode)) {
-            result = TRUE;
+            result = true;
             break;
         }
     }
@@ -745,7 +745,7 @@ void ParagraphLayout::computeLevels(UBiDiLevel paragraphLevel)
         }
 
         fLevelRuns    = levelRuns;
-        fClientLevels = FALSE;
+        fClientLevels = false;
     }
 }
 
@@ -764,7 +764,7 @@ void ParagraphLayout::computeScripts()
     uscript_closeRun(sr);
 
     fScriptRuns    = scriptRuns;
-    fClientScripts = FALSE;
+    fClientScripts = false;
 }
 
 void ParagraphLayout::computeLocales()
@@ -775,7 +775,7 @@ void ParagraphLayout::computeLocales()
     localeRuns->add(defaultLocale, fCharCount);
 
     fLocaleRuns    = localeRuns;
-    fClientLocales = FALSE;
+    fClientLocales = false;
 }
 
 void ParagraphLayout::computeSubFonts(const FontRuns *fontRuns, LEErrorCode &status)
@@ -975,7 +975,7 @@ le_int32 ParagraphLayout::getLanguageCode(const Locale *locale)
 le_bool ParagraphLayout::isComplex(UScriptCode script)
 {
     if (script < 0 || script >= ARRAY_SIZE(complexTable)) {
-        return FALSE;
+        return false;
     }
 
     return complexTable[script];
diff --git a/icu4c/source/layoutex/RunArrays.cpp b/icu4c/source/layoutex/RunArrays.cpp
index f6e51af1e79..20d020c4f01 100644
--- a/icu4c/source/layoutex/RunArrays.cpp
+++ b/icu4c/source/layoutex/RunArrays.cpp
@@ -19,7 +19,7 @@ U_NAMESPACE_BEGIN
 const char RunArray::fgClassID = 0;
 
 RunArray::RunArray(le_int32 initialCapacity)
-    : fClientArrays(FALSE), fLimits(NULL), fCount(0), fCapacity(initialCapacity)
+    : fClientArrays(false), fLimits(NULL), fCount(0), fCapacity(initialCapacity)
 {
     if (initialCapacity > 0) {
         fLimits = LE_NEW_ARRAY(le_int32, fCapacity);
diff --git a/icu4c/source/samples/layout/FontMap.cpp b/icu4c/source/samples/layout/FontMap.cpp
index 75c1c013ffd..5bb32649c51 100644
--- a/icu4c/source/samples/layout/FontMap.cpp
+++ b/icu4c/source/samples/layout/FontMap.cpp
@@ -27,7 +27,7 @@ FontMap::FontMap(const char *fileName, le_int16 pointSize, GUISupport *guiSuppor
     : fPointSize(pointSize), fFontCount(0), fAscent(0), fDescent(0), fLeading(0), fGUISupport(guiSupport)
 {
     le_int32 defaultFont = -1, i, script;
-    le_bool haveFonts = FALSE;
+    le_bool haveFonts = false;
 
 /**/
     for (i = 0; i < scriptCodeCount; i += 1) {
@@ -70,7 +70,7 @@ FontMap::FontMap(const char *fileName, le_int16 pointSize, GUISupport *guiSuppor
 
         if (strcmp(scriptName, "DEFAULT") == 0) {
             defaultFont = getFontIndex(fontName);
-            haveFonts = TRUE;
+            haveFonts = true;
             continue;
         }
 
@@ -91,7 +91,7 @@ FontMap::FontMap(const char *fileName, le_int16 pointSize, GUISupport *guiSuppor
         }
 
         fFontIndices[script] = getFontIndex(fontName);
-        haveFonts = TRUE;
+        haveFonts = true;
     }
 
     if (defaultFont >= 0) {
diff --git a/icu4c/source/samples/layout/GDIFontInstance.cpp b/icu4c/source/samples/layout/GDIFontInstance.cpp
index 8bd688d1296..8bd917730b8 100644
--- a/icu4c/source/samples/layout/GDIFontInstance.cpp
+++ b/icu4c/source/samples/layout/GDIFontInstance.cpp
@@ -402,7 +402,7 @@ le_bool GDIFontInstance::getGlyphPoint(LEGlyphID glyph, le_int32 pointNumber, LE
 
     return result;
 #else
-    return FALSE;
+    return false;
 #endif
 }
 
diff --git a/icu4c/source/samples/layout/GnomeFontInstance.cpp b/icu4c/source/samples/layout/GnomeFontInstance.cpp
index 068f6f675c3..6f6a59ff3af 100644
--- a/icu4c/source/samples/layout/GnomeFontInstance.cpp
+++ b/icu4c/source/samples/layout/GnomeFontInstance.cpp
@@ -168,17 +168,17 @@ le_bool GnomeFontInstance::getGlyphPoint(LEGlyphID glyph, le_int32 pointNumber,
     error = FT_Load_Glyph(fFace, glyph, FT_LOAD_DEFAULT);
 
     if (error != 0) {
-        return FALSE;
+        return false;
     }
 
     if (pointNumber >= fFace->glyph->outline.n_points) {
-        return FALSE;
+        return false;
     }
 
     point.fX = fFace->glyph->outline.points[pointNumber].x >> 6;
     point.fY = fFace->glyph->outline.points[pointNumber].y >> 6;
 
-    return TRUE;
+    return true;
 }
 
 void GnomeFontInstance::rasterizeGlyphs(cairo_t *cairo, const LEGlyphID *glyphs, le_int32 glyphCount, const float *positions,
diff --git a/icu4c/source/samples/layout/ScriptCompositeFontInstance.cpp b/icu4c/source/samples/layout/ScriptCompositeFontInstance.cpp
index 004b31b6edb..d511d1324a2 100644
--- a/icu4c/source/samples/layout/ScriptCompositeFontInstance.cpp
+++ b/icu4c/source/samples/layout/ScriptCompositeFontInstance.cpp
@@ -63,7 +63,7 @@ le_bool ScriptCompositeFontInstance::getGlyphPoint(LEGlyphID glyph, le_int32 poi
         return font->getGlyphPoint(LE_GET_GLYPH(glyph), pointNumber, point);
     }
 
-    return FALSE;
+    return false;
 }
 
 const LEFontInstance *ScriptCompositeFontInstance::getSubFont(const LEUnicode chars[], le_int32 *offset, le_int32 limit, le_int32 script, LEErrorCode &success) const
diff --git a/icu4c/source/samples/layout/cgnomelayout.c b/icu4c/source/samples/layout/cgnomelayout.c
index b591412bb66..24d86ef95bd 100644
--- a/icu4c/source/samples/layout/cgnomelayout.c
+++ b/icu4c/source/samples/layout/cgnomelayout.c
@@ -14,6 +14,8 @@
  ****************************************************************************** *
  */
 
+#include 
+
 #include 
 #include 
 #include FT_FREETYPE_H
@@ -139,7 +141,7 @@ static void openfile(GtkObject *object, gpointer data)
   gtk_signal_connect_object(GTK_OBJECT(cancelButton), "clicked",
              GTK_SIGNAL_FUNC(gtk_widget_destroy), GTK_OBJECT(fileselection));
 
-  gtk_window_set_modal(GTK_WINDOW(fileselection), TRUE);
+  gtk_window_set_modal(GTK_WINDOW(fileselection), true);
   gtk_widget_show(fileselection);
   gtk_main();
 }
@@ -195,7 +197,7 @@ static gint eventDelete(GtkWidget *widget, GdkEvent *event, gpointer data)
   closeSample(widget);
 
   /* indicate that closeapp  already destroyed the window */
-  return TRUE;
+  return true;
 }
 
 static gint eventConfigure(GtkWidget *widget, GdkEventConfigure *event, Context *context)
@@ -209,7 +211,7 @@ static gint eventConfigure(GtkWidget *widget, GdkEventConfigure *event, Context
     }
   }
 
-  return TRUE;
+  return true;
 }
 
 static gint eventExpose(GtkWidget *widget, GdkEvent *event, Context *context)
@@ -224,7 +226,7 @@ static gint eventExpose(GtkWidget *widget, GdkEvent *event, Context *context)
     rs_gnomeRenderingSurfaceClose(surface);
   }
 
-  return TRUE;
+  return true;
 }
 
 GtkWidget *newSample(const gchar *fileName)
diff --git a/icu4c/source/samples/layout/clayout.c b/icu4c/source/samples/layout/clayout.c
index de8f118c108..b1077102170 100644
--- a/icu4c/source/samples/layout/clayout.c
+++ b/icu4c/source/samples/layout/clayout.c
@@ -18,6 +18,7 @@
  */
 
 #include 
+#include 
 #include 
 
 #include "playout.h"
@@ -70,7 +71,7 @@ void InitParagraph(HWND hwnd, Context *context)
         si.nMin = 0;
         si.nMax = pf_getLineCount(context->paragraph) - 1;
         si.nPage = context->height / pf_getLineHeight(context->paragraph);
-        SetScrollInfo(hwnd, SB_VERT, &si, TRUE);
+        SetScrollInfo(hwnd, SB_VERT, &si, true);
     }
 }
 
@@ -219,7 +220,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
         }
 
         si.fMask = SIF_POS;
-        SetScrollInfo(hwnd, SB_VERT, &si, TRUE);
+        SetScrollInfo(hwnd, SB_VERT, &si, true);
         GetScrollInfo(hwnd, SB_VERT, &si);
 
         context = (Context *) GetWindowLongPtr(hwnd, 0);
@@ -314,7 +315,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
                     context->paragraph = newParagraph;
                     InitParagraph(hwnd, context);
                     PrettyTitle(hwnd, szTitleName);
-                    InvalidateRect(hwnd, NULL, TRUE);
+                    InvalidateRect(hwnd, NULL, true);
 
                 }
             }
diff --git a/icu4c/source/samples/layout/gnomelayout.cpp b/icu4c/source/samples/layout/gnomelayout.cpp
index b5347377c29..9944d3d4093 100644
--- a/icu4c/source/samples/layout/gnomelayout.cpp
+++ b/icu4c/source/samples/layout/gnomelayout.cpp
@@ -147,7 +147,7 @@ void openfile(GtkObject */*object*/, gpointer data)
   gtk_signal_connect_object(GTK_OBJECT(cancelButton), "clicked",
 		     GTK_SIGNAL_FUNC(gtk_widget_destroy), GTK_OBJECT(fileselection));
 
-  gtk_window_set_modal(GTK_WINDOW(fileselection), TRUE);
+  gtk_window_set_modal(GTK_WINDOW(fileselection), true);
   gtk_widget_show(fileselection);
   gtk_main();
 }
@@ -203,7 +203,7 @@ gint eventDelete(GtkWidget *widget, GdkEvent */*event*/, gpointer /*data*/)
   closeSample(widget);
 
   // indicate that closeapp  already destroyed the window 
-  return TRUE;
+  return true;
 }
 
 gint eventConfigure(GtkWidget */*widget*/, GdkEventConfigure *event, Context *context)
@@ -217,7 +217,7 @@ gint eventConfigure(GtkWidget */*widget*/, GdkEventConfigure *event, Context *co
     }
   }
 
-  return TRUE;
+  return true;
 }
 
 gint eventExpose(GtkWidget *widget, GdkEvent */*event*/, Context *context)
@@ -230,7 +230,7 @@ gint eventExpose(GtkWidget *widget, GdkEvent */*event*/, Context *context)
     context->paragraph->draw(&surface, firstLine, (maxLines < lastLine)? maxLines : lastLine);
   }
 
-  return TRUE;
+  return true;
 }
 
 GtkWidget *newSample(const gchar *fileName)
diff --git a/icu4c/source/samples/layout/layout.cpp b/icu4c/source/samples/layout/layout.cpp
index 7ad9ac29f81..da83630c2f5 100644
--- a/icu4c/source/samples/layout/layout.cpp
+++ b/icu4c/source/samples/layout/layout.cpp
@@ -69,7 +69,7 @@ void InitParagraph(HWND hwnd, Context *context)
         si.nMin = 0;
         si.nMax = context->paragraph->getLineCount() - 1;
         si.nPage = context->height / context->paragraph->getLineHeight();
-        SetScrollInfo(hwnd, SB_VERT, &si, TRUE);
+        SetScrollInfo(hwnd, SB_VERT, &si, true);
     }
 }
 
@@ -217,7 +217,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
         }
 
         si.fMask = SIF_POS;
-        SetScrollInfo(hwnd, SB_VERT, &si, TRUE);
+        SetScrollInfo(hwnd, SB_VERT, &si, true);
         GetScrollInfo(hwnd, SB_VERT, &si);
 
         context = (Context *) GetWindowLongPtr(hwnd, GWLP_USERDATA);
@@ -310,7 +310,7 @@ LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
                     context->paragraph = newParagraph;
                     InitParagraph(hwnd, context);
                     PrettyTitle(hwnd, szTitleName);
-                    InvalidateRect(hwnd, NULL, TRUE);
+                    InvalidateRect(hwnd, NULL, true);
 
                 }
             }
diff --git a/icu4c/source/samples/layout/paragraph.cpp b/icu4c/source/samples/layout/paragraph.cpp
index f3023011b10..0559d246d2d 100644
--- a/icu4c/source/samples/layout/paragraph.cpp
+++ b/icu4c/source/samples/layout/paragraph.cpp
@@ -118,7 +118,7 @@ Paragraph::Paragraph(const LEUnicode chars[], int32_t charCount, const FontRuns
         if (pEnd != pStart) {
             subsetFontRuns(fontRuns, pStart - fChars, pEnd - fChars, &fr);
 
-            paragraphLayout = new ParagraphLayout(pStart, pEnd - pStart, &fr, NULL, NULL, locales, fParagraphLevel, FALSE, status);
+            paragraphLayout = new ParagraphLayout(pStart, pEnd - pStart, &fr, NULL, NULL, locales, fParagraphLevel, false, status);
 
             if (LE_FAILURE(status)) {
                 delete paragraphLayout;
diff --git a/icu4c/source/samples/layout/pflow.c b/icu4c/source/samples/layout/pflow.c
index c7fd290ade4..52967c234bd 100644
--- a/icu4c/source/samples/layout/pflow.c
+++ b/icu4c/source/samples/layout/pflow.c
@@ -7,6 +7,8 @@
  *
  */
 
+#include 
+
 #include "unicode/utypes.h"
 #include "unicode/uchar.h"
 #include "unicode/ubidi.h"
@@ -172,7 +174,7 @@ pf_flow *pf_create(const LEUnicode chars[], le_int32 charCount, const pl_fontRun
             pl_addLocaleRun(locales, TEST_LOCALE, pEnd - pStart);
 #endif
 
-            paragraphLayout = pl_create(pStart, pEnd - pStart, fr, NULL, NULL, locales, flow->fParagraphLevel, FALSE, status);
+            paragraphLayout = pl_create(pStart, pEnd - pStart, fr, NULL, NULL, locales, flow->fParagraphLevel, false, status);
 
             if (LE_FAILURE(*status)) {
                 break; /* return? something else? */
diff --git a/icu4c/source/test/cintltst/bocu1tst.c b/icu4c/source/test/cintltst/bocu1tst.c
index 00551c30eef..a9faf36a5b9 100644
--- a/icu4c/source/test/cintltst/bocu1tst.c
+++ b/icu4c/source/test/cintltst/bocu1tst.c
@@ -30,6 +30,8 @@
 *   ### links in design doc to here and to ucnvbocu.c
 */
 
+#include 
+
 #include "unicode/utypes.h"
 #include "unicode/ustring.h"
 #include "unicode/ucnv.h"
@@ -205,7 +207,7 @@ bocu1TrailToByte[BOCU1_TRAIL_CONTROLS_COUNT]={
  * what we need here.
  * This macro adjust the results so that the modulo-value m is always >=0.
  *
- * For positive n, the if() condition is always FALSE.
+ * For positive n, the if() condition is always false.
  *
  * @param n Number to be split into quotient and rest.
  *          Will be modified to contain the quotient.
diff --git a/icu4c/source/test/cintltst/callcoll.c b/icu4c/source/test/cintltst/callcoll.c
index c7c9067b7ec..ff9023db037 100644
--- a/icu4c/source/test/cintltst/callcoll.c
+++ b/icu4c/source/test/cintltst/callcoll.c
@@ -31,8 +31,9 @@
  * equlivalent to word 'one'. 
  */
 
-#include 
+#include 
 #include 
+#include 
 
 #include "unicode/utypes.h"
 
@@ -150,7 +151,7 @@ void uprv_appendByteToHexString(char *dst, uint8_t val) {
 static char* U_EXPORT2 sortKeyToString(const UCollator *coll, const uint8_t *sortkey, char *buffer, uint32_t *len) {
     int32_t strength = UCOL_PRIMARY;
     uint32_t res_size = 0;
-    UBool doneCase = FALSE;
+    UBool doneCase = false;
     UErrorCode errorCode = U_ZERO_ERROR;
 
     char *current = buffer;
@@ -166,9 +167,9 @@ static char* U_EXPORT2 sortKeyToString(const UCollator *coll, const uint8_t *sor
             uprv_appendByteToHexString(current, *currentSk++);
             uprv_strcat(current, " ");
         }
-        if(ucol_getAttribute(coll, UCOL_CASE_LEVEL, &errorCode) == UCOL_ON && strength == UCOL_SECONDARY && doneCase == FALSE) {
-            doneCase = TRUE;
-        } else if(ucol_getAttribute(coll, UCOL_CASE_LEVEL, &errorCode) == UCOL_OFF || doneCase == TRUE || strength != UCOL_SECONDARY) {
+        if(ucol_getAttribute(coll, UCOL_CASE_LEVEL, &errorCode) == UCOL_ON && strength == UCOL_SECONDARY && doneCase == false) {
+            doneCase = true;
+        } else if(ucol_getAttribute(coll, UCOL_CASE_LEVEL, &errorCode) == UCOL_OFF || doneCase == true || strength != UCOL_SECONDARY) {
             strength ++;
         }
         if (*currentSk) {
@@ -226,10 +227,10 @@ UBool hasCollationElements(const char *locName) {
     loc = ures_getByKey(loc, "collations", loc, &status);
     ures_close(loc);
     if(status == U_ZERO_ERROR) { /* do the test - there are real elements */
-      return TRUE;
+      return true;
     }
   }
-  return FALSE;
+  return false;
 }
 
 static UCollationResult compareUsingPartials(UCollator *coll, const UChar source[], int32_t sLen, const UChar target[], int32_t tLen, int32_t pieceSize, UErrorCode *status) {
@@ -1302,15 +1303,15 @@ find(UEnumeration* list, const char* str, UErrorCode* status){
     const char* value = NULL;
     int32_t length=0;
     if(U_FAILURE(*status)){
-        return FALSE;
+        return false;
     }
     uenum_reset(list, status);
     while( (value= uenum_next(list, &length, status))!=NULL){
         if(strcmp(value, str)==0){
-            return TRUE;
+            return true;
         }
     }
-    return FALSE;
+    return false;
 }*/
 
 static void TestJ5298(void)
diff --git a/icu4c/source/test/cintltst/capitst.c b/icu4c/source/test/cintltst/capitst.c
index bb49f4d674c..e5568d32d53 100644
--- a/icu4c/source/test/cintltst/capitst.c
+++ b/icu4c/source/test/cintltst/capitst.c
@@ -19,6 +19,7 @@
 
 #if !UCONFIG_NO_COLLATION
 
+#include 
 #include 
 #include 
 #include 
@@ -531,7 +532,7 @@ void TestRuleBasedColl()
         log_err("ERROR: CollationElement iterator creation failed.: %s\n", myErrorName(status));
         return;
     }
-    while (TRUE) {
+    while (true) {
         /* testing with en since thai has its own tailoring */
         int32_t ce = ucol_next(iter1, &status);
         int32_t ce2 = ucol_next(iter2, &status);
@@ -2196,7 +2197,7 @@ static void TestShortString(void)
             locale = NULL;
         }
 
-        coll = ucol_openFromShortString(testCases[i].input, FALSE, &parseError, &status);
+        coll = ucol_openFromShortString(testCases[i].input, false, &parseError, &status);
         if(status != testCases[i].expectedStatus) {
             log_err_status(status, "Got status '%s' that is different from expected '%s' for '%s'\n",
                 u_errorName(status), u_errorName(testCases[i].expectedStatus), testCases[i].input);
@@ -2212,7 +2213,7 @@ static void TestShortString(void)
             }
 
             ucol_normalizeShortDefinitionString(testCases[i].input, normalizedBuffer, 256, &parseError, &status);
-            fromNormalized = ucol_openFromShortString(normalizedBuffer, FALSE, &parseError, &status);
+            fromNormalized = ucol_openFromShortString(normalizedBuffer, false, &parseError, &status);
             ucol_getShortDefinitionString(fromNormalized, locale, fromNormalizedBuffer, 256, &status);
 
             if(strcmp(fromShortBuffer, fromNormalizedBuffer)) {
@@ -2254,9 +2255,9 @@ doSetsTest(const char *locale, const USet *ref, USet *set, const char* inSet, co
     if(!uset_containsAll(ref, set)) {
         log_err("%s: Some stuff from %s is not present in the set\n", locale, inSet);
         uset_removeAll(set, ref);
-        bufLen = uset_toPattern(set, buffer, UPRV_LENGTHOF(buffer), TRUE, status);
+        bufLen = uset_toPattern(set, buffer, UPRV_LENGTHOF(buffer), true, status);
         log_info("    missing: %s\n", aescstrdup(buffer, bufLen));
-        bufLen = uset_toPattern(ref, buffer, UPRV_LENGTHOF(buffer), TRUE, status);
+        bufLen = uset_toPattern(ref, buffer, UPRV_LENGTHOF(buffer), true, status);
         log_info("    total: size=%i  %s\n", uset_getItemCount(ref), aescstrdup(buffer, bufLen));
     }
 
@@ -2351,9 +2352,9 @@ TestGetContractionsAndUnsafes(void)
             log_err_status(status, "Unable to open collator for locale %s ==> %s\n", tests[i].locale, u_errorName(status));
             continue;
         }
-        ucol_getContractionsAndExpansions(coll, conts, exp, TRUE, &status);
+        ucol_getContractionsAndExpansions(coll, conts, exp, true, &status);
         doSetsTest(tests[i].locale, conts, set, tests[i].inConts, tests[i].outConts, &status);
-        setLen = uset_toPattern(conts, buffer, setBufferLen, TRUE, &status);
+        setLen = uset_toPattern(conts, buffer, setBufferLen, true, &status);
         if(U_SUCCESS(status)) {
             /*log_verbose("Contractions %i: %s\n", uset_getItemCount(conts), aescstrdup(buffer, setLen));*/
         } else {
@@ -2361,7 +2362,7 @@ TestGetContractionsAndUnsafes(void)
             status = U_ZERO_ERROR;
         }
         doSetsTest(tests[i].locale, exp, set, tests[i].inExp, tests[i].outExp, &status);
-        setLen = uset_toPattern(exp, buffer, setBufferLen, TRUE, &status);
+        setLen = uset_toPattern(exp, buffer, setBufferLen, true, &status);
         if(U_SUCCESS(status)) {
             /*log_verbose("Expansions %i: %s\n", uset_getItemCount(exp), aescstrdup(buffer, setLen));*/
         } else {
@@ -2372,7 +2373,7 @@ TestGetContractionsAndUnsafes(void)
         noConts = ucol_getUnsafeSet(coll, conts, &status);
         (void)noConts;   /* Suppress set but not used warning */
         doSetsTest(tests[i].locale, conts, set, tests[i].unsafeCodeUnits, tests[i].safeCodeUnits, &status);
-        setLen = uset_toPattern(conts, buffer, setBufferLen, TRUE, &status);
+        setLen = uset_toPattern(conts, buffer, setBufferLen, true, &status);
         if(U_SUCCESS(status)) {
             log_verbose("Unsafe %i: %s\n", uset_getItemCount(exp), aescstrdup(buffer, setLen));
         } else {
@@ -2520,10 +2521,10 @@ static UBool uenum_contains(UEnumeration *e, const char *s, UErrorCode *status)
     uenum_reset(e, status);
     while(((t = uenum_next(e, NULL, status)) != NULL) && U_SUCCESS(*status)) {
         if(uprv_strcmp(s, t) == 0) {
-            return TRUE;
+            return true;
         }
     }
-    return FALSE;
+    return false;
 }
 
 static void TestGetKeywordValuesForLocale(void) {
@@ -2551,14 +2552,14 @@ static void TestGetKeywordValuesForLocale(void) {
     UEnumeration *keywordValues = NULL;
     int32_t i, n, size;
     const char *locale = NULL, *value = NULL;
-    UBool errorOccurred = FALSE;
+    UBool errorOccurred = false;
 
     for (i = 0; i < UPRV_LENGTHOF(PREFERRED) && !errorOccurred; i++) {
         locale = PREFERRED[i][0];
         value = NULL;
         size = 0;
 
-        keywordValues = ucol_getKeywordValuesForLocale("collation", locale, TRUE, &status);
+        keywordValues = ucol_getKeywordValuesForLocale("collation", locale, true, &status);
         if (keywordValues == NULL || U_FAILURE(status)) {
             log_err_status(status, "Error getting keyword values: %s\n", u_errorName(status));
             break;
@@ -2572,7 +2573,7 @@ static void TestGetKeywordValuesForLocale(void) {
                     log_err("Keyword value \"%s\" missing for locale: %s\n", value, locale);
                 } else {
                     log_err("While getting keyword value from locale: %s got this error: %s\n", locale, u_errorName(status));
-                    errorOccurred = TRUE;
+                    errorOccurred = true;
                     break;
                 }
             }
diff --git a/icu4c/source/test/cintltst/cbiapts.c b/icu4c/source/test/cintltst/cbiapts.c
index 51cc8c43e3c..7fc43289a94 100644
--- a/icu4c/source/test/cintltst/cbiapts.c
+++ b/icu4c/source/test/cintltst/cbiapts.c
@@ -24,6 +24,7 @@
 
 #if !UCONFIG_NO_BREAK_ITERATION
 
+#include 
 #include 
 #include 
 #include "unicode/uloc.h"
@@ -42,7 +43,7 @@
 } UPRV_BLOCK_MACRO_END
 
 #define TEST_ASSERT(expr) UPRV_BLOCK_MACRO_BEGIN { \
-    if ((expr)==FALSE) { \
+    if ((expr)==false) { \
         log_data_err("Test Failure at file %s, line %d (Are you missing data?)\n", __FILE__, __LINE__); \
     } \
 } UPRV_BLOCK_MACRO_END
@@ -275,15 +276,15 @@ static void TestBreakIteratorCAPI()
     pos=ubrk_previous(word);
     log_verbose("%d \n", pos);
 
-    if (ubrk_isBoundary(word, 2) != FALSE) {
-        log_err("error ubrk_isBoundary(word, 2) did not return FALSE\n");
+    if (ubrk_isBoundary(word, 2) != false) {
+        log_err("error ubrk_isBoundary(word, 2) did not return false\n");
     }
     pos=ubrk_current(word);
     if (pos != 4) {
         log_err("error ubrk_current() != 4 after ubrk_isBoundary(word, 2)\n");
     }
-    if (ubrk_isBoundary(word, 4) != TRUE) {
-        log_err("error ubrk_isBoundary(word, 4) did not return TRUE\n");
+    if (ubrk_isBoundary(word, 4) != true) {
+        log_err("error ubrk_isBoundary(word, 4) did not return true\n");
     }
 
 
@@ -930,16 +931,16 @@ static void TestBreakIteratorTailoring(void) {
             int32_t offset, offsindx;
             UBool foundError;
 
-            foundError = FALSE;
+            foundError = false;
             for (offsindx = 0; (offset = ubrk_next(ubrkiter)) != UBRK_DONE; ++offsindx) {
                 if (!foundError && offsindx >= testPtr->numOffsets) {
                     log_err("FAIL: locale %s, break type %d, ubrk_next expected UBRK_DONE, got %d\n",
                             testPtr->locale, testPtr->type, offset);
-                    foundError = TRUE;
+                    foundError = true;
                 } else if (!foundError && offset != testPtr->offsFwd[offsindx]) {
                     log_err("FAIL: locale %s, break type %d, ubrk_next expected %d, got %d\n",
                             testPtr->locale, testPtr->type, testPtr->offsFwd[offsindx], offset);
-                    foundError = TRUE;
+                    foundError = true;
                 }
             }
             if (!foundError && offsindx < testPtr->numOffsets) {
@@ -947,16 +948,16 @@ static void TestBreakIteratorTailoring(void) {
                         testPtr->locale, testPtr->type, testPtr->offsFwd[offsindx]);
             }
 
-            foundError = FALSE;
+            foundError = false;
             for (offsindx = 0; (offset = ubrk_previous(ubrkiter)) != UBRK_DONE; ++offsindx) {
                 if (!foundError && offsindx >= testPtr->numOffsets) {
                     log_err("FAIL: locale %s, break type %d, ubrk_previous expected UBRK_DONE, got %d\n",
                             testPtr->locale, testPtr->type, offset);
-                    foundError = TRUE;
+                    foundError = true;
                 } else if (!foundError && offset != testPtr->offsRev[offsindx]) {
                     log_err("FAIL: locale %s, break type %d, ubrk_previous expected %d, got %d\n",
                             testPtr->locale, testPtr->type, testPtr->offsRev[offsindx], offset);
-                    foundError = TRUE;
+                    foundError = true;
                 }
             }
             if (!foundError && offsindx < testPtr->numOffsets) {
diff --git a/icu4c/source/test/cintltst/cbiditst.c b/icu4c/source/test/cintltst/cbiditst.c
index 38be9c50564..3eb570925f1 100644
--- a/icu4c/source/test/cintltst/cbiditst.c
+++ b/icu4c/source/test/cintltst/cbiditst.c
@@ -22,6 +22,7 @@
 #include "unicode/ushape.h"
 #include "cbiditst.h"
 #include "cstring.h"
+#include 
 /* the following include is needed for sprintf */
 #include 
 
@@ -181,8 +182,8 @@ testBidi(void) {
     if(pBiDi!=NULL) {
         pLine=ubidi_open();
         if(pLine!=NULL) {
-            doTests(pBiDi, pLine, FALSE);
-            doTests(pBiDi, pLine, TRUE);
+            doTests(pBiDi, pLine, false);
+            doTests(pBiDi, pLine, true);
         } else {
             log_err("ubidi_open() returned NULL, out of memory\n");
         }
@@ -241,7 +242,7 @@ doTests(UBiDi *pBiDi, UBiDi *pLine, UBool countRunsFirst) {
 static const char columns[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
 
 #define TABLE_SIZE  256
-static UBool   tablesInitialized = FALSE;
+static UBool   tablesInitialized = false;
 static UChar   pseudoToUChar[TABLE_SIZE];
 static uint8_t UCharToPseudo[TABLE_SIZE];    /* used for Unicode chars < 0x0100 */
 static uint8_t UCharToPseud2[TABLE_SIZE];    /* used for Unicode chars >=0x0100 */
@@ -355,7 +356,7 @@ static void buildPseudoTables(void)
         pseudoToUChar[c] = uchar;
         UCharToPseudo[uchar & 0x00ff] = c;
     }
-    tablesInitialized = TRUE;
+    tablesInitialized = true;
 }
 
 /*----------------------------------------------------------------------*/
@@ -507,22 +508,22 @@ static UBool matchingPair(UBiDi *bidi, int32_t i, char c1, char c2)
     int k, len;
 
     if (c1 == c2) {
-        return TRUE;
+        return true;
     }
     /* For UBIDI_REORDER_RUNS_ONLY, it would not be correct to check levels[i],
        so we use the appropriate run's level, which is good for all cases.
      */
     ubidi_getLogicalRun(bidi, i, NULL, &level);
     if ((level & 1) == 0) {
-        return FALSE;
+        return false;
     }
     len = (int)strlen(mates1Chars);
     for (k = 0; k < len; k++) {
         if ((c1 == mates1Chars[k]) && (c2 == mates2Chars[k])) {
-            return TRUE;
+            return true;
         }
     }
-    return FALSE;
+    return false;
 }
 
 static UBool checkWhatYouCan(UBiDi *bidi, const char *srcChars, const char *dstChars)
@@ -539,11 +540,11 @@ static UBool checkWhatYouCan(UBiDi *bidi, const char *srcChars, const char *dstC
     ubidi_getLogicalMap(bidi, logMap, &errorCode);
     if (U_FAILURE(errorCode)) {
         log_err("Error #1 invoking ICU within checkWhatYouCan\n");
-        return FALSE;
+        return false;
     }
 
-    testOK = TRUE;
-    errMap = errDst = FALSE;
+    testOK = true;
+    errMap = errDst = false;
     logLimit = ubidi_getProcessedLength(bidi);
     visLimit = ubidi_getResultLength(bidi);
     memset(accumSrc, '?', logLimit);
@@ -552,7 +553,7 @@ static UBool checkWhatYouCan(UBiDi *bidi, const char *srcChars, const char *dstC
     for (i = 0; i < logLimit; i++) {
         idx = ubidi_getVisualIndex(bidi, i, &errorCode);
         if (idx != logMap[i]) {
-            errMap = TRUE;
+            errMap = true;
         }
         if (idx == UBIDI_MAP_NOWHERE) {
             continue;
@@ -562,18 +563,18 @@ static UBool checkWhatYouCan(UBiDi *bidi, const char *srcChars, const char *dstC
         }
         accumDst[idx] = srcChars[i];
         if (!matchingPair(bidi, i, srcChars[i], dstChars[idx])) {
-            errDst = TRUE;
+            errDst = true;
         }
     }
     accumDst[visLimit] = 0;
     if (U_FAILURE(errorCode)) {
         log_err("Error #2 invoking ICU within checkWhatYouCan\n");
-        return FALSE;
+        return false;
     }
     if (errMap) {
         if (testOK) {
             printCaseInfo(bidi, srcChars, dstChars);
-            testOK = FALSE;
+            testOK = false;
         }
         log_err("Mismatch between getLogicalMap() and getVisualIndex()\n");
         log_err("Map    :");
@@ -590,17 +591,17 @@ static UBool checkWhatYouCan(UBiDi *bidi, const char *srcChars, const char *dstC
     if (errDst) {
         if (testOK) {
             printCaseInfo(bidi, srcChars, dstChars);
-            testOK = FALSE;
+            testOK = false;
         }
         log_err("Source does not map to Result\n");
         log_err("We got: %s", accumDst); fputs("\n", stderr);
     }
 
-    errMap = errDst = FALSE;
+    errMap = errDst = false;
     for (i = 0; i < visLimit; i++) {
         idx = ubidi_getLogicalIndex(bidi, i, &errorCode);
         if (idx != visMap[i]) {
-            errMap = TRUE;
+            errMap = true;
         }
         if (idx == UBIDI_MAP_NOWHERE) {
             continue;
@@ -610,18 +611,18 @@ static UBool checkWhatYouCan(UBiDi *bidi, const char *srcChars, const char *dstC
         }
         accumSrc[idx] = dstChars[i];
         if (!matchingPair(bidi, idx, srcChars[idx], dstChars[i])) {
-            errDst = TRUE;
+            errDst = true;
         }
     }
     accumSrc[logLimit] = 0;
     if (U_FAILURE(errorCode)) {
         log_err("Error #3 invoking ICU within checkWhatYouCan\n");
-        return FALSE;
+        return false;
     }
     if (errMap) {
         if (testOK) {
             printCaseInfo(bidi, srcChars, dstChars);
-            testOK = FALSE;
+            testOK = false;
         }
         log_err("Mismatch between getVisualMap() and getLogicalIndex()\n");
         log_err("Map    :");
@@ -638,7 +639,7 @@ static UBool checkWhatYouCan(UBiDi *bidi, const char *srcChars, const char *dstC
     if (errDst) {
         if (testOK) {
             printCaseInfo(bidi, srcChars, dstChars);
-            testOK = FALSE;
+            testOK = false;
         }
         log_err("Result does not map to Source\n");
         log_err("We got: %s", accumSrc);
@@ -819,7 +820,7 @@ testReorder(void) {
         log_verbose("Testing V2L #3 for case %d\n", i);
         pseudoToU16(srcSize,logicalOrder[i],src);
         ec = U_ZERO_ERROR;
-        ubidi_setInverse(bidi,TRUE);
+        ubidi_setInverse(bidi,true);
         ubidi_setPara(bidi,src,srcSize,UBIDI_DEFAULT_LTR ,NULL,&ec);
         if(U_FAILURE(ec)){
             log_err("ubidi_setPara(tests[%d], paraLevel %d) failed with errorCode %s\n",
@@ -1626,7 +1627,7 @@ static void doMisc(void) {
                 aescstrdup(src, srcLen), aescstrdup(dest, destLen));
     }
     RETURN_IF_BAD_ERRCODE("#18#");
-    ubidi_orderParagraphsLTR(bidi, TRUE);
+    ubidi_orderParagraphsLTR(bidi, true);
     srcLen = u_unescape("\n\r   \n\rabc\n\\u05d0\\u05d1\rabc \\u05d2\\u05d3\n\r"
                         "\\u05d4\\u05d5 abc\n\\u05d6\\u05d7 abc .-=\r\n"
                         "-* \\u05d8\\u05d9 abc .-=", src, MAXLEN);
@@ -1950,7 +1951,7 @@ testMultipleParagraphs(void) {
                 i, k, u_errorName(errorCode));
         errorCode=U_ZERO_ERROR;
     }
-    /* check level of block separator at end of paragraph when orderParagraphsLTR==FALSE */
+    /* check level of block separator at end of paragraph when orderParagraphsLTR==false */
     ubidi_setPara(pBidi, src, srcSize, UBIDI_RTL, NULL, &errorCode);
     /* get levels through para Bidi block */
     gotLevels=ubidi_getLevels(pBidi, &errorCode);
@@ -1993,14 +1994,14 @@ testMultipleParagraphs(void) {
     }
     orderParagraphsLTR=ubidi_isOrderParagraphsLTR(pBidi);
     if (orderParagraphsLTR) {
-        log_err("Found orderParagraphsLTR=%d expected=%d\n", orderParagraphsLTR, FALSE);
+        log_err("Found orderParagraphsLTR=%d expected=%d\n", orderParagraphsLTR, false);
     }
-    ubidi_orderParagraphsLTR(pBidi, TRUE);
+    ubidi_orderParagraphsLTR(pBidi, true);
     orderParagraphsLTR=ubidi_isOrderParagraphsLTR(pBidi);
     if (!orderParagraphsLTR) {
-        log_err("Found orderParagraphsLTR=%d expected=%d\n", orderParagraphsLTR, TRUE);
+        log_err("Found orderParagraphsLTR=%d expected=%d\n", orderParagraphsLTR, true);
     }
-    /* check level of block separator at end of paragraph when orderParagraphsLTR==TRUE */
+    /* check level of block separator at end of paragraph when orderParagraphsLTR==true */
     ubidi_setPara(pBidi, src, srcSize, UBIDI_RTL, NULL, &errorCode);
     /* get levels through para Bidi block */
     gotLevels=ubidi_getLevels(pBidi, &errorCode);
@@ -2036,7 +2037,7 @@ testMultipleParagraphs(void) {
      */
     u_unescape(text, src, MAXLEN);      /* restore original content */
     srcSize=u_strlen(src);
-    ubidi_orderParagraphsLTR(pBidi, FALSE);
+    ubidi_orderParagraphsLTR(pBidi, false);
     ubidi_setPara(pBidi, src, srcSize, UBIDI_DEFAULT_RTL, NULL, &errorCode);
     gotLevels=ubidi_getLevels(pBidi, &errorCode);
     for (i=0; i -1 && !checkMaps(pBiDi, outIndex, srcChars, destChars,
                                     desc, "UBIDI_OPTION_REMOVE_CONTROLS",
-                                    level, FALSE)) {
-        return FALSE;
+                                    level, false)) {
+        return false;
     }
-    return TRUE;
+    return true;
 }
 
 static UBool
@@ -4139,9 +4140,9 @@ checkResultLength(UBiDi *pBiDi, const char *srcChars, const char *destChars,
                 "Input:", srcChars, "Output:", destChars,
                 "Reordering mode:", mode, "Reordering option:", option,
                 "Paragraph level:", level);
-        return FALSE;
+        return false;
     }
-    return TRUE;
+    return true;
 }
 
 static void
@@ -4278,7 +4279,7 @@ testReorderingMode(void) {
     UBiDiReorderingMode modeValue, modeBack;
     int32_t srcLen, destLen, idx;
     const char *expectedChars;
-    UBool testOK = TRUE;
+    UBool testOK = true;
 
     log_verbose("\nEntering TestReorderingMode\n\n");
 
@@ -4291,7 +4292,7 @@ testReorderingMode(void) {
         return;
     }
 
-    ubidi_setInverse(pBiDi2, TRUE);
+    ubidi_setInverse(pBiDi2, true);
 
     for (tc = 0; tc < TC_COUNT; tc++) {
         const char *srcChars = textIn[tc];
@@ -4346,31 +4347,31 @@ testReorderingMode(void) {
                                 modes[mode].description,
                                 options[option].description,
                                 pBiDi)) {
-                        testOK = FALSE;
+                        testOK = false;
                     }
                     if (options[option].value == UBIDI_OPTION_INSERT_MARKS &&
                              !assertRoundTrip(pBiDi3, tc, idx, srcChars,
                                               destChars, dest, destLen,
                                               mode, option, paraLevels[level])) {
-                        testOK = FALSE;
+                        testOK = false;
                     }
                     else if (!checkResultLength(pBiDi, srcChars, destChars,
                                 destLen, modes[mode].description,
                                 options[option].description,
                                 paraLevels[level])) {
-                        testOK = FALSE;
+                        testOK = false;
                     }
                     else if (idx > -1 && !checkMaps(pBiDi, idx, srcChars,
                             destChars, modes[mode].description,
                             options[option].description, paraLevels[level],
-                            TRUE)) {
-                        testOK = FALSE;
+                            true)) {
+                        testOK = false;
                     }
                 }
             }
         }
     }
-    if (testOK == TRUE) {
+    if (testOK == true) {
         log_verbose("\nReordering mode test OK\n");
     }
     ubidi_close(pBiDi3);
@@ -4448,14 +4449,14 @@ testStreaming(void) {
     int i, j, levelIndex;
     UBiDiLevel level;
     int nTests = UPRV_LENGTHOF(testData), nLevels = UPRV_LENGTHOF(paraLevels);
-    UBool mismatch, testOK = TRUE;
+    UBool mismatch, testOK = true;
    char processedLenStr[MAXPORTIONS * 5];
 
     log_verbose("\nEntering TestStreaming\n\n");
 
     pBiDi = getBiDiObject();
 
-    ubidi_orderParagraphsLTR(pBiDi, TRUE);
+    ubidi_orderParagraphsLTR(pBiDi, true);
 
     for (levelIndex = 0; levelIndex < nLevels; levelIndex++) {
         for (i = 0; i < nTests; i++) {
@@ -4466,7 +4467,7 @@ testStreaming(void) {
             processedLenStr[0] = NULL_CHAR;
             log_verbose("Testing level %d, case %d\n", level, i);
 
-            mismatch = FALSE;
+            mismatch = false;
 
             ubidi_setReorderingOptions(pBiDi, UBIDI_OPTION_STREAMING);
             for (j = 0, pSrc = src; j < MAXPORTIONS && srcLen > 0; j++) {
@@ -4493,7 +4494,7 @@ testStreaming(void) {
             }
 
             if (mismatch || j != nPortions) {
-                testOK = FALSE;
+                testOK = false;
                 log_err("\nProcessed lengths mismatch.\n"
                     "\tParagraph level: %u\n"
                     "\tInput string: %s\n"
@@ -4505,7 +4506,7 @@ testStreaming(void) {
         }
     }
     ubidi_close(pBiDi);
-    if (testOK == TRUE) {
+    if (testOK == true) {
         log_verbose("\nBiDi streaming test OK\n");
     }
     log_verbose("\nExiting TestStreaming\n\n");
@@ -4662,7 +4663,7 @@ checkMaps(UBiDi *pBiDi, int32_t stringIndex, const char *src, const char *dest,
     int32_t i, srcLen, resLen, idx;
     const int32_t *expectedLogicalMap, *expectedVisualMap;
     UErrorCode rc = U_ZERO_ERROR;
-    UBool testOK = TRUE;
+    UBool testOK = true;
 
     if (forward) {
         expectedLogicalMap = forwardMap[stringIndex];
@@ -4674,7 +4675,7 @@ checkMaps(UBiDi *pBiDi, int32_t stringIndex, const char *src, const char *dest,
     }
     ubidi_getLogicalMap(pBiDi, actualLogicalMap, &rc);
     if (!assertSuccessful("ubidi_getLogicalMap", &rc)) {
-        testOK = FALSE;
+        testOK = false;
     }
     srcLen = ubidi_getProcessedLength(pBiDi);
     if (memcmp(expectedLogicalMap, actualLogicalMap, srcLen * sizeof(int32_t))) {
@@ -4699,7 +4700,7 @@ checkMaps(UBiDi *pBiDi, int32_t stringIndex, const char *src, const char *dest,
                 option, ubidi_getReorderingOptions(pBiDi),
                 forward
                 );
-        testOK = FALSE;
+        testOK = false;
     }
     resLen = ubidi_getResultLength(pBiDi);
     ubidi_getVisualMap(pBiDi, actualVisualMap, &rc);
@@ -4726,7 +4727,7 @@ checkMaps(UBiDi *pBiDi, int32_t stringIndex, const char *src, const char *dest,
                 option, ubidi_getReorderingOptions(pBiDi),
                 forward
                 );
-        testOK = FALSE;
+        testOK = false;
     }
     for (i = 0; i < srcLen; i++) {
         idx = ubidi_getVisualIndex(pBiDi, i, &rc);
@@ -4755,7 +4756,7 @@ checkMaps(UBiDi *pBiDi, int32_t stringIndex, const char *src, const char *dest,
                 option, ubidi_getReorderingOptions(pBiDi),
                 forward
                 );
-        testOK = FALSE;
+        testOK = false;
     }
     for (i = 0; i < resLen; i++) {
         idx = ubidi_getLogicalIndex(pBiDi, i, &rc);
@@ -4784,7 +4785,7 @@ checkMaps(UBiDi *pBiDi, int32_t stringIndex, const char *src, const char *dest,
                 option, ubidi_getReorderingOptions(pBiDi),
                 forward
                 );
-        testOK = FALSE;
+        testOK = false;
     }
     return testOK;
 }
@@ -4793,9 +4794,9 @@ static UBool
 assertIllegalArgument(const char* message, UErrorCode* rc) {
     if (*rc != U_ILLEGAL_ARGUMENT_ERROR) {
         log_err("%s() failed with error %s.\n", message, myErrorName(*rc));
-        return FALSE;
+        return false;
     }
-    return TRUE;
+    return true;
 }
 
 typedef struct {
@@ -4845,7 +4846,7 @@ testContext(void) {
     UErrorCode rc;
     int32_t proLength, epiLength, srcLen, destLen, tc;
     contextCase cc;
-    UBool testOK = TRUE;
+    UBool testOK = true;
 
     log_verbose("\nEntering TestContext \n\n");
 
@@ -4855,7 +4856,7 @@ testContext(void) {
     testOK &= assertIllegalArgument("Error when BiDi object is null", &rc);
 
     pBiDi = getBiDiObject();
-    ubidi_orderParagraphsLTR(pBiDi, TRUE);
+    ubidi_orderParagraphsLTR(pBiDi, true);
 
     /* test proLength < -1 */
     rc = U_ZERO_ERROR;
@@ -4908,10 +4909,10 @@ testContext(void) {
                 "Reordering mode:", ubidi_getReorderingMode(pBiDi),
                 "Paragraph level:", ubidi_getParaLevel(pBiDi),
                 "Reordering option:", ubidi_getReorderingOptions(pBiDi));
-            testOK = FALSE;
+            testOK = false;
         }
     }
-    if (testOK == TRUE) {
+    if (testOK == true) {
         log_verbose("\nContext test OK\n");
     }
     ubidi_close(pBiDi);
diff --git a/icu4c/source/test/cintltst/ccaltst.c b/icu4c/source/test/cintltst/ccaltst.c
index 6f62fd89deb..bba1f307c0a 100644
--- a/icu4c/source/test/cintltst/ccaltst.c
+++ b/icu4c/source/test/cintltst/ccaltst.c
@@ -19,6 +19,7 @@
 
 #if !UCONFIG_NO_FORMATTING
 
+#include 
 #include 
 #include 
 
@@ -122,7 +123,7 @@ static void TestCalendar()
     const char *tzver = 0;
     int32_t tzverLen = 0;
     UChar canonicalID[64];
-    UBool isSystemID = FALSE;
+    UBool isSystemID = false;
     const UCalGetTypeTest * ucalGetTypeTestPtr;
 
 #ifdef U_USE_UCAL_OBSOLETE_2_8
@@ -349,8 +350,8 @@ static void TestCalendar()
     /*Testing the equality between calendar's*/
     log_verbose("\nTesting ucal_equivalentTo()\n");
     if(caldef && caldef2 && calfr && calit) { 
-      if(ucal_equivalentTo(caldef, caldef2) == FALSE || ucal_equivalentTo(caldef, calfr)== TRUE || 
-        ucal_equivalentTo(caldef, calit)== TRUE || ucal_equivalentTo(calfr, calfrclone) == FALSE) {
+      if(ucal_equivalentTo(caldef, caldef2) == false || ucal_equivalentTo(caldef, calfr)== true || 
+        ucal_equivalentTo(caldef, calit)== true || ucal_equivalentTo(calfr, calfrclone) == false) {
           log_data_err("FAIL: Error. equivalentTo test failed (Are you missing data?)\n");
       } else {
           log_verbose("PASS: equivalentTo test passed\n");
@@ -1620,29 +1621,29 @@ static void TestGetKeywordValuesForLocale() {
     int32_t valueLength;
     UList *ALLList = NULL;
     
-    UEnumeration *ALL = ucal_getKeywordValuesForLocale("calendar", uloc_getDefault(), FALSE, &status);
+    UEnumeration *ALL = ucal_getKeywordValuesForLocale("calendar", uloc_getDefault(), false, &status);
     if (U_SUCCESS(status)) {
         for (i = 0; i < PREFERRED_SIZE; i++) {
             pref = NULL;
             all = NULL;
             loc = PREFERRED[i][0];
-            pref = ucal_getKeywordValuesForLocale("calendar", loc, TRUE, &status);
-            matchPref = FALSE;
-            matchAll = FALSE;
+            pref = ucal_getKeywordValuesForLocale("calendar", loc, true, &status);
+            matchPref = false;
+            matchAll = false;
             
             value = NULL;
             valueLength = 0;
             
             if (U_SUCCESS(status) && uenum_count(pref, &status) == EXPECTED_SIZE[i]) {
-                matchPref = TRUE;
+                matchPref = true;
                 for (j = 0; j < EXPECTED_SIZE[i]; j++) {
                     if ((value = uenum_next(pref, &valueLength, &status)) != NULL && U_SUCCESS(status)) {
                         if (uprv_strcmp(value, PREFERRED[i][j+1]) != 0) {
-                            matchPref = FALSE;
+                            matchPref = false;
                             break;
                         }
                     } else {
-                        matchPref = FALSE;
+                        matchPref = false;
                         log_err("ERROR getting keyword value for locale \"%s\"\n", loc);
                         break;
                     }
@@ -1655,22 +1656,22 @@ static void TestGetKeywordValuesForLocale() {
             }
             uenum_close(pref);
             
-            all = ucal_getKeywordValuesForLocale("calendar", loc, FALSE, &status);
+            all = ucal_getKeywordValuesForLocale("calendar", loc, false, &status);
             
             size = uenum_count(all, &status);
             
             if (U_SUCCESS(status) && size == uenum_count(ALL, &status)) {
-                matchAll = TRUE;
+                matchAll = true;
                 ALLList = ulist_getListFromEnum(ALL);
                 for (j = 0; j < size; j++) {
                     if ((value = uenum_next(all, &valueLength, &status)) != NULL && U_SUCCESS(status)) {
                         if (!ulist_containsString(ALLList, value, (int32_t)uprv_strlen(value))) {
                             log_err("Locale %s have %s not in ALL\n", loc, value);
-                            matchAll = FALSE;
+                            matchAll = false;
                             break;
                         }
                     } else {
-                        matchAll = FALSE;
+                        matchAll = false;
                         log_err("ERROR getting \"all\" keyword value for locale \"%s\"\n", loc);
                         break;
                     }
@@ -1786,7 +1787,7 @@ static void TestWeekend() {
     UErrorCode fmtStatus = U_ZERO_ERROR;
     UDateFormat * fmt = udat_open(UDAT_NONE, UDAT_NONE, "en", NULL, 0, NULL, 0, &fmtStatus);
     if (U_SUCCESS(fmtStatus)) {
-        udat_applyPattern(fmt, FALSE, logDateFormat, -1);
+        udat_applyPattern(fmt, false, logDateFormat, -1);
     } else {
         log_data_err("Unable to create UDateFormat - %s\n", u_errorName(fmtStatus));
         return;
@@ -1872,7 +1873,7 @@ typedef struct {
     const char *  locale;
     UDate         start;
     UDate         target;
-    UBool         progressive; /* TRUE to compute progressive difference for each field, FALSE to reset calendar after each call */
+    UBool         progressive; /* true to compute progressive difference for each field, false to reset calendar after each call */
     int32_t       yDiff;
     int32_t       MDiff;
     int32_t       dDiff;
@@ -1887,35 +1888,35 @@ static const UChar tzGMT[] = { 0x47,0x4D,0x54,0 }; /* "GMT" */
 static const TFDItem tfdItems[] = {
     /* timezone    locale          start              target           progress yDf  MDf    dDf     HDf       mDf         sDf */
     /* For these we compute the progressive difference for each field - not resetting the calendar after each call */
-    { tzUSPacific, "en_US",        1267459800000.0,   1277772600000.0,  TRUE,     0,   3,    27,      9,       40,          0 }, /* 2010-Mar-01 08:10 -> 2010-Jun-28 17:50 */
-    { tzUSPacific, "en_US",        1267459800000.0,   1299089280000.0,  TRUE,     1,   0,     1,      1,       58,          0 }, /* 2010-Mar-01 08:10 -> 2011-Mar-02 10:08 */
+    { tzUSPacific, "en_US",        1267459800000.0,   1277772600000.0,  true,     0,   3,    27,      9,       40,          0 }, /* 2010-Mar-01 08:10 -> 2010-Jun-28 17:50 */
+    { tzUSPacific, "en_US",        1267459800000.0,   1299089280000.0,  true,     1,   0,     1,      1,       58,          0 }, /* 2010-Mar-01 08:10 -> 2011-Mar-02 10:08 */
     /* For these we compute the total difference for each field - resetting the calendar after each call */
-    { tzGMT,       "en_US",        0.0,               1073692800000.0,  FALSE,   34, 408, 12427, 298248, 17894880, 1073692800 }, /* 1970-Jan-01 00:00 -> 2004-Jan-10 00:00 */
-    { tzGMT,       "en_US",        0.0,               1073779200000.0,  FALSE,   34, 408, 12428, 298272, 17896320, 1073779200 }, /* 1970-Jan-01 00:00 -> 2004-Jan-11 00:00 */
-    { tzGMT,       "en_US",        0.0,               2147472000000.0,  FALSE,   68, 816, 24855, 596520, 35791200, 2147472000 }, /* 1970-Jan-01 00:00 -> 2038-Jan-19 00:00 */
-    { tzGMT,       "en_US",        0.0,               2147558400000.0,  FALSE,   68, 816, 24856, 596544, 35792640, 0x7FFFFFFF }, /* 1970-Jan-01 00:00 -> 2038-Jan-20 00:00, seconds diff overflow */
-    { tzGMT,       "en_US",        0.0,              -1073692800000.0,  FALSE,  -34,-408,-12427,-298248,-17894880,-1073692800 }, /* 1970-Jan-01 00:00 -> 1935-Dec-24 00:00 */
-    { tzGMT,       "en_US",        0.0,              -1073779200000.0,  FALSE,  -34,-408,-12428,-298272,-17896320,-1073779200 }, /* 1970-Jan-01 00:00 -> 1935-Dec-23 00:00 */
+    { tzGMT,       "en_US",        0.0,               1073692800000.0,  false,   34, 408, 12427, 298248, 17894880, 1073692800 }, /* 1970-Jan-01 00:00 -> 2004-Jan-10 00:00 */
+    { tzGMT,       "en_US",        0.0,               1073779200000.0,  false,   34, 408, 12428, 298272, 17896320, 1073779200 }, /* 1970-Jan-01 00:00 -> 2004-Jan-11 00:00 */
+    { tzGMT,       "en_US",        0.0,               2147472000000.0,  false,   68, 816, 24855, 596520, 35791200, 2147472000 }, /* 1970-Jan-01 00:00 -> 2038-Jan-19 00:00 */
+    { tzGMT,       "en_US",        0.0,               2147558400000.0,  false,   68, 816, 24856, 596544, 35792640, 0x7FFFFFFF }, /* 1970-Jan-01 00:00 -> 2038-Jan-20 00:00, seconds diff overflow */
+    { tzGMT,       "en_US",        0.0,              -1073692800000.0,  false,  -34,-408,-12427,-298248,-17894880,-1073692800 }, /* 1970-Jan-01 00:00 -> 1935-Dec-24 00:00 */
+    { tzGMT,       "en_US",        0.0,              -1073779200000.0,  false,  -34,-408,-12428,-298272,-17896320,-1073779200 }, /* 1970-Jan-01 00:00 -> 1935-Dec-23 00:00 */
     /* check fwd/backward on either side of era boundary and across era boundary */
-    { tzGMT,       "en_US",       -61978089600000.0,-61820409600000.0,  FALSE,    4,  59,  1825,  43800,  2628000,  157680000 }, /* CE   5-Dec-31 00:00 -> CE  10-Dec-30 00:00 */
-    { tzGMT,       "en_US",       -61820409600000.0,-61978089600000.0,  FALSE,   -4, -59, -1825, -43800, -2628000, -157680000 }, /* CE  10-Dec-30 00:00 -> CE   5-Dec-31 00:00 */
-    { tzGMT,       "en_US",       -62451129600000.0,-62293449600000.0,  FALSE,    4,  59,  1825,  43800,  2628000,  157680000 }, /* BCE 10-Jan-04 00:00 -> BCE  5-Jan-03 00:00 */
-    { tzGMT,       "en_US",       -62293449600000.0,-62451129600000.0,  FALSE,   -4, -59, -1825, -43800, -2628000, -157680000 }, /* BCE  5-Jan-03 00:00 -> BCE 10-Jan-04 00:00 */
-    { tzGMT,       "en_US",       -62293449600000.0,-61978089600000.0,  FALSE,    9, 119,  3650,  87600,  5256000,  315360000 }, /* BCE  5-Jan-03 00:00 -> CE   5-Dec-31 00:00 */
-    { tzGMT,       "en_US",       -61978089600000.0,-62293449600000.0,  FALSE,   -9,-119, -3650, -87600, -5256000, -315360000 }, /* CE   5-Dec-31 00:00 -> BCE  5-Jan-03 00:00 */
-    { tzGMT, "en@calendar=roc",    -1672704000000.0, -1515024000000.0,  FALSE,    4,  59,  1825,  43800,  2628000,  157680000 }, /* MG   5-Dec-30 00:00 -> MG  10-Dec-29 00:00 */
-    { tzGMT, "en@calendar=roc",    -1515024000000.0, -1672704000000.0,  FALSE,   -4, -59, -1825, -43800, -2628000, -157680000 }, /* MG  10-Dec-29 00:00 -> MG   5-Dec-30 00:00 */
-    { tzGMT, "en@calendar=roc",    -2145744000000.0, -1988064000000.0,  FALSE,    4,  59,  1825,  43800,  2628000,  157680000 }, /* BMG 10-Jan-03 00:00 -> BMG  5-Jan-02 00:00 */
-    { tzGMT, "en@calendar=roc",    -1988064000000.0, -2145744000000.0,  FALSE,   -4, -59, -1825, -43800, -2628000, -157680000 }, /* BMG  5-Jan-02 00:00 -> BMG 10-Jan-03 00:00 */
-    { tzGMT, "en@calendar=roc",    -1988064000000.0, -1672704000000.0,  FALSE,    9, 119,  3650,  87600,  5256000,  315360000 }, /* BMG  5-Jan-02 00:00 -> MG   5-Dec-30 00:00 */
-    { tzGMT, "en@calendar=roc",    -1672704000000.0, -1988064000000.0,  FALSE,   -9,-119, -3650, -87600, -5256000, -315360000 }, /* MG   5-Dec-30 00:00 -> BMG  5-Jan-02 00:00 */
-    { tzGMT, "en@calendar=coptic",-53026531200000.0,-52868851200000.0,  FALSE,    4,  64,  1825,  43800,  2628000,  157680000 }, /* Er1  5-Nas-05 00:00 -> Er1 10-Nas-04 00:00 */
-    { tzGMT, "en@calendar=coptic",-52868851200000.0,-53026531200000.0,  FALSE,   -4, -64, -1825, -43800, -2628000, -157680000 }, /* Er1 10-Nas-04 00:00 -> Er1  5-Nas-05 00:00 */
-    { tzGMT, "en@calendar=coptic",-53499571200000.0,-53341891200000.0,  FALSE,    4,  64,  1825,  43800,  2628000,  157680000 }, /* Er0 10-Tou-04 00:00 -> Er0  5-Tou-02 00:00 */
-    { tzGMT, "en@calendar=coptic",-53341891200000.0,-53499571200000.0,  FALSE,   -4, -64, -1825, -43800, -2628000, -157680000 }, /* Er0  5-Tou-02 00:00 -> Er0 10-Tou-04 00:00 */
-    { tzGMT, "en@calendar=coptic",-53341891200000.0,-53026531200000.0,  FALSE,    9, 129,  3650,  87600,  5256000,  315360000 }, /* Er0  5-Tou-02 00:00 -> Er1  5-Nas-05 00:00 */
-    { tzGMT, "en@calendar=coptic",-53026531200000.0,-53341891200000.0,  FALSE,   -9,-129, -3650, -87600, -5256000, -315360000 }, /* Er1  5-Nas-05 00:00 -> Er0  5-Tou-02 00:00 */
-    { NULL,        NULL,           0.0,               0.0,              FALSE,    0,   0,     0,      0,        0,          0 }  /* terminator */
+    { tzGMT,       "en_US",       -61978089600000.0,-61820409600000.0,  false,    4,  59,  1825,  43800,  2628000,  157680000 }, /* CE   5-Dec-31 00:00 -> CE  10-Dec-30 00:00 */
+    { tzGMT,       "en_US",       -61820409600000.0,-61978089600000.0,  false,   -4, -59, -1825, -43800, -2628000, -157680000 }, /* CE  10-Dec-30 00:00 -> CE   5-Dec-31 00:00 */
+    { tzGMT,       "en_US",       -62451129600000.0,-62293449600000.0,  false,    4,  59,  1825,  43800,  2628000,  157680000 }, /* BCE 10-Jan-04 00:00 -> BCE  5-Jan-03 00:00 */
+    { tzGMT,       "en_US",       -62293449600000.0,-62451129600000.0,  false,   -4, -59, -1825, -43800, -2628000, -157680000 }, /* BCE  5-Jan-03 00:00 -> BCE 10-Jan-04 00:00 */
+    { tzGMT,       "en_US",       -62293449600000.0,-61978089600000.0,  false,    9, 119,  3650,  87600,  5256000,  315360000 }, /* BCE  5-Jan-03 00:00 -> CE   5-Dec-31 00:00 */
+    { tzGMT,       "en_US",       -61978089600000.0,-62293449600000.0,  false,   -9,-119, -3650, -87600, -5256000, -315360000 }, /* CE   5-Dec-31 00:00 -> BCE  5-Jan-03 00:00 */
+    { tzGMT, "en@calendar=roc",    -1672704000000.0, -1515024000000.0,  false,    4,  59,  1825,  43800,  2628000,  157680000 }, /* MG   5-Dec-30 00:00 -> MG  10-Dec-29 00:00 */
+    { tzGMT, "en@calendar=roc",    -1515024000000.0, -1672704000000.0,  false,   -4, -59, -1825, -43800, -2628000, -157680000 }, /* MG  10-Dec-29 00:00 -> MG   5-Dec-30 00:00 */
+    { tzGMT, "en@calendar=roc",    -2145744000000.0, -1988064000000.0,  false,    4,  59,  1825,  43800,  2628000,  157680000 }, /* BMG 10-Jan-03 00:00 -> BMG  5-Jan-02 00:00 */
+    { tzGMT, "en@calendar=roc",    -1988064000000.0, -2145744000000.0,  false,   -4, -59, -1825, -43800, -2628000, -157680000 }, /* BMG  5-Jan-02 00:00 -> BMG 10-Jan-03 00:00 */
+    { tzGMT, "en@calendar=roc",    -1988064000000.0, -1672704000000.0,  false,    9, 119,  3650,  87600,  5256000,  315360000 }, /* BMG  5-Jan-02 00:00 -> MG   5-Dec-30 00:00 */
+    { tzGMT, "en@calendar=roc",    -1672704000000.0, -1988064000000.0,  false,   -9,-119, -3650, -87600, -5256000, -315360000 }, /* MG   5-Dec-30 00:00 -> BMG  5-Jan-02 00:00 */
+    { tzGMT, "en@calendar=coptic",-53026531200000.0,-52868851200000.0,  false,    4,  64,  1825,  43800,  2628000,  157680000 }, /* Er1  5-Nas-05 00:00 -> Er1 10-Nas-04 00:00 */
+    { tzGMT, "en@calendar=coptic",-52868851200000.0,-53026531200000.0,  false,   -4, -64, -1825, -43800, -2628000, -157680000 }, /* Er1 10-Nas-04 00:00 -> Er1  5-Nas-05 00:00 */
+    { tzGMT, "en@calendar=coptic",-53499571200000.0,-53341891200000.0,  false,    4,  64,  1825,  43800,  2628000,  157680000 }, /* Er0 10-Tou-04 00:00 -> Er0  5-Tou-02 00:00 */
+    { tzGMT, "en@calendar=coptic",-53341891200000.0,-53499571200000.0,  false,   -4, -64, -1825, -43800, -2628000, -157680000 }, /* Er0  5-Tou-02 00:00 -> Er0 10-Tou-04 00:00 */
+    { tzGMT, "en@calendar=coptic",-53341891200000.0,-53026531200000.0,  false,    9, 129,  3650,  87600,  5256000,  315360000 }, /* Er0  5-Tou-02 00:00 -> Er1  5-Nas-05 00:00 */
+    { tzGMT, "en@calendar=coptic",-53026531200000.0,-53341891200000.0,  false,   -9,-129, -3650, -87600, -5256000, -315360000 }, /* Er1  5-Nas-05 00:00 -> Er0  5-Tou-02 00:00 */
+    { NULL,        NULL,           0.0,               0.0,              false,    0,   0,     0,      0,        0,          0 }  /* terminator */
 };
 
 void TestFieldDifference() {
@@ -2104,22 +2105,22 @@ void TestAmbiguousWallTime() {
 
 static const EraTestItem eraTestItems[] = {
     /* calendars with non-modern era 0 that goes backwards, max era == 1 */
-    { "en@calendar=gregorian", TRUE },
-    { "en@calendar=roc", TRUE },
-    { "en@calendar=coptic", TRUE },
+    { "en@calendar=gregorian", true },
+    { "en@calendar=roc", true },
+    { "en@calendar=coptic", true },
     /* calendars with non-modern era 0 that goes forwards, max era > 1 */
-    { "en@calendar=japanese", FALSE },
-    { "en@calendar=chinese", FALSE },
+    { "en@calendar=japanese", false },
+    { "en@calendar=chinese", false },
     /* calendars with non-modern era 0 that goes forwards, max era == 1 */
-    { "en@calendar=ethiopic", FALSE },
+    { "en@calendar=ethiopic", false },
     /* calendars with only one era  = 0, forwards */
-    { "en@calendar=buddhist", FALSE },
-    { "en@calendar=hebrew", FALSE },
-    { "en@calendar=islamic", FALSE },
-    { "en@calendar=indian", FALSE },
-    { "en@calendar=persian", FALSE },
-    { "en@calendar=ethiopic-amete-alem", FALSE },
-    { NULL, FALSE }
+    { "en@calendar=buddhist", false },
+    { "en@calendar=hebrew", false },
+    { "en@calendar=islamic", false },
+    { "en@calendar=indian", false },
+    { "en@calendar=persian", false },
+    { "en@calendar=ethiopic-amete-alem", false },
+    { NULL, false }
 };
 
 static const UChar zoneGMT[] = { 0x47,0x4D,0x54,0 };
@@ -2340,11 +2341,11 @@ static const UChar zoneCairo[]     = { 0x41,0x66,0x72,0x69,0x63,0x61,0x2F,0x43,0
 static const UChar zoneIceland[]   = { 0x41,0x74,0x6C,0x61,0x6E,0x74,0x69,0x63,0x2F,0x52,0x65,0x79,0x6B,0x6A,0x61,0x76,0x69,0x6B,0 }; /* "Atlantic/Reykjavik", always on DST (since when?) */
 
 static const TZTransitionItem tzTransitionItems[] = {
-    { "USPacific mid 2012", zoneUSPacific, 2012, UCAL_JULY, 1, TRUE , TRUE  },
-    { "USPacific mid  100", zoneUSPacific,  100, UCAL_JULY, 1, FALSE, TRUE  }, /* no transitions before 100 CE... */
-    { "Cairo     mid 2012", zoneCairo,     2012, UCAL_JULY, 1, TRUE , TRUE  }, /* DST cancelled since 2011 (Changed since 2014c) */
-    { "Iceland   mid 2012", zoneIceland,   2012, UCAL_JULY, 1, TRUE , FALSE }, /* always on DST */
-    { NULL,                 NULL,             0,         0, 0, FALSE, FALSE } /* terminator */
+    { "USPacific mid 2012", zoneUSPacific, 2012, UCAL_JULY, 1, true , true  },
+    { "USPacific mid  100", zoneUSPacific,  100, UCAL_JULY, 1, false, true  }, /* no transitions before 100 CE... */
+    { "Cairo     mid 2012", zoneCairo,     2012, UCAL_JULY, 1, true , true  }, /* DST cancelled since 2011 (Changed since 2014c) */
+    { "Iceland   mid 2012", zoneIceland,   2012, UCAL_JULY, 1, true , false }, /* always on DST */
+    { NULL,                 NULL,             0,         0, 0, false, false } /* terminator */
 };
 
 void TestGetTZTransition() {
diff --git a/icu4c/source/test/cintltst/ccapitst.c b/icu4c/source/test/cintltst/ccapitst.c
index aee75e6dd9d..376388bf4f2 100644
--- a/icu4c/source/test/cintltst/ccapitst.c
+++ b/icu4c/source/test/cintltst/ccapitst.c
@@ -14,6 +14,8 @@
 *     Madhu Katragadda              Ported for C API
 ******************************************************************************
 */
+
+#include 
 #include 
 #include 
 #include 
@@ -985,7 +987,7 @@ static void TestConvert()
                  &tmp_ucs_buf,
                  ucs_file_buffer_use+i,
                  NULL,
-                 TRUE,
+                 true,
                  &err);
         consumedUni = (UChar*)tmp_consumedUni;
         (void)consumedUni;   /* Suppress set but not used warning. */
@@ -1006,7 +1008,7 @@ static void TestConvert()
                 &tmp_mytarget_use,
                 mytarget_use + (mytarget_1 - mytarget),
                 NULL,
-                FALSE,
+                false,
                 &err);
         consumed = (char*)tmp_consumed;
         if (U_FAILURE(err)) 
@@ -1242,18 +1244,18 @@ static void TestAlias() {
 
             if (0 != strcmp(alias0, mapBack)) {
                 int32_t idx;
-                UBool foundAlias = FALSE;
+                UBool foundAlias = false;
                 if (status == U_AMBIGUOUS_ALIAS_WARNING) {
                     /* Make sure that we only get this mismapping when there is
                        an ambiguous alias, and the other converter has this alias too. */
                     for (idx = 0; idx < ucnv_countAliases(mapBack, &status); idx++) {
                         if (strcmp(ucnv_getAlias(mapBack, (uint16_t)idx, &status), alias) == 0) {
-                            foundAlias = TRUE;
+                            foundAlias = true;
                             break;
                         }
                     }
                 }
-                /* else not ambiguous, and this is a real problem. foundAlias = FALSE */
+                /* else not ambiguous, and this is a real problem. foundAlias = false */
 
                 if (!foundAlias) {
                     log_err("FAIL: Converter \"%s\" -> "
@@ -1412,7 +1414,7 @@ static void TSCC_fromU(const void *context,
 
     if(reason == UCNV_CLOSE) {
         log_verbose("TSCC_fromU: Context %p:%d closing\n", ctx, ctx->serial);
-        ctx->wasClosed = TRUE;
+        ctx->wasClosed = true;
     }
 }
 
@@ -1462,7 +1464,7 @@ static void TSCC_toU(const void *context,
 
     if(reason == UCNV_CLOSE) {
         log_verbose("TSCC_toU: Context %p:%d closing\n", ctx, ctx->serial);
-        ctx->wasClosed = TRUE;
+        ctx->wasClosed = true;
     }
 }
 
@@ -1604,7 +1606,7 @@ static void TestConvertSafeCloneCallback()
     TSCC_print_log(&to1, "to1");
     TSCC_print_log(to2, "to2");
 
-    if(from1.wasClosed == FALSE) {
+    if(from1.wasClosed == false) {
         log_err("FAIL! from1 is NOT closed \n");
     }
 
@@ -1612,7 +1614,7 @@ static void TestConvertSafeCloneCallback()
         log_err("FAIL! from2 was closed\n");
     }
 
-    if(to1.wasClosed == FALSE) {
+    if(to1.wasClosed == false) {
         log_err("FAIL! to1 is NOT closed \n");
     }
 
@@ -1626,22 +1628,22 @@ static void TestConvertSafeCloneCallback()
     TSCC_print_log(&from1, "from1");
     TSCC_print_log(from2, "from2");
 
-    if(from1.wasClosed == FALSE) {
+    if(from1.wasClosed == false) {
         log_err("FAIL! from1 is NOT closed \n");
     }
 
-    if(from2->wasClosed == FALSE) {
+    if(from2->wasClosed == false) {
         log_err("FAIL! from2 was NOT closed\n");
     }   
 
     TSCC_print_log(&to1, "to1");
     TSCC_print_log(to2, "to2");
 
-    if(to1.wasClosed == FALSE) {
+    if(to1.wasClosed == false) {
         log_err("FAIL! to1 is NOT closed \n");
     }
 
-    if(to2->wasClosed == FALSE) {
+    if(to2->wasClosed == false) {
         log_err("FAIL! to2 was NOT closed\n");
     }   
 
@@ -1658,12 +1660,12 @@ static UBool
 containsAnyOtherByte(uint8_t *p, int32_t length, uint8_t b) {
     while(length>0) {
         if(*p!=b) {
-            return TRUE;
+            return true;
         }
         ++p;
         --length;
     }
-    return FALSE;
+    return false;
 }
 
 static void TestConvertSafeClone()
@@ -1867,7 +1869,7 @@ static void TestConvertSafeClone()
                             &pUniBuffer,
                             uniBufferLimit,
                             NULL,
-                            TRUE,
+                            true,
                             &err);
             if(U_FAILURE(err)){
                 log_err("FAIL: cloned converter failed to do fromU conversion. Error: %s\n",u_errorName(err));
@@ -1878,7 +1880,7 @@ static void TestConvertSafeClone()
                            &pCharSource,
                            pCharSourceLimit,
                            NULL,
-                           TRUE,
+                           true,
                            &err
                            );
 
@@ -2007,7 +2009,7 @@ static void TestConvertClone()
                         &pUniBuffer,
                         uniBufferLimit,
                         NULL,
-                        TRUE,
+                        true,
                         &err);
         if(U_FAILURE(err)){
             log_err("FAIL: cloned converter failed to do fromU conversion. Error: %s\n",u_errorName(err));
@@ -2018,7 +2020,7 @@ static void TestConvertClone()
                         &pCharSource,
                         pCharSourceLimit,
                         NULL,
-                        TRUE,
+                        true,
                         &err
                         );
 
@@ -2316,7 +2318,7 @@ convertExStreaming(UConverter *srcCnv, UConverter *targetCnv,
     ucnv_resetFromUnicode(targetCnv);
 
     errorCode=U_ZERO_ERROR;
-    flush=FALSE;
+    flush=false;
 
     /* convert, streaming-style (both converters and pivot keep state) */
     for(;;) {
@@ -2330,7 +2332,7 @@ convertExStreaming(UConverter *srcCnv, UConverter *targetCnv,
                        &target, targetLimit,
                        &src, srcLimit,
                        pivotBuffer, &pivotSource, &pivotTarget, pivotLimit,
-                       FALSE, flush, &errorCode);
+                       false, flush, &errorCode);
         targetLength=(int32_t)(target-targetBuffer);
         if(target>targetLimit) {
             log_err("ucnv_convertEx(%s) chunk[%d] target %p exceeds targetLimit %p\n",
@@ -2353,7 +2355,7 @@ convertExStreaming(UConverter *srcCnv, UConverter *targetCnv,
             break;
         } else if(src==finalSrcLimit && pivotSource==pivotTarget) {
             /* all consumed, now flush without input (separate from conversion for testing) */
-            flush=TRUE;
+            flush=true;
         }
     }
 
@@ -2455,7 +2457,7 @@ static void TestConvertEx() {
     src=srcBuffer;
     target=targetBuffer;
     ucnv_convertEx(cnv2, cnv1, &target, targetBuffer+sizeof(targetBuffer), &src, NULL,
-                   NULL, NULL, NULL, NULL, TRUE, TRUE, &errorCode);
+                   NULL, NULL, NULL, NULL, true, true, &errorCode);
     if( errorCode!=U_ZERO_ERROR ||
         target-targetBuffer!=sizeof(shiftJIS) ||
         *target!=0 ||
@@ -2471,7 +2473,7 @@ static void TestConvertEx() {
     src=srcBuffer;
     target=targetBuffer;
     ucnv_convertEx(cnv2, cnv1, &target, targetBuffer+sizeof(shiftJIS), &src, NULL,
-                   NULL, NULL, NULL, NULL, TRUE, TRUE, &errorCode);
+                   NULL, NULL, NULL, NULL, true, true, &errorCode);
     if( errorCode!=U_STRING_NOT_TERMINATED_WARNING ||
         target-targetBuffer!=sizeof(shiftJIS) ||
         *target!=(char)0xff ||
@@ -2486,7 +2488,7 @@ static void TestConvertEx() {
     src=srcBuffer;
     target=targetBuffer;
     ucnv_convertEx(cnv2, cnv1, &target, targetBuffer+sizeof(targetBuffer), &src, NULL,
-                   NULL, NULL, NULL, NULL, TRUE, TRUE, &errorCode);
+                   NULL, NULL, NULL, NULL, true, true, &errorCode);
     if(errorCode!=U_MESSAGE_PARSE_ERROR) {
         log_err("ucnv_convertEx(U_MESSAGE_PARSE_ERROR) sets %s\n", u_errorName(errorCode));
     }
@@ -2495,7 +2497,7 @@ static void TestConvertEx() {
     errorCode=U_ZERO_ERROR;
     pivotSource=pivotTarget=pivotBuffer;
     ucnv_convertEx(cnv2, cnv1, &target, targetBuffer+sizeof(targetBuffer), &src, NULL,
-                   pivotBuffer, &pivotSource, &pivotTarget, pivotBuffer, TRUE, TRUE, &errorCode);
+                   pivotBuffer, &pivotSource, &pivotTarget, pivotBuffer, true, true, &errorCode);
     if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) {
         log_err("ucnv_convertEx(pivotLimit==pivotStart) sets %s\n", u_errorName(errorCode));
     }
@@ -2504,7 +2506,7 @@ static void TestConvertEx() {
     errorCode=U_ZERO_ERROR;
     pivotSource=NULL;
     ucnv_convertEx(cnv2, cnv1, &target, targetBuffer+sizeof(targetBuffer), &src, NULL,
-                   pivotBuffer, &pivotSource, &pivotTarget, pivotBuffer+1, TRUE, TRUE, &errorCode);
+                   pivotBuffer, &pivotSource, &pivotTarget, pivotBuffer+1, true, true, &errorCode);
     if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) {
         log_err("ucnv_convertEx(*pivotSource==NULL) sets %s\n", u_errorName(errorCode));
     }
@@ -2514,7 +2516,7 @@ static void TestConvertEx() {
     src=NULL;
     pivotSource=pivotBuffer;
     ucnv_convertEx(cnv2, cnv1, &target, targetBuffer+sizeof(targetBuffer), &src, NULL,
-                   pivotBuffer, &pivotSource, &pivotTarget, pivotBuffer+1, TRUE, TRUE, &errorCode);
+                   pivotBuffer, &pivotSource, &pivotTarget, pivotBuffer+1, true, true, &errorCode);
     if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) {
         log_err("ucnv_convertEx(*source==NULL) sets %s\n", u_errorName(errorCode));
     }
@@ -2524,7 +2526,7 @@ static void TestConvertEx() {
     src=srcBuffer;
     pivotSource=pivotBuffer;
     ucnv_convertEx(cnv2, cnv1, &target, targetBuffer+sizeof(targetBuffer), &src, NULL,
-                   NULL, &pivotSource, &pivotTarget, pivotBuffer+1, TRUE, FALSE, &errorCode);
+                   NULL, &pivotSource, &pivotTarget, pivotBuffer+1, true, false, &errorCode);
     if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) {
         log_err("ucnv_convertEx(pivotStart==NULL) sets %s\n", u_errorName(errorCode));
     }
@@ -2623,7 +2625,7 @@ static UBool getTestChar(UConverter *cnv, const char *converterName,
     ucnv_fromUnicode(cnv,
                      &target, char0+ARG_CHAR_ARR_SIZE,
                      &utf16Source, utf16+utf16Length,
-                     NULL, FALSE, &errorCode);
+                     NULL, false, &errorCode);
     *pChar0Length=(int32_t)(target-char0);
 
     utf16Source=utf16;
@@ -2631,19 +2633,19 @@ static UBool getTestChar(UConverter *cnv, const char *converterName,
     ucnv_fromUnicode(cnv,
                      &target, char1+ARG_CHAR_ARR_SIZE,
                      &utf16Source, utf16+utf16Length,
-                     NULL, FALSE, &errorCode);
+                     NULL, false, &errorCode);
     *pChar1Length=(int32_t)(target-char1);
 
     if(U_FAILURE(errorCode)) {
         log_err("unable to get test character for %s - %s\n", converterName, u_errorName(errorCode));
-        return FALSE;
+        return false;
     }
-    return TRUE;
+    return true;
 }
 
 static UBool isOneTruncatedUTF8(const char *s, int32_t length) {
     if(length==0) {
-        return FALSE;
+        return false;
     } else if(length==1) {
         return U8_IS_LEAD(s[0]);
     } else {
@@ -2657,7 +2659,7 @@ static UBool isOneTruncatedUTF8(const char *s, int32_t length) {
             // e.g., E0 80 -> oneLength=1.
             return oneLength==length;
         }
-        return FALSE;
+        return false;
     }
 }
 
@@ -2715,7 +2717,7 @@ static void testFromTruncatedUTF8(UConverter *utf8Cnv, UConverter *cnv, const ch
                        &target, output+sizeof(output),
                        &source, utf8+utf8Length,
                        pivotBuffer, &pivotSource, &pivotTarget, pivotBuffer+UPRV_LENGTHOF(pivotBuffer),
-                       TRUE, TRUE, /* reset & flush */
+                       true, true, /* reset & flush */
                        &errorCode);
         outputLength=(int32_t)(target-output);
         (void)outputLength;   /* Suppress set but not used warning. */
@@ -2899,7 +2901,7 @@ static void TestConvertExFromUTF8_C5F0() {
             &target, dest+expectedLength,
             &src, bad_utf8+sizeof(bad_utf8),
             pivotBuffer, &pivotSource, &pivotTarget, pivotBuffer+UPRV_LENGTHOF(pivotBuffer),
-            TRUE, TRUE, &errorCode);
+            true, true, &errorCode);
         if( errorCode!=U_STRING_NOT_TERMINATED_WARNING || src!=bad_utf8+2 ||
             target!=dest+expectedLength || 0!=uprv_memcmp(dest, expected, expectedLength) ||
             dest[expectedLength]!=9
@@ -3225,7 +3227,7 @@ testSwap(const char *name, UBool swap) {
     UConverter *cnv, *swapCnv;
     UErrorCode errorCode;
 
-    /* if the swap flag is FALSE, then the test encoding is not EBCDIC and must not swap */
+    /* if the swap flag is false, then the test encoding is not EBCDIC and must not swap */
 
     /* open both the normal and the LF/NL-swapping converters */
     strcpy(swapped, name);
@@ -3255,12 +3257,12 @@ testSwap(const char *name, UBool swap) {
     /* convert to EBCDIC */
     pcu=text;
     pc=normal;
-    ucnv_fromUnicode(cnv, &pc, normal+UPRV_LENGTHOF(normal), &pcu, text+UPRV_LENGTHOF(text), NULL, TRUE, &errorCode);
+    ucnv_fromUnicode(cnv, &pc, normal+UPRV_LENGTHOF(normal), &pcu, text+UPRV_LENGTHOF(text), NULL, true, &errorCode);
     normalLength=(int32_t)(pc-normal);
 
     pcu=text;
     pc=swapped;
-    ucnv_fromUnicode(swapCnv, &pc, swapped+UPRV_LENGTHOF(swapped), &pcu, text+UPRV_LENGTHOF(text), NULL, TRUE, &errorCode);
+    ucnv_fromUnicode(swapCnv, &pc, swapped+UPRV_LENGTHOF(swapped), &pcu, text+UPRV_LENGTHOF(text), NULL, true, &errorCode);
     swappedLength=(int32_t)(pc-swapped);
 
     if(U_FAILURE(errorCode)) {
@@ -3293,12 +3295,12 @@ testSwap(const char *name, UBool swap) {
     /* convert back to Unicode (may not roundtrip) */
     pc=normal;
     pu=uNormal;
-    ucnv_toUnicode(cnv, &pu, uNormal+UPRV_LENGTHOF(uNormal), (const char **)&pc, normal+normalLength, NULL, TRUE, &errorCode);
+    ucnv_toUnicode(cnv, &pu, uNormal+UPRV_LENGTHOF(uNormal), (const char **)&pc, normal+normalLength, NULL, true, &errorCode);
     normalLength=(int32_t)(pu-uNormal);
 
     pc=normal;
     pu=uSwapped;
-    ucnv_toUnicode(swapCnv, &pu, uSwapped+UPRV_LENGTHOF(uSwapped), (const char **)&pc, normal+swappedLength, NULL, TRUE, &errorCode);
+    ucnv_toUnicode(swapCnv, &pu, uSwapped+UPRV_LENGTHOF(uSwapped), (const char **)&pc, normal+swappedLength, NULL, true, &errorCode);
     swappedLength=(int32_t)(pu-uSwapped);
 
     if(U_FAILURE(errorCode)) {
@@ -3340,11 +3342,11 @@ TestEBCDICSwapLFNL() {
         const char *name;
         UBool swap;
     } tests[]={
-        { "ibm-37", TRUE },
-        { "ibm-1047", TRUE },
-        { "ibm-1140", TRUE },
-        { "ibm-930", TRUE },
-        { "iso-8859-3", FALSE }
+        { "ibm-37", true },
+        { "ibm-1047", true },
+        { "ibm-1140", true },
+        { "ibm-930", true },
+        { "iso-8859-3", false }
     };
 
     int i;
@@ -3388,7 +3390,7 @@ static void TestFromUCountPending(){
         const UChar* sourceLimit = source + fromUnicodeTests[i].len; 
         int32_t len = 0;
         ucnv_reset(cnv);
-        ucnv_fromUnicode(cnv,&target, targetLimit, &source, sourceLimit, NULL, FALSE, &status);
+        ucnv_fromUnicode(cnv,&target, targetLimit, &source, sourceLimit, NULL, false, &status);
         len = ucnv_fromUCountPending(cnv, &status);
         if(U_FAILURE(status)){
             log_err("ucnv_fromUnicode call did not succeed. Error: %s\n", u_errorName(status));
@@ -3423,7 +3425,7 @@ static void TestFromUCountPending(){
         const UChar* sourceLimit = source + u_strlen(head); 
         int32_t len = 0;
         ucnv_reset(cnv);
-        ucnv_fromUnicode(cnv,&target, targetLimit, &source, sourceLimit, NULL, FALSE, &status);
+        ucnv_fromUnicode(cnv,&target, targetLimit, &source, sourceLimit, NULL, false, &status);
         len = ucnv_fromUCountPending(cnv, &status);
         if(U_FAILURE(status)){
             log_err("ucnv_fromUnicode call did not succeed. Error: %s\n", u_errorName(status));
@@ -3434,7 +3436,7 @@ static void TestFromUCountPending(){
         }
         source = middle;
         sourceLimit = source + u_strlen(middle);
-        ucnv_fromUnicode(cnv,&target, targetLimit, &source, sourceLimit, NULL, FALSE, &status);
+        ucnv_fromUnicode(cnv,&target, targetLimit, &source, sourceLimit, NULL, false, &status);
         len = ucnv_fromUCountPending(cnv, &status);
         if(U_FAILURE(status)){
             log_err("ucnv_fromUnicode call did not succeed. Error: %s\n", u_errorName(status));
@@ -3445,7 +3447,7 @@ static void TestFromUCountPending(){
         }
         source = tail;
         sourceLimit = source + u_strlen(tail);
-        ucnv_fromUnicode(cnv,&target, targetLimit, &source, sourceLimit, NULL, FALSE, &status);
+        ucnv_fromUnicode(cnv,&target, targetLimit, &source, sourceLimit, NULL, false, &status);
         if(status != U_BUFFER_OVERFLOW_ERROR){
             log_err("ucnv_fromUnicode call did not succeed. Error: %s\n", u_errorName(status));
         }
@@ -3494,7 +3496,7 @@ TestToUCountPending(){
         const char* sourceLimit = source + toUnicodeTests[i].len; 
         int32_t len = 0;
         ucnv_reset(cnv);
-        ucnv_toUnicode(cnv, &target, targetLimit, &source, sourceLimit, NULL, FALSE, &status);
+        ucnv_toUnicode(cnv, &target, targetLimit, &source, sourceLimit, NULL, false, &status);
         len = ucnv_toUCountPending(cnv,&status);
         if(U_FAILURE(status)){
             log_err("ucnv_toUnicode call did not succeed. Error: %s\n", u_errorName(status));
@@ -3536,7 +3538,7 @@ TestToUCountPending(){
             return;
         }
         ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, oldToUAction, NULL, &status);
-        ucnv_toUnicode(cnv,&target, targetLimit, &source, sourceLimit, NULL, FALSE, &status);
+        ucnv_toUnicode(cnv,&target, targetLimit, &source, sourceLimit, NULL, false, &status);
         len = ucnv_toUCountPending(cnv,&status);
         if(U_FAILURE(status)){
             log_err("ucnv_toUnicode call did not succeed. Error: %s\n", u_errorName(status));
@@ -3546,7 +3548,7 @@ TestToUCountPending(){
         }
         source=mid;
         sourceLimit = source+strlen(mid);
-        ucnv_toUnicode(cnv,&target, targetLimit, &source, sourceLimit, NULL, FALSE, &status);
+        ucnv_toUnicode(cnv,&target, targetLimit, &source, sourceLimit, NULL, false, &status);
         len = ucnv_toUCountPending(cnv,&status);
         if(U_FAILURE(status)){
             log_err("ucnv_toUnicode call did not succeed. Error: %s\n", u_errorName(status));
@@ -3558,7 +3560,7 @@ TestToUCountPending(){
         source=tail;
         sourceLimit = source+strlen(tail);
         targetLimit = target;
-        ucnv_toUnicode(cnv,&target, targetLimit, &source, sourceLimit, NULL, FALSE, &status);
+        ucnv_toUnicode(cnv,&target, targetLimit, &source, sourceLimit, NULL, false, &status);
         if(status != U_BUFFER_OVERFLOW_ERROR){
             log_err("ucnv_toUnicode call did not succeed. Error: %s\n", u_errorName(status));
         }
@@ -3784,28 +3786,28 @@ InvalidArguments() {
 
     errorCode=U_ZERO_ERROR;
     /* This one should fail because an incomplete UChar is being passed in */
-    ucnv_fromUnicode(cnv, &charsPtr, charsPtr, (const UChar **)&ucharsPtr, ucharsBadPtr, NULL, TRUE, &errorCode);
+    ucnv_fromUnicode(cnv, &charsPtr, charsPtr, (const UChar **)&ucharsPtr, ucharsBadPtr, NULL, true, &errorCode);
     if(errorCode != U_ILLEGAL_ARGUMENT_ERROR) {
         log_err("ucnv_fromUnicode() failed to return U_ILLEGAL_ARGUMENT_ERROR for incomplete UChar * buffer - %s\n", u_errorName(errorCode));
     }
 
     errorCode=U_ZERO_ERROR;
     /* This one should fail because ucharsBadPtr is > than ucharsPtr */
-    ucnv_fromUnicode(cnv, &charsPtr, charsPtr, (const UChar **)&ucharsBadPtr, ucharsPtr, NULL, TRUE, &errorCode);
+    ucnv_fromUnicode(cnv, &charsPtr, charsPtr, (const UChar **)&ucharsBadPtr, ucharsPtr, NULL, true, &errorCode);
     if(errorCode != U_ILLEGAL_ARGUMENT_ERROR) {
         log_err("ucnv_fromUnicode() failed to return U_ILLEGAL_ARGUMENT_ERROR for bad limit pointer - %s\n", u_errorName(errorCode));
     }
 
     errorCode=U_ZERO_ERROR;
     /* This one should fail because an incomplete UChar is being passed in */
-    ucnv_toUnicode(cnv, &ucharsPtr, ucharsBadPtr, (const char **)&charsPtr, charsPtr, NULL, TRUE, &errorCode);
+    ucnv_toUnicode(cnv, &ucharsPtr, ucharsBadPtr, (const char **)&charsPtr, charsPtr, NULL, true, &errorCode);
     if(errorCode != U_ILLEGAL_ARGUMENT_ERROR) {
         log_err("ucnv_toUnicode() failed to return U_ILLEGAL_ARGUMENT_ERROR for incomplete UChar * buffer - %s\n", u_errorName(errorCode));
     }
 
     errorCode=U_ZERO_ERROR;
     /* This one should fail because ucharsBadPtr is > than ucharsPtr */
-    ucnv_toUnicode(cnv, &ucharsBadPtr, ucharsPtr, (const char **)&charsPtr, charsPtr, NULL, TRUE, &errorCode);
+    ucnv_toUnicode(cnv, &ucharsBadPtr, ucharsPtr, (const char **)&charsPtr, charsPtr, NULL, true, &errorCode);
     if(errorCode != U_ILLEGAL_ARGUMENT_ERROR) {
         log_err("ucnv_toUnicode() failed to return U_ILLEGAL_ARGUMENT_ERROR for bad limit pointer - %s\n", u_errorName(errorCode));
     }
diff --git a/icu4c/source/test/cintltst/cdattst.c b/icu4c/source/test/cintltst/cdattst.c
index 94fd48e6d95..fcc56e386d0 100644
--- a/icu4c/source/test/cintltst/cdattst.c
+++ b/icu4c/source/test/cintltst/cdattst.c
@@ -34,6 +34,7 @@
 #include "cmemory.h"
 
 #include 
+#include 
 
 static void TestExtremeDates(void);
 static void TestAllLocales(void);
@@ -284,17 +285,17 @@ static void TestDateFormat()
 
         /*Testing applyPattern and toPattern */
     log_verbose("\nTesting applyPattern and toPattern()\n");
-    udat_applyPattern(def1, FALSE, temp, u_strlen(temp));
+    udat_applyPattern(def1, false, temp, u_strlen(temp));
     log_verbose("Extracting the pattern\n");
 
     resultlength=0;
-    resultlengthneeded=udat_toPattern(def1, FALSE, NULL, resultlength, &status);
+    resultlengthneeded=udat_toPattern(def1, false, NULL, resultlength, &status);
     if(status==U_BUFFER_OVERFLOW_ERROR)
     {
         status=U_ZERO_ERROR;
         resultlength=resultlengthneeded + 1;
         result=(UChar*)malloc(sizeof(UChar) * resultlength);
-        udat_toPattern(def1, FALSE, result, resultlength, &status);
+        udat_toPattern(def1, false, result, resultlength, &status);
     }
     if(U_FAILURE(status))
     {
@@ -497,7 +498,7 @@ static void TestRelativeDateFormat()
         } else if ( u_strstr(strTime, minutesPatn) == NULL || dtpatLen != u_strlen(strTime) ) {
             log_err("udat_toPatternRelativeTime timeStyle SHORT dateStyle (%d | UDAT_RELATIVE) time pattern incorrect\n", *stylePtr );
         }
-        dtpatLen = udat_toPattern(fmtRelDateTime, FALSE, strDateTime, kDateAndTimeOutMax, &status);
+        dtpatLen = udat_toPattern(fmtRelDateTime, false, strDateTime, kDateAndTimeOutMax, &status);
         if ( U_FAILURE(status) ) {
             log_err("udat_toPattern timeStyle SHORT dateStyle (%d | UDAT_RELATIVE) fails, error %s\n", *stylePtr, myErrorName(status) );
             status = U_ZERO_ERROR;
@@ -509,7 +510,7 @@ static void TestRelativeDateFormat()
             log_err("udat_applyPatternRelative timeStyle SHORT dateStyle (%d | UDAT_RELATIVE) fails, error %s\n", *stylePtr, myErrorName(status) );
             status = U_ZERO_ERROR;
         } else {
-            udat_toPattern(fmtRelDateTime, FALSE, strDateTime, kDateAndTimeOutMax, &status);
+            udat_toPattern(fmtRelDateTime, false, strDateTime, kDateAndTimeOutMax, &status);
             if ( U_FAILURE(status) ) {
                 log_err("udat_toPattern timeStyle SHORT dateStyle (%d | UDAT_RELATIVE) fails, error %s\n", *stylePtr, myErrorName(status) );
                 status = U_ZERO_ERROR;
@@ -717,13 +718,13 @@ free(pattern);
     log_verbose("\nTesting setSymbols\n");
     /*applying the pattern so that setSymbolss works */
     resultlength=0;
-    resultlengthout=udat_toPattern(fr, FALSE, NULL, resultlength, &status);
+    resultlengthout=udat_toPattern(fr, false, NULL, resultlength, &status);
     if(status==U_BUFFER_OVERFLOW_ERROR)
     {
         status=U_ZERO_ERROR;
         resultlength=resultlengthout + 1;
         pattern=(UChar*)malloc(sizeof(UChar) * resultlength);
-        udat_toPattern(fr, FALSE, pattern, resultlength, &status);
+        udat_toPattern(fr, false, pattern, resultlength, &status);
     }
     if(U_FAILURE(status))
     {
@@ -731,9 +732,9 @@ free(pattern);
             myErrorName(status) );
     }
 
-    udat_applyPattern(def, FALSE, pattern, u_strlen(pattern));
+    udat_applyPattern(def, false, pattern, u_strlen(pattern));
     resultlength=0;
-    resultlengthout=udat_toPattern(def, FALSE, NULL, resultlength,&status);
+    resultlengthout=udat_toPattern(def, false, NULL, resultlength,&status);
     if(status==U_BUFFER_OVERFLOW_ERROR)
     {
         status=U_ZERO_ERROR;
@@ -743,7 +744,7 @@ free(pattern);
             result = NULL;
         }
         result=(UChar*)malloc(sizeof(UChar) * resultlength);
-        udat_toPattern(fr, FALSE,result, resultlength, &status);
+        udat_toPattern(fr, false,result, resultlength, &status);
     }
     if(U_FAILURE(status))
     {
@@ -1250,14 +1251,14 @@ static UBool _aux1ExtremeDates(UDateFormat* fmt, UDate date,
                                UChar* buf, int32_t buflen, char* cbuf,
                                UErrorCode* ec) {
     int32_t len = udat_format(fmt, date, buf, buflen, 0, ec);
-    if (!assertSuccess("udat_format", ec)) return FALSE;
+    if (!assertSuccess("udat_format", ec)) return false;
     u_austrncpy(cbuf, buf, buflen);
     if (len < 4) {
         log_err("FAIL: udat_format(%g) => \"%s\"\n", date, cbuf);
     } else {
         log_verbose("udat_format(%g) => \"%s\"\n", date, cbuf);
     }
-    return TRUE;
+    return true;
 }
 
 /**
@@ -1273,7 +1274,7 @@ static UBool _aux2ExtremeDates(UDateFormat* fmt, UDate small, UDate large,
     /* Logarithmic midpoint; see below */
     UDate mid = (UDate) exp((log(small) + log(large)) / 2);
     if (count == EXTREME_DATES_DEPTH) {
-        return TRUE;
+        return true;
     }
     return
         _aux1ExtremeDates(fmt, mid, buf, buflen, cbuf, ec) &&
@@ -1388,11 +1389,11 @@ static void TestRelativeCrash(void) {
             }
         }
         {
-            /* Now udat_toPattern works for relative date formatters, unless localized is TRUE */
+            /* Now udat_toPattern works for relative date formatters, unless localized is true */
             UErrorCode subStatus = U_ZERO_ERROR;
             what = "udat_toPattern";
             log_verbose("Trying %s on a relative date..\n", what);
-            udat_toPattern(icudf, TRUE,NULL,0, &subStatus);
+            udat_toPattern(icudf, true,NULL,0, &subStatus);
             if(subStatus == expectStatus) {
                 log_verbose("Success: did not crash on %s, but got %s.\n", what, u_errorName(subStatus));
             } else {
@@ -1403,7 +1404,7 @@ static void TestRelativeCrash(void) {
             UErrorCode subStatus = U_ZERO_ERROR;
             what = "udat_applyPattern";
             log_verbose("Trying %s on a relative date..\n", what);
-            udat_applyPattern(icudf, FALSE,tzName,-1);
+            udat_applyPattern(icudf, false,tzName,-1);
             subStatus = U_ILLEGAL_ARGUMENT_ERROR; /* what it should be, if this took an errorcode. */
             if(subStatus == expectStatus) {
                 log_verbose("Success: did not crash on %s, but got %s.\n", what, u_errorName(subStatus));
@@ -1752,7 +1753,7 @@ static void TestParseErrorReturnValue(void) {
     UCalendar* cal;
 
     df = udat_open(UDAT_DEFAULT, UDAT_DEFAULT, NULL, NULL, -1, NULL, -1, &status);
-    if (!assertSuccessCheck("udat_open()", &status, TRUE)) {
+    if (!assertSuccessCheck("udat_open()", &status, true)) {
         return;
     }
 
@@ -1873,7 +1874,7 @@ static void TestFormatForFields(void) {
                 }
             }
 
-            udat_applyPattern(udfmt, FALSE, patNoFields, -1);
+            udat_applyPattern(udfmt, false, patNoFields, -1);
             status = U_ZERO_ERROR;
             ulen = udat_formatForFields(udfmt, date2015Feb25, ubuf, kUBufFieldsLen, fpositer, &status);
             if ( U_FAILURE(status) ) {
diff --git a/icu4c/source/test/cintltst/cdtdptst.c b/icu4c/source/test/cintltst/cdtdptst.c
index f9132bd03b2..5bc0c152a9c 100644
--- a/icu4c/source/test/cintltst/cdtdptst.c
+++ b/icu4c/source/test/cintltst/cdtdptst.c
@@ -20,6 +20,8 @@
 
 #if !UCONFIG_NO_FORMATTING
 
+#include 
+
 #include "unicode/uloc.h"
 #include "unicode/udat.h"
 #include "unicode/ucal.h"
@@ -169,7 +171,7 @@ void tryPat994(UDateFormat* format, const char* pattern, const char* s, UDate ex
     pat=(UChar*)malloc(sizeof(UChar) * (strlen(pattern) + 1) );
     u_uastrcpy(pat, pattern);
     log_verbose("Pattern : %s ;  String : %s\n", austrdup(pat), austrdup(str));
-    udat_applyPattern(format, FALSE, pat, u_strlen(pat));
+    udat_applyPattern(format, false, pat, u_strlen(pat));
     pos=0;
     date = udat_parse(format, str, u_strlen(str), &pos, &status);
     if(U_FAILURE(status) || date == null) {
@@ -248,11 +250,11 @@ void TestCzechMonths459()
         return;
     }
     lneed=0;
-    lneed=udat_toPattern(fmt, TRUE, NULL, lneed, &status);
+    lneed=udat_toPattern(fmt, true, NULL, lneed, &status);
     if(status==U_BUFFER_OVERFLOW_ERROR){
         status=U_ZERO_ERROR;
         pattern=(UChar*)malloc(sizeof(UChar) * (lneed+1) );
-        udat_toPattern(fmt, TRUE, pattern, lneed+1, &status);
+        udat_toPattern(fmt, true, pattern, lneed+1, &status);
     }
     if(U_FAILURE(status)){ log_err("Error in extracting the pattern\n"); }
     tzID=(UChar*)malloc(sizeof(UChar) * 4);
@@ -363,8 +365,8 @@ void TestBooleanAttributes(void)
 {
     UDateFormat *en;
     UErrorCode status=U_ZERO_ERROR;
-    UBool initialState = TRUE;
-    UBool switchedState = FALSE;
+    UBool initialState = true;
+    UBool switchedState = false;
         
     log_verbose("\ncreating a date format with english locale\n");
     en = udat_open(UDAT_FULL, UDAT_DEFAULT, "en_US", NULL, 0, NULL, 0, &status);
@@ -376,7 +378,7 @@ void TestBooleanAttributes(void)
     
     
     initialState = udat_getBooleanAttribute(en, UDAT_PARSE_ALLOW_NUMERIC, &status);
-    if(initialState != TRUE) switchedState = TRUE;  // if it wasn't the default of TRUE, then flip what we expect
+    if(initialState != true) switchedState = true;  // if it wasn't the default of true, then flip what we expect
 
     udat_setBooleanAttribute(en, UDAT_PARSE_ALLOW_NUMERIC, switchedState, &status);
     if(switchedState != udat_getBooleanAttribute(en, UDAT_PARSE_ALLOW_NUMERIC, &status)) {
diff --git a/icu4c/source/test/cintltst/cdtrgtst.c b/icu4c/source/test/cintltst/cdtrgtst.c
index 6713396b5db..dc45fa2902a 100644
--- a/icu4c/source/test/cintltst/cdtrgtst.c
+++ b/icu4c/source/test/cintltst/cdtrgtst.c
@@ -21,6 +21,8 @@
 
 #if !UCONFIG_NO_FORMATTING
 
+#include 
+
 #include "unicode/uloc.h"
 #include "unicode/udat.h"
 #include "unicode/ucal.h"
@@ -69,13 +71,13 @@ void Test4029195()
         return;
     }
     resultlength=0;
-    resultlengthneeded=udat_toPattern(df, TRUE, NULL, resultlength, &status);
+    resultlengthneeded=udat_toPattern(df, true, NULL, resultlength, &status);
     if(status==U_BUFFER_OVERFLOW_ERROR)
     {
         status=U_ZERO_ERROR;
         resultlength=resultlengthneeded + 1;
         pat=(UChar*)malloc(sizeof(UChar) * resultlength);
-        udat_toPattern(df, TRUE, pat, resultlength, &status);
+        udat_toPattern(df, true, pat, resultlength, &status);
     }
     
     log_verbose("pattern: %s\n", austrdup(pat));
@@ -91,7 +93,7 @@ void Test4029195()
     
     temp=(UChar*)malloc(sizeof(UChar) * 10);
     u_uastrcpy(temp, "M yyyy dd");
-    udat_applyPattern(df, TRUE, temp, u_strlen(temp));
+    udat_applyPattern(df, true, temp, u_strlen(temp));
     
     todayS =myFormatit(df, today);
     log_verbose("After the pattern is applied\n today: %s\n", austrdup(todayS) );
@@ -248,13 +250,13 @@ void aux917( UDateFormat *fmt, UChar* str)
     UDate d1=1000000000.0;
    
     resultlength=0;
-    resultlengthneeded=udat_toPattern(fmt, TRUE, NULL, resultlength, &status);
+    resultlengthneeded=udat_toPattern(fmt, true, NULL, resultlength, &status);
     if(status==U_BUFFER_OVERFLOW_ERROR)
     {
         status=U_ZERO_ERROR;
         resultlength=resultlengthneeded + 1;
         pat=(UChar*)malloc(sizeof(UChar) * (resultlength));
-        udat_toPattern(fmt, TRUE, pat, resultlength, &status);
+        udat_toPattern(fmt, true, pat, resultlength, &status);
     }
     if(U_FAILURE(status)){
         log_err("failure in retrieving the pattern: %s\n", myErrorName(status));
@@ -341,17 +343,17 @@ void Test4061287()
 
     pos=0;
     
-    udat_setLenient(df, FALSE);
+    udat_setLenient(df, false);
     ok=udat_isLenient(df);
-    if(ok==TRUE)
+    if(ok==true)
         log_err("setLenient nor working\n");
-    ok = FALSE;
+    ok = false;
     myDate = udat_parse(df, dateString, u_strlen(dateString), &pos, &status);
     (void)myDate;   /* Suppress set but not used warning. */
     if(U_FAILURE(status))
-        ok = TRUE;
-    if(ok!=TRUE) 
-        log_err("Fail: Lenient not working: does lenient parsing in spite of setting Lenient as FALSE ");
+        ok = true;
+    if(ok!=true) 
+        log_err("Fail: Lenient not working: does lenient parsing in spite of setting Lenient as false ");
 
     udat_close(df);
     
@@ -396,7 +398,7 @@ void Test4073003()
         return;
     }
     u_uastrcpy(temp, "m/D/yy");
-    udat_applyPattern(fmt, FALSE, temp, u_strlen(temp));
+    udat_applyPattern(fmt, false, temp, u_strlen(temp));
 
     for(i= 0; i < 4; i+=2) {
         status=U_ZERO_ERROR;
@@ -574,7 +576,7 @@ void Test_GEec(void)
             int32_t dmyGnTextLen;
             UDate   dateResult;
 
-            udat_applyPattern(dtfmt, FALSE, patTextPtr->pattern, -1);
+            udat_applyPattern(dtfmt, false, patTextPtr->pattern, -1);
             dmyGnTextLen = udat_format(dtfmt, july022008, dmyGnText, DATE_TEXT_MAX_CHARS, NULL, &status);
             (void)dmyGnTextLen;   /* Suppress set but not used warning. */ 
             if ( U_FAILURE(status) ) {
diff --git a/icu4c/source/test/cintltst/chashtst.c b/icu4c/source/test/cintltst/chashtst.c
index 405d56d4e5d..2ea34939b28 100644
--- a/icu4c/source/test/cintltst/chashtst.c
+++ b/icu4c/source/test/cintltst/chashtst.c
@@ -139,16 +139,16 @@ static void TestBasic(void) {
     // puti(key, value==0) removes the key's element.
     _put(hash, two, 0, 200);
 
-    if(_compareChars((void*)one, (void*)three) == TRUE ||
-        _compareChars((void*)one, (void*)one2) != TRUE ||
-        _compareChars((void*)one, (void*)one) != TRUE ||
-        _compareChars((void*)one, NULL) == TRUE  )  {
+    if(_compareChars((void*)one, (void*)three) == true ||
+        _compareChars((void*)one, (void*)one2) != true ||
+        _compareChars((void*)one, (void*)one) != true ||
+        _compareChars((void*)one, NULL) == true  )  {
         log_err("FAIL: compareChars failed\n");
     }
-    if(_compareIChars((void*)one, (void*)three) == TRUE ||
-        _compareIChars((void*)one, (void*)one) != TRUE ||
-        _compareIChars((void*)one, (void*)one2) != TRUE ||
-        _compareIChars((void*)one, NULL) == TRUE  )  {
+    if(_compareIChars((void*)one, (void*)three) == true ||
+        _compareIChars((void*)one, (void*)one) != true ||
+        _compareIChars((void*)one, (void*)one2) != true ||
+        _compareIChars((void*)one, NULL) == true  )  {
         log_err("FAIL: compareIChars failed\n");
     }
 
@@ -277,10 +277,10 @@ static void TestOtherAPI(void){
         log_err("FAIL: uhash_put() with value!=NULL didn't replace the key value pair\n");
     }
 
-    if(_compareUChars((void*)one, (void*)two) == TRUE ||
-        _compareUChars((void*)one, (void*)one) != TRUE ||
-        _compareUChars((void*)one, (void*)one2) != TRUE ||
-        _compareUChars((void*)one, NULL) == TRUE  )  {
+    if(_compareUChars((void*)one, (void*)two) == true ||
+        _compareUChars((void*)one, (void*)one) != true ||
+        _compareUChars((void*)one, (void*)one2) != true ||
+        _compareUChars((void*)one, NULL) == true  )  {
         log_err("FAIL: compareUChars failed\n");
     }
    
@@ -294,9 +294,9 @@ static void TestOtherAPI(void){
     uhash_iputi(hash, 1001, 1, &status);
     uhash_iputi(hash, 1002, 2, &status);
     uhash_iputi(hash, 1003, 3, &status);
-    if(_compareLong(1001, 1002) == TRUE ||
-        _compareLong(1001, 1001) != TRUE ||
-        _compareLong(1001, 0) == TRUE  )  {
+    if(_compareLong(1001, 1002) == true ||
+        _compareLong(1001, 1001) != true ||
+        _compareLong(1001, 0) == true  )  {
         log_err("FAIL: compareLong failed\n");
     }
     /*set the resize policy to just GROW and SHRINK*/
diff --git a/icu4c/source/test/cintltst/cintltst.c b/icu4c/source/test/cintltst/cintltst.c
index a3772defe79..86e3b000a8d 100644
--- a/icu4c/source/test/cintltst/cintltst.c
+++ b/icu4c/source/test/cintltst/cintltst.c
@@ -17,8 +17,9 @@
 
 /*The main root for C API tests*/
 
-#include 
+#include 
 #include 
+#include 
 #include 
 #include "unicode/utypes.h"
 #include "unicode/putil.h"
@@ -46,7 +47,7 @@
 /* Array used as a queue */
 static void * ctst_allocated_stuff[CTST_MAX_ALLOC] = {0};
 static int ctst_allocated = 0;
-static UBool ctst_free = FALSE;
+static UBool ctst_free = false;
 static int ctst_allocated_total = 0;
 
 #define CTST_LEAK_CHECK 1
@@ -112,12 +113,12 @@ int main(int argc, const char* const argv[])
      *  Whether or not this test succeeds, we want to cleanup and reinitialize
      *  with a data path so that data loading from individual files can be tested.
      */
-    defaultDataFound = TRUE;
+    defaultDataFound = true;
     u_init(&errorCode);
     if (U_FAILURE(errorCode)) {
         fprintf(stderr,
             "#### Note:  ICU Init without build-specific setDataDirectory() failed. %s\n", u_errorName(errorCode));
-        defaultDataFound = FALSE;
+        defaultDataFound = false;
     }
     u_cleanup();
 #ifdef URES_DEBUG
@@ -467,16 +468,16 @@ UBool ctest_resetICU() {
     u_cleanup();
     if (!initArgs(gOrigArgc, gOrigArgv, NULL, NULL)) {
         /* Error already displayed. */
-        return FALSE;
+        return false;
     }
     u_setDataDirectory(dataDir);
     free(dataDir);
     u_init(&status);
     if (U_FAILURE(status)) {
         log_err_status(status, "u_init failed with %s\n", u_errorName(status));
-        return FALSE;
+        return false;
     }
-    return TRUE;
+    return true;
 }
 
 UChar* CharsToUChars(const char* str) {
@@ -527,7 +528,7 @@ char *aescstrdup(const UChar* unichars,int32_t length){
     target = newString;
     targetLimit = newString+sizeof(char) * 8 * (length +1);
     ucnv_setFromUCallBack(conv, UCNV_FROM_U_CALLBACK_ESCAPE, UCNV_ESCAPE_C, &cb, &p, &errorCode);
-    ucnv_fromUnicode(conv,&target,targetLimit, &unichars, (UChar*)(unichars+length),NULL,TRUE,&errorCode);
+    ucnv_fromUnicode(conv,&target,targetLimit, &unichars, (UChar*)(unichars+length),NULL,true,&errorCode);
     ucnv_close(conv);
     *target = '\0';
     return newString;
@@ -662,7 +663,7 @@ void *ctst_malloc(size_t size) {
   ctst_allocated_total++;
     if(ctst_allocated >= CTST_MAX_ALLOC - 1) {
         ctst_allocated = 0;
-        ctst_free = TRUE;
+        ctst_free = true;
     }
     if(ctst_allocated_stuff[ctst_allocated]) {
         free(ctst_allocated_stuff[ctst_allocated]);
@@ -673,7 +674,7 @@ void *ctst_malloc(size_t size) {
 #ifdef CTST_LEAK_CHECK
 static void ctst_freeAll() {
     int i;
-    if(ctst_free == FALSE) { /* only free up to the allocated mark */
+    if(ctst_free == false) { /* only free up to the allocated mark */
         for(i=0; i
 #include 
 
 extern uint8_t ucol_uprv_getCaseBits(const UChar *, uint32_t, UErrorCode *);
@@ -783,7 +784,7 @@ static void TestMaxExpansion()
     UChar32             unassigned = 0xEFFFD;
     UChar               supplementary[2];
     uint32_t            stringOffset = 0;
-    UBool               isError = FALSE;
+    UBool               isError = false;
     uint32_t            sorder = 0;
     UCollationElements *iter   ;/*= ucol_openElements(coll, &ch, 1, &status);*/
     uint32_t            temporder = 0;
diff --git a/icu4c/source/test/cintltst/cldrtest.c b/icu4c/source/test/cintltst/cldrtest.c
index 54efd360cb0..9bd36e208bd 100644
--- a/icu4c/source/test/cintltst/cldrtest.c
+++ b/icu4c/source/test/cintltst/cldrtest.c
@@ -6,6 +6,8 @@
  * others. All Rights Reserved.
  ********************************************************************/
 
+#include 
+
 #include "cintltst.h"
 #include "unicode/ures.h"
 #include "unicode/ucurr.h"
@@ -68,9 +70,9 @@ isCurrencyPreEuro(const char* currencyKey){
         strcmp(currencyKey, "BEF") == 0 ||
         strcmp(currencyKey, "ITL") == 0 ||
         strcmp(currencyKey, "EEK") == 0){
-            return TRUE;
+            return true;
     }
-    return FALSE;
+    return false;
 }
 #if !UCONFIG_NO_FILE_IO && !UCONFIG_NO_LEGACY_CONVERSION
 static void
@@ -121,7 +123,7 @@ TestKeyInRootRecursive(UResourceBundle *root, const char *rootName,
             int32_t minSize;
             int32_t subBundleSize;
             int32_t idx;
-            UBool sameArray = TRUE;
+            UBool sameArray = true;
             const int32_t *subRootBundleArr = ures_getIntVector(subRootBundle, &minSize, &errorCode);
             const int32_t *subBundleArr = ures_getIntVector(subBundle, &subBundleSize, &errorCode);
 
@@ -135,7 +137,7 @@ TestKeyInRootRecursive(UResourceBundle *root, const char *rootName,
 
             for (idx = 0; idx < minSize && sameArray; idx++) {
                 if (subRootBundleArr[idx] != subBundleArr[idx]) {
-                    sameArray = FALSE;
+                    sameArray = false;
                 }
                 if (strcmp(subBundleKey, "DateTimeElements") == 0
                     && (subBundleArr[idx] < 1 || 7 < subBundleArr[idx]))
@@ -170,7 +172,7 @@ TestKeyInRootRecursive(UResourceBundle *root, const char *rootName,
             else {
                 int32_t minSize = ures_getSize(subRootBundle);
                 int32_t idx;
-                UBool sameArray = TRUE;
+                UBool sameArray = true;
 
                 if (minSize > ures_getSize(subBundle)) {
                     minSize = ures_getSize(subBundle);
@@ -203,7 +205,7 @@ TestKeyInRootRecursive(UResourceBundle *root, const char *rootName,
                     const UChar *localeStr = ures_getStringByIndex(subBundle,idx,&localeStrLen,&errorCode);
                     if (rootStr && localeStr && U_SUCCESS(errorCode)) {
                         if (u_strcmp(rootStr, localeStr) != 0) {
-                            sameArray = FALSE;
+                            sameArray = false;
                         }
                     }
                     else {
@@ -824,7 +826,7 @@ findSetMatch( UScriptCode *scriptCodes, int32_t scriptsLen,
         uset_add(scripts[0], 0x2bc);
     }
     if(U_SUCCESS(status)){
-        UBool existsInScript = FALSE;
+        UBool existsInScript = false;
         /* iterate over the exemplarSet and ascertain if all
          * UChars in exemplarSet belong to the scripts returned
          * by getScript
@@ -843,15 +845,15 @@ findSetMatch( UScriptCode *scriptCodes, int32_t scriptsLen,
                 if(strCapacity == 0){
                     /* ok the item is a range */
                      for( j = 0; j < scriptsLen; j++){
-                        if(uset_containsRange(scripts[j], start, end) == TRUE){
-                            existsInScript = TRUE;
+                        if(uset_containsRange(scripts[j], start, end) == true){
+                            existsInScript = true;
                         }
                     }
-                    if(existsInScript == FALSE){
+                    if(existsInScript == false){
                         for( j = 0; j < scriptsLen; j++){
                             UChar toPattern[500]={'\0'};
                             char pat[500]={'\0'};
-                            int32_t len = uset_toPattern(scripts[j], toPattern, 500, TRUE, &status);
+                            int32_t len = uset_toPattern(scripts[j], toPattern, 500, true, &status);
                             len = myUCharsToChars(toPattern, pat, len);
                             log_err("uset_indexOf(\\u%04X)=%i uset_indexOf(\\u%04X)=%i\n", start, uset_indexOf(scripts[0], start), end, uset_indexOf(scripts[0], end));
                             if(len!=-1){
@@ -869,11 +871,11 @@ findSetMatch( UScriptCode *scriptCodes, int32_t scriptsLen,
                      * in the script set
                      */
                     for( j = 0; j < scriptsLen; j++){
-                        if(uset_containsString(scripts[j],str, strCapacity) == TRUE){
-                            existsInScript = TRUE;
+                        if(uset_containsString(scripts[j],str, strCapacity) == true){
+                            existsInScript = true;
                         }
                     }
-                    if(existsInScript == FALSE){
+                    if(existsInScript == false){
                         log_err("ExemplarCharacters and LocaleScript containment test failed for locale %s. \n", locale);
                     }
                 }
@@ -971,7 +973,7 @@ static void VerifyTranslation(void) {
                 log_err("error uloc_getDisplayLanguage returned %s\n", u_errorName(errorCode));
             }
             else {
-                strIdx = findStringSetMismatch(currLoc, langBuffer, langSize, mergedExemplarSet, FALSE, &badChar);
+                strIdx = findStringSetMismatch(currLoc, langBuffer, langSize, mergedExemplarSet, false, &badChar);
                 if (strIdx >= 0) {
                     log_err("getDisplayLanguage(%s) at index %d returned characters not in the exemplar characters: %04X.\n",
                         currLoc, strIdx, badChar);
@@ -1017,7 +1019,7 @@ static void VerifyTranslation(void) {
                         log_err("error ures_getStringByIndex(%d) returned %s\n", idx, u_errorName(errorCode));
                         continue;
                     }
-                    strIdx = findStringSetMismatch(currLoc, fromBundleStr, langSize, mergedExemplarSet, TRUE, &badChar);
+                    strIdx = findStringSetMismatch(currLoc, fromBundleStr, langSize, mergedExemplarSet, true, &badChar);
                     if ( strIdx >= 0 ) { 
                         log_err("getDayNames(%s, %d) at index %d returned characters not in the exemplar characters: %04X.\n",
                             currLoc, idx, strIdx, badChar);
@@ -1054,7 +1056,7 @@ static void VerifyTranslation(void) {
                         log_err("error ures_getStringByIndex(%d) returned %s\n", idx, u_errorName(errorCode));
                         continue;
                     }
-                    strIdx = findStringSetMismatch(currLoc, fromBundleStr, langSize, mergedExemplarSet, TRUE, &badChar);
+                    strIdx = findStringSetMismatch(currLoc, fromBundleStr, langSize, mergedExemplarSet, true, &badChar);
                     if (strIdx >= 0) {
                         log_err("getMonthNames(%s, %d) at index %d returned characters not in the exemplar characters: %04X.\n",
                             currLoc, idx, strIdx, badChar);
@@ -1226,7 +1228,7 @@ static void TestExemplarSet(void){
             }
             if (!assertSuccess("uset_openPattern", &ec)) goto END;
 
-            existsInScript = FALSE;
+            existsInScript = false;
             itemCount = uset_getItemCount(exemplarSet);
             for (m=0; m1970-01-01.\n", lastCode);
     }
 
-    if (ucurr_isAvailable(isoCode, date1975, U_DATE_MAX, &errorCode) == FALSE) {
+    if (ucurr_isAvailable(isoCode, date1975, U_DATE_MAX, &errorCode) == false) {
        log_data_err("FAIL: ISO code (%s) was available in time range >1975.\n", lastCode);
     }
 
-    if (ucurr_isAvailable(isoCode, date1981, U_DATE_MAX, &errorCode) == TRUE) {
+    if (ucurr_isAvailable(isoCode, date1981, U_DATE_MAX, &errorCode) == true) {
        log_err("FAIL: ISO code (%s) was not available in time range >1981.\n", lastCode);
     }
 
     /* from = null */
-    if (ucurr_isAvailable(isoCode, U_DATE_MIN, date1970, &errorCode) == TRUE) {
+    if (ucurr_isAvailable(isoCode, U_DATE_MIN, date1970, &errorCode) == true) {
        log_err("FAIL: ISO code (%s) was not available in time range <1970.\n", lastCode);
     }
 
-    if (ucurr_isAvailable(isoCode, U_DATE_MIN, date1975, &errorCode) == FALSE) {
+    if (ucurr_isAvailable(isoCode, U_DATE_MIN, date1975, &errorCode) == false) {
        log_data_err("FAIL: ISO code (%s) was available in time range <1975.\n", lastCode);
     }
 
-    if (ucurr_isAvailable(isoCode, U_DATE_MIN, date1981, &errorCode) == FALSE) {
+    if (ucurr_isAvailable(isoCode, U_DATE_MIN, date1981, &errorCode) == false) {
        log_data_err("FAIL: ISO code (%s) was available in time range <1981.\n", lastCode);
     }
 
     /* full ranges */
-    if (ucurr_isAvailable(isoCode, date1975, date1978, &errorCode) == FALSE) {
+    if (ucurr_isAvailable(isoCode, date1975, date1978, &errorCode) == false) {
        log_data_err("FAIL: ISO code (%s) was available in time range 1975-1978.\n", lastCode);
     }
 
-    if (ucurr_isAvailable(isoCode, date1970, date1975, &errorCode) == FALSE) {
+    if (ucurr_isAvailable(isoCode, date1970, date1975, &errorCode) == false) {
        log_data_err("FAIL: ISO code (%s) was available in time range 1970-1975.\n", lastCode);
     }
 
-    if (ucurr_isAvailable(isoCode, date1975, date1981, &errorCode) == FALSE) {
+    if (ucurr_isAvailable(isoCode, date1975, date1981, &errorCode) == false) {
        log_data_err("FAIL: ISO code (%s) was available in time range 1975-1981.\n", lastCode);
     }
 
-    if (ucurr_isAvailable(isoCode, date1970,  date1981, &errorCode) == FALSE) {
+    if (ucurr_isAvailable(isoCode, date1970,  date1981, &errorCode) == false) {
        log_data_err("FAIL: ISO code (%s) was available in time range 1970-1981.\n", lastCode);
     }
 
-    if (ucurr_isAvailable(isoCode, date1981,  date1992, &errorCode) == TRUE) {
+    if (ucurr_isAvailable(isoCode, date1981,  date1992, &errorCode) == true) {
        log_err("FAIL: ISO code (%s) was not available in time range 1981-1992.\n", lastCode);
     }
 
-    if (ucurr_isAvailable(isoCode, date1950,  date1970, &errorCode) == TRUE) {
+    if (ucurr_isAvailable(isoCode, date1950,  date1970, &errorCode) == true) {
        log_err("FAIL: ISO code (%s) was not available in time range 1950-1970.\n", lastCode);
     }
 
     /* wrong range - from > to*/
-    if (ucurr_isAvailable(isoCode, date1975,  date1970, &errorCode) == TRUE) {
+    if (ucurr_isAvailable(isoCode, date1975,  date1970, &errorCode) == true) {
        log_err("FAIL: Wrong range 1975-1970 for ISO code (%s) was not reported.\n", lastCode);
     } else if (errorCode != U_ILLEGAL_ARGUMENT_ERROR) {
        log_data_err("FAIL: Error code not reported for wrong range 1975-1970 for ISO code (%s).\n", lastCode);
diff --git a/icu4c/source/test/cintltst/cloctst.c b/icu4c/source/test/cintltst/cloctst.c
index a9d1baaf703..e4f333cdb1a 100644
--- a/icu4c/source/test/cintltst/cloctst.c
+++ b/icu4c/source/test/cintltst/cloctst.c
@@ -15,8 +15,9 @@
 ******************************************************************************
 */
 #include "cloctst.h"
-#include 
+#include 
 #include 
+#include 
 #include 
 #include "cintltst.h"
 #include "cmemory.h"
@@ -911,15 +912,15 @@ static void TestGetAvailableLocalesByType() {
     uenum_close(uenum);
 
     uenum = uloc_openAvailableByType(ULOC_AVAILABLE_ONLY_LEGACY_ALIASES, &status);
-    UBool found_he = FALSE;
-    UBool found_iw = FALSE;
+    UBool found_he = false;
+    UBool found_iw = false;
     const char* loc;
     while ((loc = uenum_next(uenum, NULL, &status))) {
         if (uprv_strcmp("he", loc) == 0) {
-            found_he = TRUE;
+            found_he = true;
         }
         if (uprv_strcmp("iw", loc) == 0) {
-            found_iw = TRUE;
+            found_iw = true;
         }
     }
     assertTrue("Should NOT have found he amongst the legacy/alias locales", !found_he);
@@ -927,16 +928,16 @@ static void TestGetAvailableLocalesByType() {
     uenum_close(uenum);
 
     uenum = uloc_openAvailableByType(ULOC_AVAILABLE_WITH_LEGACY_ALIASES, &status);
-    found_he = FALSE;
-    found_iw = FALSE;
+    found_he = false;
+    found_iw = false;
     const UChar* uloc; // test the UChar conversion
     int32_t count = 0;
     while ((uloc = uenum_unext(uenum, NULL, &status))) {
         if (u_strcmp(u"iw", uloc) == 0) {
-            found_iw = TRUE;
+            found_iw = true;
         }
         if (u_strcmp(u"he", uloc) == 0) {
-            found_he = TRUE;
+            found_he = true;
         }
         count++;
     }
@@ -3240,9 +3241,9 @@ static UBool isLocaleAvailable(UResourceBundle* resIndex, const char* loc){
     int32_t len = 0;
     ures_getStringByKey(resIndex, loc,&len, &status);
     if(U_FAILURE(status)){
-        return FALSE; 
+        return false; 
     }
-    return TRUE;
+    return true;
 }
 
 static void TestCalendar() {
@@ -6248,7 +6249,7 @@ static void TestToLanguageTag(void) {
         langtag[0] = 0;
         expected = locale_to_langtag[i][1];
 
-        len = uloc_toLanguageTag(inloc, langtag, sizeof(langtag), FALSE, &status);
+        len = uloc_toLanguageTag(inloc, langtag, sizeof(langtag), false, &status);
         (void)len;    /* Suppress set but not used warning. */
         if (U_FAILURE(status)) {
             if (expected != NULL) {
@@ -6270,7 +6271,7 @@ static void TestToLanguageTag(void) {
         langtag[0] = 0;
         expected = locale_to_langtag[i][2];
 
-        len = uloc_toLanguageTag(inloc, langtag, sizeof(langtag), TRUE, &status);
+        len = uloc_toLanguageTag(inloc, langtag, sizeof(langtag), true, &status);
         if (U_FAILURE(status)) {
             if (expected != NULL) {
                 log_data_err("Error returned by uloc_toLanguageTag {strict} for locale id [%s] - error: %s Are you missing data?\n",
@@ -6302,7 +6303,7 @@ static void TestBug20132(void) {
      * instead require several iterations before getting the correct size. */
 
     status = U_ZERO_ERROR;
-    len = uloc_toLanguageTag(inloc, langtag, 1, FALSE, &status);
+    len = uloc_toLanguageTag(inloc, langtag, 1, false, &status);
 
     if (U_FAILURE(status) && status != U_BUFFER_OVERFLOW_ERROR) {
         log_data_err("Error returned by uloc_toLanguageTag for locale id [%s] - error: %s Are you missing data?\n",
@@ -6314,7 +6315,7 @@ static void TestBug20132(void) {
     }
 
     status = U_ZERO_ERROR;
-    len = uloc_toLanguageTag(inloc, langtag, expected_len, FALSE, &status);
+    len = uloc_toLanguageTag(inloc, langtag, expected_len, false, &status);
 
     if (U_FAILURE(status)) {
         log_data_err("Error returned by uloc_toLanguageTag for locale id [%s] - error: %s Are you missing data?\n",
@@ -6481,7 +6482,7 @@ static void TestLangAndRegionCanonicalize(void) {
         status = U_ZERO_ERROR;
         const char* input = langtag_to_canonical[i].input;
         uloc_forLanguageTag(input, locale, sizeof(locale), NULL, &status);
-        uloc_toLanguageTag(locale, canonical, sizeof(canonical), TRUE, &status);
+        uloc_toLanguageTag(locale, canonical, sizeof(canonical), true, &status);
         if (U_FAILURE(status)) {
             log_err_status(status, "Error returned by uloc_forLanguageTag or uloc_toLanguageTag "
                            "for language tag [%s] - error: %s\n", input, u_errorName(status));
diff --git a/icu4c/source/test/cintltst/cmsccoll.c b/icu4c/source/test/cintltst/cmsccoll.c
index 206daa20a3d..90ef7506ce1 100644
--- a/icu4c/source/test/cintltst/cmsccoll.c
+++ b/icu4c/source/test/cintltst/cmsccoll.c
@@ -15,6 +15,7 @@
  * to fit.
  */
 
+#include 
 #include 
 
 #include "unicode/utypes.h"
@@ -3222,16 +3223,16 @@ ucol_getFunctionalEquivalent(char* result, int32_t resultCapacity,
                                      &isAvailable, &ec);
     if (assertSuccess("getFunctionalEquivalent", &ec)) {
         assertEquals("getFunctionalEquivalent(de)", "root", loc);
-        assertTrue("getFunctionalEquivalent(de).isAvailable==TRUE",
-                   isAvailable == TRUE);
+        assertTrue("getFunctionalEquivalent(de).isAvailable==true",
+                   isAvailable == true);
     }
 
     n = ucol_getFunctionalEquivalent(loc, sizeof(loc), "collation", "de_DE",
                                      &isAvailable, &ec);
     if (assertSuccess("getFunctionalEquivalent", &ec)) {
         assertEquals("getFunctionalEquivalent(de_DE)", "root", loc);
-        assertTrue("getFunctionalEquivalent(de_DE).isAvailable==FALSE",
-                   isAvailable == FALSE);
+        assertTrue("getFunctionalEquivalent(de_DE).isAvailable==false",
+                   isAvailable == false);
     }
 }
 
@@ -4032,7 +4033,7 @@ TestSortKeyConsistency(void)
     uint8_t bufPart[TSKC_DATA_SIZE][TSKC_BUF_SIZE];
     int32_t i, j, i2;
 
-    ucol = ucol_openFromShortString("LEN_S4", FALSE, NULL, &icuRC);
+    ucol = ucol_openFromShortString("LEN_S4", false, NULL, &icuRC);
     if (U_FAILURE(icuRC))
     {
         log_err_status(icuRC, "ucol_openFromShortString failed -> %s\n", u_errorName(icuRC));
@@ -4062,8 +4063,8 @@ TestSortKeyConsistency(void)
 
         for (i2=0; i2 %s\n", u_errorName(status));
         return;
@@ -4142,7 +4143,7 @@ static void TestHiragana(void) {
     int32_t keySize1;
     int32_t keySize2;
 
-    ucol = ucol_openFromShortString("LJA_AN_CX_EX_FX_HO_NX_S4", FALSE, NULL,
+    ucol = ucol_openFromShortString("LJA_AN_CX_EX_FX_HO_NX_S4", false, NULL,
             &status);
     if (U_FAILURE(status)) {
         log_err_status(status, "Error status: %s; Unable to open collator from short string.\n", u_errorName(status));
@@ -4944,9 +4945,9 @@ static void TestReorderingAPIWithRuleCreatedCollator(void)
 static UBool containsExpectedScript(const int32_t scripts[], int32_t length, int32_t expectedScript) {
     int32_t i;
     for (i = 0; i < length; ++i) {
-        if (expectedScript == scripts[i]) { return TRUE; }
+        if (expectedScript == scripts[i]) { return true; }
     }
-    return FALSE;
+    return false;
 }
 
 static void TestEquivalentReorderingScripts(void) {
diff --git a/icu4c/source/test/cintltst/cmsgtst.c b/icu4c/source/test/cintltst/cmsgtst.c
index ff33fbfdb33..cb32870783f 100644
--- a/icu4c/source/test/cintltst/cmsgtst.c
+++ b/icu4c/source/test/cintltst/cmsgtst.c
@@ -18,9 +18,10 @@
 
 #if !UCONFIG_NO_FORMATTING
 
+#include 
+#include 
 #include 
 #include 
-#include 
 #include "unicode/uloc.h"
 #include "unicode/umsg.h"
 #include "unicode/udat.h"
@@ -52,7 +53,7 @@ static UChar* testCasePatterns[5];
 
 static UChar* testResultStrings[5];
 
-static UBool strings_initialized = FALSE;
+static UBool strings_initialized = false;
 
 /* function used to create the test patterns for testing Message formatting */
 static void InitStrings( void )
@@ -72,7 +73,7 @@ static void InitStrings( void )
         u_unescape(txt_testResultStrings[i], testResultStrings[i], strSize);
     }
 
-    strings_initialized = TRUE;
+    strings_initialized = true;
 }
 
 static void FreeStrings( void )
@@ -87,7 +88,7 @@ static void FreeStrings( void )
     for (i=0; i < cnt_testCases; i++ ) {
         free(testResultStrings[i]);
     }
-    strings_initialized = FALSE;
+    strings_initialized = false;
 }
 
 #if (U_PLATFORM == U_PF_LINUX) /* add platforms here .. */
diff --git a/icu4c/source/test/cintltst/cnmdptst.c b/icu4c/source/test/cintltst/cnmdptst.c
index 9e9b42ac5fd..98504e0220f 100644
--- a/icu4c/source/test/cintltst/cnmdptst.c
+++ b/icu4c/source/test/cintltst/cnmdptst.c
@@ -23,6 +23,8 @@
 
 #if !UCONFIG_NO_FORMATTING
 
+#include 
+
 #include "unicode/ucurr.h"
 #include "unicode/uloc.h"
 #include "unicode/unum.h"
@@ -82,11 +84,11 @@ static void TestPatterns(void)
             continue;
         }
         lneed=0;
-        lneed=unum_toPattern(fmt, FALSE, NULL, lneed, &status);
+        lneed=unum_toPattern(fmt, false, NULL, lneed, &status);
         if(status==U_BUFFER_OVERFLOW_ERROR){
             status= U_ZERO_ERROR;
             unewp=(UChar*)malloc(sizeof(UChar) * (lneed+1) );
-            unum_toPattern(fmt, FALSE, unewp, lneed+1, &status);
+            unum_toPattern(fmt, false, unewp, lneed+1, &status);
         }
         if(U_FAILURE(status)){
             log_err("FAIL: Number format extracting the pattern failed for %s\n", pat[i]);
@@ -261,7 +263,7 @@ static void TestExponential(void)
             continue;
         }
         lneed= u_strlen(upat) + 1;
-        unum_toPattern(fmt, FALSE, pattern, lneed, &status);
+        unum_toPattern(fmt, false, pattern, lneed, &status);
         log_verbose("Pattern \" %s \" -toPattern-> \" %s \" \n", upat, u_austrcpy(tempMsgBug, pattern) );
         for (v=0; v %s\n", u_austrcpy(tempBuf, str) );
@@ -647,10 +649,10 @@ static void TestSecondaryGrouping(void) {
     UFieldPosition pos;
     UChar resultBuffer[512];
     int32_t l = 1876543210L;
-    UBool ok = TRUE;
+    UBool ok = true;
     UChar buffer[512];
     int32_t i;
-    UBool expectGroup = FALSE, isGroup = FALSE;
+    UBool expectGroup = false, isGroup = false;
 
     u_uastrcpy(buffer, "#,##,###");
     f = unum_open(UNUM_IGNORE,buffer, -1, "en_US",NULL, &status);
@@ -670,7 +672,7 @@ static void TestSecondaryGrouping(void) {
         log_err("Fail: Formatting \"#,##,###\" pattern pos = (%d, %d) expected pos = (0, 12)\n", pos.beginIndex, pos.endIndex);
     }
     memset(resultBuffer,0, sizeof(UChar)*512);
-    unum_toPattern(f, FALSE, resultBuffer, 512, &status);
+    unum_toPattern(f, false, resultBuffer, 512, &status);
     u_uastrcpy(buffer, "#,##,##0");
     if ((u_strcmp(resultBuffer, buffer) != 0) || U_FAILURE(status))
     {
@@ -678,7 +680,7 @@ static void TestSecondaryGrouping(void) {
     }
     memset(resultBuffer,0, sizeof(UChar)*512);
     u_uastrcpy(buffer, "#,###");
-    unum_applyPattern(f, FALSE, buffer, -1,NULL,NULL);
+    unum_applyPattern(f, false, buffer, -1,NULL,NULL);
     if (U_FAILURE(status))
     {
         log_err("Fail: applyPattern call failed\n");
@@ -691,7 +693,7 @@ static void TestSecondaryGrouping(void) {
         log_err("Fail: Formatting \"#,###\" pattern with 123456789 got %s, expected %s\n", austrdup(resultBuffer), "12,3456,789");
     }
     memset(resultBuffer,0, sizeof(UChar)*512);
-    unum_toPattern(f, FALSE, resultBuffer, 512, &status);
+    unum_toPattern(f, false, resultBuffer, 512, &status);
     u_uastrcpy(buffer, "#,####,##0");
     if ((u_strcmp(resultBuffer, buffer) != 0) || U_FAILURE(status))
     {
@@ -709,23 +711,23 @@ static void TestSecondaryGrouping(void) {
     /* expect "1,87,65,43,210", but with Hindi digits */
     /*         01234567890123                         */
     if (u_strlen(resultBuffer) != 14) {
-        ok = FALSE;
+        ok = false;
     } else {
         for (i=0; i %s\n", u_errorName(status));
         return;
@@ -858,24 +860,24 @@ static void TestGetKeywordValuesForLocale(void) {
         pref = NULL;
         all = NULL;
         loc = PREFERRED[i][0];
-        pref = ucurr_getKeywordValuesForLocale("currency", loc, TRUE, &status);
-        matchPref = FALSE;
-        matchAll = FALSE;
+        pref = ucurr_getKeywordValuesForLocale("currency", loc, true, &status);
+        matchPref = false;
+        matchAll = false;
         
         size = uenum_count(pref, &status);
         
         if (size == EXPECTED_SIZE[i]) {
-            matchPref = TRUE;
+            matchPref = true;
             for (j = 0; j < size; j++) {
                 if ((value = uenum_next(pref, &valueLength, &status)) != NULL && U_SUCCESS(status)) {
                     if (uprv_strcmp(value, PREFERRED[i][j+1]) != 0) {
                         log_err("ERROR: locale %s got keywords #%d %s expected %s\n", loc, j, value, PREFERRED[i][j+1]);
 
-                        matchPref = FALSE;
+                        matchPref = false;
                         break;
                     }
                 } else {
-                    matchPref = FALSE;
+                    matchPref = false;
                     log_err("ERROR getting keyword value for locale \"%s\"\n", loc);
                     break;
                 }
@@ -890,22 +892,22 @@ static void TestGetKeywordValuesForLocale(void) {
         }
         uenum_close(pref);
         
-        all = ucurr_getKeywordValuesForLocale("currency", loc, FALSE, &status);
+        all = ucurr_getKeywordValuesForLocale("currency", loc, false, &status);
         
         size = uenum_count(all, &status);
         
         if (U_SUCCESS(status) && size == uenum_count(ALL, &status)) {
-            matchAll = TRUE;
+            matchAll = true;
             ALLList = ulist_getListFromEnum(ALL);
             for (j = 0; j < size; j++) {
                 if ((value = uenum_next(all, &valueLength, &status)) != NULL && U_SUCCESS(status)) {
                     if (!ulist_containsString(ALLList, value, (int32_t)uprv_strlen(value))) {
                         log_err("Locale %s have %s not in ALL\n", loc, value);
-                        matchAll = FALSE;
+                        matchAll = false;
                         break;
                     }
                 } else {
-                    matchAll = FALSE;
+                    matchAll = false;
                     log_err("ERROR getting \"all\" keyword value for locale \"%s\"\n", loc);
                     break;
                 }
diff --git a/icu4c/source/test/cintltst/cnormtst.c b/icu4c/source/test/cintltst/cnormtst.c
index c7830073b23..7d9fea6ae81 100644
--- a/icu4c/source/test/cintltst/cnormtst.c
+++ b/icu4c/source/test/cintltst/cnormtst.c
@@ -24,6 +24,7 @@
 
 #if !UCONFIG_NO_NORMALIZATION
 
+#include 
 #include 
 #include 
 #include "unicode/uchar.h"
@@ -1082,7 +1083,7 @@ _testIter(const UChar *src, int32_t srcLength,
             } else {
                 expect=in;
                 expectLength=inLength;
-                expectNeeded=FALSE;
+                expectNeeded=false;
             }
         } else {
             if(!iter->hasPrevious(iter)) {
@@ -1108,7 +1109,7 @@ _testIter(const UChar *src, int32_t srcLength,
             } else {
                 expect=in;
                 expectLength=inLength;
-                expectNeeded=FALSE;
+                expectNeeded=false;
             }
         }
         index=iter->getIndex(iter, UITER_CURRENT);
@@ -1198,56 +1199,56 @@ TestNextPrevious() {
 
     /* test iteration with doNormalize */
     iter.index=0;
-    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_NFD, TRUE, nfd, UPRV_LENGTHOF(nfd), nfdIndexes, sizeof(nfdIndexes)/4);
+    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_NFD, true, nfd, UPRV_LENGTHOF(nfd), nfdIndexes, sizeof(nfdIndexes)/4);
     iter.index=0;
-    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_NFKD, TRUE, nfkd, UPRV_LENGTHOF(nfkd), nfkdIndexes, sizeof(nfkdIndexes)/4);
+    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_NFKD, true, nfkd, UPRV_LENGTHOF(nfkd), nfkdIndexes, sizeof(nfkdIndexes)/4);
     iter.index=0;
-    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_NFC, TRUE, nfc, UPRV_LENGTHOF(nfc), nfcIndexes, sizeof(nfcIndexes)/4);
+    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_NFC, true, nfc, UPRV_LENGTHOF(nfc), nfcIndexes, sizeof(nfcIndexes)/4);
     iter.index=0;
-    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_NFKC, TRUE, nfkc, UPRV_LENGTHOF(nfkc), nfkcIndexes, sizeof(nfkcIndexes)/4);
+    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_NFKC, true, nfkc, UPRV_LENGTHOF(nfkc), nfkcIndexes, sizeof(nfkcIndexes)/4);
     iter.index=0;
-    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_FCD, TRUE, fcd, UPRV_LENGTHOF(fcd), fcdIndexes, sizeof(fcdIndexes)/4);
+    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_FCD, true, fcd, UPRV_LENGTHOF(fcd), fcdIndexes, sizeof(fcdIndexes)/4);
 
     iter.index=iter.length;
-    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_NFD, FALSE, nfd, UPRV_LENGTHOF(nfd), nfdIndexes, sizeof(nfdIndexes)/4);
+    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_NFD, false, nfd, UPRV_LENGTHOF(nfd), nfdIndexes, sizeof(nfdIndexes)/4);
     iter.index=iter.length;
-    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_NFKD, FALSE, nfkd, UPRV_LENGTHOF(nfkd), nfkdIndexes, sizeof(nfkdIndexes)/4);
+    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_NFKD, false, nfkd, UPRV_LENGTHOF(nfkd), nfkdIndexes, sizeof(nfkdIndexes)/4);
     iter.index=iter.length;
-    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_NFC, FALSE, nfc, UPRV_LENGTHOF(nfc), nfcIndexes, sizeof(nfcIndexes)/4);
+    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_NFC, false, nfc, UPRV_LENGTHOF(nfc), nfcIndexes, sizeof(nfcIndexes)/4);
     iter.index=iter.length;
-    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_NFKC, FALSE, nfkc, UPRV_LENGTHOF(nfkc), nfkcIndexes, sizeof(nfkcIndexes)/4);
+    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_NFKC, false, nfkc, UPRV_LENGTHOF(nfkc), nfkcIndexes, sizeof(nfkcIndexes)/4);
     iter.index=iter.length;
-    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_FCD, FALSE, fcd, UPRV_LENGTHOF(fcd), fcdIndexes, sizeof(fcdIndexes)/4);
+    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_FCD, false, fcd, UPRV_LENGTHOF(fcd), fcdIndexes, sizeof(fcdIndexes)/4);
 
     /* test iteration without doNormalize */
     iter.index=0;
-    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_NFD, TRUE, NULL, 0, nfdIndexes, sizeof(nfdIndexes)/4);
+    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_NFD, true, NULL, 0, nfdIndexes, sizeof(nfdIndexes)/4);
     iter.index=0;
-    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_NFKD, TRUE, NULL, 0, nfkdIndexes, sizeof(nfkdIndexes)/4);
+    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_NFKD, true, NULL, 0, nfkdIndexes, sizeof(nfkdIndexes)/4);
     iter.index=0;
-    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_NFC, TRUE, NULL, 0, nfcIndexes, sizeof(nfcIndexes)/4);
+    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_NFC, true, NULL, 0, nfcIndexes, sizeof(nfcIndexes)/4);
     iter.index=0;
-    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_NFKC, TRUE, NULL, 0, nfkcIndexes, sizeof(nfkcIndexes)/4);
+    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_NFKC, true, NULL, 0, nfkcIndexes, sizeof(nfkcIndexes)/4);
     iter.index=0;
-    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_FCD, TRUE, NULL, 0, fcdIndexes, sizeof(fcdIndexes)/4);
+    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_FCD, true, NULL, 0, fcdIndexes, sizeof(fcdIndexes)/4);
 
     iter.index=iter.length;
-    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_NFD, FALSE, NULL, 0, nfdIndexes, sizeof(nfdIndexes)/4);
+    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_NFD, false, NULL, 0, nfdIndexes, sizeof(nfdIndexes)/4);
     iter.index=iter.length;
-    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_NFKD, FALSE, NULL, 0, nfkdIndexes, sizeof(nfkdIndexes)/4);
+    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_NFKD, false, NULL, 0, nfkdIndexes, sizeof(nfkdIndexes)/4);
     iter.index=iter.length;
-    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_NFC, FALSE, NULL, 0, nfcIndexes, sizeof(nfcIndexes)/4);
+    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_NFC, false, NULL, 0, nfcIndexes, sizeof(nfcIndexes)/4);
     iter.index=iter.length;
-    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_NFKC, FALSE, NULL, 0, nfkcIndexes, sizeof(nfkcIndexes)/4);
+    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_NFKC, false, NULL, 0, nfkcIndexes, sizeof(nfkcIndexes)/4);
     iter.index=iter.length;
-    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_FCD, FALSE, NULL, 0, fcdIndexes, sizeof(fcdIndexes)/4);
+    _testIter(src, UPRV_LENGTHOF(src), &iter, UNORM_FCD, false, NULL, 0, fcdIndexes, sizeof(fcdIndexes)/4);
 
     /* try without neededToNormalize */
     errorCode=U_ZERO_ERROR;
     buffer[0]=5;
     iter.index=1;
     length=unorm_next(&iter, buffer, UPRV_LENGTHOF(buffer),
-                      UNORM_NFD, 0, TRUE, NULL,
+                      UNORM_NFD, 0, true, NULL,
                       &errorCode);
     if(U_FAILURE(errorCode) || length!=2 || buffer[0]!=nfd[2] || buffer[1]!=nfd[3]) {
         log_data_err("error unorm_next(without needed) %s - (Are you missing data?)\n", u_errorName(errorCode));
@@ -1258,9 +1259,9 @@ TestNextPrevious() {
     neededToNormalize=9;
     iter.index=1;
     length=unorm_next(&iter, NULL, 0,
-                      UNORM_NFD, 0, TRUE, &neededToNormalize,
+                      UNORM_NFD, 0, true, &neededToNormalize,
                       &errorCode);
-    if(errorCode!=U_BUFFER_OVERFLOW_ERROR || neededToNormalize!=FALSE || length!=2) {
+    if(errorCode!=U_BUFFER_OVERFLOW_ERROR || neededToNormalize!=false || length!=2) {
         log_err("error unorm_next(pure preflighting) %s\n", u_errorName(errorCode));
         return;
     }
@@ -1270,9 +1271,9 @@ TestNextPrevious() {
     neededToNormalize=9;
     iter.index=1;
     length=unorm_next(&iter, buffer, 1,
-                      UNORM_NFD, 0, TRUE, &neededToNormalize,
+                      UNORM_NFD, 0, true, &neededToNormalize,
                       &errorCode);
-    if(errorCode!=U_BUFFER_OVERFLOW_ERROR || neededToNormalize!=FALSE || length!=2 || buffer[1]!=5) {
+    if(errorCode!=U_BUFFER_OVERFLOW_ERROR || neededToNormalize!=false || length!=2 || buffer[1]!=5) {
         log_err("error unorm_next(preflighting) %s\n", u_errorName(errorCode));
         return;
     }
@@ -1283,7 +1284,7 @@ TestNextPrevious() {
     neededToNormalize=9;
     iter.index=1;
     length=unorm_next(NULL, buffer, UPRV_LENGTHOF(buffer),
-                      UNORM_NFD, 0, TRUE, &neededToNormalize,
+                      UNORM_NFD, 0, true, &neededToNormalize,
                       &errorCode);
     if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) {
         log_err("error unorm_next(no iterator) %s\n", u_errorName(errorCode));
@@ -1295,7 +1296,7 @@ TestNextPrevious() {
     neededToNormalize=9;
     iter.index=1;
     length=unorm_next(&iter, buffer, UPRV_LENGTHOF(buffer),
-                      (UNormalizationMode)0, 0, TRUE, &neededToNormalize,
+                      (UNormalizationMode)0, 0, true, &neededToNormalize,
                       &errorCode);
     if(errorCode!=U_ILLEGAL_ARGUMENT_ERROR) {
         log_err("error unorm_next(illegal mode) %s\n", u_errorName(errorCode));
@@ -1307,7 +1308,7 @@ TestNextPrevious() {
     buffer[0]=5;
     iter.index=1;
     length=unorm_next(&iter, buffer, UPRV_LENGTHOF(buffer),
-                      UNORM_NFD, 0, TRUE, NULL,
+                      UNORM_NFD, 0, true, NULL,
                       &errorCode);
     if(errorCode!=U_MISPLACED_QUANTIFIER) {
         log_err("error unorm_next(U_MISPLACED_QUANTIFIER) %s\n", u_errorName(errorCode));
diff --git a/icu4c/source/test/cintltst/cnumtst.c b/icu4c/source/test/cintltst/cnumtst.c
index fd9abe3a943..615deacf31f 100644
--- a/icu4c/source/test/cintltst/cnumtst.c
+++ b/icu4c/source/test/cintltst/cnumtst.c
@@ -38,6 +38,7 @@
 #include "cstring.h"
 #include "putilimp.h"
 #include "uassert.h"
+#include 
 #include 
 #include 
 
@@ -514,13 +515,13 @@ free(result);
     /*test for unum_toPattern()*/
     log_verbose("\nTesting unum_toPattern()\n");
     resultlength=0;
-    resultlengthneeded=unum_toPattern(pattern, FALSE, NULL, resultlength, &status);
+    resultlengthneeded=unum_toPattern(pattern, false, NULL, resultlength, &status);
     if(status==U_BUFFER_OVERFLOW_ERROR)
     {
         status=U_ZERO_ERROR;
         resultlength=resultlengthneeded+1;
         result=(UChar*)malloc(sizeof(UChar) * resultlength);
-        unum_toPattern(pattern, FALSE, result, resultlength, &status);
+        unum_toPattern(pattern, false, result, resultlength, &status);
     }
     if(U_FAILURE(status))
     {
@@ -539,13 +540,13 @@ free(result);
     log_verbose("\nTesting unum_getSymbols and unum_setSymbols()\n");
     /*when we try to change the symbols of french to default we need to apply the pattern as well to fetch correct results */
     resultlength=0;
-    resultlengthneeded=unum_toPattern(cur_def, FALSE, NULL, resultlength, &status);
+    resultlengthneeded=unum_toPattern(cur_def, false, NULL, resultlength, &status);
     if(status==U_BUFFER_OVERFLOW_ERROR)
     {
         status=U_ZERO_ERROR;
         resultlength=resultlengthneeded+1;
         result=(UChar*)malloc(sizeof(UChar) * resultlength);
-        unum_toPattern(cur_def, FALSE, result, resultlength, &status);
+        unum_toPattern(cur_def, false, result, resultlength, &status);
     }
     if(U_FAILURE(status))
     {
@@ -591,7 +592,7 @@ free(result);
     if(U_FAILURE(status)){
         log_err("Fail: error in unum_setSymbols: %s\n", myErrorName(status));
     }
-    unum_applyPattern(cur_frpattern, FALSE, result, u_strlen(result),NULL,NULL);
+    unum_applyPattern(cur_frpattern, false, result, u_strlen(result),NULL,NULL);
 
     for (symType = UNUM_DECIMAL_SEPARATOR_SYMBOL; symType < UNUM_FORMAT_SYMBOL_COUNT; symType++) {
         status=U_ZERO_ERROR;
@@ -1240,7 +1241,7 @@ static void TestSignificantDigits()
         log_data_err("got unexpected error for unum_open: '%s'\n", u_errorName(status));
         return;
     }
-    unum_setAttribute(fmt, UNUM_SIGNIFICANT_DIGITS_USED, TRUE);
+    unum_setAttribute(fmt, UNUM_SIGNIFICANT_DIGITS_USED, true);
     unum_setAttribute(fmt, UNUM_MAX_SIGNIFICANT_DIGITS, 6);
 
     u_uastrcpy(temp, "123457");
@@ -1281,8 +1282,8 @@ static void TestSigDigRounding()
         log_data_err("got unexpected error for unum_open: '%s'\n", u_errorName(status));
         return;
     }
-    unum_setAttribute(fmt, UNUM_LENIENT_PARSE, FALSE);
-    unum_setAttribute(fmt, UNUM_SIGNIFICANT_DIGITS_USED, TRUE);
+    unum_setAttribute(fmt, UNUM_LENIENT_PARSE, false);
+    unum_setAttribute(fmt, UNUM_SIGNIFICANT_DIGITS_USED, true);
     unum_setAttribute(fmt, UNUM_MAX_SIGNIFICANT_DIGITS, 2);
     /* unum_setAttribute(fmt, UNUM_MAX_FRACTION_DIGITS, 0); */
 
@@ -1347,13 +1348,13 @@ static void TestNumberFormatPadding()
         /*test for unum_toPattern()*/
         log_verbose("\nTesting padding unum_toPattern()\n");
         resultlength=0;
-        resultlengthneeded=unum_toPattern(pattern, FALSE, NULL, resultlength, &status);
+        resultlengthneeded=unum_toPattern(pattern, false, NULL, resultlength, &status);
         if(status==U_BUFFER_OVERFLOW_ERROR)
         {
             status=U_ZERO_ERROR;
             resultlength=resultlengthneeded+1;
             result=(UChar*)malloc(sizeof(UChar) * resultlength);
-            unum_toPattern(pattern, FALSE, result, resultlength, &status);
+            unum_toPattern(pattern, false, result, resultlength, &status);
         }
         if(U_FAILURE(status))
         {
@@ -1581,7 +1582,7 @@ static void test_fmt(UNumberFormat* fmt, UBool isDecimal) {
         UErrorCode status = U_ZERO_ERROR;
         UParseError perr;
         u_uastrcpy(buffer, "#,##0.0#");
-        unum_applyPattern(fmt, FALSE, buffer, -1, &perr, &status);
+        unum_applyPattern(fmt, false, buffer, -1, &perr, &status);
         if (isDecimal ? U_FAILURE(status) : (status != U_UNSUPPORTED_ERROR)) {
             log_err("got unexpected error for applyPattern: '%s'\n", u_errorName(status));
         }
@@ -1590,13 +1591,13 @@ static void test_fmt(UNumberFormat* fmt, UBool isDecimal) {
     {
         int isLenient = unum_getAttribute(fmt, UNUM_LENIENT_PARSE);
         log_verbose("lenient: 0x%x\n", isLenient);
-        if (isLenient != FALSE) {
+        if (isLenient != false) {
             log_err("didn't expect lenient value: %d\n", isLenient);
         }
 
-        unum_setAttribute(fmt, UNUM_LENIENT_PARSE, TRUE);
+        unum_setAttribute(fmt, UNUM_LENIENT_PARSE, true);
         isLenient = unum_getAttribute(fmt, UNUM_LENIENT_PARSE);
-        if (isLenient != TRUE) {
+        if (isLenient != true) {
             log_err("didn't expect lenient value after set: %d\n", isLenient);
         }
     }
@@ -1674,7 +1675,7 @@ static void test_fmt(UNumberFormat* fmt, UBool isDecimal) {
 
     {
         UErrorCode status = U_ZERO_ERROR;
-        unum_toPattern(fmt, FALSE, buffer, BUFSIZE, &status);
+        unum_toPattern(fmt, false, buffer, BUFSIZE, &status);
         if (U_SUCCESS(status)) {
             u_austrcpy(temp, buffer);
             log_verbose("pattern: '%s'\n", temp);
@@ -2031,7 +2032,7 @@ static void TestNBSPInPattern(void) {
         UChar pat[200];
         testcase = "ar_AE special pattern: " SPECIAL_PATTERN;
         u_unescape(SPECIAL_PATTERN, pat, UPRV_LENGTHOF(pat));
-        unum_applyPattern(nf, FALSE, pat, -1, NULL, &status);
+        unum_applyPattern(nf, false, pat, -1, NULL, &status);
         if(U_FAILURE(status)) {
             log_err("%s: unum_applyPattern failed with %s\n", testcase, u_errorName(status));
         } else {
@@ -2358,7 +2359,7 @@ static void TestUFormattable(void) {
   {
     UErrorCode status = U_ZERO_ERROR;
     UNumberFormat *unum = unum_open(UNUM_DEFAULT, NULL, -1, "en_US_POSIX", NULL, &status);
-    if(assertSuccessCheck("calling unum_open()", &status, TRUE)) {
+    if(assertSuccessCheck("calling unum_open()", &status, true)) {
       //! [unum_parseToUFormattable]
       const UChar str[] = { 0x0031, 0x0032, 0x0033, 0x0000 }; /* 123 */
       int32_t result = 0;
@@ -2383,7 +2384,7 @@ static void TestUFormattable(void) {
 
     ufmt = ufmt_open(&status);
     unum = unum_open(UNUM_DEFAULT, NULL, -1, "en_US_POSIX", NULL, &status);
-    if(assertSuccessCheck("calling ufmt_open() || unum_open()", &status, TRUE)) {
+    if(assertSuccessCheck("calling ufmt_open() || unum_open()", &status, true)) {
 
       pattern = "31337";
       log_verbose("-- pattern: %s\n", pattern);
@@ -2431,13 +2432,13 @@ static void TestUFormattable(void) {
     u_uastrcpy(buffer, pattern);
 
     unum = unum_open(UNUM_DEFAULT, NULL, -1, "en_US_POSIX", NULL, &status);
-    if(assertSuccessCheck("calling unum_open()", &status, TRUE)) {
+    if(assertSuccessCheck("calling unum_open()", &status, true)) {
 
       ufmt = unum_parseToUFormattable(unum, NULL, /* will be ufmt_open()'ed for us */
                                    buffer, -1, NULL, &status);
       if(assertSuccess("unum_parseToUFormattable(weight of the moon)", &status)) {
         log_verbose("new formattable allocated at %p\n", (void*)ufmt);
-        assertTrue("ufmt_isNumeric() TRUE", ufmt_isNumeric(ufmt));
+        assertTrue("ufmt_isNumeric() true", ufmt_isNumeric(ufmt));
         unum_formatUFormattable(unum, ufmt, out2k, 2048, NULL, &status);
         if(assertSuccess("unum_formatUFormattable(3.14159)", &status)) {
           assertEquals("unum_formatUFormattable r/t", austrdup(buffer), austrdup(out2k));
@@ -2478,14 +2479,14 @@ static const UChar hantDesc[]    = {0x7A,0x68,0x5F,0x48,0x61,0x6E,0x74,0x2F,0x53
 
 static const NumSysTestItem numSysTestItems[] = {
     //locale                         numsys    radix isAlgo  description
-    { "en",                          "latn",    10,  FALSE,  latnDesc },
-    { "en@numbers=roman",            "roman",   10,  TRUE,   romanDesc },
-    { "en@numbers=finance",          "latn",    10,  FALSE,  latnDesc },
-    { "ar-EG",                       "arab",    10,  FALSE,  arabDesc },
-    { "fa",                          "arabext", 10,  FALSE,  arabextDesc },
-    { "zh_Hans@numbers=hanidec",     "hanidec", 10,  FALSE,  hanidecDesc },
-    { "zh_Hant@numbers=traditional", "hant",    10,  TRUE,   hantDesc },
-    { NULL,                          NULL,       0,  FALSE,  NULL },
+    { "en",                          "latn",    10,  false,  latnDesc },
+    { "en@numbers=roman",            "roman",   10,  true,   romanDesc },
+    { "en@numbers=finance",          "latn",    10,  false,  latnDesc },
+    { "ar-EG",                       "arab",    10,  false,  arabDesc },
+    { "fa",                          "arabext", 10,  false,  arabextDesc },
+    { "zh_Hans@numbers=hanidec",     "hanidec", 10,  false,  hanidecDesc },
+    { "zh_Hant@numbers=traditional", "hant",    10,  true,   hantDesc },
+    { NULL,                          NULL,       0,  false,  NULL },
 };
 enum { kNumSysDescripBufMax = 64 };
 
@@ -2527,15 +2528,15 @@ static void TestUNumberingSystem(void) {
         if ( U_SUCCESS(status) ) {
             int32_t numsysCount = 0;
             // sanity check for a couple of number systems that must be in the enumeration
-            UBool foundLatn = FALSE;
-            UBool foundArab = FALSE;
+            UBool foundLatn = false;
+            UBool foundArab = false;
             while ( (numsys = uenum_next(uenum, NULL, &status)) != NULL && U_SUCCESS(status) ) {
                 status = U_ZERO_ERROR;
                 unumsys = unumsys_openByName(numsys, &status);
                 if ( U_SUCCESS(status) ) {
                     numsysCount++;
-                    if ( uprv_strcmp(numsys, "latn") ) foundLatn = TRUE;
-                    if ( uprv_strcmp(numsys, "arab") ) foundArab = TRUE;
+                    if ( uprv_strcmp(numsys, "latn") ) foundLatn = true;
+                    if ( uprv_strcmp(numsys, "arab") ) foundArab = true;
                     unumsys_close(unumsys);
                 } else {
                     log_err("unumsys_openAvailableNames includes %s but unumsys_openByName on it fails with status %s\n",
@@ -2812,10 +2813,10 @@ static void TestCurrFmtNegSameAsPositive(void) {
     UErrorCode status = U_ZERO_ERROR;
     UNumberFormat* unumfmt = unum_open(UNUM_CURRENCY, NULL, 0, "en_US", NULL, &status);
     if ( U_SUCCESS(status) ) {
-        unum_applyPattern(unumfmt, FALSE, currFmtNegSameAsPos, -1, NULL, &status);
+        unum_applyPattern(unumfmt, false, currFmtNegSameAsPos, -1, NULL, &status);
         if (U_SUCCESS(status)) {
             UChar ubuf[kUBufSize];
-            int32_t ulen = unum_toPattern(unumfmt, FALSE, ubuf, kUBufSize, &status);
+            int32_t ulen = unum_toPattern(unumfmt, false, ubuf, kUBufSize, &status);
             if (U_FAILURE(status)) {
                 log_err("unum_toPattern fails with status %s\n", myErrorName(status));
             } else if (u_strcmp(ubuf, currFmtToPatExpected) != 0) {
@@ -3041,7 +3042,7 @@ static void TestParseCurrPatternWithDecStyle() {
     if (U_FAILURE(status)) {
         log_data_err("unum_open DECIMAL failed for en_US: %s (Are you missing data?)\n", u_errorName(status));
     } else {
-        unum_applyPattern(unumfmt, FALSE, currpat, -1, NULL, &status);
+        unum_applyPattern(unumfmt, false, currpat, -1, NULL, &status);
         if (U_FAILURE(status)) {
             log_err_status(status, "unum_applyPattern failed: %s\n", u_errorName(status));
         } else {
@@ -3138,7 +3139,7 @@ static void TestFormatForFields(void) {
                 } else {
                     const FieldsData * fptr;
                     int32_t field, beginPos, endPos;
-                    for (fptr = itemPtr->expectedFields; TRUE; fptr++) {
+                    for (fptr = itemPtr->expectedFields; true; fptr++) {
                         field = ufieldpositer_next(fpositer, &beginPos, &endPos);
                         if (field != fptr->field || (field >= 0 && (beginPos != fptr->beginPos || endPos != fptr->endPos))) {
                             if (fptr->field >= 0) {
@@ -3167,7 +3168,7 @@ static void Test12052_NullPointer() {
     static const UChar input[] = u"199a";
     UChar currency[200] = {0};
     UNumberFormat *theFormatter = unum_open(UNUM_CURRENCY, NULL, 0, "en_US", NULL, &status);
-    if (!assertSuccessCheck("unum_open() failed", &status, TRUE)) { return; }
+    if (!assertSuccessCheck("unum_open() failed", &status, true)) { return; }
     status = U_ZERO_ERROR;
     unum_setAttribute(theFormatter, UNUM_LENIENT_PARSE, 1);
     int32_t pos = 1;
@@ -3194,18 +3195,18 @@ typedef struct {
 } ParseCaseItem;
 
 static const ParseCaseItem parseCaseItems[] = {
-    { "en", u"0,000",            FALSE, FALSE, U_ZERO_ERROR,            5,          0, U_ZERO_ERROR,  5,                0.0, U_ZERO_ERROR,  5, "0" },
-    { "en", u"0,000",            TRUE,  FALSE, U_ZERO_ERROR,            5,          0, U_ZERO_ERROR,  5,                0.0, U_ZERO_ERROR,  5, "0" },
-    { "en", u"1000,000",         FALSE, FALSE, U_PARSE_ERROR,           0,          0, U_PARSE_ERROR, 0,                0.0, U_PARSE_ERROR, 0, "" },
-    { "en", u"1000,000",         TRUE,  FALSE, U_ZERO_ERROR,            8,    1000000, U_ZERO_ERROR,  8,          1000000.0, U_ZERO_ERROR,  8, "1000000" },
-    { "en", u"",                 FALSE, FALSE, U_PARSE_ERROR,           0,          0, U_PARSE_ERROR, 0,                0.0, U_PARSE_ERROR, 0, "" },
-    { "en", u"",                 TRUE,  FALSE, U_PARSE_ERROR,           0,          0, U_PARSE_ERROR, 0,                0.0, U_PARSE_ERROR, 0, "" },
-    { "en", u"9999990000503021", FALSE, FALSE, U_INVALID_FORMAT_ERROR, 16, 2147483647, U_ZERO_ERROR, 16, 9999990000503020.0, U_ZERO_ERROR, 16, "9999990000503021" },
-    { "en", u"9999990000503021", FALSE, TRUE,  U_INVALID_FORMAT_ERROR, 16, 2147483647, U_ZERO_ERROR, 16, 9999990000503020.0, U_ZERO_ERROR, 16, "9999990000503021" },
-    { "en", u"1000000.5",        FALSE, FALSE, U_ZERO_ERROR,            9,    1000000, U_ZERO_ERROR,  9,          1000000.5, U_ZERO_ERROR,  9, "1.0000005E+6"},
-    { "en", u"1000000.5",        FALSE, TRUE,  U_ZERO_ERROR,            7,    1000000, U_ZERO_ERROR,  7,          1000000.0, U_ZERO_ERROR,  7, "1000000" },
-    { "en", u"123.5",            FALSE, FALSE, U_ZERO_ERROR,            5,        123, U_ZERO_ERROR,  5,              123.5, U_ZERO_ERROR,  5, "123.5" },
-    { "en", u"123.5",            FALSE, TRUE,  U_ZERO_ERROR,            3,        123, U_ZERO_ERROR,  3,              123.0, U_ZERO_ERROR,  3, "123" },
+    { "en", u"0,000",            false, false, U_ZERO_ERROR,            5,          0, U_ZERO_ERROR,  5,                0.0, U_ZERO_ERROR,  5, "0" },
+    { "en", u"0,000",            true,  false, U_ZERO_ERROR,            5,          0, U_ZERO_ERROR,  5,                0.0, U_ZERO_ERROR,  5, "0" },
+    { "en", u"1000,000",         false, false, U_PARSE_ERROR,           0,          0, U_PARSE_ERROR, 0,                0.0, U_PARSE_ERROR, 0, "" },
+    { "en", u"1000,000",         true,  false, U_ZERO_ERROR,            8,    1000000, U_ZERO_ERROR,  8,          1000000.0, U_ZERO_ERROR,  8, "1000000" },
+    { "en", u"",                 false, false, U_PARSE_ERROR,           0,          0, U_PARSE_ERROR, 0,                0.0, U_PARSE_ERROR, 0, "" },
+    { "en", u"",                 true,  false, U_PARSE_ERROR,           0,          0, U_PARSE_ERROR, 0,                0.0, U_PARSE_ERROR, 0, "" },
+    { "en", u"9999990000503021", false, false, U_INVALID_FORMAT_ERROR, 16, 2147483647, U_ZERO_ERROR, 16, 9999990000503020.0, U_ZERO_ERROR, 16, "9999990000503021" },
+    { "en", u"9999990000503021", false, true,  U_INVALID_FORMAT_ERROR, 16, 2147483647, U_ZERO_ERROR, 16, 9999990000503020.0, U_ZERO_ERROR, 16, "9999990000503021" },
+    { "en", u"1000000.5",        false, false, U_ZERO_ERROR,            9,    1000000, U_ZERO_ERROR,  9,          1000000.5, U_ZERO_ERROR,  9, "1.0000005E+6"},
+    { "en", u"1000000.5",        false, true,  U_ZERO_ERROR,            7,    1000000, U_ZERO_ERROR,  7,          1000000.0, U_ZERO_ERROR,  7, "1000000" },
+    { "en", u"123.5",            false, false, U_ZERO_ERROR,            5,        123, U_ZERO_ERROR,  5,              123.5, U_ZERO_ERROR,  5, "123.5" },
+    { "en", u"123.5",            false, true,  U_ZERO_ERROR,            3,        123, U_ZERO_ERROR,  3,              123.0, U_ZERO_ERROR,  3, "123" },
     { NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0.0, 0, 0, NULL }
 };
 
@@ -3326,7 +3327,7 @@ static const SetMaxFracAndRoundIncrItem maxFracAndRoundIncrItems[] = {
 // roundIncr must be non-zero
 static UBool ignoreRoundingIncrement(double roundIncr, int32_t maxFrac) {
     if (maxFrac < 0) {
-        return FALSE;
+        return false;
     }
     int32_t frac = 0;
     roundIncr *= 2.0;
@@ -3383,7 +3384,7 @@ static void TestSetMaxFracAndRoundIncr(void) {
         }
 
         status = U_ZERO_ERROR;
-        ulen = unum_toPattern(unf, FALSE, ubuf, kUBufMax, &status);
+        ulen = unum_toPattern(unf, false, ubuf, kUBufMax, &status);
         (void)ulen;
         if ( U_FAILURE(status) ) {
             log_err("test %s: unum_toPattern fails with %s\n", itemPtr->descrip, u_errorName(status));
@@ -3426,7 +3427,7 @@ static void TestIgnorePadding(void) {
             unum_setAttribute(unum, UNUM_MAX_FRACTION_DIGITS, 0);
 
             UChar ubuf[kUBufMax];
-            int32_t ulen = unum_toPattern(unum, FALSE, ubuf, kUBufMax, &status);
+            int32_t ulen = unum_toPattern(unum, false, ubuf, kUBufMax, &status);
             if (U_FAILURE(status)) {
                 log_err("unum_toPattern fails: %s\n", u_errorName(status));
             } else {
@@ -3436,7 +3437,7 @@ static void TestIgnorePadding(void) {
                     u_austrncpy(bbuf, ubuf, kBBufMax);
                     log_err("unum_toPattern result should ignore padding but get %s\n", bbuf);
                 }
-                unum_applyPattern(unum, FALSE, ubuf, ulen, NULL, &status);
+                unum_applyPattern(unum, false, ubuf, ulen, NULL, &status);
                 if (U_FAILURE(status)) {
                     log_err("unum_applyPattern fails: %s\n", u_errorName(status));
                 } else {
@@ -3469,7 +3470,7 @@ static void TestSciNotationMaxFracCap(void) {
 
         unum_setAttribute(unum, UNUM_MIN_FRACTION_DIGITS, 0);
         unum_setAttribute(unum, UNUM_MAX_FRACTION_DIGITS, 2147483647);
-        ulen = unum_toPattern(unum, FALSE, ubuf, kUBufMax, &status);
+        ulen = unum_toPattern(unum, false, ubuf, kUBufMax, &status);
         if ( U_SUCCESS(status) ) {
             u_austrncpy(bbuf, ubuf, kUBufMax);
             log_info("unum_toPattern (%d): %s\n", ulen, bbuf);
@@ -3507,7 +3508,7 @@ static void TestMinIntMinFracZero(void) {
             log_err("after setting minInt=minFrac=0, get minInt %d, minFrac %d\n", minInt, minFrac);
         }
 
-        ulen = unum_toPattern(unum, FALSE, ubuf, kUBufMax, &status);
+        ulen = unum_toPattern(unum, false, ubuf, kUBufMax, &status);
         if ( U_FAILURE(status) ) {
             log_err("unum_toPattern fails with %s\n", u_errorName(status));
         } else if (ulen < 3 || u_strstr(ubuf, u"#.#")==NULL) {
diff --git a/icu4c/source/test/cintltst/cpluralrulestest.c b/icu4c/source/test/cintltst/cpluralrulestest.c
index 57fcb2968a9..e2b4e362978 100644
--- a/icu4c/source/test/cintltst/cpluralrulestest.c
+++ b/icu4c/source/test/cintltst/cpluralrulestest.c
@@ -10,6 +10,8 @@
 
 #if !UCONFIG_NO_FORMATTING
 
+#include 
+
 #include "unicode/upluralrules.h"
 #include "unicode/ustring.h"
 #include "unicode/uenum.h"
@@ -143,7 +145,7 @@ static void TestOrdinalRules() {
     }
     U_STRING_INIT(two, "two", 3);
     length = uplrules_select(upr, 2., keyword, 8, &errorCode);
-    if (U_FAILURE(errorCode) || u_strCompare(keyword, length, two, 3, FALSE) != 0) {
+    if (U_FAILURE(errorCode) || u_strCompare(keyword, length, two, 3, false) != 0) {
         log_data_err("uplrules_select(en-ordinal, 2) failed - %s\n", u_errorName(errorCode));
     }
     uplrules_close(upr);
@@ -211,13 +213,13 @@ static void TestGetKeywords() {
         
         /* initialize arrays for expected and get results */
         for (i = 0; i < kNumKeywords; i++) {
-            expectKeywords[i] = FALSE;
-            getKeywords[i] = FALSE;
+            expectKeywords[i] = false;
+            getKeywords[i] = false;
         }
         for (i = 0; i < kNumKeywords && itemPtr->keywords[i] != NULL; i++) {
             iKnown = getKeywordIndex(itemPtr->keywords[i]);
             if (iKnown >= 0) {
-                expectKeywords[iKnown] = TRUE;
+                expectKeywords[iKnown] = true;
             }
         }
         
@@ -237,7 +239,7 @@ static void TestGetKeywords() {
                 if (iKnown < 0) {
                     log_err("FAIL: uplrules_getKeywords for locale %s, unknown keyword %s\n", itemPtr->locale, keyword );
                 } else {
-                    getKeywords[iKnown] = TRUE;
+                    getKeywords[iKnown] = true;
                 }
                 keywordCount++;
             }
diff --git a/icu4c/source/test/cintltst/crelativedateformattest.c b/icu4c/source/test/cintltst/crelativedateformattest.c
index 8b5c90f6b47..55643b92ff6 100644
--- a/icu4c/source/test/cintltst/crelativedateformattest.c
+++ b/icu4c/source/test/cintltst/crelativedateformattest.c
@@ -10,6 +10,8 @@
 
 #if !UCONFIG_NO_FORMATTING && !UCONFIG_NO_BREAK_ITERATION
 
+#include 
+
 #include "unicode/ureldatefmt.h"
 #include "unicode/unum.h"
 #include "unicode/udisplaycontext.h"
@@ -482,8 +484,8 @@ static void TestNumericField()
 
                 FieldsDat expectedAttr = itemPtr->expectedAttributes[iOffset*2];
                 UConstrainedFieldPosition* cfpos = ucfpos_open(&status);
-                UBool foundNumeric = FALSE;
-                while (TRUE) {
+                UBool foundNumeric = false;
+                while (true) {
                     foundNumeric = ufmtval_nextPosition(ureldatefmt_resultAsValue(fv, &status), cfpos, &status);
                     if (!foundNumeric) {
                         break;
@@ -537,8 +539,8 @@ static void TestNumericField()
 
                 FieldsDat expectedAttr = itemPtr->expectedAttributes[iOffset*2 + 1];
                 UConstrainedFieldPosition* cfpos = ucfpos_open(&status);
-                UBool foundNumeric = FALSE;
-                while (TRUE) {
+                UBool foundNumeric = false;
+                while (true) {
                     foundNumeric = ufmtval_nextPosition(ureldatefmt_resultAsValue(fv, &status), cfpos, &status);
                     if (!foundNumeric) {
                         break;
diff --git a/icu4c/source/test/cintltst/crestst.c b/icu4c/source/test/cintltst/crestst.c
index b3fd04d5c11..bc2889e55af 100644
--- a/icu4c/source/test/cintltst/crestst.c
+++ b/icu4c/source/test/cintltst/crestst.c
@@ -24,6 +24,7 @@
 #include "cmemory.h"
 #include "cstring.h"
 #include "filestrm.h"
+#include 
 #include 
 
 #define RESTEST_HEAP_CHECK 0
@@ -88,12 +89,12 @@ static struct
   /* "IN" means inherits */
   /* "NE" or "ne" means "does not exist" */
 
-  { "root",         U_ZERO_ERROR,             e_Root,    { TRUE, FALSE, FALSE }, { TRUE, FALSE, FALSE } },
-  { "te",           U_ZERO_ERROR,             e_te,      { FALSE, TRUE, FALSE }, { TRUE, TRUE, FALSE } },
-  { "te_IN",        U_ZERO_ERROR,             e_te_IN,   { FALSE, FALSE, TRUE }, { TRUE, TRUE, TRUE } },
-  { "te_NE",        U_USING_FALLBACK_WARNING, e_te,      { FALSE, TRUE, FALSE }, { TRUE, TRUE, FALSE } },
-  { "te_IN_NE",     U_USING_FALLBACK_WARNING, e_te_IN,   { FALSE, FALSE, TRUE }, { TRUE, TRUE, TRUE } },
-  { "ne",           U_USING_DEFAULT_WARNING,  e_Root,    { TRUE, FALSE, FALSE }, { TRUE, FALSE, FALSE } }
+  { "root",         U_ZERO_ERROR,             e_Root,    { true, false, false }, { true, false, false } },
+  { "te",           U_ZERO_ERROR,             e_te,      { false, true, false }, { true, true, false } },
+  { "te_IN",        U_ZERO_ERROR,             e_te_IN,   { false, false, true }, { true, true, true } },
+  { "te_NE",        U_USING_FALLBACK_WARNING, e_te,      { false, true, false }, { true, true, false } },
+  { "te_IN_NE",     U_USING_FALLBACK_WARNING, e_te_IN,   { false, false, true }, { true, true, true } },
+  { "ne",           U_USING_DEFAULT_WARNING,  e_Root,    { true, false, false }, { true, false, false } }
 };
 
 static int32_t bundles_count = UPRV_LENGTHOF(param);
@@ -163,14 +164,14 @@ void TestResourceBundles()
         return;
     }
 
-    testTag("only_in_Root", TRUE, FALSE, FALSE);
-    testTag("in_Root_te", TRUE, TRUE, FALSE);
-    testTag("in_Root_te_te_IN", TRUE, TRUE, TRUE);
-    testTag("in_Root_te_IN", TRUE, FALSE, TRUE);
-    testTag("only_in_te", FALSE, TRUE, FALSE);
-    testTag("only_in_te_IN", FALSE, FALSE, TRUE);
-    testTag("in_te_te_IN", FALSE, TRUE, TRUE);
-    testTag("nonexistent", FALSE, FALSE, FALSE);
+    testTag("only_in_Root", true, false, false);
+    testTag("in_Root_te", true, true, false);
+    testTag("in_Root_te_te_IN", true, true, true);
+    testTag("in_Root_te_IN", true, false, true);
+    testTag("only_in_te", false, true, false);
+    testTag("only_in_te_IN", false, false, true);
+    testTag("in_te_te_IN", false, true, true);
+    testTag("nonexistent", false, false, false);
 
     log_verbose("Passed:=  %d   Failed=   %d \n", pass, fail);
 }
@@ -297,7 +298,7 @@ UBool testTag(const char* frag,
     {
         ures_close(theBundle);
         log_err("Couldn't open root bundle in %s", testdatapath);
-        return FALSE;
+        return false;
     }
     ures_close(theBundle);
     theBundle = NULL;
diff --git a/icu4c/source/test/cintltst/creststn.c b/icu4c/source/test/cintltst/creststn.c
index 5b69d9c59a8..133430c1855 100644
--- a/icu4c/source/test/cintltst/creststn.c
+++ b/icu4c/source/test/cintltst/creststn.c
@@ -17,6 +17,7 @@
 */
 
 
+#include 
 #include 
 #include "unicode/utypes.h"
 #include "cintltst.h"
@@ -54,11 +55,11 @@ randul()
 {
     uint32_t l=0;
     int32_t i;
-    static UBool initialized = FALSE;
+    static UBool initialized = false;
     if (!initialized)
     {
         srand((unsigned)time(NULL));
-        initialized = TRUE;
+        initialized = true;
     }
     /* Assume rand has at least 12 bits of precision */
     
@@ -195,12 +196,12 @@ param[] =
   /* "IN" means inherits */
   /* "NE" or "ne" means "does not exist" */
 
-  { "root",         U_ZERO_ERROR,             e_Root,    { TRUE, FALSE, FALSE }, { TRUE, FALSE, FALSE } },
-  { "te",           U_ZERO_ERROR,             e_te,      { FALSE, TRUE, FALSE }, { TRUE, TRUE, FALSE  } },
-  { "te_IN",        U_ZERO_ERROR,             e_te_IN,   { FALSE, FALSE, TRUE }, { TRUE, TRUE, TRUE   } },
-  { "te_NE",        U_USING_FALLBACK_WARNING, e_te,      { FALSE, TRUE, FALSE }, { TRUE, TRUE, FALSE  } },
-  { "te_IN_NE",     U_USING_FALLBACK_WARNING, e_te_IN,   { FALSE, FALSE, TRUE }, { TRUE, TRUE, TRUE   } },
-  { "ne",           U_USING_DEFAULT_WARNING,  e_Root,    { TRUE, FALSE, FALSE }, { TRUE, FALSE, FALSE } }
+  { "root",         U_ZERO_ERROR,             e_Root,    { true, false, false }, { true, false, false } },
+  { "te",           U_ZERO_ERROR,             e_te,      { false, true, false }, { true, true, false  } },
+  { "te_IN",        U_ZERO_ERROR,             e_te_IN,   { false, false, true }, { true, true, true   } },
+  { "te_NE",        U_USING_FALLBACK_WARNING, e_te,      { false, true, false }, { true, true, false  } },
+  { "te_IN_NE",     U_USING_FALLBACK_WARNING, e_te_IN,   { false, false, true }, { true, true, true   } },
+  { "ne",           U_USING_DEFAULT_WARNING,  e_Root,    { true, false, false }, { true, false, false } }
 };
 
 static int32_t bundles_count = UPRV_LENGTHOF(param);
@@ -714,7 +715,7 @@ static void TestNewTypes() {
             }else{
                 /* open the file */
                 const char* cp = NULL; 
-                UCHARBUF* ucbuf = ucbuf_open(testDataFileName,&cp,FALSE,FALSE,&status);
+                UCHARBUF* ucbuf = ucbuf_open(testDataFileName,&cp,false,false,&status);
                 len = 0;
                 if(U_SUCCESS(status)){
                     const UChar* buffer = ucbuf_getBuffer(ucbuf,&len,&status);
@@ -752,7 +753,7 @@ static void TestNewTypes() {
             }else{
                 /* open the file */
                 const char* cp=NULL;
-                UCHARBUF* ucbuf = ucbuf_open(testDataFileName,&cp,FALSE,FALSE,&status);
+                UCHARBUF* ucbuf = ucbuf_open(testDataFileName,&cp,false,false,&status);
                 len = 0;
                 if(U_SUCCESS(status)){
                     const UChar* buffer = ucbuf_getBuffer(ucbuf,&len,&status);
@@ -1255,8 +1256,8 @@ static void TestErrorConditions(){
     }
     /*Test ures_hasNext() with UResourceBundle = NULL*/
     status=U_ZERO_ERROR;
-    if(ures_hasNext(NULL) != FALSE){  
-        log_err("ERROR: ures_hasNext() should return FALSE when UResourceBundle=NULL.  Got =%d\n", ures_hasNext(NULL));
+    if(ures_hasNext(NULL) != false){  
+        log_err("ERROR: ures_hasNext() should return false when UResourceBundle=NULL.  Got =%d\n", ures_hasNext(NULL));
     }
     /*Test ures_get() with UResourceBundle = NULL*/
     status=U_ZERO_ERROR;
@@ -1524,14 +1525,14 @@ static void TestResourceBundles()
         return;
     }
 
-    testTag("only_in_Root", TRUE, FALSE, FALSE);
-    testTag("in_Root_te", TRUE, TRUE, FALSE);
-    testTag("in_Root_te_te_IN", TRUE, TRUE, TRUE);
-    testTag("in_Root_te_IN", TRUE, FALSE, TRUE);
-    testTag("only_in_te", FALSE, TRUE, FALSE);
-    testTag("only_in_te_IN", FALSE, FALSE, TRUE);
-    testTag("in_te_te_IN", FALSE, TRUE, TRUE);
-    testTag("nonexistent", FALSE, FALSE, FALSE);
+    testTag("only_in_Root", true, false, false);
+    testTag("in_Root_te", true, true, false);
+    testTag("in_Root_te_te_IN", true, true, true);
+    testTag("in_Root_te_IN", true, false, true);
+    testTag("only_in_te", false, true, false);
+    testTag("only_in_te_IN", false, false, true);
+    testTag("in_te_te_IN", false, true, true);
+    testTag("nonexistent", false, false, false);
 
     log_verbose("Passed:=  %d   Failed=   %d \n", pass, fail);
 
@@ -1671,7 +1672,7 @@ static UBool testTag(const char* frag,
     if(U_FAILURE(status))
     {
         log_data_err("Could not load testdata.dat %s \n",myErrorName(status));
-        return FALSE;
+        return false;
     }
 
     is_in[0] = in_Root;
@@ -2587,7 +2588,7 @@ static void TestJB3763(void) {
 
 static void TestGetKeywordValues(void) {
     UEnumeration *kwVals;
-    UBool foundStandard = FALSE;
+    UBool foundStandard = false;
     UErrorCode status = U_ZERO_ERROR;
     const char *kw;
 #if !UCONFIG_NO_COLLATION
@@ -2598,14 +2599,14 @@ static void TestGetKeywordValues(void) {
     while((kw=uenum_next(kwVals, NULL, &status))) {
         log_verbose("  %s\n", kw);
         if(!strcmp(kw,"standard")) {
-            if(foundStandard == FALSE) {
-                foundStandard = TRUE;
+            if(foundStandard == false) {
+                foundStandard = true;
             } else {
                 log_err("'standard' was found twice in the keyword list.\n");
             }
         }
     }
-    if(foundStandard == FALSE) {
+    if(foundStandard == false) {
         log_err_status(status, "'standard' was not found in the keyword list.\n");
     }
     uenum_close(kwVals);
@@ -2614,7 +2615,7 @@ static void TestGetKeywordValues(void) {
     }
     status = U_ZERO_ERROR;
 #endif
-    foundStandard = FALSE;
+    foundStandard = false;
     kwVals = ures_getKeywordValues( "ICUDATA", "calendar", &status);
 
     log_verbose("Testing getting calendar keyword values:\n");
@@ -2622,14 +2623,14 @@ static void TestGetKeywordValues(void) {
     while((kw=uenum_next(kwVals, NULL, &status))) {
         log_verbose("  %s\n", kw);
         if(!strcmp(kw,"japanese")) {
-            if(foundStandard == FALSE) {
-                foundStandard = TRUE;
+            if(foundStandard == false) {
+                foundStandard = true;
             } else {
                 log_err("'japanese' was found twice in the calendar keyword list.\n");
             }
         }
     }
-    if(foundStandard == FALSE) {
+    if(foundStandard == false) {
         log_err_status(status, "'japanese' was not found in the calendar keyword list.\n");
     }
     uenum_close(kwVals);
@@ -2641,8 +2642,8 @@ static void TestGetKeywordValues(void) {
 static void TestGetFunctionalEquivalentOf(const char *path, const char *resName, const char *keyword, UBool truncate, const char * const testCases[]) {
     int32_t i;
     for(i=0;testCases[i];i+=3) {
-        UBool expectAvail = (testCases[i][0]=='t')?TRUE:FALSE;
-        UBool gotAvail = FALSE;
+        UBool expectAvail = (testCases[i][0]=='t')?true:false;
+        UBool gotAvail = false;
         const char *inLocale = testCases[i+1];
         const char *expectLocale = testCases[i+2];
         char equivLocale[256];
@@ -2724,9 +2725,9 @@ static void TestGetFunctionalEquivalent(void) {
     };
 
 #if !UCONFIG_NO_COLLATION
-    TestGetFunctionalEquivalentOf(U_ICUDATA_COLL, "collations", "collation", TRUE, collCases);
+    TestGetFunctionalEquivalentOf(U_ICUDATA_COLL, "collations", "collation", true, collCases);
 #endif
-    TestGetFunctionalEquivalentOf("ICUDATA", "calendar", "calendar", FALSE, calCases);
+    TestGetFunctionalEquivalentOf("ICUDATA", "calendar", "calendar", false, calCases);
 
 #if !UCONFIG_NO_COLLATION
     log_verbose("Testing error conditions:\n");
@@ -2734,11 +2735,11 @@ static void TestGetFunctionalEquivalent(void) {
         char equivLocale[256] = "???";
         int32_t len;
         UErrorCode status = U_ZERO_ERROR;
-        UBool gotAvail = FALSE;
+        UBool gotAvail = false;
 
         len = ures_getFunctionalEquivalent(equivLocale, 255, U_ICUDATA_COLL,
             "calendar", "calendar", "ar_EG@calendar=islamic", 
-            &gotAvail, FALSE, &status);
+            &gotAvail, false, &status);
         (void)len;    /* Suppress set but not used warning. */
 
         if(status == U_MISSING_RESOURCE_ERROR) {
@@ -2929,7 +2930,7 @@ tres_getString(const UResourceBundle *resB,
     length16 = *length;
 
     /* try the UTF-8 variant of ures_getStringXYZ() */
-    for(forceCopy = FALSE; forceCopy <= TRUE; ++forceCopy) {
+    for(forceCopy = false; forceCopy <= true; ++forceCopy) {
         p8 = buffer8;
         length8 = (int32_t)sizeof(buffer8);
         if(idx >= 0) {
@@ -3037,7 +3038,7 @@ TestGetUTF8String() {
     /* one good call */
     status = U_ZERO_ERROR;
     length8 = (int32_t)sizeof(buffer8);
-    s8 = ures_getUTF8StringByKey(res, "string_only_in_Root", buffer8, &length8, FALSE, &status);
+    s8 = ures_getUTF8StringByKey(res, "string_only_in_Root", buffer8, &length8, false, &status);
     (void)s8;    /* Suppress set but not used warning. */
     if(status != U_ZERO_ERROR) {
         log_err("ures_getUTF8StringByKey(testdata/root string) malfunctioned - %s\n", u_errorName(status));
@@ -3046,7 +3047,7 @@ TestGetUTF8String() {
     /* negative capacity */
     status = U_ZERO_ERROR;
     length8 = -1;
-    s8 = ures_getUTF8StringByKey(res, "string_only_in_Root", buffer8, &length8, FALSE, &status);
+    s8 = ures_getUTF8StringByKey(res, "string_only_in_Root", buffer8, &length8, false, &status);
     if(status != U_ILLEGAL_ARGUMENT_ERROR) {
         log_err("ures_getUTF8StringByKey(capacity<0) malfunctioned - %s\n", u_errorName(status));
     }
@@ -3054,7 +3055,7 @@ TestGetUTF8String() {
     /* capacity>0 but dest=NULL */
     status = U_ZERO_ERROR;
     length8 = (int32_t)sizeof(buffer8);
-    s8 = ures_getUTF8StringByKey(res, "string_only_in_Root", NULL, &length8, FALSE, &status);
+    s8 = ures_getUTF8StringByKey(res, "string_only_in_Root", NULL, &length8, false, &status);
     if(status != U_ILLEGAL_ARGUMENT_ERROR) {
         log_err("ures_getUTF8StringByKey(dest=NULL capacity>0) malfunctioned - %s\n", u_errorName(status));
     }
diff --git a/icu4c/source/test/cintltst/cstrtest.c b/icu4c/source/test/cintltst/cstrtest.c
index 985b8ff6de6..d8006fd1c8e 100644
--- a/icu4c/source/test/cintltst/cstrtest.c
+++ b/icu4c/source/test/cintltst/cstrtest.c
@@ -15,6 +15,8 @@
 *******************************************************************************
 */
 
+#include 
+
 #include "unicode/ustring.h"
 #include "unicode/ucnv.h"
 #include "cstring.h"
@@ -377,7 +379,7 @@ TestNoInvariantAtSign() {
         char ic = nativeInvChars[i];
         UBool actual = uprv_isAtSign(ic);
         if (actual) {
-            log_err("uprv_isAtSign(invariant '%c')=TRUE is wrong\n", ic);
+            log_err("uprv_isAtSign(invariant '%c')=true is wrong\n", ic);
         }
         if (ic == 0) { break; }
     }
diff --git a/icu4c/source/test/cintltst/cucdapi.c b/icu4c/source/test/cintltst/cucdapi.c
index e6beb1d7f1e..fb78f08e506 100644
--- a/icu4c/source/test/cintltst/cucdapi.c
+++ b/icu4c/source/test/cintltst/cucdapi.c
@@ -5,6 +5,7 @@
  * Corporation and others. All Rights Reserved.
  ********************************************************************/
 
+#include 
 #include 
 #include "unicode/utypes.h"
 #include "unicode/uscript.h"
@@ -316,7 +317,7 @@ void TestUScriptCodeAPI(){
         };
         UScriptCode code = USCRIPT_INVALID_CODE;
         UErrorCode status = U_ZERO_ERROR;
-        UBool passed = TRUE;
+        UBool passed = true;
 
         for(i=0; i
 #include 
+#include 
 #include 
+#include 
 
 #include "unicode/utypes.h"
 #include "unicode/uchar.h"
@@ -331,7 +332,7 @@ Checks LetterLike Symbols which were previously a source of confusion
         int32_t num = UPRV_LENGTHOF(expected);
         for(i=0; i a-b should be empty, that is, b should contain all of a
-     * FALSE -> a&b should be empty, that is, a should contain none of b (and vice versa)
+     * true  -> a-b should be empty, that is, b should contain all of a
+     * false -> a&b should be empty, that is, a should contain none of b (and vice versa)
      */
     if(expect ? uset_containsAll(b, a) : uset_containsNone(a, b)) {
-        return TRUE;
+        return true;
     }
 
     /* clone a to aa because a is const */
     aa=uset_open(1, 0);
     if(aa==NULL) {
         /* unusual problem - out of memory? */
-        return FALSE;
+        return false;
     }
     uset_addAll(aa, a);
 
@@ -408,21 +409,21 @@ showADiffB(const USet *a, const USet *b,
     }
 
     uset_close(aa);
-    return FALSE;
+    return false;
 }
 
 static UBool
 showAMinusB(const USet *a, const USet *b,
             const char *a_name, const char *b_name,
             UBool diffIsError) {
-    return showADiffB(a, b, a_name, b_name, TRUE, diffIsError);
+    return showADiffB(a, b, a_name, b_name, true, diffIsError);
 }
 
 static UBool
 showAIntersectB(const USet *a, const USet *b,
                 const char *a_name, const char *b_name,
                 UBool diffIsError) {
-    return showADiffB(a, b, a_name, b_name, FALSE, diffIsError);
+    return showADiffB(a, b, a_name, b_name, false, diffIsError);
 }
 
 static UBool
@@ -519,7 +520,7 @@ static void TestLetterNumber()
         decimalValues=uset_openPattern(decimalValuesPattern, 24, &errorCode);
 
         if(U_SUCCESS(errorCode)) {
-            compareUSets(digits, decimalValues, "[:Nd:]", "[:Numeric_Type=Decimal:]", TRUE);
+            compareUSets(digits, decimalValues, "[:Nd:]", "[:Numeric_Type=Decimal:]", true);
         }
 
         uset_close(digits);
@@ -565,29 +566,29 @@ static void TestMisc()
 
     memset(icuVersion, 0, U_MAX_VERSION_STRING_LENGTH);
 
-    testSampleCharProps(u_isspace, "u_isspace", sampleSpaces, UPRV_LENGTHOF(sampleSpaces), TRUE);
-    testSampleCharProps(u_isspace, "u_isspace", sampleNonSpaces, UPRV_LENGTHOF(sampleNonSpaces), FALSE);
+    testSampleCharProps(u_isspace, "u_isspace", sampleSpaces, UPRV_LENGTHOF(sampleSpaces), true);
+    testSampleCharProps(u_isspace, "u_isspace", sampleNonSpaces, UPRV_LENGTHOF(sampleNonSpaces), false);
 
     testSampleCharProps(u_isJavaSpaceChar, "u_isJavaSpaceChar",
-                        sampleSpaces, UPRV_LENGTHOF(sampleSpaces), TRUE);
+                        sampleSpaces, UPRV_LENGTHOF(sampleSpaces), true);
     testSampleCharProps(u_isJavaSpaceChar, "u_isJavaSpaceChar",
-                        sampleNonSpaces, UPRV_LENGTHOF(sampleNonSpaces), FALSE);
+                        sampleNonSpaces, UPRV_LENGTHOF(sampleNonSpaces), false);
 
     testSampleCharProps(u_isWhitespace, "u_isWhitespace",
-                        sampleWhiteSpaces, UPRV_LENGTHOF(sampleWhiteSpaces), TRUE);
+                        sampleWhiteSpaces, UPRV_LENGTHOF(sampleWhiteSpaces), true);
     testSampleCharProps(u_isWhitespace, "u_isWhitespace",
-                        sampleNonWhiteSpaces, UPRV_LENGTHOF(sampleNonWhiteSpaces), FALSE);
+                        sampleNonWhiteSpaces, UPRV_LENGTHOF(sampleNonWhiteSpaces), false);
 
     testSampleCharProps(u_isdefined, "u_isdefined",
-                        sampleDefined, UPRV_LENGTHOF(sampleDefined), TRUE);
+                        sampleDefined, UPRV_LENGTHOF(sampleDefined), true);
     testSampleCharProps(u_isdefined, "u_isdefined",
-                        sampleUndefined, UPRV_LENGTHOF(sampleUndefined), FALSE);
+                        sampleUndefined, UPRV_LENGTHOF(sampleUndefined), false);
 
-    testSampleCharProps(u_isbase, "u_isbase", sampleBase, UPRV_LENGTHOF(sampleBase), TRUE);
-    testSampleCharProps(u_isbase, "u_isbase", sampleNonBase, UPRV_LENGTHOF(sampleNonBase), FALSE);
+    testSampleCharProps(u_isbase, "u_isbase", sampleBase, UPRV_LENGTHOF(sampleBase), true);
+    testSampleCharProps(u_isbase, "u_isbase", sampleNonBase, UPRV_LENGTHOF(sampleNonBase), false);
 
-    testSampleCharProps(u_isdigit, "u_isdigit", sampleDigits, UPRV_LENGTHOF(sampleDigits), TRUE);
-    testSampleCharProps(u_isdigit, "u_isdigit", sampleNonDigits, UPRV_LENGTHOF(sampleNonDigits), FALSE);
+    testSampleCharProps(u_isdigit, "u_isdigit", sampleDigits, UPRV_LENGTHOF(sampleDigits), true);
+    testSampleCharProps(u_isdigit, "u_isdigit", sampleNonDigits, UPRV_LENGTHOF(sampleNonDigits), false);
 
     for (i = 0; i < UPRV_LENGTHOF(sampleDigits); i++) {
         if (u_charDigitValue(sampleDigits[i]) != sampleDigitValues[i]) {
@@ -832,7 +833,7 @@ TestPOSIX() {
             expect=(UBool)((posixData[i].posixResults&mask)!=0);
             if(posixClasses[cl].fn(posixData[i].c)!=expect) {
                 log_err("u_%s(U+%04x)=%s is wrong\n",
-                    posixClasses[cl].name, posixData[i].c, expect ? "FALSE" : "TRUE");
+                    posixClasses[cl].name, posixData[i].c, expect ? "false" : "true");
             }
         }
         mask<<=1;
@@ -848,13 +849,13 @@ static void TestControlPrint()
     const UChar32 sampleNonPrintable[] = {0x200c, 0x009f, 0x001b};
     UChar32 c;
 
-    testSampleCharProps(u_iscntrl, "u_iscntrl", sampleControl, UPRV_LENGTHOF(sampleControl), TRUE);
-    testSampleCharProps(u_iscntrl, "u_iscntrl", sampleNonControl, UPRV_LENGTHOF(sampleNonControl), FALSE);
+    testSampleCharProps(u_iscntrl, "u_iscntrl", sampleControl, UPRV_LENGTHOF(sampleControl), true);
+    testSampleCharProps(u_iscntrl, "u_iscntrl", sampleNonControl, UPRV_LENGTHOF(sampleNonControl), false);
 
     testSampleCharProps(u_isprint, "u_isprint",
-                        samplePrintable, UPRV_LENGTHOF(samplePrintable), TRUE);
+                        samplePrintable, UPRV_LENGTHOF(samplePrintable), true);
     testSampleCharProps(u_isprint, "u_isprint",
-                        sampleNonPrintable, UPRV_LENGTHOF(sampleNonPrintable), FALSE);
+                        sampleNonPrintable, UPRV_LENGTHOF(sampleNonPrintable), false);
 
     /* test all ISO 8 controls */
     for(c=0; c<=0x9f; ++c) {
@@ -863,13 +864,13 @@ static void TestControlPrint()
             c=0x7f;
         }
         if(!u_iscntrl(c)) {
-            log_err("error: u_iscntrl(ISO 8 control U+%04x)=FALSE\n", c);
+            log_err("error: u_iscntrl(ISO 8 control U+%04x)=false\n", c);
         }
         if(!u_isISOControl(c)) {
-            log_err("error: u_isISOControl(ISO 8 control U+%04x)=FALSE\n", c);
+            log_err("error: u_isISOControl(ISO 8 control U+%04x)=false\n", c);
         }
         if(u_isprint(c)) {
-            log_err("error: u_isprint(ISO 8 control U+%04x)=TRUE\n", c);
+            log_err("error: u_isprint(ISO 8 control U+%04x)=true\n", c);
         }
     }
 
@@ -882,7 +883,7 @@ static void TestControlPrint()
             ++c;
         }
         if(!u_isprint(c)) {
-            log_err("error: u_isprint(Latin-1 graphic character U+%04x)=FALSE\n", c);
+            log_err("error: u_isprint(Latin-1 graphic character U+%04x)=false\n", c);
         }
     }
 }
@@ -902,37 +903,37 @@ static void TestIdentifier()
     const UChar32 sampleNonIDIgnore[] = {0x0075, 0x00a3, 0x0061};
 
     testSampleCharProps(u_isJavaIDStart, "u_isJavaIDStart",
-                        sampleJavaIDStart, UPRV_LENGTHOF(sampleJavaIDStart), TRUE);
+                        sampleJavaIDStart, UPRV_LENGTHOF(sampleJavaIDStart), true);
     testSampleCharProps(u_isJavaIDStart, "u_isJavaIDStart",
-                        sampleNonJavaIDStart, UPRV_LENGTHOF(sampleNonJavaIDStart), FALSE);
+                        sampleNonJavaIDStart, UPRV_LENGTHOF(sampleNonJavaIDStart), false);
 
     testSampleCharProps(u_isJavaIDPart, "u_isJavaIDPart",
-                        sampleJavaIDPart, UPRV_LENGTHOF(sampleJavaIDPart), TRUE);
+                        sampleJavaIDPart, UPRV_LENGTHOF(sampleJavaIDPart), true);
     testSampleCharProps(u_isJavaIDPart, "u_isJavaIDPart",
-                        sampleNonJavaIDPart, UPRV_LENGTHOF(sampleNonJavaIDPart), FALSE);
+                        sampleNonJavaIDPart, UPRV_LENGTHOF(sampleNonJavaIDPart), false);
 
     /* IDPart should imply IDStart */
     testSampleCharProps(u_isJavaIDPart, "u_isJavaIDPart",
-                        sampleJavaIDStart, UPRV_LENGTHOF(sampleJavaIDStart), TRUE);
+                        sampleJavaIDStart, UPRV_LENGTHOF(sampleJavaIDStart), true);
 
     testSampleCharProps(u_isIDStart, "u_isIDStart",
-                        sampleUnicodeIDStart, UPRV_LENGTHOF(sampleUnicodeIDStart), TRUE);
+                        sampleUnicodeIDStart, UPRV_LENGTHOF(sampleUnicodeIDStart), true);
     testSampleCharProps(u_isIDStart, "u_isIDStart",
-                        sampleNonUnicodeIDStart, UPRV_LENGTHOF(sampleNonUnicodeIDStart), FALSE);
+                        sampleNonUnicodeIDStart, UPRV_LENGTHOF(sampleNonUnicodeIDStart), false);
 
     testSampleCharProps(u_isIDPart, "u_isIDPart",
-                        sampleUnicodeIDPart, UPRV_LENGTHOF(sampleUnicodeIDPart), TRUE);
+                        sampleUnicodeIDPart, UPRV_LENGTHOF(sampleUnicodeIDPart), true);
     testSampleCharProps(u_isIDPart, "u_isIDPart",
-                        sampleNonUnicodeIDPart, UPRV_LENGTHOF(sampleNonUnicodeIDPart), FALSE);
+                        sampleNonUnicodeIDPart, UPRV_LENGTHOF(sampleNonUnicodeIDPart), false);
 
     /* IDPart should imply IDStart */
     testSampleCharProps(u_isIDPart, "u_isIDPart",
-                        sampleUnicodeIDStart, UPRV_LENGTHOF(sampleUnicodeIDStart), TRUE);
+                        sampleUnicodeIDStart, UPRV_LENGTHOF(sampleUnicodeIDStart), true);
 
     testSampleCharProps(u_isIDIgnorable, "u_isIDIgnorable",
-                        sampleIDIgnore, UPRV_LENGTHOF(sampleIDIgnore), TRUE);
+                        sampleIDIgnore, UPRV_LENGTHOF(sampleIDIgnore), true);
     testSampleCharProps(u_isIDIgnorable, "u_isIDIgnorable",
-                        sampleNonIDIgnore, UPRV_LENGTHOF(sampleNonIDIgnore), FALSE);
+                        sampleNonIDIgnore, UPRV_LENGTHOF(sampleNonIDIgnore), false);
 }
 
 /* for each line of UnicodeData.txt, check some of the properties */
@@ -1192,7 +1193,7 @@ enumTypeRange(const void *context, UChar32 start, UChar32 limit, UCharCategory t
 
     if(0!=strcmp((const char *)context, "a1")) {
         log_err("error: u_enumCharTypes() passes on an incorrect context pointer\n");
-        return FALSE;
+        return false;
     }
 
     count=UPRV_LENGTHOF(test);
@@ -1203,17 +1204,17 @@ enumTypeRange(const void *context, UChar32 start, UChar32 limit, UCharCategory t
                         start, limit, (long)type, test[i][0], test[i][1]);
             }
             /* stop at the range that includes the last test code point (increases code coverage for enumeration) */
-            return i==(count-1) ? FALSE : TRUE;
+            return i==(count-1) ? false : true;
         }
     }
 
     if(start>test[count-1][0]) {
         log_err("error: u_enumCharTypes() has range [U+%04lx, U+%04lx[ with %ld after it should have stopped\n",
                 start, limit, (long)type);
-        return FALSE;
+        return false;
     }
 
-    return TRUE;
+    return true;
 }
 
 static UBool U_CALLCONV
@@ -1308,7 +1309,7 @@ enumDefaultsRange(const void *context, UChar32 start, UChar32 limit, UCharCatego
         }
     }
 
-    return TRUE;
+    return true;
 }
 
 /* tests for several properties */
@@ -1614,7 +1615,7 @@ static void TestCharLength()
             log_err("The no: of code units for U+%04x:- Expected: %d Got: %d\n", c, codepoint[i], U16_LENGTH(c));
         }
 #if !U_HIDE_OBSOLETE_UTF_OLD_H
-        multiple=(UBool)(codepoint[i] == 1 ? FALSE : TRUE);
+        multiple=(UBool)(codepoint[i] == 1 ? false : true);
         if(UTF_NEED_MULTIPLE_UCHAR(c) != multiple){
             log_err("ERROR: Unicode::needMultipleUChar() failed for U+%04x\n", c);
         }
@@ -1691,7 +1692,7 @@ enumCharNamesFn(void *context,
     if(length<=0 || length!=(int32_t)strlen(name)) {
         /* should not be called with an empty string or invalid length */
         log_err("u_enumCharName(0x%lx)=%s but length=%ld\n", name, length);
-        return TRUE;
+        return true;
     }
 
     ++*pCount;
@@ -1726,7 +1727,7 @@ enumCharNamesFn(void *context,
             break;
         }
     }
-    return TRUE;
+    return true;
 }
 
 struct enumExtCharNamesContext {
@@ -1922,7 +1923,7 @@ TestCharNames() {
 
         /* build set the dumb (but sure-fire) way */
         for (i=0; i<256; ++i) {
-            map[i] = FALSE;
+            map[i] = false;
         }
 
         maxLength=0;
@@ -1942,7 +1943,7 @@ TestCharNames() {
             for (i=0; i 10 && !atLeastSomething) {
           log_data_err("Never got anything after 10 tries.\nYour data is probably fried. Quitting this test\n", p, choice);
           return;
@@ -3073,8 +3074,8 @@ TestPropertyNames(void) {
                 if (!sawProp)
                     log_verbose("prop 0x%04x+%2d:", p&~0xfff, p&0xfff);
                 log_verbose("%d=\"%s\"", choice, name);
-                sawProp = TRUE;
-                atLeastSomething = TRUE;
+                sawProp = true;
+                atLeastSomething = true;
 
                 /* test reverse mapping */
                 rev = u_getPropertyEnum(name);
@@ -3101,13 +3102,13 @@ TestPropertyNames(void) {
             }
             log_verbose("\n");
             for (v=-1; ; ++v) {
-                UBool sawValue = FALSE;
+                UBool sawValue = false;
                 for (choice=0; ; ++choice) {
                     const char* vname = u_getPropertyValueName(propEnum, v, (UPropertyNameChoice)choice);
                     if (vname) {
                         if (!sawValue) log_verbose(" %s, value %d:", pname, v);
                         log_verbose("%d=\"%s\"", choice, vname);
-                        sawValue = TRUE;
+                        sawValue = true;
 
                         /* test reverse mapping */
                         rev = u_getPropertyValueEnum(propEnum, vname);
@@ -3265,7 +3266,7 @@ TestConsistency() {
         /* remove the Katakana middle dot(s) from set1 */
         uset_remove(set1, 0x30fb);
         uset_remove(set1, 0xff65); /* halfwidth variant */
-        showAMinusB(set1, set2, "[:Hyphen:]", "[:Dash:]", FALSE);
+        showAMinusB(set1, set2, "[:Hyphen:]", "[:Dash:]", false);
     } else {
         log_data_err("error opening [:Hyphen:] or [:Dash:] - %s (Are you missing data?)\n", u_errorName(errorCode));
     }
@@ -3274,9 +3275,9 @@ TestConsistency() {
     set3=uset_openPattern(formatPattern, 6, &errorCode);
     set4=uset_openPattern(alphaPattern, 14, &errorCode);
     if(U_SUCCESS(errorCode)) {
-        showAIntersectB(set3, set1, "[:Cf:]", "[:Hyphen:]", FALSE);
-        showAIntersectB(set3, set2, "[:Cf:]", "[:Dash:]", TRUE);
-        showAIntersectB(set3, set4, "[:Cf:]", "[:Alphabetic:]", TRUE);
+        showAIntersectB(set3, set1, "[:Cf:]", "[:Hyphen:]", false);
+        showAIntersectB(set3, set2, "[:Cf:]", "[:Dash:]", true);
+        showAIntersectB(set3, set4, "[:Cf:]", "[:Alphabetic:]", true);
     } else {
         log_data_err("error opening [:Cf:] or [:Alpbabetic:] - %s (Are you missing data?)\n", u_errorName(errorCode));
     }
@@ -3339,7 +3340,7 @@ TestConsistency() {
         uset_retainAll(set1, set3); /* [math blocks]&[assigned] */
         compareUSets(set1, set2,
                      "[assigned Math block chars]", "[math blocks]&[:Math:]",
-                     TRUE);
+                     true);
     } else {
         log_data_err("error opening [math blocks] or [:Math:] or [:Cn:] - %s (Are you missing data?)\n", u_errorName(errorCode));
     }
@@ -3354,7 +3355,7 @@ TestConsistency() {
     if(U_SUCCESS(errorCode)) {
         compareUSets(set1, set2,
                      "[:sc=Unknown:]", "[[:Cn:][:Co:][:Cs:]]",
-                     TRUE);
+                     true);
     } else {
         log_data_err("error opening [:sc=Unknown:] or [[:Cn:][:Co:][:Cs:]] - %s (Are you missing data?)\n", u_errorName(errorCode));
     }
diff --git a/icu4c/source/test/cintltst/currtest.c b/icu4c/source/test/cintltst/currtest.c
index 9f3254fe855..731f3a2c766 100644
--- a/icu4c/source/test/cintltst/currtest.c
+++ b/icu4c/source/test/cintltst/currtest.c
@@ -8,6 +8,9 @@
 #include "unicode/utypes.h"
 
 #if !UCONFIG_NO_FORMATTING
+
+#include 
+
 #include "unicode/unum.h"
 #include "unicode/ucurr.h"
 #include "unicode/ustring.h"
@@ -34,70 +37,70 @@ static void expectInList(const char *isoCurrency, uint32_t currencyType, UBool i
 
     if ((foundCurrency != NULL) != isExpected) {
        log_err("Error: could not find %s as expected. isExpected = %s type=0x%X\n",
-           isoCurrency, isExpected ? "TRUE" : "FALSE", currencyType);
+           isoCurrency, isExpected ? "true" : "false", currencyType);
     }
     uenum_close(en);
 }
 
 static void TestEnumList(void) {
-    expectInList("ADP", UCURR_ALL, TRUE); /* First in list */
-    expectInList("ZWD", UCURR_ALL, TRUE); /* Last in list */
+    expectInList("ADP", UCURR_ALL, true); /* First in list */
+    expectInList("ZWD", UCURR_ALL, true); /* Last in list */
 
-    expectInList("USD", UCURR_ALL, TRUE);
-    expectInList("USD", UCURR_COMMON, TRUE);
-    expectInList("USD", UCURR_UNCOMMON, FALSE);
-    expectInList("USD", UCURR_DEPRECATED, FALSE);
-    expectInList("USD", UCURR_NON_DEPRECATED, TRUE);
-    expectInList("USD", UCURR_COMMON|UCURR_DEPRECATED, FALSE);
-    expectInList("USD", UCURR_COMMON|UCURR_NON_DEPRECATED, TRUE);
-    expectInList("USD", UCURR_UNCOMMON|UCURR_DEPRECATED, FALSE);
-    expectInList("USD", UCURR_UNCOMMON|UCURR_NON_DEPRECATED, FALSE);
+    expectInList("USD", UCURR_ALL, true);
+    expectInList("USD", UCURR_COMMON, true);
+    expectInList("USD", UCURR_UNCOMMON, false);
+    expectInList("USD", UCURR_DEPRECATED, false);
+    expectInList("USD", UCURR_NON_DEPRECATED, true);
+    expectInList("USD", UCURR_COMMON|UCURR_DEPRECATED, false);
+    expectInList("USD", UCURR_COMMON|UCURR_NON_DEPRECATED, true);
+    expectInList("USD", UCURR_UNCOMMON|UCURR_DEPRECATED, false);
+    expectInList("USD", UCURR_UNCOMMON|UCURR_NON_DEPRECATED, false);
 
-    expectInList("USN", UCURR_ALL, TRUE);
-    expectInList("USN", UCURR_COMMON, FALSE);
-    expectInList("USN", UCURR_UNCOMMON, TRUE);
-    expectInList("USN", UCURR_DEPRECATED, FALSE);
-    expectInList("USN", UCURR_NON_DEPRECATED, TRUE);
-    expectInList("USN", UCURR_COMMON|UCURR_DEPRECATED, FALSE);
-    expectInList("USN", UCURR_COMMON|UCURR_NON_DEPRECATED, FALSE);
-    expectInList("USN", UCURR_UNCOMMON|UCURR_DEPRECATED, FALSE);
-    expectInList("USN", UCURR_UNCOMMON|UCURR_NON_DEPRECATED, TRUE);
+    expectInList("USN", UCURR_ALL, true);
+    expectInList("USN", UCURR_COMMON, false);
+    expectInList("USN", UCURR_UNCOMMON, true);
+    expectInList("USN", UCURR_DEPRECATED, false);
+    expectInList("USN", UCURR_NON_DEPRECATED, true);
+    expectInList("USN", UCURR_COMMON|UCURR_DEPRECATED, false);
+    expectInList("USN", UCURR_COMMON|UCURR_NON_DEPRECATED, false);
+    expectInList("USN", UCURR_UNCOMMON|UCURR_DEPRECATED, false);
+    expectInList("USN", UCURR_UNCOMMON|UCURR_NON_DEPRECATED, true);
 
-    expectInList("DEM", UCURR_ALL, TRUE);
-    expectInList("DEM", UCURR_COMMON, TRUE);
-    expectInList("DEM", UCURR_UNCOMMON, FALSE);
-    expectInList("DEM", UCURR_DEPRECATED, TRUE);
-    expectInList("DEM", UCURR_NON_DEPRECATED, FALSE);
-    expectInList("DEM", UCURR_COMMON|UCURR_DEPRECATED, TRUE);
-    expectInList("DEM", UCURR_COMMON|UCURR_NON_DEPRECATED, FALSE);
-    expectInList("DEM", UCURR_UNCOMMON|UCURR_DEPRECATED, FALSE);
-    expectInList("DEM", UCURR_UNCOMMON|UCURR_NON_DEPRECATED, FALSE);
+    expectInList("DEM", UCURR_ALL, true);
+    expectInList("DEM", UCURR_COMMON, true);
+    expectInList("DEM", UCURR_UNCOMMON, false);
+    expectInList("DEM", UCURR_DEPRECATED, true);
+    expectInList("DEM", UCURR_NON_DEPRECATED, false);
+    expectInList("DEM", UCURR_COMMON|UCURR_DEPRECATED, true);
+    expectInList("DEM", UCURR_COMMON|UCURR_NON_DEPRECATED, false);
+    expectInList("DEM", UCURR_UNCOMMON|UCURR_DEPRECATED, false);
+    expectInList("DEM", UCURR_UNCOMMON|UCURR_NON_DEPRECATED, false);
 
-    expectInList("XEU", UCURR_ALL, TRUE);
-    expectInList("XEU", UCURR_COMMON, FALSE);
-    expectInList("XEU", UCURR_UNCOMMON, TRUE);
-    expectInList("XEU", UCURR_DEPRECATED, TRUE);
-    expectInList("XEU", UCURR_NON_DEPRECATED, FALSE);
-    expectInList("XEU", UCURR_COMMON|UCURR_DEPRECATED, FALSE);
-    expectInList("XEU", UCURR_COMMON|UCURR_NON_DEPRECATED, FALSE);
-    expectInList("XEU", UCURR_UNCOMMON|UCURR_DEPRECATED, TRUE);
-    expectInList("XEU", UCURR_UNCOMMON|UCURR_NON_DEPRECATED, FALSE);
+    expectInList("XEU", UCURR_ALL, true);
+    expectInList("XEU", UCURR_COMMON, false);
+    expectInList("XEU", UCURR_UNCOMMON, true);
+    expectInList("XEU", UCURR_DEPRECATED, true);
+    expectInList("XEU", UCURR_NON_DEPRECATED, false);
+    expectInList("XEU", UCURR_COMMON|UCURR_DEPRECATED, false);
+    expectInList("XEU", UCURR_COMMON|UCURR_NON_DEPRECATED, false);
+    expectInList("XEU", UCURR_UNCOMMON|UCURR_DEPRECATED, true);
+    expectInList("XEU", UCURR_UNCOMMON|UCURR_NON_DEPRECATED, false);
 
     // ICU-21622
-    expectInList("UYW", UCURR_ALL, TRUE);
-    expectInList("UYW", UCURR_COMMON, FALSE);
-    expectInList("UYW", UCURR_UNCOMMON, TRUE);
-    expectInList("UYW", UCURR_DEPRECATED, FALSE);
-    expectInList("UYW", UCURR_NON_DEPRECATED, TRUE);
+    expectInList("UYW", UCURR_ALL, true);
+    expectInList("UYW", UCURR_COMMON, false);
+    expectInList("UYW", UCURR_UNCOMMON, true);
+    expectInList("UYW", UCURR_DEPRECATED, false);
+    expectInList("UYW", UCURR_NON_DEPRECATED, true);
 
     // ICU-21685
-    expectInList("VES", UCURR_ALL, TRUE);
-    expectInList("VES", UCURR_COMMON, TRUE);
-    expectInList("VES", UCURR_UNCOMMON, FALSE);
-    expectInList("VES", UCURR_DEPRECATED, FALSE);
-    expectInList("VES", UCURR_NON_DEPRECATED, TRUE);
+    expectInList("VES", UCURR_ALL, true);
+    expectInList("VES", UCURR_COMMON, true);
+    expectInList("VES", UCURR_UNCOMMON, false);
+    expectInList("VES", UCURR_DEPRECATED, false);
+    expectInList("VES", UCURR_NON_DEPRECATED, true);
 
-    expectInList("EQE", UCURR_ALL, FALSE);
+    expectInList("EQE", UCURR_ALL, false);
 }
 
 static void TestEnumListReset(void) {
diff --git a/icu4c/source/test/cintltst/custrtrn.c b/icu4c/source/test/cintltst/custrtrn.c
index 615cdbf9b65..d794d79baa3 100644
--- a/icu4c/source/test/cintltst/custrtrn.c
+++ b/icu4c/source/test/cintltst/custrtrn.c
@@ -17,8 +17,9 @@
 /****************************************************************************/
 
 
-#include 
+#include 
 #include 
+#include 
 #include 
 #include "unicode/utypes.h"
 #include "unicode/ustring.h"
@@ -516,7 +517,7 @@ static void Test_UChar_UTF8_API(void){
     char* u8Target = u8Temp;
     int32_t u8TargetLength =0;
     int32_t u8DestLen =0;
-    UBool failed = FALSE;
+    UBool failed = false;
     int i= 0;
     int32_t numSubstitutions;
 
@@ -541,7 +542,7 @@ static void Test_UChar_UTF8_API(void){
         else {
             log_err("Should have gotten U_BUFFER_OVERFLOW_ERROR");
         }
-        failed = FALSE;
+        failed = false;
         /*for(i=0; i< u8DestLen; i++){
             printf("0x%04X, ",u8Target[i]);
             if(i%10==0){
@@ -551,7 +552,7 @@ static void Test_UChar_UTF8_API(void){
         /*for(i=0; i< u8DestLen; i++){
             if(u8Target[i] != src8[i]){
                 log_verbose("u_strToUTF8() failed expected: %04X got: %04X \n", src8[i], u8Target[i]);
-                failed =TRUE;
+                failed =true;
             }
         }
         if(failed){
@@ -583,12 +584,12 @@ static void Test_UChar_UTF8_API(void){
         }*/
 
         if(U_FAILURE(err) || uDestLen != uTargetLength || uTarget[uTargetLength] != 0xfff0) {
-            failed = TRUE;
+            failed = true;
         }
         for(i=0; i< uSrcLen; i++){
             if(uTarget[i] != src16[i]){
                 log_verbose("u_strFromUTF8() failed expected: \\u%04X got: \\u%04X at index: %i \n", src16[i] ,uTarget[i],i);
-                failed =TRUE;
+                failed =true;
             }
         }
         if(failed){
@@ -603,7 +604,7 @@ static void Test_UChar_UTF8_API(void){
         uTargetLength = 0;
         uSrcLen =-1;
         u8TargetLength=0;
-        failed = FALSE;
+        failed = false;
         /* preflight */
         u_strToUTF8(NULL,u8TargetLength, &u8DestLen, uSrc, uSrcLen,&err);
         if(err == U_BUFFER_OVERFLOW_ERROR){
@@ -617,7 +618,7 @@ static void Test_UChar_UTF8_API(void){
         else {
             log_err("Should have gotten U_BUFFER_OVERFLOW_ERROR");
         }
-        failed = FALSE;
+        failed = false;
         /*for(i=0; i< u8DestLen; i++){
             printf("0x%04X, ",u8Target[i]);
             if(i%10==0){
@@ -627,7 +628,7 @@ static void Test_UChar_UTF8_API(void){
         /*for(i=0; i< u8DestLen; i++){
             if(u8Target[i] != src8[i]){
                 log_verbose("u_strToUTF8() failed expected: %04X got: %04X \n", src8[i], u8Target[i]);
-                failed =TRUE;
+                failed =true;
             }
         }
         if(failed){
@@ -658,7 +659,7 @@ static void Test_UChar_UTF8_API(void){
         for(i=0; i< uSrcLen; i++){
             if(uTarget[i] != src16[i]){
                 log_verbose("u_strFromUTF8() failed expected: \\u%04X got: \\u%04X at index: %i \n", src16[i] ,uTarget[i],i);
-                failed =TRUE;
+                failed =true;
             }
         }
         if(failed){
@@ -871,11 +872,11 @@ equalAnyFFFD(const UChar *s, const UChar *t, int32_t length) {
         c1=*s++;
         c2=*t++;
         if(c1!=c2 && c2!=0xfffd) {
-            return FALSE;
+            return false;
         }
         --length;
     }
-    return TRUE;
+    return true;
 }
 
 /* test u_strFromUTF8Lenient() */
@@ -1171,7 +1172,7 @@ static void Test_UChar_WCHART_API(void){
     wchar_t* wDest = NULL;
     int32_t wDestLen = 0;
     int32_t reqLen= 0 ;
-    UBool failed = FALSE;
+    UBool failed = false;
     UChar* uDest = NULL;
     int32_t uDestLen = 0;
     int i =0;
@@ -1225,12 +1226,12 @@ static void Test_UChar_WCHART_API(void){
         for(i=0; i< uSrcLen; i++){
             if(uDest[i] != src16j[i]){
                 log_verbose("u_str*WCS() failed for unterminated string expected: \\u%04X got: \\u%04X at index: %i \n", src16j[i] ,uDest[i],i);
-                failed =TRUE;
+                failed =true;
             }
         }
 
         if(U_FAILURE(err)){
-            failed = TRUE;
+            failed = true;
         }
         if(failed){
             log_err("u_strToWCS() failed \n");
@@ -1270,13 +1271,13 @@ static void Test_UChar_WCHART_API(void){
          for(i=0; i< uSrcLen; i++){
             if(uDest[i] != src16WithNulls[i]){
                 log_verbose("u_str*WCS() failed for string with nulls expected: \\u%04X got: \\u%04X at index: %i \n", src16WithNulls[i] ,uDest[i],i);
-                failed =TRUE;
+                failed =true;
             }
          }
         }
 
         if(U_FAILURE(err)){
-            failed = TRUE;
+            failed = true;
         }
         if(failed){
             log_err("u_strToWCS() failed \n");
@@ -1320,13 +1321,13 @@ static void Test_UChar_WCHART_API(void){
          for(i=0; i< uSrcLen; i++){
             if(uDest[i] != src16j[i]){
                 log_verbose("u_str*WCS() failed for null terminated string expected: \\u%04X got: \\u%04X at index: %i \n", src16j[i] ,uDest[i],i);
-                failed =TRUE;
+                failed =true;
             }
          }
         }
 
         if(U_FAILURE(err)){
-            failed = TRUE;
+            failed = true;
         }
         if(failed){
             log_err("u_strToWCS() failed \n");
@@ -1437,7 +1438,7 @@ Test_WCHART_LongString(){
     int32_t uDestLen =0;
     wchar_t* wDest = NULL;
     UChar* uDest = NULL;
-    UBool failed = FALSE;
+    UBool failed = false;
 
     log_verbose("Loaded string of %d UChars\n", uSrcLen);
 
@@ -1493,12 +1494,12 @@ Test_WCHART_LongString(){
     for(i=0; i< uSrcLen; i++){
         if(uDest[i] != str[i]){
             log_verbose("u_str*WCS() failed for null terminated string expected: \\u%04X got: \\u%04X at index: %i \n", str[i], uDest[i],i);
-            failed =TRUE;
+            failed =true;
         }
     }
 
     if(U_FAILURE(status)){
-        failed = TRUE;
+        failed = true;
     }
     if(failed){
         log_err("u_strToWCS() failed \n");
diff --git a/icu4c/source/test/cintltst/custrtst.c b/icu4c/source/test/cintltst/custrtst.c
index db503ff113d..f276b94cc2d 100644
--- a/icu4c/source/test/cintltst/custrtst.c
+++ b/icu4c/source/test/cintltst/custrtst.c
@@ -24,6 +24,7 @@
 #include "cintltst.h"
 #include "cstring.h"
 #include "cmemory.h"
+#include 
 #include 
 
 /* get the sign of an integer */
@@ -445,19 +446,19 @@ static void TestStringFunctions()
                 log_err("error: u_strncmpCodePointOrder(2)!=u_memcmpCodePointOrder(2) for string %d and the following one\n", i);
             }
 
-            /* test u_strCompare(TRUE) */
+            /* test u_strCompare(true) */
             len1=u_strlen(strings[i]);
             len2=u_strlen(strings[i+1]);
-            if( u_strCompare(strings[i], -1, strings[i+1], -1, TRUE)>=0 ||
-                u_strCompare(strings[i], -1, strings[i+1], len2, TRUE)>=0 ||
-                u_strCompare(strings[i], len1, strings[i+1], -1, TRUE)>=0 ||
-                u_strCompare(strings[i], len1, strings[i+1], len2, TRUE)>=0
+            if( u_strCompare(strings[i], -1, strings[i+1], -1, true)>=0 ||
+                u_strCompare(strings[i], -1, strings[i+1], len2, true)>=0 ||
+                u_strCompare(strings[i], len1, strings[i+1], -1, true)>=0 ||
+                u_strCompare(strings[i], len1, strings[i+1], len2, true)>=0
             ) {
                 log_err("error: u_strCompare(code point order) fails for string %d and the following one\n", i);
             }
 
-            /* test u_strCompare(FALSE) */
-            r1=u_strCompare(strings[i], -1, strings[i+1], -1, FALSE);
+            /* test u_strCompare(false) */
+            r1=u_strCompare(strings[i], -1, strings[i+1], -1, false);
             r2=u_strcmp(strings[i], strings[i+1]);
             if(_SIGN(r1)!=_SIGN(r2)) {
                 log_err("error: u_strCompare(code unit order)!=u_strcmp() for string %d and the following one\n", i);
@@ -466,10 +467,10 @@ static void TestStringFunctions()
             /* test u_strCompareIter() */
             uiter_setString(&iter1, strings[i], len1);
             uiter_setString(&iter2, strings[i+1], len2);
-            if(u_strCompareIter(&iter1, &iter2, TRUE)>=0) {
+            if(u_strCompareIter(&iter1, &iter2, true)>=0) {
                 log_err("error: u_strCompareIter(code point order) fails for string %d and the following one\n", i);
             }
-            r1=u_strCompareIter(&iter1, &iter2, FALSE);
+            r1=u_strCompareIter(&iter1, &iter2, false);
             if(_SIGN(r1)!=_SIGN(u_strcmp(strings[i], strings[i+1]))) {
                 log_err("error: u_strCompareIter(code unit order)!=u_strcmp() for string %d and the following one\n", i);
             }
@@ -1312,7 +1313,7 @@ compareIterators(UCharIterator *iter1, const char *n1,
         return;
     }
     if(!iter1->hasNext(iter1)) {
-        log_err("%s->hasNext() at the start returns FALSE\n", n1);
+        log_err("%s->hasNext() at the start returns false\n", n1);
         return;
     }
 
@@ -1322,7 +1323,7 @@ compareIterators(UCharIterator *iter1, const char *n1,
         return;
     }
     if(!iter2->hasNext(iter2)) {
-        log_err("%s->hasNext() at the start returns FALSE\n", n2);
+        log_err("%s->hasNext() at the start returns false\n", n2);
         return;
     }
 
@@ -1336,11 +1337,11 @@ compareIterators(UCharIterator *iter1, const char *n1,
     } while(c1>=0);
 
     if(iter1->hasNext(iter1)) {
-        log_err("%s->hasNext() at the end returns TRUE\n", n1);
+        log_err("%s->hasNext() at the end returns true\n", n1);
         return;
     }
     if(iter2->hasNext(iter2)) {
-        log_err("%s->hasNext() at the end returns TRUE\n", n2);
+        log_err("%s->hasNext() at the end returns true\n", n2);
         return;
     }
 
@@ -1377,7 +1378,7 @@ compareIterators(UCharIterator *iter1, const char *n1,
         return;
     }
     if(!iter1->hasPrevious(iter1)) {
-        log_err("%s->hasPrevious() at the end returns FALSE\n", n1);
+        log_err("%s->hasPrevious() at the end returns false\n", n1);
         return;
     }
 
@@ -1387,7 +1388,7 @@ compareIterators(UCharIterator *iter1, const char *n1,
         return;
     }
     if(!iter2->hasPrevious(iter2)) {
-        log_err("%s->hasPrevious() at the end returns FALSE\n", n2);
+        log_err("%s->hasPrevious() at the end returns false\n", n2);
         return;
     }
 
@@ -1401,11 +1402,11 @@ compareIterators(UCharIterator *iter1, const char *n1,
     } while(c1>=0);
 
     if(iter1->hasPrevious(iter1)) {
-        log_err("%s->hasPrevious() at the start returns TRUE\n", n1);
+        log_err("%s->hasPrevious() at the start returns true\n", n1);
         return;
     }
     if(iter2->hasPrevious(iter2)) {
-        log_err("%s->hasPrevious() at the start returns TRUE\n", n2);
+        log_err("%s->hasPrevious() at the start returns true\n", n2);
         return;
     }
 }
diff --git a/icu4c/source/test/cintltst/eurocreg.c b/icu4c/source/test/cintltst/eurocreg.c
index 19633c03486..9aac51b099a 100644
--- a/icu4c/source/test/cintltst/eurocreg.c
+++ b/icu4c/source/test/cintltst/eurocreg.c
@@ -5,6 +5,9 @@
  * Copyright (c) 1999-2013, International Business Machines Corporation and
  * others. All Rights Reserved.
  ********************************************************************/
+
+#include 
+
 #include "unicode/utypes.h"
 #include "unicode/ustring.h"
 #include "unicode/ctest.h"
@@ -157,7 +160,7 @@ UBool isEuroAware(UConverter* myConv)
     if (U_FAILURE(err))
     {
       log_err("Failure occurred in ucnv_fromUChars euro roundtrip test\n");
-      return FALSE;
+      return false;
     }
     euroBackSize = ucnv_toUChars(myConv,
             euroBack,
@@ -169,17 +172,17 @@ UBool isEuroAware(UConverter* myConv)
     if (U_FAILURE(err))
     {
         log_err("Failure occurred in ucnv_toUChars euro roundtrip test\n");
-        return FALSE;
+        return false;
     }
     if (u_strcmp(euroString, euroBack)) 
     {
         /*      log_err("%s FAILED Euro roundtrip\n", myName);*/
-        return FALSE;
+        return false;
     }
     else 
     {
         /*      log_verbose("%s PASSED Euro roundtrip\n", myName);*/
-        return TRUE;
+        return true;
     }
 
 }
diff --git a/icu4c/source/test/cintltst/idnatest.c b/icu4c/source/test/cintltst/idnatest.c
index 3025e85416e..bd979f0d4c5 100644
--- a/icu4c/source/test/cintltst/idnatest.c
+++ b/icu4c/source/test/cintltst/idnatest.c
@@ -15,6 +15,7 @@
  *   created on: 2003jul11
  *   created by: Ram Viswanadha
  */
+#include 
 #include 
 #include 
 #include "unicode/utypes.h"
@@ -79,7 +80,7 @@ testAPI(const UChar* src, const UChar* expected, const char* testName,
     int32_t destLen = 0;
     UChar* dest = NULL;
     int32_t expectedLen = (expected != NULL) ? u_strlen(expected) : 0;
-    int32_t options = (useSTD3ASCIIRules == TRUE) ? UIDNA_USE_STD3_RULES : UIDNA_DEFAULT;
+    int32_t options = (useSTD3ASCIIRules == true) ? UIDNA_USE_STD3_RULES : UIDNA_DEFAULT;
     UParseError parseError;
     int32_t tSrcLen = 0;
     UChar* tSrc = NULL;
@@ -99,7 +100,7 @@ testAPI(const UChar* src, const UChar* expected, const char* testName,
             dest = destStack;
             destLen = func(src,-1,dest,destLen+1,options, &parseError, &status);
             /* TODO : compare output with expected */
-            if(U_SUCCESS(status) && expectedStatus != U_IDNA_STD3_ASCII_RULES_ERROR&& (doCompare==TRUE) && u_strCaseCompare(dest,destLen, expected,expectedLen,0,&status)!=0){
+            if(U_SUCCESS(status) && expectedStatus != U_IDNA_STD3_ASCII_RULES_ERROR&& (doCompare==true) && u_strCaseCompare(dest,destLen, expected,expectedLen,0,&status)!=0){
                 log_err("Did not get the expected result for  null terminated source.\n" );
             }
         }else{
@@ -121,7 +122,7 @@ testAPI(const UChar* src, const UChar* expected, const char* testName,
                 dest = destStack;
                 destLen = func(src,-1,dest,destLen+1,options | UIDNA_ALLOW_UNASSIGNED, &parseError, &status);
                 /* TODO : compare output with expected */
-                if(U_SUCCESS(status) && (doCompare==TRUE) && u_strCaseCompare(dest,destLen, expected,expectedLen,0,&status)!=0){
+                if(U_SUCCESS(status) && (doCompare==true) && u_strCaseCompare(dest,destLen, expected,expectedLen,0,&status)!=0){
                     log_err("Did not get the expected result for %s null terminated source with both options set.\n",testName);
 
                 }
@@ -145,7 +146,7 @@ testAPI(const UChar* src, const UChar* expected, const char* testName,
             dest = destStack;
             destLen = func(src,u_strlen(src),dest,destLen+1,options, &parseError, &status);
             /* TODO : compare output with expected */
-            if(U_SUCCESS(status) && (doCompare==TRUE) && u_strCaseCompare(dest,destLen, expected,expectedLen,0,&status)!=0){
+            if(U_SUCCESS(status) && (doCompare==true) && u_strCaseCompare(dest,destLen, expected,expectedLen,0,&status)!=0){
                 log_err("Did not get the expected result for %s with source length.\n",testName);
             }
         }else{
@@ -167,7 +168,7 @@ testAPI(const UChar* src, const UChar* expected, const char* testName,
                 dest = destStack;
                 destLen = func(src,u_strlen(src),dest,destLen+1,options | UIDNA_ALLOW_UNASSIGNED, &parseError, &status);
                 /* TODO : compare output with expected */
-                if(U_SUCCESS(status) && (doCompare==TRUE) && u_strCaseCompare(dest,destLen, expected,expectedLen,0,&status)!=0){
+                if(U_SUCCESS(status) && (doCompare==true) && u_strCaseCompare(dest,destLen, expected,expectedLen,0,&status)!=0){
                     log_err("Did not get the expected result for %s with source length and both options set.\n",testName);
                 }
             }else{
@@ -188,7 +189,7 @@ testAPI(const UChar* src, const UChar* expected, const char* testName,
             dest = destStack;
             destLen = func(src,-1,dest,destLen+1,options | UIDNA_USE_STD3_RULES, &parseError, &status);
             /* TODO : compare output with expected*/
-            if(U_SUCCESS(status) && (doCompare==TRUE) && u_strCaseCompare(dest,destLen, expected,expectedLen,0,&status)!=0){
+            if(U_SUCCESS(status) && (doCompare==true) && u_strCaseCompare(dest,destLen, expected,expectedLen,0,&status)!=0){
                 log_err("Did not get the expected result for %s null terminated source with both options set.\n",testName);
 
             }
@@ -211,7 +212,7 @@ testAPI(const UChar* src, const UChar* expected, const char* testName,
             dest = destStack;
             destLen = func(src,u_strlen(src),dest,destLen+1,options | UIDNA_USE_STD3_RULES, &parseError, &status);
             /* TODO : compare output with expected*/
-            if(U_SUCCESS(status) && (doCompare==TRUE) && u_strCaseCompare(dest,destLen, expected,expectedLen,0,&status)!=0){
+            if(U_SUCCESS(status) && (doCompare==true) && u_strCaseCompare(dest,destLen, expected,expectedLen,0,&status)!=0){
                 log_err("Did not get the expected result for %s with source length and both options set.\n",testName);
             }
         }else{
@@ -434,7 +435,7 @@ TestToASCII(){
     TestFunc func = uidna_toASCII;
     for(i=0;i< UPRV_LENGTHOF(unicodeIn); i++){
         u_charsToUChars(asciiIn[i],buf, (int32_t)strlen(asciiIn[i])+1);
-        testAPI(unicodeIn[i], buf,testName, FALSE,U_ZERO_ERROR, TRUE, TRUE, func);
+        testAPI(unicodeIn[i], buf,testName, false,U_ZERO_ERROR, true, true, func);
 
     }
 }
@@ -448,7 +449,7 @@ TestToUnicode(){
     TestFunc func = uidna_toUnicode;
     for(i=0;i< UPRV_LENGTHOF(asciiIn); i++){
         u_charsToUChars(asciiIn[i],buf, (int32_t)strlen(asciiIn[i])+1);
-        testAPI(buf,unicodeIn[i],testName,FALSE,U_ZERO_ERROR, TRUE, TRUE, func);
+        testAPI(buf,unicodeIn[i],testName,false,U_ZERO_ERROR, true, true, func);
     }
 }
 
@@ -471,9 +472,9 @@ TestIDNToUnicode(){
             log_err_status(status,  "%s failed to convert domainNames[%i].Error: %s \n",testName, i, u_errorName(status));
             break;
         }
-        testAPI(buf,expected,testName,FALSE,U_ZERO_ERROR, TRUE, TRUE, func);
+        testAPI(buf,expected,testName,false,U_ZERO_ERROR, true, true, func);
          /*test toUnicode with all labels in the string*/
-        testAPI(buf,expected,testName, FALSE,U_ZERO_ERROR, TRUE, TRUE, func);
+        testAPI(buf,expected,testName, false,U_ZERO_ERROR, true, true, func);
         if(U_FAILURE(status)){
             log_err( "%s failed to convert domainNames[%i].Error: %s \n",testName,i, u_errorName(status));
             break;
@@ -501,9 +502,9 @@ TestIDNToASCII(){
             log_err_status(status,  "%s failed to convert domainNames[%i].Error: %s \n",testName,i, u_errorName(status));
             break;
         }
-        testAPI(buf,expected,testName, FALSE,U_ZERO_ERROR, TRUE, TRUE, func);
+        testAPI(buf,expected,testName, false,U_ZERO_ERROR, true, true, func);
         /*test toASCII with all labels in the string*/
-        testAPI(buf,expected,testName, FALSE,U_ZERO_ERROR, FALSE, TRUE, func);
+        testAPI(buf,expected,testName, false,U_ZERO_ERROR, false, true, func);
         if(U_FAILURE(status)){
             log_err( "%s failed to convert domainNames[%i].Error: %s \n",testName,i, u_errorName(status));
             break;
@@ -523,7 +524,7 @@ testCompareWithSrc(const UChar* s1, int32_t s1Len,
     UErrorCode status = U_ZERO_ERROR;
     int32_t retVal = func(s1,-1,s2,-1,UIDNA_DEFAULT,&status);
 
-    if(isEqual==TRUE &&  retVal !=0){
+    if(isEqual==true &&  retVal !=0){
         log_err("Did not get the expected result for %s with null termniated strings.\n",testName);
     }
     if(U_FAILURE(status)){
@@ -533,7 +534,7 @@ testCompareWithSrc(const UChar* s1, int32_t s1Len,
     status = U_ZERO_ERROR;
     retVal = func(s1,-1,s2,-1,UIDNA_ALLOW_UNASSIGNED,&status);
 
-    if(isEqual==TRUE &&  retVal !=0){
+    if(isEqual==true &&  retVal !=0){
         log_err("Did not get the expected result for %s with null termniated strings with options set.\n", testName);
     }
     if(U_FAILURE(status)){
@@ -543,7 +544,7 @@ testCompareWithSrc(const UChar* s1, int32_t s1Len,
     status = U_ZERO_ERROR;
     retVal = func(s1,s1Len,s2,s2Len,UIDNA_DEFAULT,&status);
 
-    if(isEqual==TRUE &&  retVal !=0){
+    if(isEqual==true &&  retVal !=0){
         log_err("Did not get the expected result for %s with string length.\n",testName);
     }
     if(U_FAILURE(status)){
@@ -553,7 +554,7 @@ testCompareWithSrc(const UChar* s1, int32_t s1Len,
     status = U_ZERO_ERROR;
     retVal = func(s1,s1Len,s2,s2Len,UIDNA_ALLOW_UNASSIGNED,&status);
 
-    if(isEqual==TRUE &&  retVal !=0){
+    if(isEqual==true &&  retVal !=0){
         log_err("Did not get the expected result for %s with string length and options set.\n",testName);
     }
     if(U_FAILURE(status)){
@@ -619,22 +620,22 @@ TestCompare(){
         src = source;
         srcLen = u_strlen(src);
 
-        testCompareWithSrc(src,srcLen,src,srcLen,testName, func, TRUE);
+        testCompareWithSrc(src,srcLen,src,srcLen,testName, func, true);
 
         /* b) compare it with asciiIn equivalent */
-        testCompareWithSrc(src,srcLen,buf,u_strlen(buf),testName, func,TRUE);
+        testCompareWithSrc(src,srcLen,buf,u_strlen(buf),testName, func,true);
 
         /* c) compare it with unicodeIn not equivalent*/
         if(i==0){
-            testCompareWithSrc(src,srcLen,uni1,u_strlen(uni1),testName, func,FALSE);
+            testCompareWithSrc(src,srcLen,uni1,u_strlen(uni1),testName, func,false);
         }else{
-            testCompareWithSrc(src,srcLen,uni0,u_strlen(uni0),testName, func,FALSE);
+            testCompareWithSrc(src,srcLen,uni0,u_strlen(uni0),testName, func,false);
         }
         /* d) compare it with asciiIn not equivalent */
         if(i==0){
-            testCompareWithSrc(src,srcLen,ascii1,u_strlen(ascii1),testName, func,FALSE);
+            testCompareWithSrc(src,srcLen,ascii1,u_strlen(ascii1),testName, func,false);
         }else{
-            testCompareWithSrc(src,srcLen,ascii0,u_strlen(ascii0),testName, func,FALSE);
+            testCompareWithSrc(src,srcLen,ascii0,u_strlen(ascii0),testName, func,false);
         }
 
     }
diff --git a/icu4c/source/test/cintltst/nccbtst.c b/icu4c/source/test/cintltst/nccbtst.c
index 66551a7382e..88a1b2f223b 100644
--- a/icu4c/source/test/cintltst/nccbtst.c
+++ b/icu4c/source/test/cintltst/nccbtst.c
@@ -14,10 +14,11 @@
 *    Madhu Katragadda     7/21/1999      Testing error callback routines
 ********************************************************************************
 */
+#include 
+#include 
 #include 
 #include 
 #include 
-#include 
 #include "cmemory.h"
 #include "cstring.h"
 #include "unicode/uloc.h"
@@ -2637,7 +2638,7 @@ UBool testConvertFromUnicode(const UChar *source, int sourceLen,  const uint8_t
     char *realBufferEnd;
     const UChar *realSourceEnd;
     const UChar *sourceLimit;
-    UBool checkOffsets = TRUE;
+    UBool checkOffsets = true;
     UBool doFlush;
     char junk[9999];
     char offset_str[9999];
@@ -2659,7 +2660,7 @@ UBool testConvertFromUnicode(const UChar *source, int sourceLen,  const uint8_t
     if(U_FAILURE(status))
     {
         log_data_err("Couldn't open converter %s\n",codepage);
-        return TRUE;
+        return true;
     }
 
     log_verbose("Converter opened..\n");
@@ -2689,10 +2690,10 @@ UBool testConvertFromUnicode(const UChar *source, int sourceLen,  const uint8_t
     realSourceEnd = source + sourceLen;
 
     if ( gOutBufferSize != realBufferSize )
-      checkOffsets = FALSE;
+      checkOffsets = false;
 
     if( gInBufferSize != NEW_MAX_BUFFER )
-      checkOffsets = FALSE;
+      checkOffsets = false;
 
     do
     {
@@ -2704,9 +2705,9 @@ UBool testConvertFromUnicode(const UChar *source, int sourceLen,  const uint8_t
         if(targ == realBufferEnd)
         {
             log_err("Error, overflowed the real buffer while about to call fromUnicode! targ=%08lx %s", targ, gNuConvTestName);
-            return FALSE;
+            return false;
         }
-        log_verbose("calling fromUnicode @ SOURCE:%08lx to %08lx  TARGET: %08lx to %08lx, flush=%s\n", src,sourceLimit, targ,end, doFlush?"TRUE":"FALSE");
+        log_verbose("calling fromUnicode @ SOURCE:%08lx to %08lx  TARGET: %08lx to %08lx, flush=%s\n", src,sourceLimit, targ,end, doFlush?"true":"false");
 
 
         status = U_ZERO_ERROR;
@@ -2742,7 +2743,7 @@ UBool testConvertFromUnicode(const UChar *source, int sourceLen,  const uint8_t
        (callback != UCNV_FROM_U_CALLBACK_STOP || (status != U_INVALID_CHAR_FOUND && status != U_ILLEGAL_CHAR_FOUND)))
     {
         log_err("Problem in fromUnicode, errcode %s %s\n", myErrorName(status), gNuConvTestName);
-        return FALSE;
+        return false;
     }
 
     log_verbose("\nConversion done [%d uchars in -> %d chars out]. \nResult :",
@@ -2776,7 +2777,7 @@ UBool testConvertFromUnicode(const UChar *source, int sourceLen,  const uint8_t
         log_verbose("Expected %d chars out, got %d %s\n", expectLen, targ-junkout, gNuConvTestName);
         printSeqErr((const uint8_t *)junkout, (int32_t)(targ-junkout));
         printSeqErr(expect, expectLen);
-        return FALSE;
+        return false;
     }
 
     if (checkOffsets && (expectOffsets != 0) )
@@ -2794,14 +2795,14 @@ UBool testConvertFromUnicode(const UChar *source, int sourceLen,  const uint8_t
             for(i=0; i<(targ-junkout); i++)
                 log_err("%d,", expectOffsets[i]);
             log_err("\n");
-            return FALSE;
+            return false;
         }
     }
 
     if(!memcmp(junkout, expect, expectLen))
     {
         log_verbose("String matches! %s\n", gNuConvTestName);
-        return TRUE;
+        return true;
     }
     else
     {
@@ -2812,7 +2813,7 @@ UBool testConvertFromUnicode(const UChar *source, int sourceLen,  const uint8_t
         printSeqErr((const uint8_t *)junkout, expectLen);
         log_err("Expected: ");
         printSeqErr(expect, expectLen);
-        return FALSE;
+        return false;
     }
 }
 
@@ -2831,7 +2832,7 @@ UBool testConvertToUnicode( const uint8_t *source, int sourcelen, const UChar *e
     UChar *end;
     int32_t *offs;
     int i;
-    UBool   checkOffsets = TRUE;
+    UBool   checkOffsets = true;
     char junk[9999];
     char offset_str[9999];
     UChar *p;
@@ -2856,7 +2857,7 @@ UBool testConvertToUnicode( const uint8_t *source, int sourcelen, const UChar *e
     if(U_FAILURE(status))
     {
         log_data_err("Couldn't open converter %s\n",gNuConvTestName);
-        return TRUE;
+        return true;
     }
 
     log_verbose("Converter opened..\n");
@@ -2886,10 +2887,10 @@ UBool testConvertToUnicode( const uint8_t *source, int sourcelen, const UChar *e
 
 
     if ( gOutBufferSize != realBufferSize )
-        checkOffsets = FALSE;
+        checkOffsets = false;
 
     if( gInBufferSize != NEW_MAX_BUFFER )
-        checkOffsets = FALSE;
+        checkOffsets = false;
 
     do
     {
@@ -2899,7 +2900,7 @@ UBool testConvertToUnicode( const uint8_t *source, int sourcelen, const UChar *e
         if(targ == realBufferEnd)
         {
             log_err("Error, the end would overflow the real output buffer while about to call toUnicode! tarjey=%08lx %s",targ,gNuConvTestName);
-            return FALSE;
+            return false;
         }
         log_verbose("calling toUnicode @ %08lx to %08lx\n", targ,end);
 
@@ -2937,7 +2938,7 @@ UBool testConvertToUnicode( const uint8_t *source, int sourcelen, const UChar *e
        (callback != UCNV_TO_U_CALLBACK_STOP || (status != U_INVALID_CHAR_FOUND && status != U_ILLEGAL_CHAR_FOUND && status != U_TRUNCATED_CHAR_FOUND)))
     {
         log_err("Problem doing toUnicode, errcode %s %s\n", myErrorName(status), gNuConvTestName);
-        return FALSE;
+        return false;
     }
 
     log_verbose("\nConversion done. %d bytes -> %d chars.\nResult :",
@@ -2994,7 +2995,7 @@ UBool testConvertToUnicode( const uint8_t *source, int sourcelen, const UChar *e
     if(!memcmp(junkout, expect, expectlen*2))
     {
         log_verbose("Matches!\n");
-        return TRUE;
+        return true;
     }
     else
     {
@@ -3005,7 +3006,7 @@ UBool testConvertToUnicode( const uint8_t *source, int sourcelen, const UChar *e
         log_err("Expected: ");
         printUSeqErr(expect, expectlen);
         log_err("\n");
-        return FALSE;
+        return false;
     }
 }
 
@@ -3028,7 +3029,7 @@ UBool testConvertFromUnicodeWithContext(const UChar *source, int sourceLen,  con
     char *realBufferEnd;
     const UChar *realSourceEnd;
     const UChar *sourceLimit;
-    UBool checkOffsets = TRUE;
+    UBool checkOffsets = true;
     UBool doFlush;
     char junk[9999];
     char offset_str[9999];
@@ -3050,7 +3051,7 @@ UBool testConvertFromUnicodeWithContext(const UChar *source, int sourceLen,  con
     if(U_FAILURE(status))
     {
         log_data_err("Couldn't open converter %s\n",codepage);
-        return TRUE; /* Because the err has already been logged. */
+        return true; /* Because the err has already been logged. */
     }
 
     log_verbose("Converter opened..\n");
@@ -3080,10 +3081,10 @@ UBool testConvertFromUnicodeWithContext(const UChar *source, int sourceLen,  con
     realSourceEnd = source + sourceLen;
 
     if ( gOutBufferSize != realBufferSize )
-      checkOffsets = FALSE;
+      checkOffsets = false;
 
     if( gInBufferSize != NEW_MAX_BUFFER )
-      checkOffsets = FALSE;
+      checkOffsets = false;
 
     do
     {
@@ -3095,9 +3096,9 @@ UBool testConvertFromUnicodeWithContext(const UChar *source, int sourceLen,  con
         if(targ == realBufferEnd)
         {
             log_err("Error, overflowed the real buffer while about to call fromUnicode! targ=%08lx %s", targ, gNuConvTestName);
-            return FALSE;
+            return false;
         }
-        log_verbose("calling fromUnicode @ SOURCE:%08lx to %08lx  TARGET: %08lx to %08lx, flush=%s\n", src,sourceLimit, targ,end, doFlush?"TRUE":"FALSE");
+        log_verbose("calling fromUnicode @ SOURCE:%08lx to %08lx  TARGET: %08lx to %08lx, flush=%s\n", src,sourceLimit, targ,end, doFlush?"true":"false");
 
 
         status = U_ZERO_ERROR;
@@ -3116,7 +3117,7 @@ UBool testConvertFromUnicodeWithContext(const UChar *source, int sourceLen,  con
     if(U_FAILURE(status) && status != expectedError)
     {
         log_err("Problem in fromUnicode, errcode %s %s\n", myErrorName(status), gNuConvTestName);
-        return FALSE;
+        return false;
     }
 
     log_verbose("\nConversion done [%d uchars in -> %d chars out]. \nResult :",
@@ -3150,7 +3151,7 @@ UBool testConvertFromUnicodeWithContext(const UChar *source, int sourceLen,  con
         log_verbose("Expected %d chars out, got %d %s\n", expectLen, targ-junkout, gNuConvTestName);
         printSeqErr((const uint8_t *)junkout, (int32_t)(targ-junkout));
         printSeqErr(expect, expectLen);
-        return FALSE;
+        return false;
     }
 
     if (checkOffsets && (expectOffsets != 0) )
@@ -3168,14 +3169,14 @@ UBool testConvertFromUnicodeWithContext(const UChar *source, int sourceLen,  con
             for(i=0; i<(targ-junkout); i++)
                 log_err("%d,", expectOffsets[i]);
             log_err("\n");
-            return FALSE;
+            return false;
         }
     }
 
     if(!memcmp(junkout, expect, expectLen))
     {
         log_verbose("String matches! %s\n", gNuConvTestName);
-        return TRUE;
+        return true;
     }
     else
     {
@@ -3186,7 +3187,7 @@ UBool testConvertFromUnicodeWithContext(const UChar *source, int sourceLen,  con
         printSeqErr((const uint8_t *)junkout, expectLen);
         log_err("Expected: ");
         printSeqErr(expect, expectLen);
-        return FALSE;
+        return false;
     }
 }
 UBool testConvertToUnicodeWithContext( const uint8_t *source, int sourcelen, const UChar *expect, int expectlen, 
@@ -3204,7 +3205,7 @@ UBool testConvertToUnicodeWithContext( const uint8_t *source, int sourcelen, con
     UChar *end;
     int32_t *offs;
     int i;
-    UBool   checkOffsets = TRUE;
+    UBool   checkOffsets = true;
     char junk[9999];
     char offset_str[9999];
     UChar *p;
@@ -3229,7 +3230,7 @@ UBool testConvertToUnicodeWithContext( const uint8_t *source, int sourcelen, con
     if(U_FAILURE(status))
     {
         log_data_err("Couldn't open converter %s\n",gNuConvTestName);
-        return TRUE;
+        return true;
     }
 
     log_verbose("Converter opened..\n");
@@ -3259,10 +3260,10 @@ UBool testConvertToUnicodeWithContext( const uint8_t *source, int sourcelen, con
 
 
     if ( gOutBufferSize != realBufferSize )
-        checkOffsets = FALSE;
+        checkOffsets = false;
 
     if( gInBufferSize != NEW_MAX_BUFFER )
-        checkOffsets = FALSE;
+        checkOffsets = false;
 
     do
     {
@@ -3272,7 +3273,7 @@ UBool testConvertToUnicodeWithContext( const uint8_t *source, int sourcelen, con
         if(targ == realBufferEnd)
         {
             log_err("Error, the end would overflow the real output buffer while about to call toUnicode! tarjey=%08lx %s",targ,gNuConvTestName);
-            return FALSE;
+            return false;
         }
         log_verbose("calling toUnicode @ %08lx to %08lx\n", targ,end);
 
@@ -3294,7 +3295,7 @@ UBool testConvertToUnicodeWithContext( const uint8_t *source, int sourcelen, con
     if(U_FAILURE(status) && status!=expectedError)
     {
         log_err("Problem doing toUnicode, errcode %s %s\n", myErrorName(status), gNuConvTestName);
-        return FALSE;
+        return false;
     }
 
     log_verbose("\nConversion done. %d bytes -> %d chars.\nResult :",
@@ -3351,7 +3352,7 @@ UBool testConvertToUnicodeWithContext( const uint8_t *source, int sourcelen, con
     if(!memcmp(junkout, expect, expectlen*2))
     {
         log_verbose("Matches!\n");
-        return TRUE;
+        return true;
     }
     else
     {
@@ -3362,7 +3363,7 @@ UBool testConvertToUnicodeWithContext( const uint8_t *source, int sourcelen, con
         log_err("Expected: ");
         printUSeqErr(expect, expectlen);
         log_err("\n");
-        return FALSE;
+        return false;
     }
 }
 
diff --git a/icu4c/source/test/cintltst/nccbtst.h b/icu4c/source/test/cintltst/nccbtst.h
index dc91aa5e0ea..00882e1d1c5 100644
--- a/icu4c/source/test/cintltst/nccbtst.h
+++ b/icu4c/source/test/cintltst/nccbtst.h
@@ -44,7 +44,7 @@ static void TestLegalAndOthers(int32_t inputsize, int32_t outputsize);
 static void TestSingleByte(int32_t inputsize, int32_t outputsize);
 static void TestEBCDIC_STATEFUL_Sub(int32_t inputsize, int32_t outputsize);
 
-/* Following will return FALSE *only* on a mismatch. They will return TRUE on any other error OR success, because
+/* Following will return false *only* on a mismatch. They will return true on any other error OR success, because
  * the error would have been emitted to log_err separately. */
 
 UBool testConvertFromUnicode(const UChar *source, int sourceLen,  const uint8_t *expect, int expectLen, 
diff --git a/icu4c/source/test/cintltst/ncnvfbts.c b/icu4c/source/test/cintltst/ncnvfbts.c
index d7e5efa2a8f..a986f68f62a 100644
--- a/icu4c/source/test/cintltst/ncnvfbts.c
+++ b/icu4c/source/test/cintltst/ncnvfbts.c
@@ -14,6 +14,7 @@
 * Madhu Katragadda    06/23/2000     Tests for Converter FallBack API and Functionality
 ******************************************************************************
 */
+#include 
 #include 
 #include "unicode/uloc.h"
 #include "unicode/ucnv.h"
@@ -146,9 +147,9 @@ static UBool testConvertFromUnicode(const UChar *source, int sourceLen,  const u
     char *realBufferEnd;
     const UChar *realSourceEnd;
     const UChar *sourceLimit;
-    UBool checkOffsets = TRUE;
+    UBool checkOffsets = true;
     UBool doFlush;
-    UBool action=FALSE;
+    UBool action=false;
     char *p;
 
 
@@ -165,7 +166,7 @@ static UBool testConvertFromUnicode(const UChar *source, int sourceLen,  const u
     if(U_FAILURE(status))
     {
         log_data_err("Couldn't open converter %s\n",codepage);
-        return TRUE;
+        return true;
     }
 
     log_verbose("Converter opened..\n");
@@ -185,10 +186,10 @@ static UBool testConvertFromUnicode(const UChar *source, int sourceLen,  const u
     realSourceEnd = source + sourceLen;
 
     if ( gOutBufferSize != realBufferSize )
-        checkOffsets = FALSE;
+        checkOffsets = false;
 
     if( gInBufferSize != NEW_MAX_BUFFER )
-        checkOffsets = FALSE;
+        checkOffsets = false;
 
     do
     {
@@ -200,9 +201,9 @@ static UBool testConvertFromUnicode(const UChar *source, int sourceLen,  const u
         if(targ == realBufferEnd)
         {
             log_err("Error, overflowed the real buffer while about to call fromUnicode! targ=%08lx %s", targ, gNuConvTestName);
-            return FALSE;
+            return false;
         }
-        log_verbose("calling fromUnicode @ SOURCE:%08lx to %08lx  TARGET: %08lx to %08lx, flush=%s\n", src,sourceLimit, targ,end, doFlush?"TRUE":"FALSE");
+        log_verbose("calling fromUnicode @ SOURCE:%08lx to %08lx  TARGET: %08lx to %08lx, flush=%s\n", src,sourceLimit, targ,end, doFlush?"true":"false");
 
 
         status = U_ZERO_ERROR;
@@ -221,7 +222,7 @@ static UBool testConvertFromUnicode(const UChar *source, int sourceLen,  const u
     if(U_FAILURE(status))
     {
         log_err("Problem doing toUnicode, errcode %d %s\n", myErrorName(status), gNuConvTestName);
-        return FALSE;
+        return false;
     }
 
     log_verbose("\nConversion done [%d uchars in -> %d chars out]. \nResult :",
@@ -257,7 +258,7 @@ static UBool testConvertFromUnicode(const UChar *source, int sourceLen,  const u
         log_verbose("Expected %d chars out, got %d %s\n", expectLen, targ-junkout, gNuConvTestName);
         printSeqErr((const unsigned char*)junkout, (int32_t)(targ-junkout));
         printSeqErr((const unsigned char*)expect, expectLen);
-        return FALSE;
+        return false;
     }
 
     if (checkOffsets && (expectOffsets != 0) )
@@ -279,7 +280,7 @@ static UBool testConvertFromUnicode(const UChar *source, int sourceLen,  const u
     if(!memcmp(junkout, expect, expectLen))
     {
         log_verbose("Matches!\n");
-        return TRUE;
+        return true;
     }
     else
     {
@@ -287,7 +288,7 @@ static UBool testConvertFromUnicode(const UChar *source, int sourceLen,  const u
         log_verbose("String does not match. %s\n", gNuConvTestName);
         printSeqErr((const unsigned char*)junkout, expectLen);
         printSeqErr((const unsigned char*)expect, expectLen);
-        return FALSE;
+        return false;
     }
 }
 
@@ -305,7 +306,7 @@ static UBool testConvertToUnicode( const uint8_t *source, int sourcelen, const U
     UChar *end;
     int32_t *offs;
     int i;
-    UBool   checkOffsets = TRUE;
+    UBool   checkOffsets = true;
     char junk[9999];
     char offset_str[9999];
     UChar *p;
@@ -329,7 +330,7 @@ static UBool testConvertToUnicode( const uint8_t *source, int sourcelen, const U
     if(U_FAILURE(status))
     {
         log_data_err("Couldn't open converter %s\n",gNuConvTestName);
-        return TRUE; /* because it has been logged */
+        return true; /* because it has been logged */
     }
 
     log_verbose("Converter opened..\n");
@@ -349,10 +350,10 @@ static UBool testConvertToUnicode( const uint8_t *source, int sourcelen, const U
     }
     /*-------------------------------------*/
     if ( gOutBufferSize != realBufferSize )
-      checkOffsets = FALSE;
+      checkOffsets = false;
 
     if( gInBufferSize != NEW_MAX_BUFFER )
-      checkOffsets = FALSE;
+      checkOffsets = false;
 
     do
     {
@@ -362,7 +363,7 @@ static UBool testConvertToUnicode( const uint8_t *source, int sourcelen, const U
         if(targ == realBufferEnd)
         {
             log_err("Error, the end would overflow the real output buffer while about to call toUnicode! tarjey=%08lx %s",targ,gNuConvTestName);
-            return FALSE;
+            return false;
         }
         log_verbose("calling toUnicode @ %08lx to %08lx\n", targ,end);
 
@@ -384,7 +385,7 @@ static UBool testConvertToUnicode( const uint8_t *source, int sourcelen, const U
     if(U_FAILURE(status))
     {
         log_err("Problem doing toUnicode, errcode %s %s\n", myErrorName(status), gNuConvTestName);
-        return FALSE;
+        return false;
     }
 
     log_verbose("\nConversion done. %d bytes -> %d chars.\nResult :",
@@ -437,7 +438,7 @@ static UBool testConvertToUnicode( const uint8_t *source, int sourcelen, const U
     if(!memcmp(junkout, expect, expectlen*2))
     {
         log_verbose("Matches!\n");
-        return TRUE;
+        return true;
     }
     else
     {
@@ -446,7 +447,7 @@ static UBool testConvertToUnicode( const uint8_t *source, int sourcelen, const U
         printUSeqErr(junkout, expectlen);
         printf("\n");
         printUSeqErr(expect, expectlen);
-        return FALSE;
+        return false;
     }
 }
 
@@ -547,31 +548,31 @@ static void TestConvertFallBackWithBufferSizes(int32_t outsize, int32_t insize )
     for(i=0; i %s(SBCS) with FallBack did not match.\n", nativeCodePage[i]);
 
         if(!testConvertToUnicode(expectedNative, sizeof(expectedNative), 
-            retrievedSBCSText, UPRV_LENGTHOF(retrievedSBCSText), nativeCodePage[i], TRUE, fromNativeoffs ))
+            retrievedSBCSText, UPRV_LENGTHOF(retrievedSBCSText), nativeCodePage[i], true, fromNativeoffs ))
             log_err("%s->u(SBCS) with Fallback did not match.\n", nativeCodePage[i]);
     }
     
     /*DBCS*/
     if(!testConvertFromUnicode(DBCSText, UPRV_LENGTHOF(DBCSText),
-        expectedIBM1363_DBCS, sizeof(expectedIBM1363_DBCS), "ibm-1363", TRUE, toIBM1363Offs_DBCS ))
+        expectedIBM1363_DBCS, sizeof(expectedIBM1363_DBCS), "ibm-1363", true, toIBM1363Offs_DBCS ))
        log_err("u-> ibm-1363(DBCS portion) with FallBack did not match.\n");
 
     if(!testConvertToUnicode(expectedIBM1363_DBCS, sizeof(expectedIBM1363_DBCS), 
-        retrievedDBCSText, UPRV_LENGTHOF(retrievedDBCSText),"ibm-1363", TRUE, fromIBM1363offs_DBCS ))
+        retrievedDBCSText, UPRV_LENGTHOF(retrievedDBCSText),"ibm-1363", true, fromIBM1363offs_DBCS ))
         log_err("ibm-1363->u(DBCS portion) with Fallback did not match.\n");
 
   
     /*MBCS*/
     if(!testConvertFromUnicode(MBCSText, UPRV_LENGTHOF(MBCSText),
-        expectedIBM950, sizeof(expectedIBM950), "ibm-950", TRUE, toIBM950Offs ))
+        expectedIBM950, sizeof(expectedIBM950), "ibm-950", true, toIBM950Offs ))
        log_err("u-> ibm-950(MBCS) with FallBack did not match.\n");
 
     if(!testConvertToUnicode(expectedIBM950, sizeof(expectedIBM950), 
-        retrievedMBCSText, UPRV_LENGTHOF(retrievedMBCSText),"ibm-950", TRUE, fromIBM950offs ))
+        retrievedMBCSText, UPRV_LENGTHOF(retrievedMBCSText),"ibm-950", true, fromIBM950offs ))
         log_err("ibm-950->u(MBCS) with Fallback did not match.\n");
     
    /*commented until data table is available*/
@@ -586,10 +587,10 @@ static void TestConvertFallBackWithBufferSizes(int32_t outsize, int32_t insize )
         UChar expectedFallbackFalse[]= { 0x5165, 0x5165, 0x516b, 0x516b, 0x9ef9, 0x9ef9};
 
         if(!testConvertToUnicode(IBM950input, sizeof(IBM950input), 
-                expectedUnicodeText, UPRV_LENGTHOF(expectedUnicodeText),"ibm-950", TRUE, fromIBM950inputOffs ))
+                expectedUnicodeText, UPRV_LENGTHOF(expectedUnicodeText),"ibm-950", true, fromIBM950inputOffs ))
             log_err("ibm-950->u(MBCS) with Fallback did not match.\n");
         if(!testConvertToUnicode(IBM950input, sizeof(IBM950input), 
-                expectedFallbackFalse, UPRV_LENGTHOF(expectedFallbackFalse),"ibm-950", FALSE, fromIBM950inputOffs ))
+                expectedFallbackFalse, UPRV_LENGTHOF(expectedFallbackFalse),"ibm-950", false, fromIBM950inputOffs ))
             log_err("ibm-950->u(MBCS) with Fallback  did not match.\n");
 
     }
@@ -605,11 +606,11 @@ static void TestConvertFallBackWithBufferSizes(int32_t outsize, int32_t insize )
         UChar expectedFallbackFalse[]= { 0x5C6E, 0x5C6E, 0x81FC, 0x81FC, 0x8278, 0x8278};
 
         if(!testConvertToUnicode(euc_tw_input, sizeof(euc_tw_input), 
-                expectedUnicodeText, UPRV_LENGTHOF(expectedUnicodeText),"euc-tw", TRUE, from_euc_tw_offs ))
+                expectedUnicodeText, UPRV_LENGTHOF(expectedUnicodeText),"euc-tw", true, from_euc_tw_offs ))
             log_err("from euc-tw->u with Fallback did not match.\n");
 
         if(!testConvertToUnicode(euc_tw_input, sizeof(euc_tw_input), 
-                expectedFallbackFalse, UPRV_LENGTHOF(expectedFallbackFalse),"euc-tw", FALSE, from_euc_tw_offs ))
+                expectedFallbackFalse, UPRV_LENGTHOF(expectedFallbackFalse),"euc-tw", false, from_euc_tw_offs ))
             log_err("from euc-tw->u with Fallback false did not match.\n");
 
 
@@ -630,18 +631,18 @@ static void TestConvertFallBackWithBufferSizes(int32_t outsize, int32_t insize )
             6, 6, 7, 7, 7, 7, 8, 8, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12};
 
         if(!testConvertFromUnicode(inputText, UPRV_LENGTHOF(inputText),
-                expected_euc_tw, sizeof(expected_euc_tw), "euc-tw", TRUE, to_euc_tw_offs ))
+                expected_euc_tw, sizeof(expected_euc_tw), "euc-tw", true, to_euc_tw_offs ))
             log_err("u-> euc-tw with FallBack did not match.\n");
 
     }
 
     /*MBCS 1363*/
     if(!testConvertFromUnicode(MBCSText1363, UPRV_LENGTHOF(MBCSText1363),
-        expectedIBM1363, sizeof(expectedIBM1363), "ibm-1363", TRUE, toIBM1363Offs ))
+        expectedIBM1363, sizeof(expectedIBM1363), "ibm-1363", true, toIBM1363Offs ))
        log_err("u-> ibm-1363(MBCS) with FallBack did not match.\n");
 
     if(!testConvertToUnicode(expectedIBM1363, sizeof(expectedIBM1363), 
-        retrievedMBCSText1363, UPRV_LENGTHOF(retrievedMBCSText1363),"ibm-1363", TRUE, fromIBM1363offs ))
+        retrievedMBCSText1363, UPRV_LENGTHOF(retrievedMBCSText1363),"ibm-1363", true, fromIBM1363offs ))
         log_err("ibm-1363->u(MBCS) with Fallback did not match.\n");
 
 
@@ -660,12 +661,12 @@ static void TestConvertFallBackWithBufferSizes(int32_t outsize, int32_t insize )
 
         /*from Unicode*/
         if(!testConvertFromUnicode(unicodeInput, UPRV_LENGTHOF(unicodeInput),
-                expectedtest1, sizeof(expectedtest1), "@test1", TRUE, totest1Offs ))
+                expectedtest1, sizeof(expectedtest1), "@test1", true, totest1Offs ))
             log_err("u-> test1(MBCS conversion with single-byte) did not match.\n");
         
         /*to Unicode*/
         if(!testConvertToUnicode(test1input, sizeof(test1input),
-               expectedUnicode, UPRV_LENGTHOF(expectedUnicode), "@test1", TRUE, fromtest1Offs ))
+               expectedUnicode, UPRV_LENGTHOF(expectedUnicode), "@test1", true, fromtest1Offs ))
             log_err("test1(MBCS conversion with single-byte) -> u  did not match.\n");
 
     }
@@ -687,12 +688,12 @@ static void TestConvertFallBackWithBufferSizes(int32_t outsize, int32_t insize )
 
         /*from Unicode*/
         if(!testConvertFromUnicode(unicodeInput, UPRV_LENGTHOF(unicodeInput),
-                expectedtest3, sizeof(expectedtest3), "@test3", TRUE, totest3Offs ))
+                expectedtest3, sizeof(expectedtest3), "@test3", true, totest3Offs ))
             log_err("u-> test3(MBCS conversion with three-byte) did not match.\n");
         
         /*to Unicode*/
         if(!testConvertToUnicode(test3input, sizeof(test3input),
-               expectedUnicode, UPRV_LENGTHOF(expectedUnicode), "@test3", TRUE, fromtest3Offs ))
+               expectedUnicode, UPRV_LENGTHOF(expectedUnicode), "@test3", true, fromtest3Offs ))
             log_err("test3(MBCS conversion with three-byte) -> u  did not match.\n"); 
 
     }
@@ -722,12 +723,12 @@ static void TestConvertFallBackWithBufferSizes(int32_t outsize, int32_t insize )
 
         /*from Unicode*/
         if(!testConvertFromUnicode(unicodeInput, UPRV_LENGTHOF(unicodeInput),
-                expectedtest4, sizeof(expectedtest4), "@test4", TRUE, totest4Offs ))
+                expectedtest4, sizeof(expectedtest4), "@test4", true, totest4Offs ))
             log_err("u-> test4(MBCS conversion with four-byte) did not match.\n");
         
         /*to Unicode*/
         if(!testConvertToUnicode(test4input, sizeof(test4input),
-               expectedUnicode, UPRV_LENGTHOF(expectedUnicode), "@test4", TRUE, fromtest4Offs ))
+               expectedUnicode, UPRV_LENGTHOF(expectedUnicode), "@test4", true, fromtest4Offs ))
             log_err("test4(MBCS conversion with four-byte) -> u  did not match.\n"); 
 
     }
@@ -741,11 +742,11 @@ static void TestConvertFallBackWithBufferSizes(int32_t outsize, int32_t insize )
         int32_t fromtest1Offs[]       = {1,              3,          5,         8,         10,             12 };
         /*from Unicode*/
         if(!testConvertFromUnicode(unicodeInput, UPRV_LENGTHOF(unicodeInput),
-                expectedtest1, sizeof(expectedtest1), "ibm-1371", TRUE, totest1Offs ))
+                expectedtest1, sizeof(expectedtest1), "ibm-1371", true, totest1Offs ))
             log_err("u-> ibm-1371(MBCS conversion with single-byte) did not match.,\n");
         /*to Unicode*/
         if(!testConvertToUnicode(test1input, sizeof(test1input),
-               expectedUnicode, UPRV_LENGTHOF(expectedUnicode), "ibm-1371", TRUE, fromtest1Offs ))
+               expectedUnicode, UPRV_LENGTHOF(expectedUnicode), "ibm-1371", true, fromtest1Offs ))
             log_err("ibm-1371(MBCS conversion with single-byte) -> u  did not match.,\n");
     }
 
diff --git a/icu4c/source/test/cintltst/ncnvtst.c b/icu4c/source/test/cintltst/ncnvtst.c
index 7f56e644420..3d41b0f56d4 100644
--- a/icu4c/source/test/cintltst/ncnvtst.c
+++ b/icu4c/source/test/cintltst/ncnvtst.c
@@ -14,6 +14,7 @@
 *   Madhu Katragadda              7/7/2000        Converter Tests for extended code coverage
 ******************************************************************************
 */
+#include 
 #include 
 #include 
 #include 
@@ -148,13 +149,13 @@ static void TestSurrogateBehaviour(){
 #if !UCONFIG_NO_LEGACY_CONVERSION
         /*SBCS*/
         if(!convertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected, sizeof(expected), "ibm-920", 0 , TRUE, U_ZERO_ERROR))
+                expected, sizeof(expected), "ibm-920", 0 , true, U_ZERO_ERROR))
             log_err("u-> ibm-920 [UCNV_SBCS] not match.\n");
 #endif
 
         /*LATIN_1*/
         if(!convertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected, sizeof(expected), "LATIN_1", 0, TRUE, U_ZERO_ERROR ))
+                expected, sizeof(expected), "LATIN_1", 0, true, U_ZERO_ERROR ))
             log_err("u-> LATIN_1 not match.\n");
 
     }
@@ -168,17 +169,17 @@ static void TestSurrogateBehaviour(){
 
         /*DBCS*/
         if(!convertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected, sizeof(expected), "ibm-1363", 0 , TRUE, U_ZERO_ERROR))
+                expected, sizeof(expected), "ibm-1363", 0 , true, U_ZERO_ERROR))
             log_err("u-> ibm-1363 [UCNV_DBCS portion] not match.\n");
         if(!convertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected, sizeof(expected), "ibm-1363", offsets , TRUE, U_ZERO_ERROR))
+                expected, sizeof(expected), "ibm-1363", offsets , true, U_ZERO_ERROR))
             log_err("u-> ibm-1363 [UCNV_DBCS portion] not match.\n");
         /*MBCS*/
         if(!convertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected, sizeof(expected), "ibm-1363", 0 , TRUE, U_ZERO_ERROR))
+                expected, sizeof(expected), "ibm-1363", 0 , true, U_ZERO_ERROR))
             log_err("u-> ibm-1363 [UCNV_MBCS] not match.\n");
         if(!convertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected, sizeof(expected), "ibm-1363", offsets, TRUE, U_ZERO_ERROR))
+                expected, sizeof(expected), "ibm-1363", offsets, true, U_ZERO_ERROR))
             log_err("u-> ibm-1363 [UCNV_MBCS] not match.\n");
     }
 
@@ -194,10 +195,10 @@ static void TestSurrogateBehaviour(){
 
         /*iso-2022-jp*/
         if(!convertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected, sizeof(expected), "iso-2022-jp", 0 , TRUE, U_ZERO_ERROR))
+                expected, sizeof(expected), "iso-2022-jp", 0 , true, U_ZERO_ERROR))
             log_err("u-> not match.\n");
         if(!convertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected, sizeof(expected), "iso-2022-jp", offsets , TRUE, U_ZERO_ERROR))
+                expected, sizeof(expected), "iso-2022-jp", offsets , true, U_ZERO_ERROR))
             log_err("u->  not match.\n");
     }
 
@@ -224,10 +225,10 @@ static void TestSurrogateBehaviour(){
 
         /*iso-2022-CN*/
         if(!convertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected, sizeof(expected), "iso-2022-cn", 0 , TRUE, U_ZERO_ERROR))
+                expected, sizeof(expected), "iso-2022-cn", 0 , true, U_ZERO_ERROR))
             log_err("u-> not match.\n");
         if(!convertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected, sizeof(expected), "iso-2022-cn", offsets , TRUE, U_ZERO_ERROR))
+                expected, sizeof(expected), "iso-2022-cn", offsets , true, U_ZERO_ERROR))
             log_err("u-> not match.\n");
     }
 
@@ -254,10 +255,10 @@ static void TestSurrogateBehaviour(){
 
         /*iso-2022-kr*/
         if(!convertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected, sizeof(expected), "iso-2022-kr", 0 , TRUE, U_ZERO_ERROR))
+                expected, sizeof(expected), "iso-2022-kr", 0 , true, U_ZERO_ERROR))
             log_err("u-> iso-2022-kr [UCNV_DBCS] not match.\n");
         if(!convertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected, sizeof(expected), "iso-2022-kr", offsets , TRUE, U_ZERO_ERROR))
+                expected, sizeof(expected), "iso-2022-kr", offsets , true, U_ZERO_ERROR))
             log_err("u-> iso-2022-kr [UCNV_DBCS] not match.\n");
     }
 
@@ -282,10 +283,10 @@ static void TestSurrogateBehaviour(){
 
         /*hz*/
         if(!convertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected, sizeof(expected), "HZ", 0 , TRUE, U_ZERO_ERROR))
+                expected, sizeof(expected), "HZ", 0 , true, U_ZERO_ERROR))
             log_err("u-> HZ not match.\n");
         if(!convertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected, sizeof(expected), "HZ", offsets , TRUE, U_ZERO_ERROR))
+                expected, sizeof(expected), "HZ", offsets , true, U_ZERO_ERROR))
             log_err("u-> HZ not match.\n");
     }
 #endif
@@ -304,29 +305,29 @@ static void TestSurrogateBehaviour(){
         static const int32_t fromOffsets[] = { 0x0000, 0x0003, 0x0005, 0x0006, 0x0009, 0x0009, 0x000D }; 
         /*UTF-8*/
         if(!convertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-            expected, sizeof(expected), "UTF8", offsets, TRUE, U_ZERO_ERROR ))
+            expected, sizeof(expected), "UTF8", offsets, true, U_ZERO_ERROR ))
             log_err("u-> UTF8 with offsets and flush true did not match.\n");
         if(!convertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-            expected, sizeof(expected), "UTF8", 0, TRUE, U_ZERO_ERROR ))
+            expected, sizeof(expected), "UTF8", 0, true, U_ZERO_ERROR ))
             log_err("u-> UTF8 with offsets and flush true did not match.\n");
         if(!convertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-            expected, sizeof(expected), "UTF8", offsets, FALSE, U_ZERO_ERROR ))
+            expected, sizeof(expected), "UTF8", offsets, false, U_ZERO_ERROR ))
             log_err("u-> UTF8 with offsets and flush true did not match.\n");
         if(!convertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-            expected, sizeof(expected), "UTF8", 0, FALSE, U_ZERO_ERROR ))
+            expected, sizeof(expected), "UTF8", 0, false, U_ZERO_ERROR ))
             log_err("u-> UTF8 with offsets and flush true did not match.\n");
 
         if(!convertToU(expected, sizeof(expected), 
-            sampleText, UPRV_LENGTHOF(sampleText), "UTF8", 0, TRUE, U_ZERO_ERROR ))
+            sampleText, UPRV_LENGTHOF(sampleText), "UTF8", 0, true, U_ZERO_ERROR ))
             log_err("UTF8 -> u did not match.\n");
         if(!convertToU(expected, sizeof(expected), 
-            sampleText, UPRV_LENGTHOF(sampleText), "UTF8", 0, FALSE, U_ZERO_ERROR ))
+            sampleText, UPRV_LENGTHOF(sampleText), "UTF8", 0, false, U_ZERO_ERROR ))
             log_err("UTF8 -> u did not match.\n");
         if(!convertToU(expected, sizeof(expected), 
-            sampleText, UPRV_LENGTHOF(sampleText), "UTF8", fromOffsets, TRUE, U_ZERO_ERROR ))
+            sampleText, UPRV_LENGTHOF(sampleText), "UTF8", fromOffsets, true, U_ZERO_ERROR ))
             log_err("UTF8 ->u  did not match.\n");
         if(!convertToU(expected, sizeof(expected), 
-            sampleText, UPRV_LENGTHOF(sampleText), "UTF8", fromOffsets, FALSE, U_ZERO_ERROR ))
+            sampleText, UPRV_LENGTHOF(sampleText), "UTF8", fromOffsets, false, U_ZERO_ERROR ))
             log_err("UTF8 -> u did not match.\n");
 
     }
@@ -345,26 +346,26 @@ static void TestErrorBehaviour(){
 #if !UCONFIG_NO_LEGACY_CONVERSION
         /*SBCS*/
         if(!convertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected, sizeof(expected), "ibm-920", 0, TRUE, U_ZERO_ERROR))
+                expected, sizeof(expected), "ibm-920", 0, true, U_ZERO_ERROR))
             log_err("u-> ibm-920 [UCNV_SBCS] \n");
         if(!convertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected0, sizeof(expected0), "ibm-920", 0, FALSE, U_ZERO_ERROR))
+                expected0, sizeof(expected0), "ibm-920", 0, false, U_ZERO_ERROR))
             log_err("u-> ibm-920 [UCNV_SBCS] \n");
         if(!convertFromU(sampleText2, UPRV_LENGTHOF(sampleText2),
-                expected2, sizeof(expected2), "ibm-920", 0, TRUE, U_ZERO_ERROR))
+                expected2, sizeof(expected2), "ibm-920", 0, true, U_ZERO_ERROR))
             log_err("u-> ibm-920 [UCNV_SBCS] did not match\n");
 #endif
 
         /*LATIN_1*/
         if(!convertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected, sizeof(expected), "LATIN_1", 0, TRUE, U_ZERO_ERROR))
+                expected, sizeof(expected), "LATIN_1", 0, true, U_ZERO_ERROR))
             log_err("u-> LATIN_1 is supposed to fail\n");
         if(!convertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected0, sizeof(expected0), "LATIN_1", 0, FALSE, U_ZERO_ERROR))
+                expected0, sizeof(expected0), "LATIN_1", 0, false, U_ZERO_ERROR))
             log_err("u-> LATIN_1 is supposed to fail\n");
 
         if(!convertFromU(sampleText2, UPRV_LENGTHOF(sampleText2),
-                expected2, sizeof(expected2), "LATIN_1", 0, TRUE, U_ZERO_ERROR))
+                expected2, sizeof(expected2), "LATIN_1", 0, true, U_ZERO_ERROR))
             log_err("u-> LATIN_1 did not match\n");
     }
 
@@ -391,57 +392,57 @@ static void TestErrorBehaviour(){
 
         /*DBCS*/
         if(!convertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expectedSUB, sizeof(expectedSUB), "ibm-1363", 0, TRUE, U_ZERO_ERROR))
+                expectedSUB, sizeof(expectedSUB), "ibm-1363", 0, true, U_ZERO_ERROR))
             log_err("u-> ibm-1363 [UCNV_DBCS portion] is supposed to fail\n");
         if(!convertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected, sizeof(expected), "ibm-1363", 0, FALSE, U_AMBIGUOUS_ALIAS_WARNING))
+                expected, sizeof(expected), "ibm-1363", 0, false, U_AMBIGUOUS_ALIAS_WARNING))
             log_err("u-> ibm-1363 [UCNV_DBCS portion] is supposed to fail\n");
 
         if(!convertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expectedSUB, sizeof(expectedSUB), "ibm-1363", offsetsSUB, TRUE, U_ZERO_ERROR))
+                expectedSUB, sizeof(expectedSUB), "ibm-1363", offsetsSUB, true, U_ZERO_ERROR))
             log_err("u-> ibm-1363 [UCNV_DBCS portion] is supposed to fail\n");
         if(!convertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected, sizeof(expected), "ibm-1363", offsets, FALSE, U_AMBIGUOUS_ALIAS_WARNING))
+                expected, sizeof(expected), "ibm-1363", offsets, false, U_AMBIGUOUS_ALIAS_WARNING))
             log_err("u-> ibm-1363 [UCNV_DBCS portion] is supposed to fail\n");
 
         
         if(!convertFromU(sampleText2, UPRV_LENGTHOF(sampleText2),
-                expected2, sizeof(expected2), "ibm-1363", 0, TRUE, U_ZERO_ERROR))
+                expected2, sizeof(expected2), "ibm-1363", 0, true, U_ZERO_ERROR))
             log_err("u-> ibm-1363 [UCNV_DBCS portion] did not match \n");
         if(!convertFromU(sampleText2, UPRV_LENGTHOF(sampleText2),
-                expected2, sizeof(expected2), "ibm-1363", offsets2, TRUE, U_ZERO_ERROR))
+                expected2, sizeof(expected2), "ibm-1363", offsets2, true, U_ZERO_ERROR))
             log_err("u-> ibm-1363 [UCNV_DBCS portion] did not match \n");
 
         /*MBCS*/
         if(!convertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expectedSUB, sizeof(expectedSUB), "ibm-1363", 0, TRUE, U_ZERO_ERROR))
+                expectedSUB, sizeof(expectedSUB), "ibm-1363", 0, true, U_ZERO_ERROR))
             log_err("u-> ibm-1363 [UCNV_MBCS] \n");
         if(!convertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected, sizeof(expected), "ibm-1363", 0, FALSE, U_AMBIGUOUS_ALIAS_WARNING))
+                expected, sizeof(expected), "ibm-1363", 0, false, U_AMBIGUOUS_ALIAS_WARNING))
             log_err("u-> ibm-1363 [UCNV_MBCS] \n");
 
         if(!convertFromU(sampleText2, UPRV_LENGTHOF(sampleText2),
-                expected2, sizeof(expected2), "ibm-1363", 0, TRUE, U_ZERO_ERROR))
+                expected2, sizeof(expected2), "ibm-1363", 0, true, U_ZERO_ERROR))
             log_err("u-> ibm-1363 [UCNV_DBCS] did not match\n");
         if(!convertFromU(sampleText2, UPRV_LENGTHOF(sampleText2),
-                expected2, sizeof(expected2), "ibm-1363", 0, FALSE, U_ZERO_ERROR))
+                expected2, sizeof(expected2), "ibm-1363", 0, false, U_ZERO_ERROR))
             log_err("u-> ibm-1363 [UCNV_DBCS] did not match\n");
         if(!convertFromU(sampleText2, UPRV_LENGTHOF(sampleText2),
-                expected2, sizeof(expected2), "ibm-1363", offsets2, FALSE, U_ZERO_ERROR))
+                expected2, sizeof(expected2), "ibm-1363", offsets2, false, U_ZERO_ERROR))
             log_err("u-> ibm-1363 [UCNV_DBCS] did not match\n");
 
         if(!convertFromU(sampleText3MBCS, UPRV_LENGTHOF(sampleText3MBCS),
-                expected3MBCS, sizeof(expected3MBCS), "ibm-1363", offsets3MBCS, TRUE, U_ZERO_ERROR))
+                expected3MBCS, sizeof(expected3MBCS), "ibm-1363", offsets3MBCS, true, U_ZERO_ERROR))
             log_err("u-> ibm-1363 [UCNV_MBCS] \n");
         if(!convertFromU(sampleText3MBCS, UPRV_LENGTHOF(sampleText3MBCS),
-                expected3MBCS, sizeof(expected3MBCS), "ibm-1363", offsets3MBCS, FALSE, U_ZERO_ERROR))
+                expected3MBCS, sizeof(expected3MBCS), "ibm-1363", offsets3MBCS, false, U_ZERO_ERROR))
             log_err("u-> ibm-1363 [UCNV_MBCS] \n");
 
         if(!convertFromU(sampleText4MBCS, UPRV_LENGTHOF(sampleText4MBCS),
-                expected4MBCS, sizeof(expected4MBCS), "IBM-eucJP", offsets4MBCS, TRUE, U_ZERO_ERROR))
+                expected4MBCS, sizeof(expected4MBCS), "IBM-eucJP", offsets4MBCS, true, U_ZERO_ERROR))
             log_err("u-> euc-jp [UCNV_MBCS] \n");
         if(!convertFromU(sampleText4MBCS, UPRV_LENGTHOF(sampleText4MBCS),
-                expected4MBCS, sizeof(expected4MBCS), "IBM-eucJP", offsets4MBCS, FALSE, U_ZERO_ERROR))
+                expected4MBCS, sizeof(expected4MBCS), "IBM-eucJP", offsets4MBCS, false, U_ZERO_ERROR))
             log_err("u-> euc-jp [UCNV_MBCS] \n");
     }
 
@@ -461,27 +462,27 @@ static void TestErrorBehaviour(){
         static const uint8_t expected4MBCS[] = { 0x61, 0x1b, 0x24, 0x42, 0x30, 0x6c,0x1b,0x28,0x42,0x1a};
         static const int32_t offsets4MBCS[]        = { 0x00, 0x01, 0x01 ,0x01, 0x01, 0x01,0x02,0x02,0x02,0x02 };
         if(!convertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expectedSUB, sizeof(expectedSUB), "iso-2022-jp", offsets, TRUE, U_ZERO_ERROR))
+                expectedSUB, sizeof(expectedSUB), "iso-2022-jp", offsets, true, U_ZERO_ERROR))
             log_err("u-> iso-2022-jp [UCNV_MBCS] \n");
         if(!convertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected, sizeof(expected), "iso-2022-jp", offsets, FALSE, U_AMBIGUOUS_ALIAS_WARNING))
+                expected, sizeof(expected), "iso-2022-jp", offsets, false, U_AMBIGUOUS_ALIAS_WARNING))
             log_err("u-> iso-2022-jp [UCNV_MBCS] \n");
 
         if(!convertFromU(sampleText2, UPRV_LENGTHOF(sampleText2),
-                expected2, sizeof(expected2), "iso-2022-jp", offsets2, TRUE, U_ZERO_ERROR))
+                expected2, sizeof(expected2), "iso-2022-jp", offsets2, true, U_ZERO_ERROR))
             log_err("u->iso-2022-jp[UCNV_DBCS] did not match\n");
         if(!convertFromU(sampleText2, UPRV_LENGTHOF(sampleText2),
-                expected2, sizeof(expected2), "iso-2022-jp", offsets2, FALSE, U_ZERO_ERROR))
+                expected2, sizeof(expected2), "iso-2022-jp", offsets2, false, U_ZERO_ERROR))
             log_err("u-> iso-2022-jp [UCNV_DBCS] did not match\n");
         if(!convertFromU(sampleText2, UPRV_LENGTHOF(sampleText2),
-                expected2, sizeof(expected2), "iso-2022-jp", offsets2, FALSE, U_ZERO_ERROR))
+                expected2, sizeof(expected2), "iso-2022-jp", offsets2, false, U_ZERO_ERROR))
             log_err("u-> iso-2022-jp [UCNV_DBCS] did not match\n");
 
         if(!convertFromU(sampleText4MBCS, UPRV_LENGTHOF(sampleText4MBCS),
-                expected4MBCS, sizeof(expected4MBCS), "iso-2022-jp", offsets4MBCS, TRUE, U_ZERO_ERROR))
+                expected4MBCS, sizeof(expected4MBCS), "iso-2022-jp", offsets4MBCS, true, U_ZERO_ERROR))
             log_err("u-> iso-2022-jp [UCNV_MBCS] \n");
         if(!convertFromU(sampleText4MBCS, UPRV_LENGTHOF(sampleText4MBCS),
-                expected4MBCS, sizeof(expected4MBCS), "iso-2022-jp", offsets4MBCS, FALSE, U_ZERO_ERROR))
+                expected4MBCS, sizeof(expected4MBCS), "iso-2022-jp", offsets4MBCS, false, U_ZERO_ERROR))
             log_err("u-> iso-2022-jp [UCNV_MBCS] \n");
     }
 
@@ -505,34 +506,34 @@ static void TestErrorBehaviour(){
         static const uint8_t expected4MBCS[] = { 0x61, 0x1b, 0x24, 0x29, 0x41, 0x0e, 0x52, 0x3b, 0x0f, 0x1a };
         static const int32_t offsets4MBCS[]        = { 0x00, 0x01, 0x01 ,0x01, 0x01, 0x01, 0x01, 0x01, 0x02, 0x02 };
         if(!convertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expectedSUB, sizeof(expectedSUB), "iso-2022-cn", offsets, TRUE, U_ZERO_ERROR))
+                expectedSUB, sizeof(expectedSUB), "iso-2022-cn", offsets, true, U_ZERO_ERROR))
             log_err("u-> iso-2022-cn [UCNV_MBCS] \n");
         if(!convertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected, sizeof(expected), "iso-2022-cn", offsets, FALSE, U_ZERO_ERROR))
+                expected, sizeof(expected), "iso-2022-cn", offsets, false, U_ZERO_ERROR))
             log_err("u-> ibm-1363 [UCNV_MBCS] \n");
 
         if(!convertFromU(sampleText2, UPRV_LENGTHOF(sampleText2),
-                expected2, sizeof(expected2), "iso-2022-cn", offsets2, TRUE, U_ZERO_ERROR))
+                expected2, sizeof(expected2), "iso-2022-cn", offsets2, true, U_ZERO_ERROR))
             log_err("u->iso-2022-cn[UCNV_DBCS] did not match\n");
         if(!convertFromU(sampleText2, UPRV_LENGTHOF(sampleText2),
-                expected2, sizeof(expected2), "iso-2022-cn", offsets2, FALSE, U_ZERO_ERROR))
+                expected2, sizeof(expected2), "iso-2022-cn", offsets2, false, U_ZERO_ERROR))
             log_err("u-> iso-2022-cn [UCNV_DBCS] did not match\n");
         if(!convertFromU(sampleText2, UPRV_LENGTHOF(sampleText2),
-                expected2, sizeof(expected2), "iso-2022-cn", offsets2, FALSE, U_ZERO_ERROR))
+                expected2, sizeof(expected2), "iso-2022-cn", offsets2, false, U_ZERO_ERROR))
             log_err("u-> iso-2022-cn [UCNV_DBCS] did not match\n");
 
         if(!convertFromU(sampleText3MBCS, UPRV_LENGTHOF(sampleText3MBCS),
-                expected3MBCS, sizeof(expected3MBCS), "iso-2022-cn", offsets3MBCS, TRUE, U_ZERO_ERROR))
+                expected3MBCS, sizeof(expected3MBCS), "iso-2022-cn", offsets3MBCS, true, U_ZERO_ERROR))
             log_err("u->iso-2022-cn [UCNV_MBCS] \n");
         if(!convertFromU(sampleText3MBCS, UPRV_LENGTHOF(sampleText3MBCS),
-                expected3MBCS, sizeof(expected3MBCS), "iso-2022-cn", offsets3MBCS, FALSE, U_ZERO_ERROR))
+                expected3MBCS, sizeof(expected3MBCS), "iso-2022-cn", offsets3MBCS, false, U_ZERO_ERROR))
             log_err("u-> iso-2022-cn[UCNV_MBCS] \n");
 
         if(!convertFromU(sampleText4MBCS, UPRV_LENGTHOF(sampleText4MBCS),
-                expected4MBCS, sizeof(expected4MBCS), "iso-2022-cn", offsets4MBCS, TRUE, U_ZERO_ERROR))
+                expected4MBCS, sizeof(expected4MBCS), "iso-2022-cn", offsets4MBCS, true, U_ZERO_ERROR))
             log_err("u-> iso-2022-cn [UCNV_MBCS] \n");
         if(!convertFromU(sampleText4MBCS, UPRV_LENGTHOF(sampleText4MBCS),
-                expected4MBCS, sizeof(expected4MBCS), "iso-2022-cn", offsets4MBCS, FALSE, U_ZERO_ERROR))
+                expected4MBCS, sizeof(expected4MBCS), "iso-2022-cn", offsets4MBCS, false, U_ZERO_ERROR))
             log_err("u-> iso-2022-cn [UCNV_MBCS] \n");
     }
 
@@ -553,27 +554,27 @@ static void TestErrorBehaviour(){
         static const int32_t offsets3MBCS[]        = { -1,   -1,   -1,   -1,    0x00, 0x01, 0x02, 0x02 };
 
         if(!convertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expectedSUB, sizeof(expectedSUB), "iso-2022-kr", offsets, TRUE, U_ZERO_ERROR))
+                expectedSUB, sizeof(expectedSUB), "iso-2022-kr", offsets, true, U_ZERO_ERROR))
             log_err("u-> iso-2022-kr [UCNV_MBCS] \n");
         if(!convertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected, sizeof(expected), "iso-2022-kr", offsets, FALSE, U_ZERO_ERROR))
+                expected, sizeof(expected), "iso-2022-kr", offsets, false, U_ZERO_ERROR))
             log_err("u-> ibm-1363 [UCNV_MBCS] \n");
 
         if(!convertFromU(sampleText2, UPRV_LENGTHOF(sampleText2),
-                expected2, sizeof(expected2), "iso-2022-kr", offsets2, TRUE, U_ZERO_ERROR))
+                expected2, sizeof(expected2), "iso-2022-kr", offsets2, true, U_ZERO_ERROR))
             log_err("u->iso-2022-kr[UCNV_DBCS] did not match\n");
         if(!convertFromU(sampleText2, UPRV_LENGTHOF(sampleText2),
-                expected2, sizeof(expected2), "iso-2022-kr", offsets2, FALSE, U_ZERO_ERROR))
+                expected2, sizeof(expected2), "iso-2022-kr", offsets2, false, U_ZERO_ERROR))
             log_err("u-> iso-2022-kr [UCNV_DBCS] did not match\n");
         if(!convertFromU(sampleText2, UPRV_LENGTHOF(sampleText2),
-                expected2, sizeof(expected2), "iso-2022-kr", offsets2, FALSE, U_ZERO_ERROR))
+                expected2, sizeof(expected2), "iso-2022-kr", offsets2, false, U_ZERO_ERROR))
             log_err("u-> iso-2022-kr [UCNV_DBCS] did not match\n");
 
         if(!convertFromU(sampleText3MBCS, UPRV_LENGTHOF(sampleText3MBCS),
-                expected3MBCS, sizeof(expected3MBCS), "iso-2022-kr", offsets3MBCS, TRUE, U_ZERO_ERROR))
+                expected3MBCS, sizeof(expected3MBCS), "iso-2022-kr", offsets3MBCS, true, U_ZERO_ERROR))
             log_err("u->iso-2022-kr [UCNV_MBCS] \n");
         if(!convertFromU(sampleText3MBCS, UPRV_LENGTHOF(sampleText3MBCS),
-                expected3MBCS, sizeof(expected3MBCS), "iso-2022-kr", offsets3MBCS, FALSE, U_ZERO_ERROR))
+                expected3MBCS, sizeof(expected3MBCS), "iso-2022-kr", offsets3MBCS, false, U_ZERO_ERROR))
             log_err("u-> iso-2022-kr[UCNV_MBCS] \n");
     }
 
@@ -597,34 +598,34 @@ static void TestErrorBehaviour(){
         static const uint8_t expected4MBCS[] = { 0x7e, 0x7d, 0x61, 0x7e, 0x7b, 0x52, 0x3b, 0x7e, 0x7d, 0x1a };
         static const int32_t offsets4MBCS[]        = { 0x00, 0x00, 0x00, 0x01, 0x01, 0x01 ,0x01, 0x02, 0x02, 0x02 };
         if(!convertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expectedSUB, sizeof(expectedSUB), "HZ", offsets, TRUE, U_ZERO_ERROR))
+                expectedSUB, sizeof(expectedSUB), "HZ", offsets, true, U_ZERO_ERROR))
             log_err("u-> HZ [UCNV_MBCS] \n");
         if(!convertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected, sizeof(expected), "HZ", offsets, FALSE, U_ZERO_ERROR))
+                expected, sizeof(expected), "HZ", offsets, false, U_ZERO_ERROR))
             log_err("u-> ibm-1363 [UCNV_MBCS] \n");
 
         if(!convertFromU(sampleText2, UPRV_LENGTHOF(sampleText2),
-                expected2, sizeof(expected2), "HZ", offsets2, TRUE, U_ZERO_ERROR))
+                expected2, sizeof(expected2), "HZ", offsets2, true, U_ZERO_ERROR))
             log_err("u->HZ[UCNV_DBCS] did not match\n");
         if(!convertFromU(sampleText2, UPRV_LENGTHOF(sampleText2),
-                expected2, sizeof(expected2), "HZ", offsets2, FALSE, U_ZERO_ERROR))
+                expected2, sizeof(expected2), "HZ", offsets2, false, U_ZERO_ERROR))
             log_err("u-> HZ [UCNV_DBCS] did not match\n");
         if(!convertFromU(sampleText2, UPRV_LENGTHOF(sampleText2),
-                expected2, sizeof(expected2), "HZ", offsets2, FALSE, U_ZERO_ERROR))
+                expected2, sizeof(expected2), "HZ", offsets2, false, U_ZERO_ERROR))
             log_err("u-> HZ [UCNV_DBCS] did not match\n");
 
         if(!convertFromU(sampleText3MBCS, UPRV_LENGTHOF(sampleText3MBCS),
-                expected3MBCS, sizeof(expected3MBCS), "HZ", offsets3MBCS, TRUE, U_ZERO_ERROR))
+                expected3MBCS, sizeof(expected3MBCS), "HZ", offsets3MBCS, true, U_ZERO_ERROR))
             log_err("u->HZ [UCNV_MBCS] \n");
         if(!convertFromU(sampleText3MBCS, UPRV_LENGTHOF(sampleText3MBCS),
-                expected3MBCS, sizeof(expected3MBCS), "HZ", offsets3MBCS, FALSE, U_ZERO_ERROR))
+                expected3MBCS, sizeof(expected3MBCS), "HZ", offsets3MBCS, false, U_ZERO_ERROR))
             log_err("u-> HZ[UCNV_MBCS] \n");
 
         if(!convertFromU(sampleText4MBCS, UPRV_LENGTHOF(sampleText4MBCS),
-                expected4MBCS, sizeof(expected4MBCS), "HZ", offsets4MBCS, TRUE, U_ZERO_ERROR))
+                expected4MBCS, sizeof(expected4MBCS), "HZ", offsets4MBCS, true, U_ZERO_ERROR))
             log_err("u-> HZ [UCNV_MBCS] \n");
         if(!convertFromU(sampleText4MBCS, UPRV_LENGTHOF(sampleText4MBCS),
-                expected4MBCS, sizeof(expected4MBCS), "HZ", offsets4MBCS, FALSE, U_ZERO_ERROR))
+                expected4MBCS, sizeof(expected4MBCS), "HZ", offsets4MBCS, false, U_ZERO_ERROR))
             log_err("u-> HZ [UCNV_MBCS] \n");
     }
 #endif
@@ -640,10 +641,10 @@ static void TestToUnicodeErrorBehaviour()
         const UChar expected[] = { 0x00a1 };
         
         if(!convertToU(sampleText, sizeof(sampleText), 
-                expected, UPRV_LENGTHOF(expected), "ibm-1363", 0, TRUE, U_AMBIGUOUS_ALIAS_WARNING ))
+                expected, UPRV_LENGTHOF(expected), "ibm-1363", 0, true, U_AMBIGUOUS_ALIAS_WARNING ))
             log_err("DBCS (ibm-1363)->Unicode  did not match.\n");
         if(!convertToU(sampleText, sizeof(sampleText), 
-                expected, UPRV_LENGTHOF(expected), "ibm-1363", 0, FALSE, U_AMBIGUOUS_ALIAS_WARNING ))
+                expected, UPRV_LENGTHOF(expected), "ibm-1363", 0, false, U_AMBIGUOUS_ALIAS_WARNING ))
             log_err("DBCS (ibm-1363)->Unicode  with flush = false did not match.\n");
     }
     log_verbose("Testing error conditions for SBCS\n");
@@ -655,10 +656,10 @@ static void TestToUnicodeErrorBehaviour()
         const UChar expected2[] = { 0x0073 };*/
 
         if(!convertToU(sampleText, sizeof(sampleText), 
-                expected, UPRV_LENGTHOF(expected), "ibm-1051", 0, TRUE, U_ZERO_ERROR ))
+                expected, UPRV_LENGTHOF(expected), "ibm-1051", 0, true, U_ZERO_ERROR ))
             log_err("SBCS (ibm-1051)->Unicode  did not match.\n");
         if(!convertToU(sampleText, sizeof(sampleText), 
-                expected, UPRV_LENGTHOF(expected), "ibm-1051", 0, FALSE, U_ZERO_ERROR ))
+                expected, UPRV_LENGTHOF(expected), "ibm-1051", 0, false, U_ZERO_ERROR ))
             log_err("SBCS (ibm-1051)->Unicode  with flush = false did not match.\n");
 
     }
@@ -710,11 +711,11 @@ static void TestRegressionUTF8(){
             currCh++;
         }
         if(!convertFromU(standardForm, offset16, 
-            utf8, offset8, "UTF8", 0, TRUE, U_ZERO_ERROR )) {
+            utf8, offset8, "UTF8", 0, true, U_ZERO_ERROR )) {
             log_err("Unicode->UTF8 did not match.\n");
         }
         if(!convertToU(utf8, offset8, 
-            standardForm, offset16, "UTF8", 0, TRUE, U_ZERO_ERROR )) {
+            standardForm, offset16, "UTF8", 0, true, U_ZERO_ERROR )) {
             log_err("UTF8->Unicode did not match.\n");
         }
     }
@@ -738,13 +739,13 @@ static void TestRegressionUTF8(){
         srcBeg = src8;
         pivBeg = pivotBuffer;
         srcEnd = src8 + 3;
-        ucnv_toUnicode(conv8, &pivBeg, pivEnd, &srcBeg, srcEnd, 0, FALSE, &err);
+        ucnv_toUnicode(conv8, &pivBeg, pivEnd, &srcBeg, srcEnd, 0, false, &err);
         if (srcBeg != srcEnd) {
             log_err("Did not consume whole buffer on first call.\n");
         }
 
         srcEnd = src8 + 4;
-        ucnv_toUnicode(conv8, &pivBeg, pivEnd, &srcBeg, srcEnd, 0, TRUE, &err);
+        ucnv_toUnicode(conv8, &pivBeg, pivEnd, &srcBeg, srcEnd, 0, true, &err);
         if (srcBeg != srcEnd) {
             log_err("Did not consume whole buffer on second call.\n");
         }
@@ -781,11 +782,11 @@ static void TestRegressionUTF32(){
             currCh++;
         }
         if(!convertFromU(standardForm, offset16, 
-            (const uint8_t *)utf32, offset32*sizeof(UChar32), "UTF32_PlatformEndian", 0, TRUE, U_ZERO_ERROR )) {
+            (const uint8_t *)utf32, offset32*sizeof(UChar32), "UTF32_PlatformEndian", 0, true, U_ZERO_ERROR )) {
             log_err("Unicode->UTF32 did not match.\n");
         }
         if(!convertToU((const uint8_t *)utf32, offset32*sizeof(UChar32), 
-            standardForm, offset16, "UTF32_PlatformEndian", 0, TRUE, U_ZERO_ERROR )) {
+            standardForm, offset16, "UTF32_PlatformEndian", 0, true, U_ZERO_ERROR )) {
             log_err("UTF32->Unicode did not match.\n");
         }
     }
@@ -813,17 +814,17 @@ static void TestRegressionUTF32(){
         };
 
         if(!convertFromU(sampleBadStartSurrogate, UPRV_LENGTHOF(sampleBadStartSurrogate),
-                expectedUTF32BE, sizeof(expectedUTF32BE), "UTF-32BE", offsetsUTF32, TRUE, U_ZERO_ERROR))
+                expectedUTF32BE, sizeof(expectedUTF32BE), "UTF-32BE", offsetsUTF32, true, U_ZERO_ERROR))
             log_err("u->UTF-32BE\n");
         if(!convertFromU(sampleBadEndSurrogate, UPRV_LENGTHOF(sampleBadEndSurrogate),
-                expectedUTF32BE, sizeof(expectedUTF32BE), "UTF-32BE", offsetsUTF32, TRUE, U_ZERO_ERROR))
+                expectedUTF32BE, sizeof(expectedUTF32BE), "UTF-32BE", offsetsUTF32, true, U_ZERO_ERROR))
             log_err("u->UTF-32BE\n");
 
         if(!convertFromU(sampleBadStartSurrogate, UPRV_LENGTHOF(sampleBadStartSurrogate),
-                expectedUTF32LE, sizeof(expectedUTF32LE), "UTF-32LE", offsetsUTF32, TRUE, U_ZERO_ERROR))
+                expectedUTF32LE, sizeof(expectedUTF32LE), "UTF-32LE", offsetsUTF32, true, U_ZERO_ERROR))
             log_err("u->UTF-32LE\n");
         if(!convertFromU(sampleBadEndSurrogate, UPRV_LENGTHOF(sampleBadEndSurrogate),
-                expectedUTF32LE, sizeof(expectedUTF32LE), "UTF-32LE", offsetsUTF32, TRUE, U_ZERO_ERROR))
+                expectedUTF32LE, sizeof(expectedUTF32LE), "UTF-32LE", offsetsUTF32, true, U_ZERO_ERROR))
             log_err("u->UTF-32LE\n");
     }
 
@@ -843,13 +844,13 @@ static void TestRegressionUTF32(){
         srcBeg = srcBE;
         pivBeg = pivotBuffer;
         srcEnd = srcBE + 5;
-        ucnv_toUnicode(convBE, &pivBeg, pivEnd, &srcBeg, srcEnd, 0, FALSE, &err);
+        ucnv_toUnicode(convBE, &pivBeg, pivEnd, &srcBeg, srcEnd, 0, false, &err);
         if (srcBeg != srcEnd) {
             log_err("Did not consume whole buffer on first call.\n");
         }
 
         srcEnd = srcBE + 8;
-        ucnv_toUnicode(convBE, &pivBeg, pivEnd, &srcBeg, srcEnd, 0, TRUE, &err);
+        ucnv_toUnicode(convBE, &pivBeg, pivEnd, &srcBeg, srcEnd, 0, true, &err);
         if (srcBeg != srcEnd) {
             log_err("Did not consume whole buffer on second call.\n");
         }
@@ -875,13 +876,13 @@ static void TestRegressionUTF32(){
         srcBeg = srcLE;
         pivBeg = pivotBuffer;
         srcEnd = srcLE + 5;
-        ucnv_toUnicode(convLE, &pivBeg, pivEnd, &srcBeg, srcEnd, 0, FALSE, &err);
+        ucnv_toUnicode(convLE, &pivBeg, pivEnd, &srcBeg, srcEnd, 0, false, &err);
         if (srcBeg != srcEnd) {
             log_err("Did not consume whole buffer on first call.\n");
         }
 
         srcEnd = srcLE + 8;
-        ucnv_toUnicode(convLE, &pivBeg, pivEnd, &srcBeg, srcEnd, 0, TRUE, &err);
+        ucnv_toUnicode(convLE, &pivBeg, pivEnd, &srcBeg, srcEnd, 0, true, &err);
         if (srcBeg != srcEnd) {
             log_err("Did not consume whole buffer on second call.\n");
         }
@@ -937,7 +938,7 @@ static void TestWithBufferSize(int32_t insize, int32_t outsize){
 
         /*UTF-8*/
         if(!testConvertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-            expectedUTF8, sizeof(expectedUTF8), "UTF8", UCNV_FROM_U_CALLBACK_SUBSTITUTE, toUTF8Offs ,FALSE))
+            expectedUTF8, sizeof(expectedUTF8), "UTF8", UCNV_FROM_U_CALLBACK_SUBSTITUTE, toUTF8Offs ,false))
              log_err("u-> UTF8 did not match.\n");
     }
 
@@ -954,7 +955,7 @@ static void TestWithBufferSize(int32_t insize, int32_t outsize){
 
         if(!testConvertFromU(inputTest, UPRV_LENGTHOF(inputTest),
                 toIBM943, sizeof(toIBM943), "ibm-943",
-                (UConverterFromUCallback)UCNV_FROM_U_CALLBACK_ESCAPE, offset,FALSE))
+                (UConverterFromUCallback)UCNV_FROM_U_CALLBACK_ESCAPE, offset,false))
             log_err("u-> ibm-943 with subst with value did not match.\n");
     }
 #endif
@@ -967,7 +968,7 @@ static void TestWithBufferSize(int32_t insize, int32_t outsize){
         int32_t offsets1[] = {   0x0000, 0x0001, 0x0004, 0x0005, 0x0006};
 
         if(!testConvertToU(sampleText1, sizeof(sampleText1),
-                 expected1, UPRV_LENGTHOF(expected1),"utf8", UCNV_TO_U_CALLBACK_SUBSTITUTE, offsets1,FALSE))
+                 expected1, UPRV_LENGTHOF(expected1),"utf8", UCNV_TO_U_CALLBACK_SUBSTITUTE, offsets1,false))
             log_err("utf8->u with substitute did not match.\n");
     }
 
@@ -985,7 +986,7 @@ static void TestWithBufferSize(int32_t insize, int32_t outsize){
 
         if(!testConvertToU(sampleTxtToU, sizeof(sampleTxtToU),
                  IBM_943toUnicode, UPRV_LENGTHOF(IBM_943toUnicode),"ibm-943",
-                (UConverterToUCallback)UCNV_TO_U_CALLBACK_ESCAPE, fromIBM943Offs,FALSE))
+                (UConverterToUCallback)UCNV_TO_U_CALLBACK_ESCAPE, fromIBM943Offs,false))
             log_err("ibm-943->u with substitute with value did not match.\n");
 
     }
@@ -1011,7 +1012,7 @@ static UBool convertFromU( const UChar *source, int sourceLen,  const uint8_t *e
     if(U_FAILURE(status))
     {
         log_data_err("Couldn't open converter %s\n",codepage);    
-        return TRUE;
+        return true;
     }
     log_verbose("Converter %s opened..\n", ucnv_getName(conv, &status));
 
@@ -1036,7 +1037,7 @@ static UBool convertFromU( const UChar *source, int sourceLen,  const uint8_t *e
     ucnv_close(conv);
     if(status != expectedStatus){
           log_err("ucnv_fromUnicode() failed for codepage=%s. Error =%s Expected=%s\n", codepage, myErrorName(status), myErrorName(expectedStatus));
-          return FALSE;
+          return false;
     }
 
     log_verbose("\nConversion done [%d uchars in -> %d chars out]. \nResult :",
@@ -1048,7 +1049,7 @@ static UBool convertFromU( const UChar *source, int sourceLen,  const uint8_t *e
         log_verbose("Expected %d chars out, got %d FROM Unicode to %s\n", expectLen, targ-buffer, codepage);
         printSeqErr((const unsigned char *)buffer, (int32_t)(targ-buffer));
         printSeqErr((const unsigned char*)expect, expectLen);
-        return FALSE;
+        return false;
     }
 
     if(memcmp(buffer, expect, expectLen)){
@@ -1057,7 +1058,7 @@ static UBool convertFromU( const UChar *source, int sourceLen,  const uint8_t *e
         printSeqErr((const unsigned char *)buffer, expectLen);
         log_info("\nExpected:");
         printSeqErr((const unsigned char *)expect, expectLen);
-        return FALSE;
+        return false;
     }
     else {    
         log_verbose("Matches!\n");
@@ -1077,7 +1078,7 @@ static UBool convertFromU( const UChar *source, int sourceLen,  const uint8_t *e
         }
     }
 
-    return TRUE;    
+    return true;    
 }
 
 
@@ -1102,7 +1103,7 @@ static UBool convertToU( const uint8_t *source, int sourceLen, const UChar *expe
     if(U_FAILURE(status))
     {
         log_data_err("Couldn't open converter %s\n",codepage);    
-        return TRUE;
+        return true;
     }
     log_verbose("Converter %s opened..\n", ucnv_getName(conv, &status));
 
@@ -1133,7 +1134,7 @@ static UBool convertToU( const uint8_t *source, int sourceLen, const UChar *expe
     ucnv_close(conv);
     if(status != expectedStatus){
           log_err("ucnv_fromUnicode() failed for codepage=%s. Error =%s Expected=%s\n", codepage, myErrorName(status), myErrorName(expectedStatus));
-          return FALSE;
+          return false;
     }
     log_verbose("\nConversion done [%d uchars in -> %d chars out]. \nResult :",
         sourceLen, targ-buffer);
@@ -1168,13 +1169,13 @@ static UBool convertToU( const uint8_t *source, int sourceLen, const UChar *expe
         printUSeqErr(buffer, expectLen);
         log_info("\nExpected:");
         printUSeqErr(expect, expectLen);
-        return FALSE;
+        return false;
     }
     else {
         log_verbose("Matches!\n");
     }
 
-    return TRUE;
+    return true;
 }
 
 
@@ -1195,7 +1196,7 @@ static UBool testConvertFromU( const UChar *source, int sourceLen,  const uint8_
     char *realBufferEnd;
     const UChar *realSourceEnd;
     const UChar *sourceLimit;
-    UBool checkOffsets = TRUE;
+    UBool checkOffsets = true;
     UBool doFlush;
 
     UConverterFromUCallback oldAction = NULL;
@@ -1214,7 +1215,7 @@ static UBool testConvertFromU( const UChar *source, int sourceLen,  const uint8_
     if(U_FAILURE(status))
     {
         log_data_err("Couldn't open converter %s\n",codepage);    
-        return TRUE;
+        return true;
     }
 
     log_verbose("Converter opened..\n");
@@ -1234,10 +1235,10 @@ static UBool testConvertFromU( const UChar *source, int sourceLen,  const uint8_
     realSourceEnd = source + sourceLen;
 
     if ( gOutBufferSize != realBufferSize )
-      checkOffsets = FALSE;
+      checkOffsets = false;
 
     if( gInBufferSize != MAX_LENGTH )
-      checkOffsets = FALSE;
+      checkOffsets = false;
 
     do
     {
@@ -1249,14 +1250,14 @@ static UBool testConvertFromU( const UChar *source, int sourceLen,  const uint8_
         if(targ == realBufferEnd)
           {
         log_err("Error, overflowed the real buffer while about to call fromUnicode! targ=%08lx %s", targ, gNuConvTestName);
-        return FALSE;
+        return false;
           }
-        log_verbose("calling fromUnicode @ SOURCE:%08lx to %08lx  TARGET: %08lx to %08lx, flush=%s\n", src,sourceLimit, targ,end, doFlush?"TRUE":"FALSE");
+        log_verbose("calling fromUnicode @ SOURCE:%08lx to %08lx  TARGET: %08lx to %08lx, flush=%s\n", src,sourceLimit, targ,end, doFlush?"true":"false");
 
 
         status = U_ZERO_ERROR;
         if(gInBufferSize ==999 && gOutBufferSize==999)
-            doFlush = FALSE;
+            doFlush = false;
         ucnv_fromUnicode (conv,
                   (char **)&targ,
                   (const char *)end,
@@ -1274,7 +1275,7 @@ static UBool testConvertFromU( const UChar *source, int sourceLen,  const uint8_
 
     if(U_FAILURE(status)) {
         log_err("Problem doing fromUnicode to %s, errcode %s %s\n", codepage, myErrorName(status), gNuConvTestName);
-        return FALSE;
+        return false;
       }
 
     log_verbose("\nConversion done [%d uchars in -> %d chars out]. \nResult :",
@@ -1313,7 +1314,7 @@ static UBool testConvertFromU( const UChar *source, int sourceLen,  const uint8_
         printSeqErr((const unsigned char*)junkout, (int32_t)(targ-junkout));
         log_info("\nExpected:");
         printSeqErr((const unsigned char*)expect, expectLen);
-        return FALSE;
+        return false;
     }
 
     if (checkOffsets && (expectOffsets != 0) )
@@ -1335,7 +1336,7 @@ static UBool testConvertFromU( const UChar *source, int sourceLen,  const uint8_
     if(!memcmp(junkout, expect, expectLen))
     {
         log_verbose("Matches!\n");
-        return TRUE;
+        return true;
     }
     else
     {
@@ -1346,7 +1347,7 @@ static UBool testConvertFromU( const UChar *source, int sourceLen,  const uint8_
         log_info("\nExpected:");
         printSeqErr((const unsigned char *)expect, expectLen);
 
-        return FALSE;
+        return false;
     }
 }
 
@@ -1365,7 +1366,7 @@ static UBool testConvertToU( const uint8_t *source, int sourcelen, const UChar *
     UChar *end;
     int32_t *offs;
     int i;
-    UBool   checkOffsets = TRUE;
+    UBool   checkOffsets = true;
     int32_t   realBufferSize;
     UChar *realBufferEnd;
     UBool doFlush;
@@ -1388,7 +1389,7 @@ static UBool testConvertToU( const uint8_t *source, int sourcelen, const UChar *
     if(U_FAILURE(status))
     {
         log_data_err("Couldn't open converter %s\n",gNuConvTestName);
-        return TRUE;
+        return true;
     }
 
     log_verbose("Converter opened..\n");
@@ -1408,10 +1409,10 @@ static UBool testConvertToU( const uint8_t *source, int sourcelen, const UChar *
     realSourceEnd = src + sourcelen;
 
     if ( gOutBufferSize != realBufferSize )
-      checkOffsets = FALSE;
+      checkOffsets = false;
 
     if( gInBufferSize != MAX_LENGTH )
-      checkOffsets = FALSE;
+      checkOffsets = false;
 
     do
       {
@@ -1421,14 +1422,14 @@ static UBool testConvertToU( const uint8_t *source, int sourcelen, const UChar *
         if(targ == realBufferEnd)
         {
             log_err("Error, the end would overflow the real output buffer while about to call toUnicode! tarjey=%08lx %s",targ,gNuConvTestName);
-            return FALSE;
+            return false;
         }
         log_verbose("calling toUnicode @ %08lx to %08lx\n", targ,end);
 
         /* oldTarg = targ; */
 
         status = U_ZERO_ERROR;
-        doFlush=(UBool)((gInBufferSize ==999 && gOutBufferSize==999)?(srcLimit == realSourceEnd) : FALSE);
+        doFlush=(UBool)((gInBufferSize ==999 && gOutBufferSize==999)?(srcLimit == realSourceEnd) : false);
             
         ucnv_toUnicode (conv,
                 &targ,
@@ -1449,7 +1450,7 @@ static UBool testConvertToU( const uint8_t *source, int sourcelen, const UChar *
     if(U_FAILURE(status))
     {
         log_err("Problem doing %s toUnicode, errcode %s %s\n", codepage, myErrorName(status), gNuConvTestName);
-        return FALSE;
+        return false;
     }
 
     log_verbose("\nConversion done. %d bytes -> %d chars.\nResult :",
@@ -1505,7 +1506,7 @@ static UBool testConvertToU( const uint8_t *source, int sourcelen, const UChar *
     if(!memcmp(junkout, expect, expectlen*2))
     {
         log_verbose("Matches!\n");
-        return TRUE;
+        return true;
     }
     else
     {
@@ -1515,7 +1516,7 @@ static UBool testConvertToU( const uint8_t *source, int sourcelen, const UChar *
         printUSeq(junkout, expectlen);
         log_info("\nExpected:");
         printUSeq(expect, expectlen); 
-        return FALSE;
+        return false;
     }
 }
 
@@ -1535,27 +1536,27 @@ static void TestResetBehaviour(void){
 
         /*DBCS*/
         if(!testConvertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected, sizeof(expected), "ibm-1363", UCNV_FROM_U_CALLBACK_SUBSTITUTE , NULL, TRUE))
+                expected, sizeof(expected), "ibm-1363", UCNV_FROM_U_CALLBACK_SUBSTITUTE , NULL, true))
             log_err("u-> ibm-1363 [UCNV_DBCS portion] not match.\n");
         if(!testConvertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected, sizeof(expected), "ibm-1363", UCNV_FROM_U_CALLBACK_SUBSTITUTE,offsets , TRUE))
+                expected, sizeof(expected), "ibm-1363", UCNV_FROM_U_CALLBACK_SUBSTITUTE,offsets , true))
             log_err("u-> ibm-1363 [UCNV_DBCS portion] not match.\n");
        
         if(!testConvertToU(expected1, sizeof(expected1), 
                 sampleText1, UPRV_LENGTHOF(sampleText1), "ibm-1363",UCNV_TO_U_CALLBACK_SUBSTITUTE , 
-                offsets1, TRUE))
+                offsets1, true))
            log_err("ibm-1363 -> did not match.\n");
         /*MBCS*/
         if(!testConvertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected, sizeof(expected), "ibm-1363", UCNV_FROM_U_CALLBACK_SUBSTITUTE , NULL, TRUE))
+                expected, sizeof(expected), "ibm-1363", UCNV_FROM_U_CALLBACK_SUBSTITUTE , NULL, true))
             log_err("u-> ibm-1363 [UCNV_MBCS] not match.\n");
         if(!testConvertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected, sizeof(expected), "ibm-1363", UCNV_FROM_U_CALLBACK_SUBSTITUTE,offsets , TRUE))
+                expected, sizeof(expected), "ibm-1363", UCNV_FROM_U_CALLBACK_SUBSTITUTE,offsets , true))
             log_err("u-> ibm-1363 [UCNV_MBCS] not match.\n");
       
         if(!testConvertToU(expected1, sizeof(expected1), 
                 sampleText1, UPRV_LENGTHOF(sampleText1), "ibm-1363",UCNV_TO_U_CALLBACK_SUBSTITUTE , 
-                offsets1, TRUE))
+                offsets1, true))
            log_err("ibm-1363 -> did not match.\n");
 
     }
@@ -1578,15 +1579,15 @@ static void TestResetBehaviour(void){
 
         /*iso-2022-jp*/
         if(!testConvertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected, sizeof(expected), "iso-2022-jp",  UCNV_FROM_U_CALLBACK_SUBSTITUTE , NULL, TRUE))
+                expected, sizeof(expected), "iso-2022-jp",  UCNV_FROM_U_CALLBACK_SUBSTITUTE , NULL, true))
             log_err("u-> not match.\n");
         if(!testConvertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected, sizeof(expected), "iso-2022-jp", UCNV_FROM_U_CALLBACK_SUBSTITUTE,offsets , TRUE))
+                expected, sizeof(expected), "iso-2022-jp", UCNV_FROM_U_CALLBACK_SUBSTITUTE,offsets , true))
             log_err("u->  not match.\n");
         
         if(!testConvertToU(expected1, sizeof(expected1), 
                 sampleText1, UPRV_LENGTHOF(sampleText1), "iso-2022-jp",UCNV_TO_U_CALLBACK_SUBSTITUTE ,
-                offsets1, TRUE))
+                offsets1, true))
            log_err("iso-2022-jp -> did not match.\n");
 
     }
@@ -1623,15 +1624,15 @@ static void TestResetBehaviour(void){
 
         /*iso-2022-CN*/
         if(!testConvertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected, sizeof(expected), "iso-2022-cn", UCNV_FROM_U_CALLBACK_SUBSTITUTE , NULL, TRUE))
+                expected, sizeof(expected), "iso-2022-cn", UCNV_FROM_U_CALLBACK_SUBSTITUTE , NULL, true))
             log_err("u-> not match.\n");
         if(!testConvertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected, sizeof(expected), "iso-2022-cn", UCNV_FROM_U_CALLBACK_SUBSTITUTE,offsets , TRUE))
+                expected, sizeof(expected), "iso-2022-cn", UCNV_FROM_U_CALLBACK_SUBSTITUTE,offsets , true))
             log_err("u-> not match.\n");
 
         if(!testConvertToU(expected1, sizeof(expected1), 
                 sampleText1, UPRV_LENGTHOF(sampleText1), "iso-2022-cn",UCNV_TO_U_CALLBACK_SUBSTITUTE ,
-                offsets1, TRUE))
+                offsets1, true))
            log_err("iso-2022-cn -> did not match.\n");
     }
 
@@ -1672,14 +1673,14 @@ static void TestResetBehaviour(void){
                             };
         /*iso-2022-kr*/
         if(!testConvertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected, sizeof(expected), "iso-2022-kr",  UCNV_FROM_U_CALLBACK_SUBSTITUTE , NULL, TRUE))
+                expected, sizeof(expected), "iso-2022-kr",  UCNV_FROM_U_CALLBACK_SUBSTITUTE , NULL, true))
             log_err("u-> iso-2022-kr [UCNV_DBCS] not match.\n");
         if(!testConvertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected, sizeof(expected), "iso-2022-kr",  UCNV_FROM_U_CALLBACK_SUBSTITUTE,offsets , TRUE))
+                expected, sizeof(expected), "iso-2022-kr",  UCNV_FROM_U_CALLBACK_SUBSTITUTE,offsets , true))
             log_err("u-> iso-2022-kr [UCNV_DBCS] not match.\n");
         if(!testConvertToU(expected1, sizeof(expected1), 
                 sampleText1, UPRV_LENGTHOF(sampleText1), "iso-2022-kr",UCNV_TO_U_CALLBACK_SUBSTITUTE ,
-                offsets1, TRUE))
+                offsets1, true))
            log_err("iso-2022-kr -> did not match.\n");
     }
 
@@ -1716,14 +1717,14 @@ static void TestResetBehaviour(void){
 
         /*hz*/
         if(!testConvertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected, sizeof(expected), "HZ", UCNV_FROM_U_CALLBACK_SUBSTITUTE,NULL , TRUE))
+                expected, sizeof(expected), "HZ", UCNV_FROM_U_CALLBACK_SUBSTITUTE,NULL , true))
             log_err("u->  not match.\n");
         if(!testConvertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-                expected, sizeof(expected), "HZ", UCNV_FROM_U_CALLBACK_SUBSTITUTE,offsets , TRUE))
+                expected, sizeof(expected), "HZ", UCNV_FROM_U_CALLBACK_SUBSTITUTE,offsets , true))
             log_err("u->  not match.\n");
         if(!testConvertToU(expected1, sizeof(expected1), 
                 sampleText1, UPRV_LENGTHOF(sampleText1), "hz",UCNV_TO_U_CALLBACK_SUBSTITUTE ,
-                offsets1, TRUE))
+                offsets1, true))
            log_err("hz -> did not match.\n");
     }
 #endif
@@ -1742,28 +1743,28 @@ static void TestResetBehaviour(void){
         static const int32_t fromOffsets[] = { 0x0000, 0x0003, 0x0005, 0x0006, 0x0009, 0x0009, 0x000D }; 
         /*UTF-8*/
         if(!testConvertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-            expected, sizeof(expected), "UTF8", UCNV_FROM_U_CALLBACK_SUBSTITUTE,offsets , TRUE))
+            expected, sizeof(expected), "UTF8", UCNV_FROM_U_CALLBACK_SUBSTITUTE,offsets , true))
             log_err("u-> UTF8 with offsets and flush true did not match.\n");
         if(!testConvertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-            expected, sizeof(expected), "UTF8",  UCNV_FROM_U_CALLBACK_SUBSTITUTE,NULL , TRUE))
+            expected, sizeof(expected), "UTF8",  UCNV_FROM_U_CALLBACK_SUBSTITUTE,NULL , true))
             log_err("u-> UTF8 with offsets and flush true did not match.\n");
         if(!testConvertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-            expected, sizeof(expected), "UTF8", UCNV_FROM_U_CALLBACK_SUBSTITUTE,offsets , TRUE))
+            expected, sizeof(expected), "UTF8", UCNV_FROM_U_CALLBACK_SUBSTITUTE,offsets , true))
             log_err("u-> UTF8 with offsets and flush true did not match.\n");
         if(!testConvertFromU(sampleText, UPRV_LENGTHOF(sampleText),
-            expected, sizeof(expected), "UTF8",  UCNV_FROM_U_CALLBACK_SUBSTITUTE,NULL , TRUE))
+            expected, sizeof(expected), "UTF8",  UCNV_FROM_U_CALLBACK_SUBSTITUTE,NULL , true))
             log_err("u-> UTF8 with offsets and flush true did not match.\n");
         if(!testConvertToU(expected, sizeof(expected), 
-            sampleText, UPRV_LENGTHOF(sampleText), "UTF8",UCNV_TO_U_CALLBACK_SUBSTITUTE , NULL, TRUE))
+            sampleText, UPRV_LENGTHOF(sampleText), "UTF8",UCNV_TO_U_CALLBACK_SUBSTITUTE , NULL, true))
             log_err("UTF8 -> did not match.\n");
         if(!testConvertToU(expected, sizeof(expected), 
-            sampleText, UPRV_LENGTHOF(sampleText), "UTF8", UCNV_TO_U_CALLBACK_SUBSTITUTE , NULL, TRUE))
+            sampleText, UPRV_LENGTHOF(sampleText), "UTF8", UCNV_TO_U_CALLBACK_SUBSTITUTE , NULL, true))
             log_err("UTF8 -> did not match.\n");
         if(!testConvertToU(expected, sizeof(expected), 
-            sampleText, UPRV_LENGTHOF(sampleText), "UTF8",UCNV_TO_U_CALLBACK_SUBSTITUTE , fromOffsets, TRUE))
+            sampleText, UPRV_LENGTHOF(sampleText), "UTF8",UCNV_TO_U_CALLBACK_SUBSTITUTE , fromOffsets, true))
             log_err("UTF8 -> did not match.\n");
         if(!testConvertToU(expected, sizeof(expected), 
-            sampleText, UPRV_LENGTHOF(sampleText), "UTF8", UCNV_TO_U_CALLBACK_SUBSTITUTE , fromOffsets, TRUE))
+            sampleText, UPRV_LENGTHOF(sampleText), "UTF8", UCNV_TO_U_CALLBACK_SUBSTITUTE , fromOffsets, true))
             log_err("UTF8 -> did not match.\n");
 
     }
@@ -1800,31 +1801,31 @@ doTestTruncated(const char *cnvName, const uint8_t *bytes, int32_t length) {
     target=buffer;
     targetLimit=buffer+UPRV_LENGTHOF(buffer);
 
-    /* 1. input bytes with flush=FALSE, then input nothing with flush=TRUE */
-    ucnv_toUnicode(cnv, &target, targetLimit, &source, sourceLimit, NULL, FALSE, &errorCode);
+    /* 1. input bytes with flush=false, then input nothing with flush=true */
+    ucnv_toUnicode(cnv, &target, targetLimit, &source, sourceLimit, NULL, false, &errorCode);
     if(U_FAILURE(errorCode) || source!=sourceLimit || target!=buffer) {
-        log_err("error TestTruncated(%s, 1a): input bytes[%d], flush=FALSE: %s, input left %d, output %d\n",
+        log_err("error TestTruncated(%s, 1a): input bytes[%d], flush=false: %s, input left %d, output %d\n",
                 cnvName, length, u_errorName(errorCode), (int)(sourceLimit-source), (int)(target-buffer));
     }
 
     errorCode=U_ZERO_ERROR;
     source=sourceLimit;
     target=buffer;
-    ucnv_toUnicode(cnv, &target, targetLimit, &source, sourceLimit, NULL, TRUE, &errorCode);
+    ucnv_toUnicode(cnv, &target, targetLimit, &source, sourceLimit, NULL, true, &errorCode);
     if(errorCode!=U_TRUNCATED_CHAR_FOUND || target!=buffer) {
-        log_err("error TestTruncated(%s, 1b): no input (previously %d), flush=TRUE: %s (should be U_TRUNCATED_CHAR_FOUND), output %d\n",
+        log_err("error TestTruncated(%s, 1b): no input (previously %d), flush=true: %s (should be U_TRUNCATED_CHAR_FOUND), output %d\n",
                 cnvName, (int)length, u_errorName(errorCode), (int)(target-buffer));
     }
 
-    /* 2. input bytes with flush=TRUE */
+    /* 2. input bytes with flush=true */
     ucnv_resetToUnicode(cnv);
 
     errorCode=U_ZERO_ERROR;
     source=(const char *)bytes;
     target=buffer;
-    ucnv_toUnicode(cnv, &target, targetLimit, &source, sourceLimit, NULL, TRUE, &errorCode);
+    ucnv_toUnicode(cnv, &target, targetLimit, &source, sourceLimit, NULL, true, &errorCode);
     if(errorCode!=U_TRUNCATED_CHAR_FOUND || source!=sourceLimit || target!=buffer) {
-        log_err("error TestTruncated(%s, 2): input bytes[%d], flush=TRUE: %s (should be U_TRUNCATED_CHAR_FOUND), input left %d, output %d\n",
+        log_err("error TestTruncated(%s, 2): input bytes[%d], flush=true: %s (should be U_TRUNCATED_CHAR_FOUND), input left %d, output %d\n",
                 cnvName, length, u_errorName(errorCode), (int)(sourceLimit-source), (int)(target-buffer));
     }
 
diff --git a/icu4c/source/test/cintltst/nucnvtst.c b/icu4c/source/test/cintltst/nucnvtst.c
index ce37bab8463..d1b55c4480e 100644
--- a/icu4c/source/test/cintltst/nucnvtst.c
+++ b/icu4c/source/test/cintltst/nucnvtst.c
@@ -14,6 +14,7 @@
 *    Steven R. Loomis     7/8/1999      Adding input buffer test
 ********************************************************************************
 */
+#include 
 #include 
 #include "cstring.h"
 #include "unicode/uloc.h"
@@ -376,7 +377,7 @@ static ETestConvertResult testConvertFromU( const UChar *source, int sourceLen,
     char *realBufferEnd;
     const UChar *realSourceEnd;
     const UChar *sourceLimit;
-    UBool checkOffsets = TRUE;
+    UBool checkOffsets = true;
     UBool doFlush;
 
     for(i=0;iinputText;
             const char *  inCharsLimit = inCharsPtr + testPtr->inputTextLength;
-            ucnv_toUnicode(cnv, &toUCharsPtr, toUCharsLimit, &inCharsPtr, inCharsLimit, NULL, TRUE, &err);
+            ucnv_toUnicode(cnv, &toUCharsPtr, toUCharsLimit, &inCharsPtr, inCharsLimit, NULL, true, &err);
         }
         ucnv_close(cnv);
     }
@@ -4969,7 +4970,7 @@ TestLMBCS() {
                       &pSource,
                       sourceLimit,
                       off,
-                      TRUE,
+                      true,
                       &errorCode);
 
 
@@ -5132,7 +5133,7 @@ TestLMBCS() {
                &pSource,
                (pSource+1), /* claim that this is a 1- byte buffer */
                NULL,
-               FALSE,    /* FALSE means there might be more chars in the next buffer */
+               false,    /* false means there might be more chars in the next buffer */
                &errorCode);
            
            if (U_SUCCESS (errorCode))
@@ -5176,7 +5177,7 @@ TestLMBCS() {
 
          /* negative source request should always return U_ILLEGAL_ARGUMENT_ERROR */
          pUIn++;
-         ucnv_fromUnicode(cnv, &pLOut, pLOut+1, &pUIn, pUIn-1, off, FALSE, &errorCode);
+         ucnv_fromUnicode(cnv, &pLOut, pLOut+1, &pUIn, pUIn-1, off, false, &errorCode);
          if (errorCode != U_ILLEGAL_ARGUMENT_ERROR)
          {
             log_err("Unexpected Error on negative source request to ucnv_fromUnicode: %s\n", u_errorName(errorCode));
@@ -5184,7 +5185,7 @@ TestLMBCS() {
          pUIn--;
          
          errorCode=U_ZERO_ERROR;
-         ucnv_toUnicode(cnv, &pUOut,pUOut+1,(const char **)&pLIn,(const char *)(pLIn-1),off,FALSE, &errorCode);
+         ucnv_toUnicode(cnv, &pUOut,pUOut+1,(const char **)&pLIn,(const char *)(pLIn-1),off,false, &errorCode);
          if (errorCode != U_ILLEGAL_ARGUMENT_ERROR)
          {
             log_err("Unexpected Error on negative source request to ucnv_toUnicode: %s\n", u_errorName(errorCode));
@@ -5199,8 +5200,8 @@ TestLMBCS() {
          errorCode=U_ZERO_ERROR;
 
          /* 0 byte source request - no error, no pointer movement */
-         ucnv_toUnicode(cnv, &pUOut,pUOut+1,(const char **)&pLIn,(const char *)pLIn,off,FALSE, &errorCode);
-         ucnv_fromUnicode(cnv, &pLOut,pLOut+1,&pUIn,pUIn,off,FALSE, &errorCode);
+         ucnv_toUnicode(cnv, &pUOut,pUOut+1,(const char **)&pLIn,(const char *)pLIn,off,false, &errorCode);
+         ucnv_fromUnicode(cnv, &pLOut,pLOut+1,&pUIn,pUIn,off,false, &errorCode);
          if(U_FAILURE(errorCode)) {
             log_err("0 byte source request: unexpected error: %s\n", u_errorName(errorCode));
          }
@@ -5223,7 +5224,7 @@ TestLMBCS() {
          /* running out of target room : U_BUFFER_OVERFLOW_ERROR */
 
          pUIn = pszUnicode;
-         ucnv_fromUnicode(cnv, &pLOut,pLOut+offsets[4],&pUIn,pUIn+UPRV_LENGTHOF(pszUnicode),off,FALSE, &errorCode);
+         ucnv_fromUnicode(cnv, &pLOut,pLOut+offsets[4],&pUIn,pUIn+UPRV_LENGTHOF(pszUnicode),off,false, &errorCode);
          if (errorCode != U_BUFFER_OVERFLOW_ERROR || pLOut != LOut + offsets[4] || pUIn != pszUnicode+4 )
          {
             log_err("Unexpected results on out of target room to ucnv_fromUnicode\n");
@@ -5232,7 +5233,7 @@ TestLMBCS() {
          errorCode = U_ZERO_ERROR;
 
          pLIn = (const char *)pszLMBCS;
-         ucnv_toUnicode(cnv, &pUOut,pUOut+4,&pLIn,(pLIn+sizeof(pszLMBCS)),off,FALSE, &errorCode);
+         ucnv_toUnicode(cnv, &pUOut,pUOut+4,&pLIn,(pLIn+sizeof(pszLMBCS)),off,false, &errorCode);
          if (errorCode != U_BUFFER_OVERFLOW_ERROR || pUOut != UOut + 4 || pLIn != (const char *)pszLMBCS+offsets[4])
          {
             log_err("Unexpected results on out of target room to ucnv_toUnicode\n");
@@ -5251,7 +5252,7 @@ TestLMBCS() {
          pUOut = UOut;
 
          ucnv_setToUCallBack(cnv, UCNV_TO_U_CALLBACK_STOP, NULL, NULL, NULL, &errorCode);
-         ucnv_toUnicode(cnv, &pUOut,pUOut+UPRV_LENGTHOF(UOut),(const char **)&pLIn,(const char *)(pLIn+5),off,TRUE, &errorCode);
+         ucnv_toUnicode(cnv, &pUOut,pUOut+UPRV_LENGTHOF(UOut),(const char **)&pLIn,(const char *)(pLIn+5),off,true, &errorCode);
          if (UOut[0] != 0xD801 || errorCode != U_TRUNCATED_CHAR_FOUND || pUOut != UOut + 1 || pLIn != LIn + 5)
          {
             log_err("Unexpected results on chopped low surrogate\n");
@@ -5265,7 +5266,7 @@ TestLMBCS() {
          errorCode = U_ZERO_ERROR;
          pUOut = UOut;
 
-         ucnv_toUnicode(cnv, &pUOut,pUOut+UPRV_LENGTHOF(UOut),(const char **)&pLIn,(const char *)(pLIn+3),off,TRUE, &errorCode);
+         ucnv_toUnicode(cnv, &pUOut,pUOut+UPRV_LENGTHOF(UOut),(const char **)&pLIn,(const char *)(pLIn+3),off,true, &errorCode);
          if (UOut[0] != 0xD801 || U_FAILURE(errorCode) || pUOut != UOut + 1 || pLIn != LIn + 3)
          {
             log_err("Unexpected results on chopped at surrogate boundary \n");
@@ -5282,7 +5283,7 @@ TestLMBCS() {
          errorCode = U_ZERO_ERROR;
          pUOut = UOut;
 
-         ucnv_toUnicode(cnv, &pUOut,pUOut+UPRV_LENGTHOF(UOut),(const char **)&pLIn,(const char *)(pLIn+6),off,TRUE, &errorCode);
+         ucnv_toUnicode(cnv, &pUOut,pUOut+UPRV_LENGTHOF(UOut),(const char **)&pLIn,(const char *)(pLIn+6),off,true, &errorCode);
          if (UOut[0] != 0xD801 || UOut[1] != 0xC9D0 || U_FAILURE(errorCode) || pUOut != UOut + 2 || pLIn != LIn + 6)
          {
             log_err("Unexpected results after unpaired surrogate plus valid Unichar \n");
@@ -5299,7 +5300,7 @@ TestLMBCS() {
          errorCode = U_ZERO_ERROR;
          pUOut = UOut;
 
-         ucnv_toUnicode(cnv, &pUOut,pUOut+UPRV_LENGTHOF(UOut),(const char **)&pLIn,(const char *)(pLIn+5),off,TRUE, &errorCode);
+         ucnv_toUnicode(cnv, &pUOut,pUOut+UPRV_LENGTHOF(UOut),(const char **)&pLIn,(const char *)(pLIn+5),off,true, &errorCode);
          if (UOut[0] != 0xD801 || errorCode != U_TRUNCATED_CHAR_FOUND || pUOut != UOut + 1 || pLIn != LIn + 5)
          {
             log_err("Unexpected results after unpaired surrogate plus chopped Unichar \n");
@@ -5316,7 +5317,7 @@ TestLMBCS() {
          errorCode = U_ZERO_ERROR;
          pUOut = UOut;
 
-         ucnv_toUnicode(cnv, &pUOut,pUOut+UPRV_LENGTHOF(UOut),(const char **)&pLIn,(const char *)(pLIn+5),off,TRUE, &errorCode);
+         ucnv_toUnicode(cnv, &pUOut,pUOut+UPRV_LENGTHOF(UOut),(const char **)&pLIn,(const char *)(pLIn+5),off,true, &errorCode);
          if (UOut[0] != 0xD801 || UOut[1] != 0x1B || U_FAILURE(errorCode) || pUOut != UOut + 2 || pLIn != LIn + 5)
          {
             log_err("Unexpected results after unpaired surrogate plus valid non-Unichar\n");
@@ -5332,7 +5333,7 @@ TestLMBCS() {
          errorCode = U_ZERO_ERROR;
          pUOut = UOut;
 
-         ucnv_toUnicode(cnv, &pUOut,pUOut+UPRV_LENGTHOF(UOut),(const char **)&pLIn,(const char *)(pLIn+4),off,TRUE, &errorCode);
+         ucnv_toUnicode(cnv, &pUOut,pUOut+UPRV_LENGTHOF(UOut),(const char **)&pLIn,(const char *)(pLIn+4),off,true, &errorCode);
 
          if (UOut[0] != 0xD801 || errorCode != U_TRUNCATED_CHAR_FOUND || pUOut != UOut + 1 || pLIn != LIn + 4)
          {
@@ -5389,7 +5390,7 @@ static void TestEBCDICUS4XML()
         log_data_err("Failed to open the converter for EBCDIC-XML-US.\n");
         return;
     }
-    ucnv_toUnicode(cnv, &unicodes, unicodes+3, (const char**)&newLines, newLines+3, NULL, TRUE, &status);
+    ucnv_toUnicode(cnv, &unicodes, unicodes+3, (const char**)&newLines, newLines+3, NULL, true, &status);
     if (U_FAILURE(status) || memcmp(unicodes_x, toUnicodeMaps, sizeof(UChar)*3) != 0) {
         log_err("To Unicode conversion failed in EBCDICUS4XML test. %s\n",
             u_errorName(status));
@@ -5397,7 +5398,7 @@ static void TestEBCDICUS4XML()
         printUSeqErr(toUnicodeMaps, 3);
     }
     status = U_ZERO_ERROR;
-    ucnv_fromUnicode(cnv, &target, target+3, (const UChar**)&toUnicodeMaps, toUnicodeMaps+3, NULL, TRUE, &status);
+    ucnv_fromUnicode(cnv, &target, target+3, (const UChar**)&toUnicodeMaps, toUnicodeMaps+3, NULL, true, &status);
     if (U_FAILURE(status) || memcmp(target_x, fromUnicodeMaps, sizeof(char)*3) != 0) {
         log_err("From Unicode conversion failed in EBCDICUS4XML test. %s\n",
             u_errorName(status));
@@ -5525,7 +5526,7 @@ static void TestJB5275_1(){
     }
     
     log_verbose("Testing switching back to default script when new line is encountered.\n");
-    ucnv_toUnicode(conv, &target, targetLimit, &source, sourceLimit, NULL, TRUE, &status);
+    ucnv_toUnicode(conv, &target, targetLimit, &source, sourceLimit, NULL, true, &status);
     if(U_FAILURE(status)){
         log_err("conversion failed: %s \n", u_errorName(status));
     }
@@ -5571,7 +5572,7 @@ static void TestJB5275(){
     const char* source = data;
     const char* sourceLimit = data+strlen(data);
     const UChar* exp = expected;
-    ucnv_toUnicode(conv, &target, targetLimit, &source, sourceLimit, NULL, TRUE, &status);
+    ucnv_toUnicode(conv, &target, targetLimit, &source, sourceLimit, NULL, true, &status);
     if(U_FAILURE(status)){
         log_data_err("conversion failed: %s \n", u_errorName(status));
     }
@@ -5617,7 +5618,7 @@ TestIsFixedWidth() {
         }
 
         if (!ucnv_isFixedWidth(cnv, &status)) {
-            log_err("%s is a fixedWidth converter but returned FALSE.\n", fixedWidth[i]);
+            log_err("%s is a fixedWidth converter but returned false.\n", fixedWidth[i]);
         }
         ucnv_close(cnv);
     }
@@ -5630,7 +5631,7 @@ TestIsFixedWidth() {
         }
 
         if (ucnv_isFixedWidth(cnv, &status)) {
-            log_err("%s is NOT a fixedWidth converter but returned TRUE.\n", notFixedWidth[i]);
+            log_err("%s is NOT a fixedWidth converter but returned true.\n", notFixedWidth[i]);
         }
         ucnv_close(cnv);
     }
diff --git a/icu4c/source/test/cintltst/putiltst.c b/icu4c/source/test/cintltst/putiltst.c
index e455dd59441..805e76bc0d6 100644
--- a/icu4c/source/test/cintltst/putiltst.c
+++ b/icu4c/source/test/cintltst/putiltst.c
@@ -25,6 +25,7 @@
 #include "putilimp.h"
 #include "toolutil.h"
 #include "uinvchar.h"
+#include 
 #include 
 #if U_PLATFORM_USES_ONLY_WIN32_API 
 #include "wintz.h"
@@ -56,7 +57,7 @@ static void TestPUtilAPI(void){
     double  n1=0.0, y1=0.0, expn1, expy1;
     double  value1 = 0.021;
     char *str=0;
-    UBool isTrue=FALSE;
+    UBool isTrue=false;
 
     log_verbose("Testing the API uprv_modf()\n");
     y1 = uprv_modf(value1, &n1);
@@ -117,32 +118,32 @@ static void TestPUtilAPI(void){
 
     log_verbose("Testing the API uprv_isNegativeInfinity()\n");
     isTrue=uprv_isNegativeInfinity(uprv_getInfinity() * -1);
-    if(isTrue != TRUE){
+    if(isTrue != true){
         log_err("ERROR: uprv_isNegativeInfinity failed.\n");
     }
     log_verbose("Testing the API uprv_isPositiveInfinity()\n");
     isTrue=uprv_isPositiveInfinity(uprv_getInfinity());
-    if(isTrue != TRUE){
+    if(isTrue != true){
         log_err("ERROR: uprv_isPositiveInfinity failed.\n");
     }
     log_verbose("Testing the API uprv_isInfinite()\n");
     isTrue=uprv_isInfinite(uprv_getInfinity());
-    if(isTrue != TRUE){
+    if(isTrue != true){
         log_err("ERROR: uprv_isInfinite failed.\n");
     }
 
     log_verbose("Testing the APIs uprv_add32_overflow and uprv_mul32_overflow\n");
     int32_t overflow_result;
-    doAssert(FALSE, uprv_add32_overflow(INT32_MAX - 2, 1, &overflow_result), "should not overflow");
+    doAssert(false, uprv_add32_overflow(INT32_MAX - 2, 1, &overflow_result), "should not overflow");
     doAssert(INT32_MAX - 1, overflow_result, "should equal INT32_MAX - 1");
-    doAssert(FALSE, uprv_add32_overflow(INT32_MAX - 2, 2, &overflow_result), "should not overflow");
+    doAssert(false, uprv_add32_overflow(INT32_MAX - 2, 2, &overflow_result), "should not overflow");
     doAssert(INT32_MAX, overflow_result, "should equal exactly INT32_MAX");
-    doAssert(TRUE, uprv_add32_overflow(INT32_MAX - 2, 3, &overflow_result), "should overflow");
-    doAssert(FALSE, uprv_mul32_overflow(INT32_MAX / 5, 4, &overflow_result), "should not overflow");
+    doAssert(true, uprv_add32_overflow(INT32_MAX - 2, 3, &overflow_result), "should overflow");
+    doAssert(false, uprv_mul32_overflow(INT32_MAX / 5, 4, &overflow_result), "should not overflow");
     doAssert(INT32_MAX / 5 * 4, overflow_result, "should equal INT32_MAX / 5 * 4");
-    doAssert(TRUE, uprv_mul32_overflow(INT32_MAX / 5, 6, &overflow_result), "should overflow");
+    doAssert(true, uprv_mul32_overflow(INT32_MAX / 5, 6, &overflow_result), "should overflow");
     // Test on negative numbers:
-    doAssert(FALSE, uprv_add32_overflow(-3, -2, &overflow_result), "should not overflow");
+    doAssert(false, uprv_add32_overflow(-3, -2, &overflow_result), "should not overflow");
     doAssert(-5, overflow_result, "should equal -5");
 
 #if 0
@@ -437,14 +438,14 @@ static UBool compareWithNAN(double x, double y)
 {
   if( uprv_isNaN(x) || uprv_isNaN(y) ) {
     if(!uprv_isNaN(x) || !uprv_isNaN(y) ) {
-      return FALSE;
+      return false;
     }
   }
   else if (y != x) { /* no NaN's involved */
-    return FALSE;
+    return false;
   }
 
-  return TRUE;
+  return true;
 }
 
 static void doAssert(double got, double expect, const char *message)
diff --git a/icu4c/source/test/cintltst/reapits.c b/icu4c/source/test/cintltst/reapits.c
index db961480147..3d657968e9f 100644
--- a/icu4c/source/test/cintltst/reapits.c
+++ b/icu4c/source/test/cintltst/reapits.c
@@ -23,6 +23,7 @@
 
 #if !UCONFIG_NO_REGULAR_EXPRESSIONS
 
+#include 
 #include 
 #include 
 #include "unicode/uloc.h"
@@ -40,7 +41,7 @@
 } UPRV_BLOCK_MACRO_END
 
 #define TEST_ASSERT(expr) UPRV_BLOCK_MACRO_BEGIN { \
-    if ((expr)==FALSE) { \
+    if ((expr)==false) { \
         log_err("Test Failure at file %s:%d - ASSERT(%s) failed.\n", __FILE__, __LINE__, #expr); \
     } \
 } UPRV_BLOCK_MACRO_END
@@ -93,7 +94,7 @@ static void test_assert_string(const char *expected, const UChar *actual, UBool
          buf_inside_macro[len+1] = 0;
          success = (strncmp((expected), buf_inside_macro, len) == 0);
      }
-     if (success == FALSE) {
+     if (success == false) {
          log_err("Failure at file %s, line %d, expected \"%s\", got \"%s\"\n",
              file, line, (expected), buf_inside_macro);
      }
@@ -106,7 +107,7 @@ static UBool equals_utf8_utext(const char *utf8, UText *utext) {
     int32_t u8i = 0;
     UChar32 u8c = 0;
     UChar32 utc = 0;
-    UBool   stringsEqual = TRUE;
+    UBool   stringsEqual = true;
     utext_setNativeIndex(utext, 0);
     for (;;) {
         U8_NEXT_UNSAFE(utf8, u8i, u8c);
@@ -115,7 +116,7 @@ static UBool equals_utf8_utext(const char *utf8, UText *utext) {
             break;
         }
         if (u8c != utc || u8c == 0) {
-            stringsEqual = FALSE;
+            stringsEqual = false;
             break;
         }
     }
@@ -318,17 +319,17 @@ static void TestRegexCAPI(void) {
         TEST_ASSERT_SUCCESS(status);
         result = uregex_lookingAt(clone1, 0, &status);
         TEST_ASSERT_SUCCESS(status);
-        TEST_ASSERT(result==TRUE);
+        TEST_ASSERT(result==true);
         
         status = U_ZERO_ERROR;
         uregex_setText(clone2, testString2, -1, &status);
         TEST_ASSERT_SUCCESS(status);
         result = uregex_lookingAt(clone2, 0, &status);
         TEST_ASSERT_SUCCESS(status);
-        TEST_ASSERT(result==FALSE);
+        TEST_ASSERT(result==false);
         result = uregex_find(clone2, 0, &status);
         TEST_ASSERT_SUCCESS(status);
-        TEST_ASSERT(result==TRUE);
+        TEST_ASSERT(result==true);
 
         uregex_close(clone1);
         uregex_close(clone2);
@@ -423,31 +424,31 @@ static void TestRegexCAPI(void) {
         status = U_ZERO_ERROR;
         uregex_setText(re, text1, -1, &status);
         result = uregex_lookingAt(re, 0, &status);
-        TEST_ASSERT(result == TRUE);
+        TEST_ASSERT(result == true);
         TEST_ASSERT_SUCCESS(status);
 
         status = U_ZERO_ERROR;
         uregex_setText(re, text2, -1, &status);
         result = uregex_lookingAt(re, 0, &status);
-        TEST_ASSERT(result == FALSE);
+        TEST_ASSERT(result == false);
         TEST_ASSERT_SUCCESS(status);
 
         status = U_ZERO_ERROR;
         uregex_setText(re, text1, -1, &status);
         result = uregex_lookingAt(re, 0, &status);
-        TEST_ASSERT(result == TRUE);
+        TEST_ASSERT(result == true);
         TEST_ASSERT_SUCCESS(status);
 
         status = U_ZERO_ERROR;
         uregex_setText(re, text1, 5, &status);
         result = uregex_lookingAt(re, 0, &status);
-        TEST_ASSERT(result == FALSE);
+        TEST_ASSERT(result == false);
         TEST_ASSERT_SUCCESS(status);
 
         status = U_ZERO_ERROR;
         uregex_setText(re, text1, 6, &status);
         result = uregex_lookingAt(re, 0, &status);
-        TEST_ASSERT(result == TRUE);
+        TEST_ASSERT(result == true);
         TEST_ASSERT_SUCCESS(status);
 
         uregex_close(re);
@@ -507,19 +508,19 @@ static void TestRegexCAPI(void) {
 
         uregex_setText(re, text1, -1, &status);
         result = uregex_matches(re, 0, &status);
-        TEST_ASSERT(result == FALSE);
+        TEST_ASSERT(result == false);
         TEST_ASSERT_SUCCESS(status);
 
         status = U_ZERO_ERROR;
         uregex_setText(re, text1, 6, &status);
         result = uregex_matches(re, 0, &status);
-        TEST_ASSERT(result == TRUE);
+        TEST_ASSERT(result == true);
         TEST_ASSERT_SUCCESS(status);
 
         status = U_ZERO_ERROR;
         uregex_setText(re, text1, 6, &status);
         result = uregex_matches(re, 1, &status);
-        TEST_ASSERT(result == FALSE);
+        TEST_ASSERT(result == false);
         TEST_ASSERT_SUCCESS(status);
         uregex_close(re);
 
@@ -528,14 +529,14 @@ static void TestRegexCAPI(void) {
         uregex_setText(re, text1, -1, &status);
         len = u_strlen(text1);
         result = uregex_matches(re, len, &status);
-        TEST_ASSERT(result == TRUE);
+        TEST_ASSERT(result == true);
         TEST_ASSERT_SUCCESS(status);
 
         status = U_ZERO_ERROR;
         uregex_setText(re, nullString, -1, &status);
         TEST_ASSERT_SUCCESS(status);
         result = uregex_matches(re, 0, &status);
-        TEST_ASSERT(result == TRUE);
+        TEST_ASSERT(result == true);
         TEST_ASSERT_SUCCESS(status);
         uregex_close(re);
     }
@@ -558,32 +559,32 @@ static void TestRegexCAPI(void) {
 
         uregex_setText(re, text1, -1, &status);
         result = uregex_find(re, 0, &status);
-        TEST_ASSERT(result == TRUE);
+        TEST_ASSERT(result == true);
         TEST_ASSERT(uregex_start(re, 0, &status) == 3);
         TEST_ASSERT(uregex_end(re, 0, &status) == 5);
         TEST_ASSERT_SUCCESS(status);
 
         result = uregex_find(re, 9, &status);
-        TEST_ASSERT(result == TRUE);
+        TEST_ASSERT(result == true);
         TEST_ASSERT(uregex_start(re, 0, &status) == 11);
         TEST_ASSERT(uregex_end(re, 0, &status) == 13);
         TEST_ASSERT_SUCCESS(status);
 
         result = uregex_find(re, 14, &status);
-        TEST_ASSERT(result == FALSE);
+        TEST_ASSERT(result == false);
         TEST_ASSERT_SUCCESS(status);
 
         status = U_ZERO_ERROR;
         uregex_reset(re, 0, &status);
 
         result = uregex_findNext(re, &status);
-        TEST_ASSERT(result == TRUE);
+        TEST_ASSERT(result == true);
         TEST_ASSERT(uregex_start(re, 0, &status) == 3);
         TEST_ASSERT(uregex_end(re, 0, &status) == 5);
         TEST_ASSERT_SUCCESS(status);
 
         result = uregex_findNext(re, &status);
-        TEST_ASSERT(result == TRUE);
+        TEST_ASSERT(result == true);
         TEST_ASSERT(uregex_start(re, 0, &status) == 6);
         TEST_ASSERT(uregex_end(re, 0, &status) == 8);
         TEST_ASSERT_SUCCESS(status);
@@ -592,13 +593,13 @@ static void TestRegexCAPI(void) {
         uregex_reset(re, 12, &status);
 
         result = uregex_findNext(re, &status);
-        TEST_ASSERT(result == TRUE);
+        TEST_ASSERT(result == true);
         TEST_ASSERT(uregex_start(re, 0, &status) == 13);
         TEST_ASSERT(uregex_end(re, 0, &status) == 15);
         TEST_ASSERT_SUCCESS(status);
 
         result = uregex_findNext(re, &status);
-        TEST_ASSERT(result == FALSE);
+        TEST_ASSERT(result == false);
         TEST_ASSERT_SUCCESS(status);
 
         uregex_close(re);
@@ -644,20 +645,20 @@ static void TestRegexCAPI(void) {
 
         uregex_setText(re, text1, -1, &status);
         result = uregex_find(re, 0, &status);
-        TEST_ASSERT(result==TRUE);
+        TEST_ASSERT(result==true);
 
         /*  Capture Group 0, the full match.  Should succeed.  */
         status = U_ZERO_ERROR;
         resultSz = uregex_group(re, 0, buf, UPRV_LENGTHOF(buf), &status);
         TEST_ASSERT_SUCCESS(status);
-        TEST_ASSERT_STRING("abc interior def", buf, TRUE);
+        TEST_ASSERT_STRING("abc interior def", buf, true);
         TEST_ASSERT(resultSz == (int32_t)strlen("abc interior def"));
 
         /*  Capture group #1.  Should succeed. */
         status = U_ZERO_ERROR;
         resultSz = uregex_group(re, 1, buf, UPRV_LENGTHOF(buf), &status);
         TEST_ASSERT_SUCCESS(status);
-        TEST_ASSERT_STRING(" interior ", buf, TRUE);
+        TEST_ASSERT_STRING(" interior ", buf, true);
         TEST_ASSERT(resultSz == (int32_t)strlen(" interior "));
 
         /*  Capture group out of range.  Error. */
@@ -676,7 +677,7 @@ static void TestRegexCAPI(void) {
         memset(buf, -1, sizeof(buf));
         resultSz = uregex_group(re, 0, buf, 5, &status);
         TEST_ASSERT(status == U_BUFFER_OVERFLOW_ERROR);
-        TEST_ASSERT_STRING("abc i", buf, FALSE);
+        TEST_ASSERT_STRING("abc i", buf, false);
         TEST_ASSERT(buf[5] == (UChar)0xffff);
         TEST_ASSERT(resultSz == (int32_t)strlen("abc interior def"));
 
@@ -684,7 +685,7 @@ static void TestRegexCAPI(void) {
         status = U_ZERO_ERROR;
         resultSz = uregex_group(re, 0, buf, (int32_t)strlen("abc interior def"), &status);
         TEST_ASSERT(status == U_STRING_NOT_TERMINATED_WARNING);
-        TEST_ASSERT_STRING("abc interior def", buf, FALSE);
+        TEST_ASSERT_STRING("abc interior def", buf, false);
         TEST_ASSERT(resultSz == (int32_t)strlen("abc interior def"));
         TEST_ASSERT(buf[strlen("abc interior def")] == (UChar)0xffff);
         
@@ -707,13 +708,13 @@ static void TestRegexCAPI(void) {
         TEST_ASSERT(uregex_regionEnd(re, &status) == 6);
         TEST_ASSERT(uregex_findNext(re, &status));
         TEST_ASSERT(uregex_group(re, 0, resultString, UPRV_LENGTHOF(resultString), &status) == 3);
-        TEST_ASSERT_STRING("345", resultString, TRUE);
+        TEST_ASSERT_STRING("345", resultString, true);
         TEST_TEARDOWN;
         
         /* find(start=-1) uses regions   */
         TEST_SETUP(".*", "0123456789ABCDEF", 0);
         uregex_setRegion(re, 4, 6, &status);
-        TEST_ASSERT(uregex_find(re, -1, &status) == TRUE);
+        TEST_ASSERT(uregex_find(re, -1, &status) == true);
         TEST_ASSERT(uregex_start(re, 0, &status) == 4);
         TEST_ASSERT(uregex_end(re, 0, &status) == 6);
         TEST_TEARDOWN;
@@ -721,7 +722,7 @@ static void TestRegexCAPI(void) {
         /* find (start >=0) does not use regions   */
         TEST_SETUP(".*", "0123456789ABCDEF", 0);
         uregex_setRegion(re, 4, 6, &status);
-        TEST_ASSERT(uregex_find(re, 0, &status) == TRUE);
+        TEST_ASSERT(uregex_find(re, 0, &status) == true);
         TEST_ASSERT(uregex_start(re, 0, &status) == 0);
         TEST_ASSERT(uregex_end(re, 0, &status) == 16);
         TEST_TEARDOWN;
@@ -729,18 +730,18 @@ static void TestRegexCAPI(void) {
         /* findNext() obeys regions    */
         TEST_SETUP(".", "0123456789ABCDEF", 0);
         uregex_setRegion(re, 4, 6, &status);
-        TEST_ASSERT(uregex_findNext(re,&status) == TRUE);
+        TEST_ASSERT(uregex_findNext(re,&status) == true);
         TEST_ASSERT(uregex_start(re, 0, &status) == 4);
-        TEST_ASSERT(uregex_findNext(re, &status) == TRUE);
+        TEST_ASSERT(uregex_findNext(re, &status) == true);
         TEST_ASSERT(uregex_start(re, 0, &status) == 5);
-        TEST_ASSERT(uregex_findNext(re, &status) == FALSE);
+        TEST_ASSERT(uregex_findNext(re, &status) == false);
         TEST_TEARDOWN;
 
         /* matches(start=-1) uses regions                                           */
         /*    Also, verify that non-greedy *? succeeds in finding the full match.   */
         TEST_SETUP(".*?", "0123456789ABCDEF", 0);
         uregex_setRegion(re, 4, 6, &status);
-        TEST_ASSERT(uregex_matches(re, -1, &status) == TRUE);
+        TEST_ASSERT(uregex_matches(re, -1, &status) == true);
         TEST_ASSERT(uregex_start(re, 0, &status) == 4);
         TEST_ASSERT(uregex_end(re, 0, &status) == 6);
         TEST_TEARDOWN;
@@ -748,7 +749,7 @@ static void TestRegexCAPI(void) {
         /* matches (start >=0) does not use regions       */
         TEST_SETUP(".*?", "0123456789ABCDEF", 0);
         uregex_setRegion(re, 4, 6, &status);
-        TEST_ASSERT(uregex_matches(re, 0, &status) == TRUE);
+        TEST_ASSERT(uregex_matches(re, 0, &status) == true);
         TEST_ASSERT(uregex_start(re, 0, &status) == 0);
         TEST_ASSERT(uregex_end(re, 0, &status) == 16);
         TEST_TEARDOWN;
@@ -757,7 +758,7 @@ static void TestRegexCAPI(void) {
         /*    Also, verify that non-greedy *? finds the first (shortest) match.     */
         TEST_SETUP(".*?", "0123456789ABCDEF", 0);
         uregex_setRegion(re, 4, 6, &status);
-        TEST_ASSERT(uregex_lookingAt(re, -1, &status) == TRUE);
+        TEST_ASSERT(uregex_lookingAt(re, -1, &status) == true);
         TEST_ASSERT(uregex_start(re, 0, &status) == 4);
         TEST_ASSERT(uregex_end(re, 0, &status) == 4);
         TEST_TEARDOWN;
@@ -765,58 +766,58 @@ static void TestRegexCAPI(void) {
         /* lookingAt (start >=0) does not use regions  */
         TEST_SETUP(".*?", "0123456789ABCDEF", 0);
         uregex_setRegion(re, 4, 6, &status);
-        TEST_ASSERT(uregex_lookingAt(re, 0, &status) == TRUE);
+        TEST_ASSERT(uregex_lookingAt(re, 0, &status) == true);
         TEST_ASSERT(uregex_start(re, 0, &status) == 0);
         TEST_ASSERT(uregex_end(re, 0, &status) == 0);
         TEST_TEARDOWN;
 
         /* hitEnd()       */
         TEST_SETUP("[a-f]*", "abcdefghij", 0);
-        TEST_ASSERT(uregex_find(re, 0, &status) == TRUE);
-        TEST_ASSERT(uregex_hitEnd(re, &status) == FALSE);
+        TEST_ASSERT(uregex_find(re, 0, &status) == true);
+        TEST_ASSERT(uregex_hitEnd(re, &status) == false);
         TEST_TEARDOWN;
 
         TEST_SETUP("[a-f]*", "abcdef", 0);
-        TEST_ASSERT(uregex_find(re, 0, &status) == TRUE);
-        TEST_ASSERT(uregex_hitEnd(re, &status) == TRUE);
+        TEST_ASSERT(uregex_find(re, 0, &status) == true);
+        TEST_ASSERT(uregex_hitEnd(re, &status) == true);
         TEST_TEARDOWN;
 
         /* requireEnd   */
         TEST_SETUP("abcd", "abcd", 0);
-        TEST_ASSERT(uregex_find(re, 0, &status) == TRUE);
-        TEST_ASSERT(uregex_requireEnd(re, &status) == FALSE);
+        TEST_ASSERT(uregex_find(re, 0, &status) == true);
+        TEST_ASSERT(uregex_requireEnd(re, &status) == false);
         TEST_TEARDOWN;
 
         TEST_SETUP("abcd$", "abcd", 0);
-        TEST_ASSERT(uregex_find(re, 0, &status) == TRUE);
-        TEST_ASSERT(uregex_requireEnd(re, &status) == TRUE);
+        TEST_ASSERT(uregex_find(re, 0, &status) == true);
+        TEST_ASSERT(uregex_requireEnd(re, &status) == true);
         TEST_TEARDOWN;
         
         /* anchoringBounds        */
         TEST_SETUP("abc$", "abcdef", 0);
-        TEST_ASSERT(uregex_hasAnchoringBounds(re, &status) == TRUE);
-        uregex_useAnchoringBounds(re, FALSE, &status);
-        TEST_ASSERT(uregex_hasAnchoringBounds(re, &status) == FALSE);
+        TEST_ASSERT(uregex_hasAnchoringBounds(re, &status) == true);
+        uregex_useAnchoringBounds(re, false, &status);
+        TEST_ASSERT(uregex_hasAnchoringBounds(re, &status) == false);
         
-        TEST_ASSERT(uregex_find(re, -1, &status) == FALSE);
-        uregex_useAnchoringBounds(re, TRUE, &status);
+        TEST_ASSERT(uregex_find(re, -1, &status) == false);
+        uregex_useAnchoringBounds(re, true, &status);
         uregex_setRegion(re, 0, 3, &status);
-        TEST_ASSERT(uregex_find(re, -1, &status) == TRUE);
+        TEST_ASSERT(uregex_find(re, -1, &status) == true);
         TEST_ASSERT(uregex_end(re, 0, &status) == 3);
         TEST_TEARDOWN;
         
         /* Transparent Bounds      */
         TEST_SETUP("abc(?=def)", "abcdef", 0);
-        TEST_ASSERT(uregex_hasTransparentBounds(re, &status) == FALSE);
-        uregex_useTransparentBounds(re, TRUE, &status);
-        TEST_ASSERT(uregex_hasTransparentBounds(re, &status) == TRUE);
+        TEST_ASSERT(uregex_hasTransparentBounds(re, &status) == false);
+        uregex_useTransparentBounds(re, true, &status);
+        TEST_ASSERT(uregex_hasTransparentBounds(re, &status) == true);
         
-        uregex_useTransparentBounds(re, FALSE, &status);
-        TEST_ASSERT(uregex_find(re, -1, &status) == TRUE);    /* No Region */
+        uregex_useTransparentBounds(re, false, &status);
+        TEST_ASSERT(uregex_find(re, -1, &status) == true);    /* No Region */
         uregex_setRegion(re, 0, 3, &status);
-        TEST_ASSERT(uregex_find(re, -1, &status) == FALSE);   /* with region, opaque bounds */
-        uregex_useTransparentBounds(re, TRUE, &status);
-        TEST_ASSERT(uregex_find(re, -1, &status) == TRUE);    /* with region, transparent bounds */
+        TEST_ASSERT(uregex_find(re, -1, &status) == false);   /* with region, opaque bounds */
+        uregex_useTransparentBounds(re, true, &status);
+        TEST_ASSERT(uregex_find(re, -1, &status) == true);    /* with region, transparent bounds */
         TEST_ASSERT(uregex_end(re, 0, &status) == 3);
         TEST_TEARDOWN;
         
@@ -842,7 +843,7 @@ static void TestRegexCAPI(void) {
         uregex_setText(re, text1, -1, &status);
         resultSz = uregex_replaceFirst(re, replText, -1, buf, UPRV_LENGTHOF(buf), &status);
         TEST_ASSERT_SUCCESS(status);
-        TEST_ASSERT_STRING("Replace  x1x x...x.", buf, TRUE);
+        TEST_ASSERT_STRING("Replace  x1x x...x.", buf, true);
         TEST_ASSERT(resultSz == (int32_t)strlen("Replace xaax x1x x...x."));
 
         /* No match.  Text should copy to output with no changes.  */
@@ -850,7 +851,7 @@ static void TestRegexCAPI(void) {
         uregex_setText(re, text2, -1, &status);
         resultSz = uregex_replaceFirst(re, replText, -1, buf, UPRV_LENGTHOF(buf), &status);
         TEST_ASSERT_SUCCESS(status);
-        TEST_ASSERT_STRING("No match here.", buf, TRUE);
+        TEST_ASSERT_STRING("No match here.", buf, true);
         TEST_ASSERT(resultSz == (int32_t)strlen("No match here."));
 
         /*  Match, output just fills buffer, no termination warning. */
@@ -859,7 +860,7 @@ static void TestRegexCAPI(void) {
         memset(buf, -1, sizeof(buf));
         resultSz = uregex_replaceFirst(re, replText, -1, buf, (int32_t)strlen("Replace  x1x x...x."), &status);
         TEST_ASSERT(status == U_STRING_NOT_TERMINATED_WARNING);
-        TEST_ASSERT_STRING("Replace  x1x x...x.", buf, FALSE);
+        TEST_ASSERT_STRING("Replace  x1x x...x.", buf, false);
         TEST_ASSERT(resultSz == (int32_t)strlen("Replace xaax x1x x...x."));
         TEST_ASSERT(buf[resultSz] == (UChar)0xffff);
 
@@ -870,7 +871,7 @@ static void TestRegexCAPI(void) {
         memset(buf, -1, sizeof(buf));
         resultSz = uregex_replaceFirst(re, replText, -1, buf, (int32_t)strlen("Replace  x1x x...x."), &status);
         TEST_ASSERT(status == U_STRING_NOT_TERMINATED_WARNING);
-        TEST_ASSERT_STRING("Replace  x1x x...x.", buf, FALSE);
+        TEST_ASSERT_STRING("Replace  x1x x...x.", buf, false);
         TEST_ASSERT(resultSz == (int32_t)strlen("Replace xaax x1x x...x."));
         TEST_ASSERT(buf[resultSz] == (UChar)0xffff);
 
@@ -885,7 +886,7 @@ static void TestRegexCAPI(void) {
         memset(buf, -1, sizeof(buf));
         resultSz = uregex_replaceFirst(re, replText, -1, buf, (int32_t)strlen("Replace  x1x x...x.")-1, &status);
         TEST_ASSERT(status == U_BUFFER_OVERFLOW_ERROR);
-        TEST_ASSERT_STRING("Replace  x1x x...x", buf, FALSE);
+        TEST_ASSERT_STRING("Replace  x1x x...x", buf, false);
         TEST_ASSERT(resultSz == (int32_t)strlen("Replace xaax x1x x...x."));
         TEST_ASSERT(buf[resultSz] == (UChar)0xffff);
 
@@ -925,7 +926,7 @@ static void TestRegexCAPI(void) {
         uregex_setText(re, text1, -1, &status);
         resultSize = uregex_replaceAll(re, replText, -1, buf, UPRV_LENGTHOF(buf), &status);
         TEST_ASSERT_SUCCESS(status);
-        TEST_ASSERT_STRING(expectedResult, buf, TRUE);
+        TEST_ASSERT_STRING(expectedResult, buf, true);
         TEST_ASSERT(resultSize == expectedResultSize);
 
         /* No match.  Text should copy to output with no changes.  */
@@ -933,7 +934,7 @@ static void TestRegexCAPI(void) {
         uregex_setText(re, text2, -1, &status);
         resultSize = uregex_replaceAll(re, replText, -1, buf, UPRV_LENGTHOF(buf), &status);
         TEST_ASSERT_SUCCESS(status);
-        TEST_ASSERT_STRING("No match here.", buf, TRUE);
+        TEST_ASSERT_STRING("No match here.", buf, true);
         TEST_ASSERT(resultSize == u_strlen(text2));
 
         /*  Match, output just fills buffer, no termination warning. */
@@ -942,7 +943,7 @@ static void TestRegexCAPI(void) {
         memset(buf, -1, sizeof(buf));
         resultSize = uregex_replaceAll(re, replText, -1, buf, expectedResultSize, &status);
         TEST_ASSERT(status == U_STRING_NOT_TERMINATED_WARNING);
-        TEST_ASSERT_STRING(expectedResult, buf, FALSE);
+        TEST_ASSERT_STRING(expectedResult, buf, false);
         TEST_ASSERT(resultSize == expectedResultSize);
         TEST_ASSERT(buf[resultSize] == (UChar)0xffff);
 
@@ -953,7 +954,7 @@ static void TestRegexCAPI(void) {
         memset(buf, -1, sizeof(buf));
         resultSize = uregex_replaceAll(re, replText, -1, buf, (int32_t)strlen("Replace xaax x1x x...x."), &status);
         TEST_ASSERT(status == U_STRING_NOT_TERMINATED_WARNING);
-        TEST_ASSERT_STRING("Replace  <1> <...>.", buf, FALSE);
+        TEST_ASSERT_STRING("Replace  <1> <...>.", buf, false);
         TEST_ASSERT(resultSize == (int32_t)strlen("Replace  <1> <...>."));
         TEST_ASSERT(buf[resultSize] == (UChar)0xffff);
 
@@ -973,7 +974,7 @@ static void TestRegexCAPI(void) {
             TEST_ASSERT(status == U_BUFFER_OVERFLOW_ERROR);
             strcpy(expected, expectedResult);
             expected[i] = 0;
-            TEST_ASSERT_STRING(expected, buf, FALSE);
+            TEST_ASSERT_STRING(expected, buf, false);
             TEST_ASSERT(resultSize == expectedResultSize);
             TEST_ASSERT(buf[i] == (UChar)0xffff);
         }
@@ -990,7 +991,7 @@ static void TestRegexCAPI(void) {
             TEST_ASSERT(status == U_BUFFER_OVERFLOW_ERROR);
             strcpy(expected, expectedResult2);
             expected[i] = 0;
-            TEST_ASSERT_STRING(expected, buf, FALSE);
+            TEST_ASSERT_STRING(expected, buf, false);
             TEST_ASSERT(resultSize == expectedResultSize2);
             TEST_ASSERT(buf[i] == (UChar)0xffff);
         }
@@ -1026,7 +1027,7 @@ static void TestRegexCAPI(void) {
         bufCap = UPRV_LENGTHOF(buf);
         uregex_appendReplacement(re, repl, -1, &bufPtr, &bufCap, &status);
         TEST_ASSERT_SUCCESS(status);
-        TEST_ASSERT_STRING("some other", buf, TRUE);
+        TEST_ASSERT_STRING("some other", buf, true);
 
         /* Match has \u \U escapes */
         uregex_find(re, 0, &status);
@@ -1036,7 +1037,7 @@ static void TestRegexCAPI(void) {
         u_uastrncpy(repl, "abc\\u0041\\U00000042 \\\\ \\$ \\abc", UPRV_LENGTHOF(repl));
         uregex_appendReplacement(re, repl, -1, &bufPtr, &bufCap, &status);
         TEST_ASSERT_SUCCESS(status);
-        TEST_ASSERT_STRING("abcAB \\ $ abc", buf, TRUE); 
+        TEST_ASSERT_STRING("abcAB \\ $ abc", buf, true); 
 
         /* Bug 6813, parameter check of NULL destCapacity; crashed before fix. */
         status = U_ZERO_ERROR;
@@ -1090,9 +1091,9 @@ static void TestRegexCAPI(void) {
             /* The TEST_ASSERT_SUCCESS call above should change too... */
             if(U_SUCCESS(status)) {
                 TEST_ASSERT(numFields == 3);
-                TEST_ASSERT_STRING("first ",  fields[0], TRUE);
-                TEST_ASSERT_STRING(" second", fields[1], TRUE);
-                TEST_ASSERT_STRING("  third", fields[2], TRUE);
+                TEST_ASSERT_STRING("first ",  fields[0], true);
+                TEST_ASSERT_STRING(" second", fields[1], true);
+                TEST_ASSERT_STRING("  third", fields[2], true);
                 TEST_ASSERT(fields[3] == NULL);
 
                 spaceNeeded = u_strlen(textToSplit) -
@@ -1122,8 +1123,8 @@ static void TestRegexCAPI(void) {
             /* The TEST_ASSERT_SUCCESS call above should change too... */
             if(U_SUCCESS(status)) {
                 TEST_ASSERT(numFields == 2);
-                TEST_ASSERT_STRING("first ",  fields[0], TRUE);
-                TEST_ASSERT_STRING(" second:  third", fields[1], TRUE);
+                TEST_ASSERT_STRING("first ",  fields[0], true);
+                TEST_ASSERT_STRING(" second:  third", fields[1], true);
                 TEST_ASSERT(!memcmp(&fields[2],&minus1,sizeof(UChar*)));
 
                 spaceNeeded = u_strlen(textToSplit) -
@@ -1144,9 +1145,9 @@ static void TestRegexCAPI(void) {
                         uregex_split(re, buf, sz, &requiredCapacity, fields, 10, &status);
                     if (sz >= spaceNeeded) {
                         TEST_ASSERT_SUCCESS(status);
-                        TEST_ASSERT_STRING("first ",  fields[0], TRUE);
-                        TEST_ASSERT_STRING(" second", fields[1], TRUE);
-                        TEST_ASSERT_STRING("  third", fields[2], TRUE);
+                        TEST_ASSERT_STRING("first ",  fields[0], true);
+                        TEST_ASSERT_STRING(" second", fields[1], true);
+                        TEST_ASSERT_STRING("  third", fields[2], true);
                     } else {
                         TEST_ASSERT(status == U_BUFFER_OVERFLOW_ERROR);
                     }
@@ -1192,11 +1193,11 @@ static void TestRegexCAPI(void) {
             /* The TEST_ASSERT_SUCCESS call above should change too... */
             if(U_SUCCESS(status)) {
                 TEST_ASSERT(numFields == 5);
-                TEST_ASSERT_STRING("first ",  fields[0], TRUE);
-                TEST_ASSERT_STRING("tag-a",   fields[1], TRUE);
-                TEST_ASSERT_STRING(" second", fields[2], TRUE);
-                TEST_ASSERT_STRING("tag-b",   fields[3], TRUE);
-                TEST_ASSERT_STRING("  third", fields[4], TRUE);
+                TEST_ASSERT_STRING("first ",  fields[0], true);
+                TEST_ASSERT_STRING("tag-a",   fields[1], true);
+                TEST_ASSERT_STRING(" second", fields[2], true);
+                TEST_ASSERT_STRING("tag-b",   fields[3], true);
+                TEST_ASSERT_STRING("  third", fields[4], true);
                 TEST_ASSERT(fields[5] == NULL);
                 spaceNeeded = (int32_t)strlen("first .tag-a. second.tag-b.  third.");  /* "." at NUL positions */
                 TEST_ASSERT(spaceNeeded == requiredCapacity);
@@ -1213,8 +1214,8 @@ static void TestRegexCAPI(void) {
         /* The TEST_ASSERT_SUCCESS call above should change too... */
         if(U_SUCCESS(status)) {
             TEST_ASSERT(numFields == 2);
-            TEST_ASSERT_STRING("first ",  fields[0], TRUE);
-            TEST_ASSERT_STRING(" second  third", fields[1], TRUE);
+            TEST_ASSERT_STRING("first ",  fields[0], true);
+            TEST_ASSERT_STRING(" second  third", fields[1], true);
             TEST_ASSERT(!memcmp(&fields[2],&minus1,sizeof(UChar*)));
 
             spaceNeeded = (int32_t)strlen("first . second  third.");  /* "." at NUL positions */
@@ -1231,9 +1232,9 @@ static void TestRegexCAPI(void) {
         /* The TEST_ASSERT_SUCCESS call above should change too... */
         if(U_SUCCESS(status)) {
             TEST_ASSERT(numFields == 3);
-            TEST_ASSERT_STRING("first ",  fields[0], TRUE);
-            TEST_ASSERT_STRING("tag-a",   fields[1], TRUE);
-            TEST_ASSERT_STRING(" second  third", fields[2], TRUE);
+            TEST_ASSERT_STRING("first ",  fields[0], true);
+            TEST_ASSERT_STRING("tag-a",   fields[1], true);
+            TEST_ASSERT_STRING(" second  third", fields[2], true);
             TEST_ASSERT(!memcmp(&fields[3],&minus1,sizeof(UChar*)));
 
             spaceNeeded = (int32_t)strlen("first .tag-a. second  third.");  /* "." at NUL positions */
@@ -1250,11 +1251,11 @@ static void TestRegexCAPI(void) {
         /* The TEST_ASSERT_SUCCESS call above should change too... */
         if(U_SUCCESS(status)) {
             TEST_ASSERT(numFields == 5);
-            TEST_ASSERT_STRING("first ",  fields[0], TRUE);
-            TEST_ASSERT_STRING("tag-a",   fields[1], TRUE);
-            TEST_ASSERT_STRING(" second", fields[2], TRUE);
-            TEST_ASSERT_STRING("tag-b",   fields[3], TRUE);
-            TEST_ASSERT_STRING("  third", fields[4], TRUE);
+            TEST_ASSERT_STRING("first ",  fields[0], true);
+            TEST_ASSERT_STRING("tag-a",   fields[1], true);
+            TEST_ASSERT_STRING(" second", fields[2], true);
+            TEST_ASSERT_STRING("tag-b",   fields[3], true);
+            TEST_ASSERT_STRING("  third", fields[4], true);
             TEST_ASSERT(!memcmp(&fields[5],&minus1,sizeof(UChar*)));
 
             spaceNeeded = (int32_t)strlen("first .tag-a. second.tag-b.  third.");  /* "." at NUL positions */
@@ -1277,11 +1278,11 @@ static void TestRegexCAPI(void) {
             /* The TEST_ASSERT_SUCCESS call above should change too... */
             if(U_SUCCESS(status)) {
                 TEST_ASSERT(numFields == 5);
-                TEST_ASSERT_STRING("first ",  fields[0], TRUE);
-                TEST_ASSERT_STRING("tag-a",   fields[1], TRUE);
-                TEST_ASSERT_STRING(" second", fields[2], TRUE);
-                TEST_ASSERT_STRING("tag-b",   fields[3], TRUE);
-                TEST_ASSERT_STRING("",        fields[4], TRUE);
+                TEST_ASSERT_STRING("first ",  fields[0], true);
+                TEST_ASSERT_STRING("tag-a",   fields[1], true);
+                TEST_ASSERT_STRING(" second", fields[2], true);
+                TEST_ASSERT_STRING("tag-b",   fields[3], true);
+                TEST_ASSERT_STRING("",        fields[4], true);
                 TEST_ASSERT(fields[5] == NULL);
                 TEST_ASSERT(fields[8] == NULL);
                 TEST_ASSERT(!memcmp(&fields[9],&minus1,sizeof(UChar*)));
@@ -1345,7 +1346,7 @@ static void TestRegexCAPI(void) {
      uregex_setMatchCallback(re, &TestCallbackFn, &cbInfo, &status);
      TEST_ASSERT_SUCCESS(status);
      TEST_ASSERT(cbInfo.numCalls == 0);
-     TEST_ASSERT(uregex_matches(re, -1, &status) == FALSE);
+     TEST_ASSERT(uregex_matches(re, -1, &status) == false);
      TEST_ASSERT_SUCCESS(status);
      TEST_ASSERT(cbInfo.numCalls > 0);
      
@@ -1401,9 +1402,9 @@ static void TestBug4315(void) {
         TEST_ASSERT(wordCount==3);
         TEST_ASSERT_SUCCESS(theICUError);
         TEST_ASSERT(neededLength1 == neededLength2);
-        TEST_ASSERT_STRING("The qui", destFields[0], TRUE);
-        TEST_ASSERT_STRING("brown fox jumped over the slow bla", destFields[1], TRUE);
-        TEST_ASSERT_STRING("turtle.", destFields[2], TRUE);
+        TEST_ASSERT_STRING("The qui", destFields[0], true);
+        TEST_ASSERT_STRING("brown fox jumped over the slow bla", destFields[1], true);
+        TEST_ASSERT_STRING("turtle.", destFields[2], true);
         TEST_ASSERT(destFields[3] == NULL);
         free(textBuff);
     }
@@ -1486,17 +1487,17 @@ static void TestUTextAPI(void) {
         TEST_ASSERT_SUCCESS(status);
         result = uregex_lookingAt(clone1, 0, &status);
         TEST_ASSERT_SUCCESS(status);
-        TEST_ASSERT(result==TRUE);
+        TEST_ASSERT(result==true);
         
         status = U_ZERO_ERROR;
         uregex_setText(clone2, testString2, -1, &status);
         TEST_ASSERT_SUCCESS(status);
         result = uregex_lookingAt(clone2, 0, &status);
         TEST_ASSERT_SUCCESS(status);
-        TEST_ASSERT(result==FALSE);
+        TEST_ASSERT(result==false);
         result = uregex_find(clone2, 0, &status);
         TEST_ASSERT_SUCCESS(status);
-        TEST_ASSERT(result==TRUE);
+        TEST_ASSERT(result==true);
 
         uregex_close(clone1);
         uregex_close(clone2);
@@ -1578,19 +1579,19 @@ static void TestUTextAPI(void) {
         status = U_ZERO_ERROR;
         uregex_setUText(re, &text1, &status);
         result = uregex_lookingAt(re, 0, &status);
-        TEST_ASSERT(result == TRUE);
+        TEST_ASSERT(result == true);
         TEST_ASSERT_SUCCESS(status);
 
         status = U_ZERO_ERROR;
         uregex_setUText(re, &text2, &status);
         result = uregex_lookingAt(re, 0, &status);
-        TEST_ASSERT(result == FALSE);
+        TEST_ASSERT(result == false);
         TEST_ASSERT_SUCCESS(status);
 
         status = U_ZERO_ERROR;
         uregex_setUText(re, &text1, &status);
         result = uregex_lookingAt(re, 0, &status);
-        TEST_ASSERT(result == TRUE);
+        TEST_ASSERT(result == true);
         TEST_ASSERT_SUCCESS(status);
 
         uregex_close(re);
@@ -1676,7 +1677,7 @@ static void TestUTextAPI(void) {
 
         uregex_setUText(re, &text1, &status);
         result = uregex_matches(re, 0, &status);
-        TEST_ASSERT(result == FALSE);
+        TEST_ASSERT(result == false);
         TEST_ASSERT_SUCCESS(status);
         uregex_close(re);
 
@@ -1684,7 +1685,7 @@ static void TestUTextAPI(void) {
         re = uregex_openC(".?", 0, NULL, &status);
         uregex_setUText(re, &text1, &status);
         result = uregex_matches(re, 7, &status);
-        TEST_ASSERT(result == TRUE);
+        TEST_ASSERT(result == true);
         TEST_ASSERT_SUCCESS(status);
 
         status = U_ZERO_ERROR;
@@ -1692,7 +1693,7 @@ static void TestUTextAPI(void) {
         uregex_setUText(re, &nullText, &status);
         TEST_ASSERT_SUCCESS(status);
         result = uregex_matches(re, 0, &status);
-        TEST_ASSERT(result == TRUE);
+        TEST_ASSERT(result == true);
         TEST_ASSERT_SUCCESS(status);
         
         uregex_close(re);
@@ -1718,32 +1719,32 @@ static void TestUTextAPI(void) {
 
         uregex_setText(re, text1, -1, &status);
         result = uregex_find(re, 0, &status);
-        TEST_ASSERT(result == TRUE);
+        TEST_ASSERT(result == true);
         TEST_ASSERT(uregex_start(re, 0, &status) == 3);
         TEST_ASSERT(uregex_end(re, 0, &status) == 5);
         TEST_ASSERT_SUCCESS(status);
 
         result = uregex_find(re, 9, &status);
-        TEST_ASSERT(result == TRUE);
+        TEST_ASSERT(result == true);
         TEST_ASSERT(uregex_start(re, 0, &status) == 11);
         TEST_ASSERT(uregex_end(re, 0, &status) == 13);
         TEST_ASSERT_SUCCESS(status);
 
         result = uregex_find(re, 14, &status);
-        TEST_ASSERT(result == FALSE);
+        TEST_ASSERT(result == false);
         TEST_ASSERT_SUCCESS(status);
 
         status = U_ZERO_ERROR;
         uregex_reset(re, 0, &status);
 
         result = uregex_findNext(re, &status);
-        TEST_ASSERT(result == TRUE);
+        TEST_ASSERT(result == true);
         TEST_ASSERT(uregex_start(re, 0, &status) == 3);
         TEST_ASSERT(uregex_end(re, 0, &status) == 5);
         TEST_ASSERT_SUCCESS(status);
 
         result = uregex_findNext(re, &status);
-        TEST_ASSERT(result == TRUE);
+        TEST_ASSERT(result == true);
         TEST_ASSERT(uregex_start(re, 0, &status) == 6);
         TEST_ASSERT(uregex_end(re, 0, &status) == 8);
         TEST_ASSERT_SUCCESS(status);
@@ -1752,13 +1753,13 @@ static void TestUTextAPI(void) {
         uregex_reset(re, 12, &status);
 
         result = uregex_findNext(re, &status);
-        TEST_ASSERT(result == TRUE);
+        TEST_ASSERT(result == true);
         TEST_ASSERT(uregex_start(re, 0, &status) == 13);
         TEST_ASSERT(uregex_end(re, 0, &status) == 15);
         TEST_ASSERT_SUCCESS(status);
 
         result = uregex_findNext(re, &status);
-        TEST_ASSERT(result == FALSE);
+        TEST_ASSERT(result == false);
         TEST_ASSERT_SUCCESS(status);
 
         uregex_close(re);
@@ -1782,7 +1783,7 @@ static void TestUTextAPI(void) {
 
         uregex_setText(re, text1, -1, &status);
         result = uregex_find(re, 0, &status);
-        TEST_ASSERT(result==TRUE);
+        TEST_ASSERT(result==true);
 
         /*  Capture Group 0 with shallow clone API.  Should succeed.  */
         status = U_ZERO_ERROR;
@@ -1793,7 +1794,7 @@ static void TestUTextAPI(void) {
         TEST_ASSERT(groupLen == 16);   /* length of "abc interior def"  */
         utext_extract(actual, 6 /*start index */, 6+16 /*limit index*/, groupBuf, sizeof(groupBuf), &status);
 
-        TEST_ASSERT_STRING("abc interior def", groupBuf, TRUE);
+        TEST_ASSERT_STRING("abc interior def", groupBuf, true);
         utext_close(actual);
 
         /*  Capture group #1.  Should succeed. */
@@ -1805,7 +1806,7 @@ static void TestUTextAPI(void) {
                                                            /*    (within the string text1)           */
         TEST_ASSERT(10 == groupLen);                       /* length of " interior " */
         utext_extract(actual, 9 /*start index*/, 9+10 /*limit index*/, groupBuf, sizeof(groupBuf), &status);
-        TEST_ASSERT_STRING(" interior ", groupBuf, TRUE);
+        TEST_ASSERT_STRING(" interior ", groupBuf, true);
 
         utext_close(actual);
 
@@ -1930,7 +1931,7 @@ static void TestUTextAPI(void) {
         bufCap = UPRV_LENGTHOF(buf);
         uregex_appendReplacement(re, repl, -1, &bufPtr, &bufCap, &status);
         TEST_ASSERT_SUCCESS(status);
-        TEST_ASSERT_STRING("some other", buf, TRUE);
+        TEST_ASSERT_STRING("some other", buf, true);
 
         /* Match has \u \U escapes */
         uregex_find(re, 0, &status);
@@ -1940,7 +1941,7 @@ static void TestUTextAPI(void) {
         u_uastrncpy(repl, "abc\\u0041\\U00000042 \\\\ \\$ \\abc", UPRV_LENGTHOF(repl));
         uregex_appendReplacement(re, repl, -1, &bufPtr, &bufCap, &status);
         TEST_ASSERT_SUCCESS(status);
-        TEST_ASSERT_STRING("abcAB \\ $ abc", buf, TRUE); 
+        TEST_ASSERT_STRING("abcAB \\ $ abc", buf, true); 
 
         uregex_close(re);
     }
@@ -2229,7 +2230,7 @@ static void TestRefreshInput(void) {
     TEST_ASSERT(uregex_start(re, 0, &status) == 2);
     TEST_ASSERT(uregex_findNext(re, &status));
     TEST_ASSERT(uregex_start(re, 0, &status) == 4);
-    TEST_ASSERT(FALSE == uregex_findNext(re, &status));
+    TEST_ASSERT(false == uregex_findNext(re, &status));
 
     uregex_close(re);
 }
@@ -2263,19 +2264,19 @@ static UBool U_CALLCONV FindCallback(const void* context , int64_t matchIndex) {
     // suppress compiler warnings about unused variables
     (void)context;
     (void)matchIndex;
-    return FALSE;
+    return false;
 }
 
 static UBool U_CALLCONV MatchCallback(const void *context, int32_t steps) {
     // suppress compiler warnings about unused variables
     (void)context;
     (void)steps;
-    return FALSE;
+    return false;
 }
 
 static void TestBug10815() {
   /* Bug 10815:   uregex_findNext() does not set U_REGEX_STOPPED_BY_CALLER 
-   *              when the callback function specified by uregex_setMatchCallback() returns FALSE
+   *              when the callback function specified by uregex_setMatchCallback() returns false
    */
     URegularExpression *re;
     UErrorCode status = U_ZERO_ERROR;
diff --git a/icu4c/source/test/cintltst/sorttest.c b/icu4c/source/test/cintltst/sorttest.c
index d4d8136e528..afa69c5bc73 100644
--- a/icu4c/source/test/cintltst/sorttest.c
+++ b/icu4c/source/test/cintltst/sorttest.c
@@ -18,6 +18,7 @@
 *   Test internal sorting functions.
 */
 
+#include 
 #include 
 
 #include "unicode/utypes.h"
@@ -39,7 +40,7 @@ SortTest(void) {
 
     /* sort small array (stable) */
     errorCode=U_ZERO_ERROR;
-    uprv_sortArray(small, UPRV_LENGTHOF(small), sizeof(small[0]), uprv_uint16Comparator, NULL, TRUE, &errorCode);
+    uprv_sortArray(small, UPRV_LENGTHOF(small), sizeof(small[0]), uprv_uint16Comparator, NULL, true, &errorCode);
     if(U_FAILURE(errorCode)) {
         log_err("uprv_sortArray(small) failed - %s\n", u_errorName(errorCode));
         return;
@@ -57,7 +58,7 @@ SortTest(void) {
     }
 
     /* sort medium array (stable) */
-    uprv_sortArray(medium, UPRV_LENGTHOF(medium), sizeof(medium[0]), uprv_int32Comparator, NULL, TRUE, &errorCode);
+    uprv_sortArray(medium, UPRV_LENGTHOF(medium), sizeof(medium[0]), uprv_int32Comparator, NULL, true, &errorCode);
     if(U_FAILURE(errorCode)) {
         log_err("uprv_sortArray(medium) failed - %s\n", u_errorName(errorCode));
         return;
@@ -71,7 +72,7 @@ SortTest(void) {
 
     /* sort large array (not stable) */
     errorCode=U_ZERO_ERROR;
-    uprv_sortArray(large, UPRV_LENGTHOF(large), sizeof(large[0]), uprv_uint32Comparator, NULL, FALSE, &errorCode);
+    uprv_sortArray(large, UPRV_LENGTHOF(large), sizeof(large[0]), uprv_uint32Comparator, NULL, false, &errorCode);
     if(U_FAILURE(errorCode)) {
         log_err("uprv_sortArray(large) failed - %s\n", u_errorName(errorCode));
         return;
@@ -165,7 +166,7 @@ static void StableSortTest(void) {
     printLines(lines);
 
     uprv_sortArray(lines, NUM_LINES, (int32_t)sizeof(Line),
-                   linesComparator, coll, TRUE, &errorCode);
+                   linesComparator, coll, true, &errorCode);
     if(U_FAILURE(errorCode)) {
         log_err("uprv_sortArray() failed - %s\n", u_errorName(errorCode));
         return;
@@ -178,7 +179,7 @@ static void StableSortTest(void) {
     for(i=1; is, STR_LEN, q->s, STR_LEN, FALSE);
+        int32_t diff=u_strCompare(p->s, STR_LEN, q->s, STR_LEN, false);
         if(diff==0) {
             if(p->recordNumber>=q->recordNumber) {
                 log_err("equal strings %d and %d out of order at sorted index %d\n",
diff --git a/icu4c/source/test/cintltst/spooftest.c b/icu4c/source/test/cintltst/spooftest.c
index 131d4c3d759..4243a1eb7c2 100644
--- a/icu4c/source/test/cintltst/spooftest.c
+++ b/icu4c/source/test/cintltst/spooftest.c
@@ -22,8 +22,9 @@
 #include "unicode/utypes.h"
 #if !UCONFIG_NO_REGULAR_EXPRESSIONS && !UCONFIG_NO_NORMALIZATION
 
-#include 
+#include 
 #include 
+#include 
 #include 
 #include "unicode/uspoof.h"
 #include "unicode/ustring.h"
@@ -38,7 +39,7 @@
 } UPRV_BLOCK_MACRO_END
 
 #define TEST_ASSERT(expr) UPRV_BLOCK_MACRO_BEGIN { \
-    if ((expr)==FALSE) { \
+    if ((expr)==false) { \
         log_err("Test Failure at file %s, line %d: \"%s\" is false.\n", __FILE__, __LINE__, #expr); \
     } \
 } UPRV_BLOCK_MACRO_END
@@ -610,12 +611,12 @@ static void TestUSpoofCAPI(void) {
 
         inclusions = uspoof_getInclusionSet(&status);
         TEST_ASSERT_SUCCESS(status);
-        TEST_ASSERT_EQ(TRUE, uset_isFrozen(inclusions));
+        TEST_ASSERT_EQ(true, uset_isFrozen(inclusions));
 
         status = U_ZERO_ERROR;
         recommended = uspoof_getRecommendedSet(&status);
         TEST_ASSERT_SUCCESS(status);
-        TEST_ASSERT_EQ(TRUE, uset_isFrozen(recommended));
+        TEST_ASSERT_EQ(true, uset_isFrozen(recommended));
     TEST_TEARDOWN;
 
 }
diff --git a/icu4c/source/test/cintltst/spreptst.c b/icu4c/source/test/cintltst/spreptst.c
index bd0c93ebc07..73e4fe3dc46 100644
--- a/icu4c/source/test/cintltst/spreptst.c
+++ b/icu4c/source/test/cintltst/spreptst.c
@@ -15,6 +15,7 @@
  *   created on: 2003jul11
  *   created by: Ram Viswanadha
  */
+#include 
 #include 
 #include 
 #include "unicode/utypes.h"
@@ -506,7 +507,7 @@ Test_nfs4_cs_prep(void){
         int32_t srcLen = unescapeData(source, (int32_t)strlen(source), src, MAX_BUFFER_SIZE, &status);
         if(U_SUCCESS(status)){
             char dest[MAX_BUFFER_SIZE] = {'\0'};
-            int32_t destLen = nfs4_cs_prepare(src, srcLen, dest, MAX_BUFFER_SIZE, FALSE, &parseError, &status);
+            int32_t destLen = nfs4_cs_prepare(src, srcLen, dest, MAX_BUFFER_SIZE, false, &parseError, &status);
             if(U_FAILURE(status)){
                 log_err("StringPrep failed for case: BiDi Checking Turned OFF with error: %s\n", u_errorName(status));
             }
@@ -529,7 +530,7 @@ Test_nfs4_cs_prep(void){
         int32_t srcLen = unescapeData(source, (int32_t)strlen(source), src, MAX_BUFFER_SIZE, &status);
         if(U_SUCCESS(status)){
             char dest[MAX_BUFFER_SIZE] = {'\0'};
-            int32_t destLen = nfs4_cs_prepare(src, srcLen, dest, MAX_BUFFER_SIZE, FALSE, &parseError, &status);
+            int32_t destLen = nfs4_cs_prepare(src, srcLen, dest, MAX_BUFFER_SIZE, false, &parseError, &status);
             if(U_FAILURE(status)){
                 log_err("StringPrep failed for case: Normalization Turned OFF with error: %s\n", u_errorName(status));
             }
@@ -552,7 +553,7 @@ Test_nfs4_cs_prep(void){
         int32_t srcLen = unescapeData(source, (int32_t)strlen(source), src, MAX_BUFFER_SIZE, &status);
         if(U_SUCCESS(status)){
             char dest[MAX_BUFFER_SIZE] = {'\0'};
-            int32_t destLen = nfs4_cs_prepare(src, srcLen, dest, MAX_BUFFER_SIZE, TRUE, &parseError, &status);
+            int32_t destLen = nfs4_cs_prepare(src, srcLen, dest, MAX_BUFFER_SIZE, true, &parseError, &status);
             if(U_FAILURE(status)){
                 log_err("StringPrep failed for case: Case Mapping Turned OFF with error: %s\n", u_errorName(status));
             }
@@ -578,7 +579,7 @@ Test_nfs4_cs_prep(void){
         int32_t expLen = unescapeData(expected, (int32_t)strlen(expected), exp, MAX_BUFFER_SIZE, &status);
         if(U_SUCCESS(status)){
             char dest[MAX_BUFFER_SIZE] = {'\0'};
-            int32_t destLen = nfs4_cs_prepare(src, srcLen, dest, MAX_BUFFER_SIZE, FALSE, &parseError, &status);
+            int32_t destLen = nfs4_cs_prepare(src, srcLen, dest, MAX_BUFFER_SIZE, false, &parseError, &status);
             if(U_FAILURE(status)){
                 log_err("StringPrep failed for case: Case Mapping Turned On with error: %s\n", u_errorName(status));
             }
diff --git a/icu4c/source/test/cintltst/sprpdata.c b/icu4c/source/test/cintltst/sprpdata.c
index af249a0aa6b..4bbdc5fab6b 100644
--- a/icu4c/source/test/cintltst/sprpdata.c
+++ b/icu4c/source/test/cintltst/sprpdata.c
@@ -21,6 +21,8 @@
 
 #if !UCONFIG_NO_IDNA
 
+#include 
+
 #include "unicode/ustring.h"
 #include "unicode/putil.h"
 #include "cintltst.h"
@@ -128,18 +130,18 @@ getValues(uint32_t result, int32_t* value, UBool* isIndex){
         type = USPREP_MAP;
         /* ascertain if the value is index or delta */
         if(result & 0x02){
-            *isIndex = TRUE;
+            *isIndex = true;
             *value = result  >> 2;
 
         }else{
-            *isIndex = FALSE;
+            *isIndex = false;
             *value = (int16_t)result;
             *value =  (*value >> 2);
 
         }
         if((result>>2) == _SPREP_MAX_INDEX_VALUE){
             type = USPREP_DELETE;
-            isIndex =FALSE;
+            isIndex =false;
             value = 0;
         }
     }
@@ -151,7 +153,7 @@ compareMapping(UStringPrepProfile* data, uint32_t codepoint, uint32_t* mapping,i
                UStringPrepType type){
     uint32_t result = 0;
     int32_t length=0;
-    UBool isIndex = FALSE;
+    UBool isIndex = false;
     UStringPrepType retType;
     int32_t value=0, idx=0, delta=0;
     int32_t* indexes = data->indexes;
@@ -233,7 +235,7 @@ compareFlagsForRange(UStringPrepProfile* data,
 
     uint32_t result =0 ;
     UStringPrepType retType;
-    UBool isIndex=FALSE;
+    UBool isIndex=false;
     int32_t value=0;
     UTrie trie = data->sprepTrie;
 /*
@@ -304,7 +306,7 @@ doStringPrepTest(const char* binFileName, const char* txtFileName, int32_t optio
     strcat(filename,relativepath);
     strcat(filename,txtFileName);
 
-    parseMappings(filename,profile, TRUE,errorCode);
+    parseMappings(filename,profile, true,errorCode);
 
     free(filename);
 }
diff --git a/icu4c/source/test/cintltst/tracetst.c b/icu4c/source/test/cintltst/tracetst.c
index 4ea7f0e2d68..87d417f8fe8 100644
--- a/icu4c/source/test/cintltst/tracetst.c
+++ b/icu4c/source/test/cintltst/tracetst.c
@@ -18,8 +18,9 @@
 #include "unicode/ures.h"
 #include "unicode/ucnv.h"
 #include "cintltst.h"
-#include 
+#include 
 #include 
+#include 
 #include 
 
 /* We define the following to always test tracing, even when it's off in the library. */
@@ -112,8 +113,8 @@ static void test_format(const char *format, int32_t bufCap, int32_t indent,
 static int    gTraceEntryCount;
 static int    gTraceExitCount;
 static int    gTraceDataCount;
-static UBool  gFnNameError   = FALSE;
-static UBool  gFnFormatError = FALSE;
+static UBool  gFnNameError   = false;
+static UBool  gFnFormatError = false;
 
 static void U_CALLCONV testTraceEntry(const void *context, int32_t fnNumber) {
     (void)context; // suppress compiler warnings about unused variable
@@ -126,7 +127,7 @@ static void U_CALLCONV testTraceEntry(const void *context, int32_t fnNumber) {
     bogusFnName = utrace_functionName(-1);
     fnName = utrace_functionName(fnNumber);
     if (strcmp(fnName, bogusFnName) == 0) {
-        gFnNameError = TRUE;
+        gFnNameError = true;
     }
     /* printf("%s() Enter\n", fnName); */
 
@@ -145,14 +146,14 @@ static void U_CALLCONV testTraceExit(const void *context, int32_t fnNumber,
     bogusFnName = utrace_functionName(-1);
     fnName = utrace_functionName(fnNumber);
     if (strcmp(fnName, bogusFnName) == 0) {
-        gFnNameError = TRUE;
+        gFnNameError = true;
     }
 
     /* Verify that the format can be used.  */
     buf[0] = 0;
     utrace_vformat(buf, sizeof(buf), 0, fmt, args);
     if (strlen(buf) == 0) {
-        gFnFormatError = TRUE;
+        gFnFormatError = true;
     }
 
     /* printf("%s() %s\n", fnName, buf); */
@@ -174,14 +175,14 @@ static void U_CALLCONV testTraceData(const void *context, int32_t fnNumber, int3
     bogusFnName = utrace_functionName(-1);
     fnName = utrace_functionName(fnNumber);
     if (strcmp(fnName, bogusFnName) == 0) {
-        gFnNameError = TRUE;
+        gFnNameError = true;
     }
 
     /* Verify that the format can be used.  */
     buf[0] = 0;
     utrace_vformat(buf, sizeof(buf), 0, fmt, args);
     if (strlen(buf) == 0) {
-        gFnFormatError = TRUE;
+        gFnFormatError = true;
     }
 
     /* printf("  %s()   %s\n", fnName, buf); */
@@ -201,7 +202,7 @@ static void pseudo_ucnv_close(UConverter * cnv)
 {
     UTRACE_ENTRY_OC(UTRACE_UCNV_UNLOAD);
     UTRACE_DATA1(UTRACE_OPEN_CLOSE, "unload converter %p", cnv);
-    UTRACE_EXIT_VALUE((int32_t)TRUE);
+    UTRACE_EXIT_VALUE((int32_t)true);
 }
 #endif
 
@@ -275,8 +276,8 @@ static void TestTraceAPI() {
         gTraceEntryCount = 0;
         gTraceExitCount  = 0;
         gTraceDataCount  = 0;
-        gFnNameError     = FALSE;
-        gFnFormatError   = FALSE;
+        gFnNameError     = false;
+        gFnFormatError   = false;
         utrace_setLevel(UTRACE_OPEN_CLOSE);
 #if ENABLE_TRACING_ORIG_VAL
         cnv = ucnv_open(NULL, &status);
@@ -290,8 +291,8 @@ static void TestTraceAPI() {
         TEST_ASSERT(gTraceEntryCount > 0);
         TEST_ASSERT(gTraceExitCount  > 0);
         TEST_ASSERT(gTraceDataCount  > 0);
-        TEST_ASSERT(gFnNameError   == FALSE);
-        TEST_ASSERT(gFnFormatError == FALSE);
+        TEST_ASSERT(gFnNameError   == false);
+        TEST_ASSERT(gFnFormatError == false);
     }
 
 
@@ -334,7 +335,7 @@ static void TestTraceAPI() {
             ptr = massiveBigEndianPtr.ptr;
             test_format("a 128 bit ptr %p", 50, 0, "a 128 bit ptr 10002000300040005000600070008000", __LINE__, ptr);
         } else {
-            TEST_ASSERT(FALSE);
+            TEST_ASSERT(false);
             /*  TODO:  others? */
         }
 
diff --git a/icu4c/source/test/cintltst/trie2test.c b/icu4c/source/test/cintltst/trie2test.c
index 845e3fe30c2..d3c50a125ad 100644
--- a/icu4c/source/test/cintltst/trie2test.c
+++ b/icu4c/source/test/cintltst/trie2test.c
@@ -16,6 +16,7 @@
 *   created by: Markus W. Scherer
 */
 
+#include 
 #include 
 #include "unicode/utypes.h"
 #include "unicode/utf8.h"
@@ -92,7 +93,7 @@ testEnumRange(const void *context, UChar32 start, UChar32 end, uint32_t value) {
             (long)start, (long)end, (long)value,
             (long)(b-1)->limit, (long)b->limit-1, (long)b->value);
     }
-    return TRUE;
+    return true;
 }
 
 static void
@@ -523,7 +524,7 @@ testFrozenTrie(const char *testName,
     uint32_t value, value2;
 
     if(!utrie2_isFrozen(trie)) {
-        log_err("error: utrie2_isFrozen(frozen %s) returned FALSE (not frozen)\n",
+        log_err("error: utrie2_isFrozen(frozen %s) returned false (not frozen)\n",
                 testName);
         return;
     }
@@ -544,7 +545,7 @@ testFrozenTrie(const char *testName,
     }
 
     errorCode=U_ZERO_ERROR;
-    utrie2_setRange32(trie, 1, 5, 234, TRUE, &errorCode);
+    utrie2_setRange32(trie, 1, 5, 234, true, &errorCode);
     value2=utrie2_get32(trie, 1);
     if(errorCode!=U_NO_WRITE_PERMISSION || value2!=value) {
         log_err("error: utrie2_setRange32(frozen %s) failed: it set %s != U_NO_WRITE_PERMISSION\n",
@@ -906,20 +907,20 @@ testTrieRanges(const char *testName, UBool withClone,
 /* set consecutive ranges, even with value 0 */
 static const SetRange
 setRanges1[]={
-    { 0,        0x40,     0,      FALSE },
-    { 0x40,     0xe7,     0x1234, FALSE },
-    { 0xe7,     0x3400,   0,      FALSE },
-    { 0x3400,   0x9fa6,   0x6162, FALSE },
-    { 0x9fa6,   0xda9e,   0x3132, FALSE },
-    { 0xdada,   0xeeee,   0x87ff, FALSE },
-    { 0xeeee,   0x11111,  1,      FALSE },
-    { 0x11111,  0x44444,  0x6162, FALSE },
-    { 0x44444,  0x60003,  0,      FALSE },
-    { 0xf0003,  0xf0004,  0xf,    FALSE },
-    { 0xf0004,  0xf0006,  0x10,   FALSE },
-    { 0xf0006,  0xf0007,  0x11,   FALSE },
-    { 0xf0007,  0xf0040,  0x12,   FALSE },
-    { 0xf0040,  0x110000, 0,      FALSE }
+    { 0,        0x40,     0,      false },
+    { 0x40,     0xe7,     0x1234, false },
+    { 0xe7,     0x3400,   0,      false },
+    { 0x3400,   0x9fa6,   0x6162, false },
+    { 0x9fa6,   0xda9e,   0x3132, false },
+    { 0xdada,   0xeeee,   0x87ff, false },
+    { 0xeeee,   0x11111,  1,      false },
+    { 0x11111,  0x44444,  0x6162, false },
+    { 0x44444,  0x60003,  0,      false },
+    { 0xf0003,  0xf0004,  0xf,    false },
+    { 0xf0004,  0xf0006,  0x10,   false },
+    { 0xf0006,  0xf0007,  0x11,   false },
+    { 0xf0007,  0xf0040,  0x12,   false },
+    { 0xf0040,  0x110000, 0,      false }
 };
 
 static const CheckRange
@@ -945,18 +946,18 @@ checkRanges1[]={
 /* set some interesting overlapping ranges */
 static const SetRange
 setRanges2[]={
-    { 0x21,     0x7f,     0x5555, TRUE },
-    { 0x2f800,  0x2fedc,  0x7a,   TRUE },
-    { 0x72,     0xdd,     3,      TRUE },
-    { 0xdd,     0xde,     4,      FALSE },
-    { 0x201,    0x240,    6,      TRUE },  /* 3 consecutive blocks with the same pattern but */
-    { 0x241,    0x280,    6,      TRUE },  /* discontiguous value ranges, testing utrie2_enum() */
-    { 0x281,    0x2c0,    6,      TRUE },
-    { 0x2f987,  0x2fa98,  5,      TRUE },
-    { 0x2f777,  0x2f883,  0,      TRUE },
-    { 0x2f900,  0x2ffaa,  1,      FALSE },
-    { 0x2ffaa,  0x2ffab,  2,      TRUE },
-    { 0x2ffbb,  0x2ffc0,  7,      TRUE }
+    { 0x21,     0x7f,     0x5555, true },
+    { 0x2f800,  0x2fedc,  0x7a,   true },
+    { 0x72,     0xdd,     3,      true },
+    { 0xdd,     0xde,     4,      false },
+    { 0x201,    0x240,    6,      true },  /* 3 consecutive blocks with the same pattern but */
+    { 0x241,    0x280,    6,      true },  /* discontiguous value ranges, testing utrie2_enum() */
+    { 0x281,    0x2c0,    6,      true },
+    { 0x2f987,  0x2fa98,  5,      true },
+    { 0x2f777,  0x2f883,  0,      true },
+    { 0x2f900,  0x2ffaa,  1,      false },
+    { 0x2ffaa,  0x2ffab,  2,      true },
+    { 0x2ffbb,  0x2ffc0,  7,      true }
 };
 
 static const CheckRange
@@ -1018,13 +1019,13 @@ checkRanges2_dbff[]={
 /* use a non-zero initial value */
 static const SetRange
 setRanges3[]={
-    { 0x31,     0xa4,     1, FALSE },
-    { 0x3400,   0x6789,   2, FALSE },
-    { 0x8000,   0x89ab,   9, TRUE },
-    { 0x9000,   0xa000,   4, TRUE },
-    { 0xabcd,   0xbcde,   3, TRUE },
-    { 0x55555,  0x110000, 6, TRUE },  /* highStart>UTRIE2_SHIFT_2)/2; ++i) {
-        utrie2_setRange32(trie, 0x740, 0x840-1, 1, TRUE, &errorCode);
-        utrie2_setRange32(trie, 0x780, 0x880-1, 1, TRUE, &errorCode);
-        utrie2_setRange32(trie, 0x740, 0x840-1, 2, TRUE, &errorCode);
-        utrie2_setRange32(trie, 0x780, 0x880-1, 3, TRUE, &errorCode);
+        utrie2_setRange32(trie, 0x740, 0x840-1, 1, true, &errorCode);
+        utrie2_setRange32(trie, 0x780, 0x880-1, 1, true, &errorCode);
+        utrie2_setRange32(trie, 0x740, 0x840-1, 2, true, &errorCode);
+        utrie2_setRange32(trie, 0x780, 0x880-1, 3, true, &errorCode);
     }
     /* make blocks that will be free during compaction */
-    utrie2_setRange32(trie, 0x1000, 0x3000-1, 2, TRUE, &errorCode);
-    utrie2_setRange32(trie, 0x2000, 0x4000-1, 3, TRUE, &errorCode);
-    utrie2_setRange32(trie, 0x1000, 0x4000-1, 1, TRUE, &errorCode);
+    utrie2_setRange32(trie, 0x1000, 0x3000-1, 2, true, &errorCode);
+    utrie2_setRange32(trie, 0x2000, 0x4000-1, 3, true, &errorCode);
+    utrie2_setRange32(trie, 0x1000, 0x4000-1, 1, true, &errorCode);
     /* set some values for lead surrogate code units */
     utrie2_set32ForLeadSurrogateCodeUnit(trie, 0xd800, 90, &errorCode);
     utrie2_set32ForLeadSurrogateCodeUnit(trie, 0xd999, 94, &errorCode);
@@ -1224,7 +1225,7 @@ FreeBlocksTest(void) {
         return;
     }
 
-    trie=testTrieSerializeAllValueBits(testName, trie, FALSE,
+    trie=testTrieSerializeAllValueBits(testName, trie, false,
                                        checkRanges, UPRV_LENGTHOF(checkRanges));
     utrie2_close(trie);
 }
@@ -1282,7 +1283,7 @@ GrowDataArrayTest(void) {
         return;
     }
 
-    trie=testTrieSerializeAllValueBits(testName, trie, FALSE,
+    trie=testTrieSerializeAllValueBits(testName, trie, false,
                                           checkRanges, UPRV_LENGTHOF(checkRanges));
     utrie2_close(trie);
 }
@@ -1306,14 +1307,14 @@ makeNewTrie1WithRanges(const char *testName,
     getSpecialValues(checkRanges, countCheckRanges, &initialValue, &errorValue);
     newTrie=utrie_open(NULL, NULL, 2000,
                        initialValue, initialValue,
-                       FALSE);
+                       false);
     if(U_FAILURE(errorCode)) {
         log_err("error: utrie_open(%s) failed: %s\n", testName, u_errorName(errorCode));
         return NULL;
     }
 
     /* set values from setRanges[] */
-    ok=TRUE;
+    ok=true;
     for(i=0; i
 #include 
 #include "unicode/utypes.h"
 #include "unicode/utf16.h"
@@ -135,7 +136,7 @@ _testEnumRange(const void *context, UChar32 start, UChar32 limit, uint32_t value
             start, limit, value,
             (b-1)->limit, b->limit, b->value);
     }
-    return TRUE;
+    return true;
 }
 
 static void
@@ -277,7 +278,7 @@ testTrieRangesWithMalloc(const char *testName,
                        latin1Linear);
 
     /* set values from setRanges[] */
-    ok=TRUE;
+    ok=true;
     for(i=0; i
 #include 
 
 #include "unicode/utypes.h"
@@ -48,23 +49,23 @@ static UBool
 getAvailableNames() {
   int32_t i;
   if (gAvailableNames != NULL) {
-    return TRUE;
+    return true;
   }
   gCountAvailable = ucnv_countAvailable();
   if (gCountAvailable == 0) {
     log_data_err("No converters available.\n");
-    return FALSE;
+    return false;
   }
   gAvailableNames = (const char **)uprv_malloc(gCountAvailable * sizeof(const char *));
   if (gAvailableNames == NULL) {
     log_err("unable to allocate memory for %ld available converter names\n",
             (long)gCountAvailable);
-    return FALSE;
+    return false;
   }
   for (i = 0; i < gCountAvailable; ++i) {
     gAvailableNames[i] = ucnv_getAvailableName(i);
   }
-  return TRUE;
+  return true;
 }
 
 static void
@@ -230,7 +231,7 @@ text_open(TestText *tt) {
   uprv_memset(tt, 0, sizeof(TestText));
   f = fopenOrError("ConverterSelectorTestUTF8.txt");
   if(!f) {
-    return FALSE;
+    return false;
   }
   fseek(f, 0, SEEK_END);
   length = (int32_t)ftell(f);
@@ -238,7 +239,7 @@ text_open(TestText *tt) {
   tt->text = (char *)uprv_malloc(length + 1);
   if (tt->text == NULL) {
     fclose(f);
-    return FALSE;
+    return false;
   }
   if (length != (int32_t)fread(tt->text, 1, length, f)) {
     log_err("error reading %ld bytes from test text file\n", (long)length);
@@ -251,7 +252,7 @@ text_open(TestText *tt) {
   /* replace all Unicode '#' (U+0023) with NUL */
   for(s = tt->text; (s = uprv_strchr(s, 0x23)) != NULL; *s++ = 0) {}
   text_reset(tt);
-  return TRUE;
+  return true;
 }
 
 static void
@@ -310,11 +311,11 @@ getResultsManually(const char** encodings, int32_t num_encodings,
      * converted, and it treats an illegal sequence as convertible
      * while uset_spanUTF8() treats it like U+FFFD which may not be convertible.
      */
-    resultsManually[encIndex] = TRUE;
+    resultsManually[encIndex] = true;
     while(offset= 0 && !uset_contains(set, cp)) {
-        resultsManually[encIndex] = FALSE;
+        resultsManually[encIndex] = false;
         break;
       }
     }
@@ -334,7 +335,7 @@ static void verifyResult(UEnumeration* res, const UBool *resultsManually) {
   /* fill the bool for the selector results! */
   uprv_memset(resultsFromSystem, 0, gCountAvailable);
   while ((name = uenum_next(res,NULL, &status)) != NULL) {
-    resultsFromSystem[findIndex(name)] = TRUE;
+    resultsFromSystem[findIndex(name)] = true;
   }
   for(i = 0 ; i < gCountAvailable; i++) {
     if(resultsManually[i] != resultsFromSystem[i]) {
diff --git a/icu4c/source/test/cintltst/ucptrietest.c b/icu4c/source/test/cintltst/ucptrietest.c
index 8b8e0fb524c..b2c41ed34f8 100644
--- a/icu4c/source/test/cintltst/ucptrietest.c
+++ b/icu4c/source/test/cintltst/ucptrietest.c
@@ -4,6 +4,7 @@
 // ucptrietest.c (modified from trie2test.c)
 // created: 2017dec29 Markus W. Scherer
 
+#include 
 #include 
 #include "unicode/utypes.h"
 #include "unicode/ucptrie.h"
@@ -81,21 +82,21 @@ doCheckRange(const char *name, const char *variant,
             log_err("error: %s getRanges (%s) fails to deliver range [U+%04lx..U+%04lx].0x%lx\n",
                     name, variant, (long)start, (long)expEnd, (long)expValue);
         }
-        return FALSE;
+        return false;
     }
     if (expEnd < 0) {
         log_err("error: %s getRanges (%s) delivers unexpected range [U+%04lx..U+%04lx].0x%lx\n",
                 name, variant, (long)start, (long)end, (long)value);
-        return FALSE;
+        return false;
     }
     if (end != expEnd || value != expValue) {
         log_err("error: %s getRanges (%s) delivers wrong range [U+%04lx..U+%04lx].0x%lx "
                 "instead of [U+%04lx..U+%04lx].0x%lx\n",
                 name, variant, (long)start, (long)end, (long)value,
                 (long)start, (long)expEnd, (long)expValue);
-        return FALSE;
+        return false;
     }
-    return TRUE;
+    return true;
 }
 
 // Test iteration starting from various UTF-8/16 and trie structure boundaries.
@@ -1198,45 +1199,45 @@ checkRangesSingleValue[]={
 
 static void
 TrieTestSet1(void) {
-    testTrieRanges("set1", FALSE,
+    testTrieRanges("set1", false,
         setRanges1, UPRV_LENGTHOF(setRanges1),
         checkRanges1, UPRV_LENGTHOF(checkRanges1));
 }
 
 static void
 TrieTestSet2Overlap(void) {
-    testTrieRanges("set2-overlap", FALSE,
+    testTrieRanges("set2-overlap", false,
         setRanges2, UPRV_LENGTHOF(setRanges2),
         checkRanges2, UPRV_LENGTHOF(checkRanges2));
 }
 
 static void
 TrieTestSet3Initial9(void) {
-    testTrieRanges("set3-initial-9", FALSE,
+    testTrieRanges("set3-initial-9", false,
         setRanges3, UPRV_LENGTHOF(setRanges3),
         checkRanges3, UPRV_LENGTHOF(checkRanges3));
-    testTrieRanges("set3-initial-9-clone", TRUE,
+    testTrieRanges("set3-initial-9-clone", true,
         setRanges3, UPRV_LENGTHOF(setRanges3),
         checkRanges3, UPRV_LENGTHOF(checkRanges3));
 }
 
 static void
 TrieTestSetEmpty(void) {
-    testTrieRanges("set-empty", FALSE,
+    testTrieRanges("set-empty", false,
         setRangesEmpty, 0,
         checkRangesEmpty, UPRV_LENGTHOF(checkRangesEmpty));
 }
 
 static void
 TrieTestSetSingleValue(void) {
-    testTrieRanges("set-single-value", FALSE,
+    testTrieRanges("set-single-value", false,
         setRangesSingleValue, UPRV_LENGTHOF(setRangesSingleValue),
         checkRangesSingleValue, UPRV_LENGTHOF(checkRangesSingleValue));
 }
 
 static void
 TrieTestSet2OverlapWithClone(void) {
-    testTrieRanges("set2-overlap.withClone", TRUE,
+    testTrieRanges("set2-overlap.withClone", true,
         setRanges2, UPRV_LENGTHOF(setRanges2),
         checkRanges2, UPRV_LENGTHOF(checkRanges2));
 }
@@ -1287,7 +1288,7 @@ FreeBlocksTest(void) {
         return;
     }
 
-    mutableTrie = testTrieSerializeAllValueWidth(testName, mutableTrie, FALSE,
+    mutableTrie = testTrieSerializeAllValueWidth(testName, mutableTrie, false,
                                                  checkRanges, UPRV_LENGTHOF(checkRanges));
     umutablecptrie_close(mutableTrie);
 }
@@ -1338,7 +1339,7 @@ GrowDataArrayTest(void) {
         return;
     }
 
-    mutableTrie = testTrieSerializeAllValueWidth(testName, mutableTrie, FALSE,
+    mutableTrie = testTrieSerializeAllValueWidth(testName, mutableTrie, false,
                                                  checkRanges, UPRV_LENGTHOF(checkRanges));
     umutablecptrie_close(mutableTrie);
 }
@@ -1377,7 +1378,7 @@ ManyAllSameBlocksTest(void) {
         }
     }
 
-    mutableTrie = testTrieSerializeAllValueWidth(testName, mutableTrie, FALSE,
+    mutableTrie = testTrieSerializeAllValueWidth(testName, mutableTrie, false,
                                                  checkRanges, UPRV_LENGTHOF(checkRanges));
     umutablecptrie_close(mutableTrie);
 }
@@ -1435,7 +1436,7 @@ MuchDataTest(void) {
 
     testBuilder(testName, mutableTrie, checkRanges, r);
     testTrieSerialize("much-data.16", mutableTrie,
-                      UCPTRIE_TYPE_FAST, UCPTRIE_VALUE_BITS_16, FALSE, checkRanges, r);
+                      UCPTRIE_TYPE_FAST, UCPTRIE_VALUE_BITS_16, false, checkRanges, r);
     umutablecptrie_close(mutableTrie);
 }
 
@@ -1526,7 +1527,7 @@ TrieTestGetRangesFixedSurr(void) {
         checkRangesFixedLeadSurr1, UPRV_LENGTHOF(checkRangesFixedLeadSurr1),
         &initialValue, &errorValue);
     UMutableCPTrie *mutableTrie = makeTrieWithRanges(
-        "fixedSurr", FALSE, setRangesFixedSurr, UPRV_LENGTHOF(setRangesFixedSurr),
+        "fixedSurr", false, setRangesFixedSurr, UPRV_LENGTHOF(setRangesFixedSurr),
         initialValue, errorValue);
     UErrorCode errorCode = U_ZERO_ERROR;
     if (mutableTrie == NULL) {
@@ -1599,7 +1600,7 @@ static void TestSmallNullBlockMatchesFast(void) {
         { 0x110000, 9 }
     };
 
-    testTrieRanges("small0-in-fast", FALSE,
+    testTrieRanges("small0-in-fast", false,
         setRanges, UPRV_LENGTHOF(setRanges),
         checkRanges, UPRV_LENGTHOF(checkRanges));
 }
@@ -1632,7 +1633,7 @@ static void ShortAllSameBlocksTest(void) {
         return;
     }
 
-    mutableTrie = testTrieSerializeAllValueWidth(testName, mutableTrie, FALSE,
+    mutableTrie = testTrieSerializeAllValueWidth(testName, mutableTrie, false,
                                                  checkRanges, UPRV_LENGTHOF(checkRanges));
     umutablecptrie_close(mutableTrie);
 }
diff --git a/icu4c/source/test/cintltst/ucsdetst.c b/icu4c/source/test/cintltst/ucsdetst.c
index b8d3b5f20b8..b607ef08dad 100644
--- a/icu4c/source/test/cintltst/ucsdetst.c
+++ b/icu4c/source/test/cintltst/ucsdetst.c
@@ -16,6 +16,7 @@
 #include "cintltst.h"
 #include "cmemory.h"
 
+#include 
 #include 
 #include 
 
@@ -60,7 +61,7 @@ static int32_t preflight(const UChar *src, int32_t length, UConverter *cnv)
     do {
         dest = buffer;
         status = U_ZERO_ERROR;
-        ucnv_fromUnicode(cnv, &dest, destLimit, &src, srcLimit, 0, TRUE, &status);
+        ucnv_fromUnicode(cnv, &dest, destLimit, &src, srcLimit, 0, true, &status);
         result += (int32_t) (dest - buffer);
     } while (status == U_BUFFER_OVERFLOW_ERROR);
 
@@ -76,7 +77,7 @@ static char *extractBytes(const UChar *src, int32_t length, const char *codepage
     char *bytes = NEW_ARRAY(char, byteCount + 1);
     char *dest = bytes, *destLimit = bytes + byteCount + 1;
 
-    ucnv_fromUnicode(cnv, &dest, destLimit, &src, srcLimit, 0, TRUE, &status);
+    ucnv_fromUnicode(cnv, &dest, destLimit, &src, srcLimit, 0, true, &status);
     ucnv_close(cnv);
 
     *byteLength = byteCount;
@@ -146,7 +147,7 @@ static void TestUTF8(void)
 
     dLength = ucsdet_getUChars(match, detected, sLength, &status);
 
-    if (u_strCompare(detected, dLength, s, sLength, FALSE) != 0) {
+    if (u_strCompare(detected, dLength, s, sLength, false) != 0) {
         log_err("Round-trip test failed!\n");
     }
 
@@ -293,10 +294,10 @@ static void TestInputFilter(void)
     sLength = u_unescape(ss, s, sizeof(ss));
     bytes = extractBytes(s, sLength, "ISO-8859-1", &byteLength);
 
-    ucsdet_enableInputFilter(csd, TRUE);
+    ucsdet_enableInputFilter(csd, true);
 
     if (!ucsdet_isInputFilterEnabled(csd)) {
-        log_err("ucsdet_enableInputFilter(csd, TRUE) did not enable input filter!\n");
+        log_err("ucsdet_enableInputFilter(csd, true) did not enable input filter!\n");
     }
 
 
@@ -321,7 +322,7 @@ static void TestInputFilter(void)
     }
 
 turn_off:
-    ucsdet_enableInputFilter(csd, FALSE);
+    ucsdet_enableInputFilter(csd, false);
     ucsdet_setText(csd, bytes, byteLength, &status);
     match = ucsdet_detect(csd, &status);
 
diff --git a/icu4c/source/test/cintltst/udatatst.c b/icu4c/source/test/cintltst/udatatst.c
index 109503db4d3..b10d886c1b3 100644
--- a/icu4c/source/test/cintltst/udatatst.c
+++ b/icu4c/source/test/cintltst/udatatst.c
@@ -31,8 +31,9 @@
 #include "cintltst.h"
 #include "ubrkimpl.h"
 #include "toolutil.h" /* for uprv_fileExists() */
-#include 
+#include 
 #include 
+#include 
 
 /* includes for TestSwapData() */
 #include "udataswp.h"
@@ -570,7 +571,7 @@ isAcceptable1(void *context,
         pInfo->formatVersion[0]==3 )
     {
         log_verbose("The data from \"%s.%s\" IS acceptable using the verifying function isAcceptable1()\n", name, type);
-        return TRUE;
+        return true;
     } else {
         log_verbose("The data from \"%s.%s\" IS NOT acceptable using the verifying function isAcceptable1():-\n"
             "\tsize              = %d\n"
@@ -583,7 +584,7 @@ isAcceptable1(void *context,
             pInfo->dataVersion[0], pInfo->dataFormat[0], pInfo->dataFormat[1], pInfo->dataFormat[2], 
             pInfo->dataFormat[3]);  
         log_verbose("Call another verifying function to accept the data\n");
-        return FALSE;
+        return false;
     }
 }
 
@@ -607,11 +608,11 @@ isAcceptable2(void *context,
         pInfo->dataVersion[0]==unicodeVersion[0] )
     {
         log_verbose("The data from \"%s.%s\" IS acceptable using the verifying function isAcceptable2()\n", name, type);
-        return TRUE;
+        return true;
     } else {
         log_verbose("The data from \"%s.%s\" IS NOT acceptable using the verifying function isAcceptable2()\n", name, type);
 
-        return FALSE;
+        return false;
     }
 
 
@@ -633,10 +634,10 @@ isAcceptable3(void *context,
         pInfo->dataVersion[0]==1   ) {
         log_verbose("The data from \"%s.%s\" IS acceptable using the verifying function isAcceptable3()\n", name, type);
 
-        return TRUE;
+        return true;
     } else {
         log_verbose("The data from \"%s.%s\" IS NOT acceptable using the verifying function isAcceptable3()\n", name, type);
-        return FALSE;
+        return false;
     }
 
 
@@ -733,10 +734,10 @@ isAcceptable(void *context,
         *((int*)context) == 2 ) {
         log_verbose("The data from\"%s.%s\" IS acceptable using the verifying function isAcceptable()\n", name, type);
 
-        return TRUE;
+        return true;
     } else {
         log_verbose("The data from \"%s.%s\" IS NOT acceptable using the verifying function isAcceptable()\n", name, type);
-        return FALSE;
+        return false;
     }
 }
 
diff --git a/icu4c/source/test/cintltst/udatpg_test.c b/icu4c/source/test/cintltst/udatpg_test.c
index c9936bcce68..a28ab2b9d79 100644
--- a/icu4c/source/test/cintltst/udatpg_test.c
+++ b/icu4c/source/test/cintltst/udatpg_test.c
@@ -28,6 +28,9 @@
 #include "unicode/utypes.h"
 
 #if !UCONFIG_NO_FORMATTING
+
+#include 
+
 #include "unicode/udat.h"
 #include "unicode/udatpg.h"
 #include "unicode/ustring.h"
@@ -277,14 +280,14 @@ static void TestBuilder() {
     }
     
     /* Add a pattern */
-    conflict = udatpg_addPattern(dtpg, redundantPattern, 5, FALSE, result, 20, 
+    conflict = udatpg_addPattern(dtpg, redundantPattern, 5, false, result, 20, 
                                  &length, &errorCode);
     if(U_FAILURE(errorCode)) {
         log_err("udatpg_addPattern() failed - %s\n", u_errorName(errorCode));
         return;
     }
     /* Add a redundant pattern */
-    conflict = udatpg_addPattern(dtpg, redundantPattern, 5, FALSE, result, 20,
+    conflict = udatpg_addPattern(dtpg, redundantPattern, 5, false, result, 20,
                                  &length, &errorCode);
     if(conflict == UDATPG_NO_CONFLICT) {
         log_err("udatpg_addPattern() failed to find the duplicate pattern.\n");
@@ -292,7 +295,7 @@ static void TestBuilder() {
     }
     /* Test pattern == NULL */
     s=NULL;
-    length = udatpg_addPattern(dtpg, s, 0, FALSE, result, 20,
+    length = udatpg_addPattern(dtpg, s, 0, false, result, 20,
                                &length, &errorCode);
     if(!U_FAILURE(errorCode)&&(length!=0) ) {
         log_err("udatpg_addPattern failed in illegal argument - pattern is NULL.\n");
@@ -301,7 +304,7 @@ static void TestBuilder() {
 
     /* replace field type */
     errorCode=U_ZERO_ERROR;
-    conflict = udatpg_addPattern(dtpg, testPattern2, 7, FALSE, result, 20,
+    conflict = udatpg_addPattern(dtpg, testPattern2, 7, false, result, 20,
                                  &length, &errorCode);
     if((conflict != UDATPG_NO_CONFLICT)||U_FAILURE(errorCode)) {
         log_err("udatpg_addPattern() failed to add HH:mm v. - %s\n", u_errorName(errorCode));
diff --git a/icu4c/source/test/cintltst/unumberformattertst.c b/icu4c/source/test/cintltst/unumberformattertst.c
index 08e10de7d2a..3079dcf302d 100644
--- a/icu4c/source/test/cintltst/unumberformattertst.c
+++ b/icu4c/source/test/cintltst/unumberformattertst.c
@@ -9,6 +9,7 @@
 // Helpful in toString methods and elsewhere.
 #define UNISTR_FROM_STRING_EXPLICIT
 
+#include 
 #include 
 #include "unicode/unumberformatter.h"
 #include "unicode/umisc.h"
@@ -63,14 +64,14 @@ static void TestSkeletonFormatToString() {
     // setup:
     UNumberFormatter* f = unumf_openForSkeletonAndLocale(
                               u"precision-integer currency/USD sign-accounting", -1, "en", &ec);
-    assertSuccessCheck("Should create without error", &ec, TRUE);
+    assertSuccessCheck("Should create without error", &ec, true);
     result = unumf_openResult(&ec);
     assertSuccess("Should create result without error", &ec);
 
     // int64 test:
     unumf_formatInt(f, -444444, result, &ec);
     // Missing data will give a U_MISSING_RESOURCE_ERROR here.
-    if (assertSuccessCheck("Should format integer without error", &ec, TRUE)) {
+    if (assertSuccessCheck("Should format integer without error", &ec, true)) {
         unumf_resultToString(result, buffer, CAPACITY, &ec);
         assertSuccess("Should print string to buffer without error", &ec);
         assertUEquals("Should produce expected string result", u"($444,444)", buffer);
@@ -103,11 +104,11 @@ static void TestSkeletonFormatToFields() {
     // setup:
     UNumberFormatter* uformatter = unumf_openForSkeletonAndLocale(
             u".00 measure-unit/length-meter sign-always", -1, "en", &ec);
-    assertSuccessCheck("Should create without error", &ec, TRUE);
+    assertSuccessCheck("Should create without error", &ec, true);
     UFormattedNumber* uresult = unumf_openResult(&ec);
     assertSuccess("Should create result without error", &ec);
     unumf_formatInt(uformatter, 9876543210L, uresult, &ec); // "+9,876,543,210.00 m"
-    if (assertSuccessCheck("unumf_formatInt() failed", &ec, TRUE)) {
+    if (assertSuccessCheck("unumf_formatInt() failed", &ec, true)) {
 
         // field position test:
         UFieldPosition ufpos = {UNUM_DECIMAL_SEPARATOR_FIELD, 0, 0};
@@ -117,7 +118,7 @@ static void TestSkeletonFormatToFields() {
 
         // field position iterator test:
         ufpositer = ufieldpositer_open(&ec);
-        if (assertSuccessCheck("Should create iterator without error", &ec, TRUE)) {
+        if (assertSuccessCheck("Should create iterator without error", &ec, true)) {
 
             unumf_resultGetAllFieldPositions(uresult, ufpositer, &ec);
             static const UFieldPosition expectedFields[] = {
@@ -188,11 +189,11 @@ static void TestExampleCode() {
     UNumberFormatter* uformatter = unumf_openForSkeletonAndLocale(u"precision-integer", -1, "en", &ec);
     UFormattedNumber* uresult = unumf_openResult(&ec);
     UChar* buffer = NULL;
-    assertSuccessCheck("There should not be a failure in the example code", &ec, TRUE);
+    assertSuccessCheck("There should not be a failure in the example code", &ec, true);
 
     // Format a double:
     unumf_formatDouble(uformatter, 5142.3, uresult, &ec);
-    if (assertSuccessCheck("There should not be a failure in the example code", &ec, TRUE)) {
+    if (assertSuccessCheck("There should not be a failure in the example code", &ec, true)) {
 
         // Export the string to a malloc'd buffer:
         int32_t len = unumf_resultToString(uresult, NULL, 0, &ec);
@@ -215,12 +216,12 @@ static void TestFormattedValue() {
     UErrorCode ec = U_ZERO_ERROR;
     UNumberFormatter* uformatter = unumf_openForSkeletonAndLocale(
             u".00 compact-short", -1, "en", &ec);
-    assertSuccessCheck("Should create without error", &ec, TRUE);
+    assertSuccessCheck("Should create without error", &ec, true);
     UFormattedNumber* uresult = unumf_openResult(&ec);
     assertSuccess("Should create result without error", &ec);
 
     unumf_formatInt(uformatter, 55000, uresult, &ec); // "55.00 K"
-    if (assertSuccessCheck("Should format without error", &ec, TRUE)) {
+    if (assertSuccessCheck("Should format without error", &ec, true)) {
         const UFormattedValue* fv = unumf_resultAsValue(uresult, &ec);
         assertSuccess("Should convert without error", &ec);
         static const UFieldPosition expectedFieldPositions[] = {
@@ -276,13 +277,13 @@ static void TestToDecimalNumber() {
         -1,
         "en-US",
         &ec);
-    assertSuccessCheck("Should create without error", &ec, TRUE);
+    assertSuccessCheck("Should create without error", &ec, true);
     UFormattedNumber* uresult = unumf_openResult(&ec);
     assertSuccess("Should create result without error", &ec);
 
     unumf_formatDouble(uformatter, 3.0, uresult, &ec);
     const UChar* str = ufmtval_getString(unumf_resultAsValue(uresult, &ec), NULL, &ec);
-    assertSuccessCheck("Formatting should succeed", &ec, TRUE);
+    assertSuccessCheck("Formatting should succeed", &ec, true);
     assertUEquals("Should produce expected string result", u"$3.00", str);
 
     char buffer[CAPACITY];
diff --git a/icu4c/source/test/cintltst/unumberrangeformattertst.c b/icu4c/source/test/cintltst/unumberrangeformattertst.c
index 4dc7a6b2409..ad1375c9838 100644
--- a/icu4c/source/test/cintltst/unumberrangeformattertst.c
+++ b/icu4c/source/test/cintltst/unumberrangeformattertst.c
@@ -9,6 +9,7 @@
 // Helpful in toString methods and elsewhere.
 #define UNISTR_FROM_STRING_EXPLICIT
 
+#include 
 #include 
 #include "unicode/unumberformatter.h"
 #include "unicode/unumberrangeformatter.h"
@@ -56,16 +57,16 @@ static void TestExampleCode() {
         NULL,
         &ec);
     UFormattedNumberRange* uresult = unumrf_openResult(&ec);
-    assertSuccessCheck("There should not be a failure in the example code", &ec, TRUE);
+    assertSuccessCheck("There should not be a failure in the example code", &ec, true);
 
     // Format a double range:
     unumrf_formatDoubleRange(uformatter, 3.0, 5.0, uresult, &ec);
-    assertSuccessCheck("There should not be a failure in the example code", &ec, TRUE);
+    assertSuccessCheck("There should not be a failure in the example code", &ec, true);
 
     // Get the result string:
     int32_t len;
     const UChar* str = ufmtval_getString(unumrf_resultAsValue(uresult, &ec), &len, &ec);
-    assertSuccessCheck("There should not be a failure in the example code", &ec, TRUE);
+    assertSuccessCheck("There should not be a failure in the example code", &ec, true);
     assertUEquals("Should produce expected string result", u"$3 – $5", str);
     int32_t resultLength = str != NULL ? u_strlen(str) : 0;
     assertIntEquals("Length should be as expected", resultLength, len);
@@ -86,14 +87,14 @@ static void TestFormattedValue() {
         "en-US",
         NULL,
         &ec);
-    assertSuccessCheck("Should create without error", &ec, TRUE);
+    assertSuccessCheck("Should create without error", &ec, true);
     UFormattedNumberRange* uresult = unumrf_openResult(&ec);
     assertSuccess("Should create result without error", &ec);
 
     // Test the decimal number code path, too
     unumrf_formatDecimalRange(uformatter, "5.5e4", -1, "1.5e5", -1, uresult, &ec);
 
-    if (assertSuccessCheck("Should format without error", &ec, TRUE)) {
+    if (assertSuccessCheck("Should format without error", &ec, true)) {
         const UFormattedValue* fv = unumrf_resultAsValue(uresult, &ec);
         assertSuccess("Should convert without error", &ec);
         static const UFieldPositionWithCategory expectedFieldPositions[] = {
@@ -169,13 +170,13 @@ static void TestGetDecimalNumbers() {
         "en-US",
         NULL,
         &ec);
-    assertSuccessCheck("Should create without error", &ec, TRUE);
+    assertSuccessCheck("Should create without error", &ec, true);
     UFormattedNumberRange* uresult = unumrf_openResult(&ec);
     assertSuccess("Should create result without error", &ec);
 
     unumrf_formatDoubleRange(uformatter, 3.0, 5.0, uresult, &ec);
     const UChar* str = ufmtval_getString(unumrf_resultAsValue(uresult, &ec), NULL, &ec);
-    assertSuccessCheck("Formatting should succeed", &ec, TRUE);
+    assertSuccessCheck("Formatting should succeed", &ec, true);
     assertUEquals("Should produce expected string result", u"$3.00 \u2013 $5.00", str);
 
     char buffer[CAPACITY];
diff --git a/icu4c/source/test/cintltst/uregiontest.c b/icu4c/source/test/cintltst/uregiontest.c
index 09fa74fae43..edb7aa39067 100644
--- a/icu4c/source/test/cintltst/uregiontest.c
+++ b/icu4c/source/test/cintltst/uregiontest.c
@@ -15,6 +15,8 @@
 
 #if !UCONFIG_NO_FORMATTING
 
+#include 
+
 #include "unicode/ustring.h"
 #include "unicode/uregion.h"
 #include "unicode/uenum.h"
@@ -575,11 +577,11 @@ static void TestGetPreferredValues() {
                     const char * preferredCode;
                     while ( (preferredCode = *regionListPtr++) != NULL ) {
                         const char *check;
-                        UBool found = FALSE;
+                        UBool found = false;
                         uenum_reset(preferredRegions, &status);
                         while ((check = uenum_next(preferredRegions, NULL, &status)) != NULL && U_SUCCESS(status) ) {
                             if ( !uprv_strcmp(check,preferredCode) ) {
-                                found = TRUE;
+                                found = true;
                                 break;
                             }
                         }
diff --git a/icu4c/source/test/cintltst/usettest.c b/icu4c/source/test/cintltst/usettest.c
index f5528d05801..c07e4073f9d 100644
--- a/icu4c/source/test/cintltst/usettest.c
+++ b/icu4c/source/test/cintltst/usettest.c
@@ -300,8 +300,8 @@ static void expect(const USet* set,
         log_err("FAIL: USet is NULL\n");
         return;
     }
-    expectContainment(set, inList, TRUE);
-    expectContainment(set, outList, FALSE);
+    expectContainment(set, inList, true);
+    expectContainment(set, outList, false);
     expectItems(set, inList);
 }
 
@@ -315,7 +315,7 @@ static void expectContainment(const USet* set,
     int32_t rangeStart = -1, rangeEnd = -1, length;
             
     ec = U_ZERO_ERROR;
-    length = uset_toPattern(set, ustr, sizeof(ustr), TRUE, &ec);
+    length = uset_toPattern(set, ustr, sizeof(ustr), true, &ec);
     if(U_FAILURE(ec)) {
         log_err("FAIL: uset_toPattern() fails in expectContainment() - %s\n", u_errorName(ec));
         return;
@@ -423,7 +423,7 @@ static void expectItems(const USet* set,
     bool isString = false;
 
     ec = U_ZERO_ERROR;
-    length = uset_toPattern(set, ustr, sizeof(ustr), TRUE, &ec);
+    length = uset_toPattern(set, ustr, sizeof(ustr), true, &ec);
     if (U_FAILURE(ec)) {
         log_err("FAIL: uset_toPattern => %s\n", u_errorName(ec));
         return;
@@ -433,7 +433,7 @@ static void expectItems(const USet* set,
     if (uset_isEmpty(set) != (strlen(items)==0)) {
         log_data_err("FAIL: %s should return %s from isEmpty (Are you missing data?)\n",
                 pat,
-                strlen(items)==0 ? "TRUE" : "FALSE");
+                strlen(items)==0 ? "true" : "false");
     }
 
     /* Don't test patterns starting with "[^" or "[\\u0000". */
diff --git a/icu4c/source/test/cintltst/usrchtst.c b/icu4c/source/test/cintltst/usrchtst.c
index aa5618617e0..73906f733ca 100644
--- a/icu4c/source/test/cintltst/usrchtst.c
+++ b/icu4c/source/test/cintltst/usrchtst.c
@@ -14,16 +14,18 @@
 
 #if !UCONFIG_NO_COLLATION && !UCONFIG_NO_BREAK_ITERATION && !UCONFIG_NO_FILE_IO
 
+#include 
+#include 
+#include 
+
 #include "unicode/usearch.h"
 #include "unicode/ustring.h"
 #include "ccolltst.h"
 #include "cmemory.h"
-#include 
 #include "usrchdat.c"
 #include "unicode/ubrk.h"
-#include 
 
-static UBool      TOCLOSE_ = TRUE;
+static UBool      TOCLOSE_ = true;
 static UCollator *EN_US_; 
 static UCollator *FR_FR_;
 static UCollator *DE_;
@@ -34,7 +36,7 @@ static UCollator *ES_;
  *     Test if a break iterator is passed in AND break iteration is disabled. 
  *     Skip the test if so.
  * CHECK_BREAK_BOOL(char *brk)
- *     Same as above, but returns 'TRUE' as a passing result
+ *     Same as above, but returns 'true' as a passing result
  */
 
 #if !UCONFIG_NO_BREAK_ITERATION
@@ -44,7 +46,7 @@ static UBreakIterator *EN_CHARACTERBREAKER_;
 #define CHECK_BREAK_BOOL(x)
 #else
 #define CHECK_BREAK(x)  if(x) { log_info("Skipping test on %s:%d because UCONFIG_NO_BREAK_ITERATION is on\n", __FILE__, __LINE__); return; }
-#define CHECK_BREAK_BOOL(x)  if(x) { log_info("Skipping test on %s:%d because UCONFIG_NO_BREAK_ITERATION is on\n", __FILE__, __LINE__); return TRUE; }
+#define CHECK_BREAK_BOOL(x)  if(x) { log_info("Skipping test on %s:%d because UCONFIG_NO_BREAK_ITERATION is on\n", __FILE__, __LINE__); return true; }
 #endif
 
 /**
@@ -84,7 +86,7 @@ static void open(UErrorCode* status)
         EN_CHARACTERBREAKER_ = ubrk_open(UBRK_CHARACTER, "en_US", NULL, 0, 
                                         status);
 #endif
-        TOCLOSE_ = TRUE;
+        TOCLOSE_ = true;
     }
 }
 
@@ -99,7 +101,7 @@ static void TestStart(void)
         log_err_status(status, "Unable to open static collators %s\n", u_errorName(status));
         return;
     }
-    TOCLOSE_ = FALSE;
+    TOCLOSE_ = false;
 }
 
 /**
@@ -117,7 +119,7 @@ static void close(void)
         ubrk_close(EN_CHARACTERBREAKER_);
 #endif
     }
-    TOCLOSE_ = FALSE;
+    TOCLOSE_ = false;
 }
 
 /**
@@ -125,9 +127,9 @@ static void close(void)
 */
 static void TestEnd(void)
 {
-    TOCLOSE_ = TRUE;
+    TOCLOSE_ = true;
     close();
-    TOCLOSE_ = TRUE;
+    TOCLOSE_ = true;
 }
 
 /**
@@ -359,7 +361,7 @@ static UBool assertEqualWithUStringSearch(      UStringSearch *strsrch,
     usearch_setAttribute(strsrch, USEARCH_ELEMENT_COMPARISON, search.elemCompare, &status);
     if (U_FAILURE(status)) {
         log_err("Error setting USEARCH_ELEMENT_COMPARISON attribute %s\n", u_errorName(status));
-        return FALSE;
+        return false;
     }
 
     if (usearch_getMatchedStart(strsrch) != USEARCH_DONE ||
@@ -379,7 +381,7 @@ static UBool assertEqualWithUStringSearch(      UStringSearch *strsrch,
             log_err("Error next match found at idx %d (len:%d); expected %d (len:%d)\n", 
                     usearch_getMatchedStart(strsrch), usearch_getMatchedLength(strsrch),
                     matchindex, matchlength);
-            return FALSE;
+            return false;
         }
         count ++;
         
@@ -403,7 +405,7 @@ static UBool assertEqualWithUStringSearch(      UStringSearch *strsrch,
         log_err("Error next match found at %d (len:%d); expected \n", 
                     usearch_getMatchedStart(strsrch), 
                     usearch_getMatchedLength(strsrch));
-        return FALSE;
+        return false;
     }
     /* start of previous matches */
     count = count == 0 ? 0 : count - 1;
@@ -421,7 +423,7 @@ static UBool assertEqualWithUStringSearch(      UStringSearch *strsrch,
             log_err("Error previous match found at %d (len:%d); expected %d (len:%d)\n", 
                     usearch_getMatchedStart(strsrch), usearch_getMatchedLength(strsrch),
                     matchindex, matchlength);
-            return FALSE;
+            return false;
         }
         
         if (usearch_getMatchedText(strsrch, matchtext, 128, &status) !=
@@ -445,7 +447,7 @@ static UBool assertEqualWithUStringSearch(      UStringSearch *strsrch,
         log_err("Error previous match found at %d (len:%d); expected \n", 
                     usearch_getMatchedStart(strsrch), 
                     usearch_getMatchedLength(strsrch));
-        return FALSE;
+        return false;
     }
 
 
@@ -456,7 +458,7 @@ static UBool assertEqualWithUStringSearch(      UStringSearch *strsrch,
     matchindex  = search.offset[count];
     nextStart = 0;
 
-    while (TRUE) {
+    while (true) {
         usearch_following(strsrch, nextStart, &status);
 
         if (matchindex < 0) {
@@ -469,7 +471,7 @@ static UBool assertEqualWithUStringSearch(      UStringSearch *strsrch,
                             nextStart, isOverlap,
                             usearch_getMatchedStart(strsrch), 
                             usearch_getMatchedLength(strsrch));
-                return FALSE;
+                return false;
             }
             /* no more matches */
             break;
@@ -487,7 +489,7 @@ static UBool assertEqualWithUStringSearch(      UStringSearch *strsrch,
                         nextStart, isOverlap,
                         usearch_getMatchedStart(strsrch), usearch_getMatchedLength(strsrch),
                         matchindex, matchlength);
-            return FALSE;
+            return false;
         }
 
         if (isOverlap || usearch_getMatchedLength(strsrch) == 0) {
@@ -507,7 +509,7 @@ static UBool assertEqualWithUStringSearch(      UStringSearch *strsrch,
     }
     usearch_getText(strsrch, &nextStart);
 
-    while (TRUE) {
+    while (true) {
         usearch_preceding(strsrch, nextStart, &status);
 
         if (count < 0) {
@@ -520,7 +522,7 @@ static UBool assertEqualWithUStringSearch(      UStringSearch *strsrch,
                             nextStart, isOverlap,
                             usearch_getMatchedStart(strsrch), 
                             usearch_getMatchedLength(strsrch));
-                return FALSE;
+                return false;
             }
             /* no more matches */
             break;
@@ -539,7 +541,7 @@ static UBool assertEqualWithUStringSearch(      UStringSearch *strsrch,
                         nextStart, isOverlap,
                         usearch_getMatchedStart(strsrch), usearch_getMatchedLength(strsrch),
                         matchindex, matchlength);
-            return FALSE;
+            return false;
         }
 
         nextStart = matchindex;
@@ -547,7 +549,7 @@ static UBool assertEqualWithUStringSearch(      UStringSearch *strsrch,
     }
 
     usearch_setAttribute(strsrch, USEARCH_ELEMENT_COMPARISON, USEARCH_STANDARD_ELEMENT_COMPARISON, &status);
-    return TRUE;
+    return true;
 }
 
 static UBool assertEqual(const SearchData search)
@@ -568,17 +570,17 @@ static UBool assertEqual(const SearchData search)
                                        breaker, &status);
     if (U_FAILURE(status)) {
         log_err("Error opening string search %s\n", u_errorName(status));
-        return FALSE;
+        return false;
     }   
     
     if (!assertEqualWithUStringSearch(strsrch, search)) {
         ucol_setStrength(collator, UCOL_TERTIARY);
         usearch_close(strsrch);
-        return FALSE;
+        return false;
     }
     ucol_setStrength(collator, UCOL_TERTIARY);
     usearch_close(strsrch);
-    return TRUE;
+    return true;
 }
 
 static UBool assertCanonicalEqual(const SearchData search)
@@ -589,7 +591,7 @@ static UBool assertCanonicalEqual(const SearchData search)
     UCollator      *collator = getCollator(search.collator);
     UBreakIterator *breaker  = getBreakIterator(search.breaker);
     UStringSearch  *strsrch; 
-    UBool           result = TRUE;
+    UBool           result = true;
     
     CHECK_BREAK_BOOL(search.breaker);
     u_unescape(search.text, text, 128);
@@ -602,14 +604,14 @@ static UBool assertCanonicalEqual(const SearchData search)
                          &status);
     if (U_FAILURE(status)) {
         log_err("Error opening string search %s\n", u_errorName(status));
-        result = FALSE;
+        result = false;
         goto bail;
     }   
     
     if (!assertEqualWithUStringSearch(strsrch, search)) {
         ucol_setStrength(collator, UCOL_TERTIARY);
         usearch_close(strsrch);
-        result = FALSE;
+        result = false;
         goto bail;
     }
 
@@ -643,17 +645,17 @@ static UBool assertEqualWithAttribute(const SearchData            search,
     
     if (U_FAILURE(status)) {
         log_err("Error opening string search %s\n", u_errorName(status));
-        return FALSE;
+        return false;
     }   
     
     if (!assertEqualWithUStringSearch(strsrch, search)) {
             ucol_setStrength(collator, UCOL_TERTIARY);
             usearch_close(strsrch);
-            return FALSE;
+            return false;
     }
     ucol_setStrength(collator, UCOL_TERTIARY);
     usearch_close(strsrch);
-    return TRUE;
+    return true;
 }
 
 static void TestBasic(void) 
@@ -1767,7 +1769,7 @@ static void TestDiacriticMatch(void)
     search = DIACRITICMATCH[count];
     while (search.text != NULL) {
         if (search.collator != NULL) {
-            coll = ucol_openFromShortString(search.collator, FALSE, NULL, &status);
+            coll = ucol_openFromShortString(search.collator, false, NULL, &status);
         } else {
             /* Always use "en_US" because some of these tests fail in Danish locales. */
             coll = ucol_open("en_US"/*uloc_getDefault()*/, &status);
@@ -2763,7 +2765,7 @@ static void TestUsingSearchCollator(void)
                         usearch_reset(usrch);
                         nextOffsetPtr = patternsOffsetsPtr->offsets;
                         limitOffsetPtr = patternsOffsetsPtr->offsets + patternsOffsetsPtr->offsetsLen;
-                        while (TRUE) {
+                        while (true) {
                             offset = usearch_next(usrch, &status);
                             if ( U_FAILURE(status) || offset == USEARCH_DONE ) {
                                 break;
@@ -2789,7 +2791,7 @@ static void TestUsingSearchCollator(void)
                         usearch_reset(usrch);
                         nextOffsetPtr = patternsOffsetsPtr->offsets + patternsOffsetsPtr->offsetsLen;
                         limitOffsetPtr = patternsOffsetsPtr->offsets;
-                        while (TRUE) {
+                        while (true) {
                             offset = usearch_previous(usrch, &status);
                             if ( U_FAILURE(status) || offset == USEARCH_DONE ) {
                                 break;
@@ -2837,7 +2839,7 @@ static void TestPCEBuffer_with(const UChar *search, uint32_t searchLen, const UC
 
 
    coll = ucol_openFromShortString( "LSK_AS_CX_EX_FX_HX_NX_S4",
-                                    FALSE,
+                                    false,
                                     NULL,
                                     &icuStatus );
    if ( U_FAILURE(icuStatus) )
@@ -2981,7 +2983,7 @@ static void TestMatchFollowedByIgnorables(void) {
     sourceLen = UPRV_LENGTHOF(source);
 
     coll = ucol_openFromShortString("LHR_AN_CX_EX_FX_HX_NX_S3",
-                                    FALSE,
+                                    false,
                                     NULL,
                                     &icuStatus);
     if (U_FAILURE(icuStatus)) {
diff --git a/icu4c/source/test/cintltst/utexttst.c b/icu4c/source/test/cintltst/utexttst.c
index 6ee85c7057d..6ad8e1441f2 100644
--- a/icu4c/source/test/cintltst/utexttst.c
+++ b/icu4c/source/test/cintltst/utexttst.c
@@ -15,6 +15,8 @@
 *******************************************************************************
 */
 
+#include 
+
 #include "unicode/utypes.h"
 #include "unicode/utext.h"
 #include "unicode/ustring.h"
@@ -35,9 +37,9 @@ addUTextTest(TestNode** root)
 
 
 #define TEST_ASSERT(x) UPRV_BLOCK_MACRO_BEGIN { \
-    if ((x)==FALSE) { \
+    if ((x)==false) { \
         log_err("Test failure in file %s at line %d\n", __FILE__, __LINE__); \
-        gFailed = TRUE; \
+        gFailed = true; \
     } \
 } UPRV_BLOCK_MACRO_END
 
@@ -46,7 +48,7 @@ addUTextTest(TestNode** root)
     if (U_FAILURE(status)) { \
         log_err("Test failure in file %s at line %d. Error = \"%s\"\n", \
                 __FILE__, __LINE__, u_errorName(status)); \
-        gFailed = TRUE; \
+        gFailed = true; \
    } \
 } UPRV_BLOCK_MACRO_END
 
@@ -63,7 +65,7 @@ addUTextTest(TestNode** root)
 
 static void TestAPI(void) {
     UErrorCode      status = U_ZERO_ERROR;
-    UBool           gFailed = FALSE;
+    UBool           gFailed = false;
     (void)gFailed;   /* Suppress set but not used warning. */
 
     /* Open    */
@@ -100,7 +102,7 @@ static void TestAPI(void) {
         status = U_ZERO_ERROR;
         uta = utext_openUChars(NULL, uString, -1, &status);
         TEST_SUCCESS(status);
-        utb = utext_clone(NULL, uta, FALSE, FALSE, &status);
+        utb = utext_clone(NULL, uta, false, false, &status);
         TEST_SUCCESS(status);
         TEST_ASSERT(utb != NULL);
         TEST_ASSERT(utb != uta);
@@ -124,11 +126,11 @@ static void TestAPI(void) {
         TEST_ASSERT(uta!=NULL);
         TEST_SUCCESS(status);
         b = utext_isLengthExpensive(uta);
-        TEST_ASSERT(b==TRUE);
+        TEST_ASSERT(b==true);
         len = utext_nativeLength(uta);
         TEST_ASSERT(len == u_strlen(uString));
         b = utext_isLengthExpensive(uta);
-        TEST_ASSERT(b==FALSE);
+        TEST_ASSERT(b==false);
 
         c = utext_char32At(uta, 0);
         TEST_ASSERT(c==uString[0]);
@@ -158,17 +160,17 @@ static void TestAPI(void) {
 
         utext_setNativeIndex(uta, 0);
         b = utext_moveIndex32(uta, 1);
-        TEST_ASSERT(b==TRUE);
+        TEST_ASSERT(b==true);
         i = utext_getNativeIndex(uta);
         TEST_ASSERT(i==1);
 
         b = utext_moveIndex32(uta, u_strlen(uString)-1);
-        TEST_ASSERT(b==TRUE);
+        TEST_ASSERT(b==true);
         i = utext_getNativeIndex(uta);
         TEST_ASSERT(i==u_strlen(uString));
 
         b = utext_moveIndex32(uta, 1);
-        TEST_ASSERT(b==FALSE);
+        TEST_ASSERT(b==false);
         i = utext_getNativeIndex(uta);
         TEST_ASSERT(i==u_strlen(uString));
 
@@ -270,10 +272,10 @@ static void TestAPI(void) {
         TEST_SUCCESS(status);
 
         b = utext_isWritable(uta);
-        TEST_ASSERT(b == FALSE);
+        TEST_ASSERT(b == false);
 
         b = utext_hasMetaData(uta);
-        TEST_ASSERT(b == FALSE);
+        TEST_ASSERT(b == false);
 
         utext_replace(uta,
                       0, 1,     /* start, limit */
@@ -285,7 +287,7 @@ static void TestAPI(void) {
         utext_copy(uta,
                    0, 1,         /* start, limit      */
                    2,            /* destination index */
-                   FALSE,        /* move flag         */
+                   false,        /* move flag         */
                    &status);
         TEST_ASSERT(status == U_NO_WRITE_PERMISSION);
 
diff --git a/icu4c/source/test/cintltst/utf16tst.c b/icu4c/source/test/cintltst/utf16tst.c
index 2d3cecdd71e..2394cbcef77 100644
--- a/icu4c/source/test/cintltst/utf16tst.c
+++ b/icu4c/source/test/cintltst/utf16tst.c
@@ -22,6 +22,7 @@
 #include "cmemory.h"
 #include "cstring.h"
 #include "cintltst.h"
+#include 
 #include 
 
 // Obsolete macro from obsolete unicode/utf_old.h, for some old test data.
@@ -135,7 +136,7 @@ static void TestCharLength()
               log_verbose("The no: of code units for %lx is %d\n",c, U16_LENGTH(c));
         }
 #if !U_HIDE_OBSOLETE_UTF_OLD_H
-        multiple=(UBool)(codepoint[i] == 1 ? FALSE : TRUE);
+        multiple=(UBool)(codepoint[i] == 1 ? false : true);
         if(UTF16_NEED_MULTIPLE_UCHAR(c) != multiple){
               log_err("ERROR: UTF16_NEED_MULTIPLE_UCHAR failed for %lx\n", c);
         }
@@ -197,7 +198,7 @@ static void TestGetChar()
         }
         expected=result[i+1];
 #if !U_HIDE_OBSOLETE_UTF_OLD_H
-        UTF16_GET_CHAR_SAFE(input, 0, offset, UPRV_LENGTHOF(input), c, FALSE);
+        UTF16_GET_CHAR_SAFE(input, 0, offset, UPRV_LENGTHOF(input), c, false);
         if(c != expected) {
             log_err("ERROR: UTF16_GET_CHAR_SAFE failed for offset=%ld. Expected:%lx Got:%lx\n", offset, expected, c);
         }
@@ -213,7 +214,7 @@ static void TestGetChar()
             log_err("ERROR: U16_GET_OR_FFFD failed for offset=%ld. Expected:%lx Got:%lx\n", offset, expected, c);
         }
 #if !U_HIDE_OBSOLETE_UTF_OLD_H
-        UTF16_GET_CHAR_SAFE(input, 0, offset, UPRV_LENGTHOF(input), c, TRUE);
+        UTF16_GET_CHAR_SAFE(input, 0, offset, UPRV_LENGTHOF(input), c, true);
         if(c != result[i+2]){
             log_err("ERROR: UTF16_GET_CHAR_SAFE(strict) failed for offset=%ld. Expected:%lx Got:%lx\n", offset, result[i+2], c);
         }
@@ -284,7 +285,7 @@ static void TestNextPrevChar(){
         expected=result[i+1];
 #if !U_HIDE_OBSOLETE_UTF_OLD_H
          setOffset=offset;
-         UTF16_NEXT_CHAR_SAFE(input, setOffset, UPRV_LENGTHOF(input), c, FALSE);
+         UTF16_NEXT_CHAR_SAFE(input, setOffset, UPRV_LENGTHOF(input), c, false);
          if(setOffset != movedOffset[i+1]){
              log_err("ERROR: UTF16_NEXT_CHAR_SAFE failed to move the offset correctly at %d\n ExpectedOffset:%d Got %d\n",
                  offset, movedOffset[i+1], setOffset);
@@ -315,7 +316,7 @@ static void TestNextPrevChar(){
         }
 #if !U_HIDE_OBSOLETE_UTF_OLD_H
          setOffset=offset;
-         UTF16_NEXT_CHAR_SAFE(input, setOffset, UPRV_LENGTHOF(input), c, TRUE);
+         UTF16_NEXT_CHAR_SAFE(input, setOffset, UPRV_LENGTHOF(input), c, true);
          if(setOffset != movedOffset[i+1]){
              log_err("ERROR: UTF16_NEXT_CHAR_SAFE(strict) failed to move the offset correctly at %d\n ExpectedOffset:%d Got %d\n",
                  offset, movedOffset[i+2], setOffset);
@@ -350,7 +351,7 @@ static void TestNextPrevChar(){
          }
 #if !U_HIDE_OBSOLETE_UTF_OLD_H
          setOffset=offset;
-         UTF16_PREV_CHAR_SAFE(input, 0, setOffset, c, FALSE);
+         UTF16_PREV_CHAR_SAFE(input, 0, setOffset, c, false);
          if(setOffset != movedOffset[i+4]){
              log_err("ERROR: UTF16_PREV_CHAR_SAFE failed to move the offset correctly at %d\n ExpectedOffset:%d Got %d\n",
                  offset, movedOffset[i+4], setOffset);
@@ -382,7 +383,7 @@ static void TestNextPrevChar(){
         }
 #if !U_HIDE_OBSOLETE_UTF_OLD_H
          setOffset=offset;
-         UTF16_PREV_CHAR_SAFE(input, 0,  setOffset, c, TRUE);
+         UTF16_PREV_CHAR_SAFE(input, 0,  setOffset, c, true);
          if(setOffset != movedOffset[i+5]){
              log_err("ERROR: UTF16_PREV_CHAR_SAFE(strict) failed to move the offset correctly at %d\n ExpectedOffset:%d Got %d\n",
                  offset, movedOffset[i+5], setOffset);
@@ -846,11 +847,11 @@ static void TestAppend() {
     }
 
     length=0;
-    wrongIsError=FALSE;
+    wrongIsError=false;
     for(i=0; i
+
 #include "unicode/utypes.h"
 #include "unicode/utf8.h"
 #include "unicode/utf_old.h"
@@ -195,7 +197,7 @@ static void TestCharLength()
               log_verbose("The no: of code units for %lx is %d\n",c, U8_LENGTH(c));
         }
 #if !U_HIDE_OBSOLETE_UTF_OLD_H
-        multiple=(UBool)(codepoint[i] == 1 ? FALSE : TRUE);
+        multiple=(UBool)(codepoint[i] == 1 ? false : true);
         if(UTF8_NEED_MULTIPLE_UCHAR(c) != multiple){
               log_err("ERROR: UTF8_NEED_MULTIPLE_UCHAR failed for %lx\n", c);
         }
@@ -263,7 +265,7 @@ static void TestGetChar()
         }
         expected=result[i+1];
 #if !U_HIDE_OBSOLETE_UTF_OLD_H
-        UTF8_GET_CHAR_SAFE(input, 0, offset, sizeof(input), c, FALSE);
+        UTF8_GET_CHAR_SAFE(input, 0, offset, sizeof(input), c, false);
         if(c != expected){
             log_err("ERROR: UTF8_GET_CHAR_SAFE failed for offset=%ld. Expected:%lx Got:%lx\n", offset, expected, c);
         }
@@ -280,7 +282,7 @@ static void TestGetChar()
             log_err("ERROR: U8_GET_OR_FFFD failed for offset=%ld. Expected:%lx Got:%lx\n", offset, expected, c);
         }
 #if !U_HIDE_OBSOLETE_UTF_OLD_H
-        UTF8_GET_CHAR_SAFE(input, 0, offset, sizeof(input), c, TRUE);
+        UTF8_GET_CHAR_SAFE(input, 0, offset, sizeof(input), c, true);
         if(c != result[i+2]){
             log_err("ERROR: UTF8_GET_CHAR_SAFE(strict) failed for offset=%ld. Expected:%lx Got:%lx\n", offset, result[i+2], c);
         }
@@ -347,7 +349,7 @@ static void TestNextPrevChar() {
         expected=result[i];  // next_safe_ns
 #if !U_HIDE_OBSOLETE_UTF_OLD_H
         setOffset=offset;
-        UTF8_NEXT_CHAR_SAFE(input, setOffset, sizeof(input), c, FALSE);
+        UTF8_NEXT_CHAR_SAFE(input, setOffset, sizeof(input), c, false);
         if(setOffset != movedOffset[j]) {
             log_err("ERROR: UTF8_NEXT_CHAR_SAFE failed to move the offset correctly at %d\n ExpectedOffset:%d Got %d\n",
                 offset, movedOffset[j], setOffset);
@@ -379,7 +381,7 @@ static void TestNextPrevChar() {
         }
 #if !U_HIDE_OBSOLETE_UTF_OLD_H
         setOffset=offset;
-        UTF8_NEXT_CHAR_SAFE(input, setOffset, sizeof(input), c, TRUE);
+        UTF8_NEXT_CHAR_SAFE(input, setOffset, sizeof(input), c, true);
         if(setOffset != movedOffset[j]) {
             log_err("ERROR: UTF8_NEXT_CHAR_SAFE(strict) failed to move the offset correctly at %d\n ExpectedOffset:%d Got %d\n",
                 offset, movedOffset[j], setOffset);
@@ -399,7 +401,7 @@ static void TestNextPrevChar() {
         expected=result[i+2];  // prev_safe_ns
 #if !U_HIDE_OBSOLETE_UTF_OLD_H
         setOffset=offset;
-        UTF8_PREV_CHAR_SAFE(input, 0, setOffset, c, FALSE);
+        UTF8_PREV_CHAR_SAFE(input, 0, setOffset, c, false);
         if(setOffset != movedOffset[j+1]) {
             log_err("ERROR: UTF8_PREV_CHAR_SAFE failed to move the offset correctly at %d\n ExpectedOffset:%d Got %d\n",
                 offset, movedOffset[j+1], setOffset);
@@ -431,7 +433,7 @@ static void TestNextPrevChar() {
         }
 #if !U_HIDE_OBSOLETE_UTF_OLD_H
         setOffset=offset;
-        UTF8_PREV_CHAR_SAFE(input, 0,  setOffset, c, TRUE);
+        UTF8_PREV_CHAR_SAFE(input, 0,  setOffset, c, true);
         if(setOffset != movedOffset[j+1]) {
             log_err("ERROR: UTF8_PREV_CHAR_SAFE(strict) failed to move the offset correctly at %d\n ExpectedOffset:%d Got %d\n",
                 offset, movedOffset[j+1], setOffset);
@@ -570,13 +572,13 @@ static void TestNextPrevNonCharacters() {
 #if !U_HIDE_OBSOLETE_UTF_OLD_H
     for(idx=0; idx<(int32_t)sizeof(nonChars);) {
         UChar32 expected= nonChars[idx]<0xf0 ? 0xffff : 0x10ffff;
-        UTF8_NEXT_CHAR_SAFE(nonChars, idx, sizeof(nonChars), ch, TRUE);
+        UTF8_NEXT_CHAR_SAFE(nonChars, idx, sizeof(nonChars), ch, true);
         if(ch!=expected) {
             log_err("UTF8_NEXT_CHAR_SAFE(strict, before %d) failed to read a non-character\n", idx);
         }
     }
     for(idx=(int32_t)sizeof(nonChars); idx>0;) {
-        UTF8_PREV_CHAR_SAFE(nonChars, 0, idx, ch, TRUE);
+        UTF8_PREV_CHAR_SAFE(nonChars, 0, idx, ch, true);
         UChar32 expected= nonChars[idx]<0xf0 ? 0xffff : 0x10ffff;
         if(ch!=expected) {
             log_err("UTF8_PREV_CHAR_SAFE(strict, at %d) failed to read a non-character\n", idx);
@@ -1215,11 +1217,11 @@ static void TestAppend() {
     }
 
     length=0;
-    wrongIsError=FALSE;
+    wrongIsError=false;
     for(i=0; i
 #include 
 #include 
 
@@ -44,11 +45,11 @@ static uint64_t randomInt64(void)
 {
     int64_t ran = 0;
     int32_t i;
-    static UBool initialized = FALSE;
+    static UBool initialized = false;
 
     if (!initialized) {
         srand((unsigned)time(NULL));
-        initialized = TRUE;
+        initialized = true;
     }
 
     /* Assume rand has at least 12 bits of precision */
diff --git a/icu4c/source/test/cintltst/utransts.c b/icu4c/source/test/cintltst/utransts.c
index 45ba01631b5..ecd3c365e0c 100644
--- a/icu4c/source/test/cintltst/utransts.c
+++ b/icu4c/source/test/cintltst/utransts.c
@@ -14,6 +14,7 @@
 
 #if !UCONFIG_NO_TRANSLITERATION
 
+#include 
 #include 
 #include 
 #include "unicode/utrans.h"
@@ -595,29 +596,29 @@ static void TestGetRulesAndSourceSet() {
         int32_t ulen;
 
         status = U_ZERO_ERROR;
-        ulen = utrans_toRules(utrans, FALSE, ubuf, kUBufMax, &status);
+        ulen = utrans_toRules(utrans, false, ubuf, kUBufMax, &status);
         if ( U_FAILURE(status) || ulen <= 50 || ulen >= 100) {
             log_err("FAIL: utrans_toRules unescaped, expected noErr and len 50-100, got error=%s and len=%d\n",
                     u_errorName(status), ulen);
         }
 
         status = U_ZERO_ERROR;
-        ulen = utrans_toRules(utrans, FALSE, NULL, 0, &status);
+        ulen = utrans_toRules(utrans, false, NULL, 0, &status);
         if ( status != U_BUFFER_OVERFLOW_ERROR || ulen <= 50 || ulen >= 100) {
             log_err("FAIL: utrans_toRules unescaped, expected U_BUFFER_OVERFLOW_ERROR and len 50-100, got error=%s and len=%d\n",
                     u_errorName(status), ulen);
         }
 
         status = U_ZERO_ERROR;
-        ulen = utrans_toRules(utrans, TRUE, ubuf, kUBufMax, &status);
+        ulen = utrans_toRules(utrans, true, ubuf, kUBufMax, &status);
         if ( U_FAILURE(status) || ulen <= 100 || ulen >= 200) {
             log_err("FAIL: utrans_toRules escaped, expected noErr and len 100-200, got error=%s and len=%d\n",
                     u_errorName(status), ulen);
         }
 
         status = U_ZERO_ERROR;
-        uset = utrans_getSourceSet(utrans, FALSE, NULL, &status);
-        ulen = uset_toPattern(uset, ubuf, kUBufMax, FALSE, &status);
+        uset = utrans_getSourceSet(utrans, false, NULL, &status);
+        ulen = uset_toPattern(uset, ubuf, kUBufMax, false, &status);
         uset_close(uset);
         if ( U_FAILURE(status) || ulen <= 4 || ulen >= 20) {
             log_err("FAIL: utrans_getSourceSet useFilter, expected noErr and len 4-20, got error=%s and len=%d\n",
@@ -625,8 +626,8 @@ static void TestGetRulesAndSourceSet() {
         }
 
         status = U_ZERO_ERROR;
-        uset = utrans_getSourceSet(utrans, TRUE, NULL, &status);
-        ulen = uset_toPattern(uset, ubuf, kUBufMax, FALSE, &status);
+        uset = utrans_getSourceSet(utrans, true, NULL, &status);
+        ulen = uset_toPattern(uset, ubuf, kUBufMax, false, &status);
         uset_close(uset);
         if ( U_FAILURE(status) || ulen <= 4 || ulen >= 20) {
             log_err("FAIL: utrans_getSourceSet ignoreFilter, expected noErr and len 4-20, got error=%s and len=%d\n",
diff --git a/icu4c/source/test/intltest/aliastst.cpp b/icu4c/source/test/intltest/aliastst.cpp
index 06521692a75..34ec09aff1f 100644
--- a/icu4c/source/test/intltest/aliastst.cpp
+++ b/icu4c/source/test/intltest/aliastst.cpp
@@ -196,15 +196,15 @@ LocaleAliasTest::~LocaleAliasTest(){
 }
 UBool LocaleAliasTest::isLocaleAvailable(const char* loc){
     if(resIndex==NULL){
-        return FALSE;
+        return false;
     }
     UErrorCode status = U_ZERO_ERROR;
     int32_t len = 0;
     ures_getStringByKey(resIndex, loc,&len, &status);
     if(U_FAILURE(status)){
-        return FALSE; 
+        return false; 
     }
-    return TRUE;
+    return true;
 }
 void LocaleAliasTest::TestDisplayName() {
     int32_t availableNum =0;
diff --git a/icu4c/source/test/intltest/allcoll.cpp b/icu4c/source/test/intltest/allcoll.cpp
index 4720d6390b2..85041d11eab 100644
--- a/icu4c/source/test/intltest/allcoll.cpp
+++ b/icu4c/source/test/intltest/allcoll.cpp
@@ -24,7 +24,7 @@ CollationDummyTest::CollationDummyTest()
 : myCollation(0)
 {
     /*UErrorCode status = U_ZERO_ERROR;
-    UnicodeString rules(TRUE, DEFAULTRULEARRAY, UPRV_LENGTHOF(DEFAULTRULEARRAY));
+    UnicodeString rules(true, DEFAULTRULEARRAY, UPRV_LENGTHOF(DEFAULTRULEARRAY));
     UnicodeString newRules("& C < ch, cH, Ch, CH & Five, 5 & Four, 4 & one, 1 & Ampersand; '&' & Two, 2 ");
     rules += newRules;
     myCollation = new RuleBasedCollator(rules, status);
diff --git a/icu4c/source/test/intltest/alphaindextst.cpp b/icu4c/source/test/intltest/alphaindextst.cpp
index a2bea639732..cd69a3e7ee5 100644
--- a/icu4c/source/test/intltest/alphaindextst.cpp
+++ b/icu4c/source/test/intltest/alphaindextst.cpp
@@ -80,7 +80,7 @@ void AlphabeticIndexTest::runIndexedTest( int32_t index, UBool exec, const char*
 } UPRV_BLOCK_MACRO_END
 
 #define TEST_ASSERT(expr) UPRV_BLOCK_MACRO_BEGIN { \
-    if ((expr)==FALSE) { \
+    if ((expr)==false) { \
         errln("%s:%d: Test failure \n", __FILE__, __LINE__); \
     } \
 } UPRV_BLOCK_MACRO_END
@@ -228,7 +228,7 @@ void AlphabeticIndexTest::APITest() {
         TEST_CHECK_STATUS;
         while (index->nextRecord(status)) {
             TEST_CHECK_STATUS;
-            TEST_ASSERT(FALSE);   // No items have been added.
+            TEST_ASSERT(false);   // No items have been added.
         }
         TEST_CHECK_STATUS;
     }
@@ -250,10 +250,10 @@ void AlphabeticIndexTest::APITest() {
     TEST_CHECK_STATUS;
     TEST_ASSERT(itemCount == 4);
 
-    TEST_ASSERT(index->nextBucket(status) == FALSE);
+    TEST_ASSERT(index->nextBucket(status) == false);
     index->resetBucketIterator(status);
     TEST_CHECK_STATUS;
-    TEST_ASSERT(index->nextBucket(status) == TRUE);
+    TEST_ASSERT(index->nextBucket(status) == true);
 
     index->clearRecords(status);
     TEST_CHECK_STATUS;
@@ -261,7 +261,7 @@ void AlphabeticIndexTest::APITest() {
     while (index->nextBucket(status)) {
         TEST_CHECK_STATUS;
         while (index->nextRecord(status)) {
-            TEST_ASSERT(FALSE);   // No items have been added.
+            TEST_ASSERT(false);   // No items have been added.
         }
     }
     TEST_CHECK_STATUS;
@@ -290,7 +290,7 @@ void AlphabeticIndexTest::APITest() {
             TEST_ASSERT(type == U_ALPHAINDEX_OVERFLOW);
             TEST_ASSERT(label == charlie);
         } else {
-            TEST_ASSERT(FALSE);
+            TEST_ASSERT(false);
         }
     }
     TEST_ASSERT(i==28);
@@ -464,9 +464,9 @@ void AlphabeticIndexTest::HackPinyinTest() {
         // std::string s;
         // std::cout << label.toUTF8String(s) << ":  ";
 
-        UBool  bucketHasContents = FALSE;
+        UBool  bucketHasContents = false;
         while (aindex.nextRecord(status)) {
-            bucketHasContents = TRUE;
+            bucketHasContents = true;
             UnicodeString name = aindex.getRecordName();
             if (aindex.getBucketLabelType() != U_ALPHAINDEX_NORMAL) {
                 errln("File %s, Line %d, Name \"\\u%x\" is in an under or overflow bucket.",
diff --git a/icu4c/source/test/intltest/apicoll.cpp b/icu4c/source/test/intltest/apicoll.cpp
index a5dbf450e96..6d8f5429e0a 100644
--- a/icu4c/source/test/intltest/apicoll.cpp
+++ b/icu4c/source/test/intltest/apicoll.cpp
@@ -233,16 +233,16 @@ void CollationAPITest::TestKeywordValues() {
     }
 
     LocalPointer kwEnum(
-        col->getKeywordValuesForLocale("collation", Locale::getEnglish(), TRUE, errorCode));
+        col->getKeywordValuesForLocale("collation", Locale::getEnglish(), true, errorCode));
     if (errorCode.errIfFailureAndReset("Get Keyword Values for English Collator failed")) {
         return;
     }
     assertTrue("expect at least one collation tailoring for English", kwEnum->count(errorCode) > 0);
     const char *kw;
-    UBool hasStandard = FALSE;
+    UBool hasStandard = false;
     while ((kw = kwEnum->next(NULL, errorCode)) != NULL) {
         if (strcmp(kw, "standard") == 0) {
-            hasStandard = TRUE;
+            hasStandard = true;
         }
     }
     assertTrue("expect at least the 'standard' collation tailoring for English", hasStandard);
@@ -525,7 +525,7 @@ CollationAPITest::TestCollationKey(/* char* par */)
     col->getCollationKey(NULL, 0, sortkEmpty, key1Status);
     // key gets reset here
     const uint8_t* byteArrayEmpty = sortkEmpty.getByteArray(length);
-    doAssert(sortkEmpty.isBogus() == FALSE && length == 3 &&
+    doAssert(sortkEmpty.isBogus() == false && length == 3 &&
              byteArrayEmpty[0] == 1 && byteArrayEmpty[1] == 1 && byteArrayEmpty[2] == 0,
              "Empty string should return a collation key with empty levels");
     doAssert(sortkNone.compareTo(sortkEmpty) == Collator::LESS,
@@ -1268,7 +1268,7 @@ void CollationAPITest::TestSortKeyOverflow() {
     // For i_and_phi we expect 6 bytes, then the NUL terminator.
     const int32_t maxPrefixLength = longCapacity - 6 - 1;
     LocalArray longSortKey(new uint8_t[longCapacity]);
-    UnicodeString s(FALSE, i_and_phi, 2);
+    UnicodeString s(false, i_and_phi, 2);
     for (int32_t prefixLength = 0; prefixLength < maxPrefixLength; ++prefixLength) {
         length = col->getSortKey(s, longSortKey.getAlias(), longCapacity);
         CollationKey collKey;
diff --git a/icu4c/source/test/intltest/astrotst.cpp b/icu4c/source/test/intltest/astrotst.cpp
index 059e645d588..88406d082b0 100644
--- a/icu4c/source/test/intltest/astrotst.cpp
+++ b/icu4c/source/test/intltest/astrotst.cpp
@@ -190,15 +190,15 @@ void AstroTest::TestCoverage(void) {
     logln((UnicodeString)"   equ ecl: " + (anAstro->eclipticToEquatorial(eq,ecl)).toString());
     logln((UnicodeString)"   equ long: " + (anAstro->eclipticToEquatorial(eq, eclLong)).toString());
     logln((UnicodeString)"   horiz: " + (anAstro->eclipticToHorizon(hor, eclLong)).toString());
-    logln((UnicodeString)"   sunrise: " + (anAstro->getSunRiseSet(TRUE)));
-    logln((UnicodeString)"   sunset: " + (anAstro->getSunRiseSet(FALSE)));
+    logln((UnicodeString)"   sunrise: " + (anAstro->getSunRiseSet(true)));
+    logln((UnicodeString)"   sunset: " + (anAstro->getSunRiseSet(false)));
     logln((UnicodeString)"   moon phase: " + anAstro->getMoonPhase());
-    logln((UnicodeString)"   moonrise: " + (anAstro->getMoonRiseSet(TRUE)));
-    logln((UnicodeString)"   moonset: " + (anAstro->getMoonRiseSet(FALSE)));
-    logln((UnicodeString)"   prev summer solstice: " + (anAstro->getSunTime(CalendarAstronomer::SUMMER_SOLSTICE(), FALSE)));
-    logln((UnicodeString)"   next summer solstice: " + (anAstro->getSunTime(CalendarAstronomer::SUMMER_SOLSTICE(), TRUE)));
-    logln((UnicodeString)"   prev full moon: " + (anAstro->getMoonTime(CalendarAstronomer::FULL_MOON(), FALSE)));
-    logln((UnicodeString)"   next full moon: " + (anAstro->getMoonTime(CalendarAstronomer::FULL_MOON(), TRUE)));
+    logln((UnicodeString)"   moonrise: " + (anAstro->getMoonRiseSet(true)));
+    logln((UnicodeString)"   moonset: " + (anAstro->getMoonRiseSet(false)));
+    logln((UnicodeString)"   prev summer solstice: " + (anAstro->getSunTime(CalendarAstronomer::SUMMER_SOLSTICE(), false)));
+    logln((UnicodeString)"   next summer solstice: " + (anAstro->getSunTime(CalendarAstronomer::SUMMER_SOLSTICE(), true)));
+    logln((UnicodeString)"   prev full moon: " + (anAstro->getMoonTime(CalendarAstronomer::FULL_MOON(), false)));
+    logln((UnicodeString)"   next full moon: " + (anAstro->getMoonTime(CalendarAstronomer::FULL_MOON(), true)));
   }
 
   delete myastro2;
@@ -296,10 +296,10 @@ void AstroTest::TestSunriseTimes(void) {
   for (int32_t i=0; i < 30; i++) {
     logln("setDate\n");
     astro3.setDate(cal.getTime(status));
-    logln("getRiseSet(TRUE)\n");
-    UDate sunrise = astro3.getSunRiseSet(TRUE);
-    logln("getRiseSet(FALSE)\n");
-    UDate sunset  = astro3.getSunRiseSet(FALSE);
+    logln("getRiseSet(true)\n");
+    UDate sunrise = astro3.getSunRiseSet(true);
+    logln("getRiseSet(false)\n");
+    UDate sunset  = astro3.getSunRiseSet(false);
     logln("end of getRiseSet\n");
 
     cal2.setTime(cal.getTime(status), status);
diff --git a/icu4c/source/test/intltest/bidiconf.cpp b/icu4c/source/test/intltest/bidiconf.cpp
index d5336d42812..648cc42d55e 100644
--- a/icu4c/source/test/intltest/bidiconf.cpp
+++ b/icu4c/source/test/intltest/bidiconf.cpp
@@ -93,14 +93,14 @@ UBool BiDiConformanceTest::parseLevels(const char *&start) {
                           || value>(UBIDI_MAX_EXPLICIT_LEVEL+1)) {
                 errln("\nError on line %d: Levels parse error at %s", (int)lineNumber, start);
                 printErrorLine();
-                return FALSE;
+                return false;
             }
             levels[levelsCount++]=(UBiDiLevel)value;
             directionBits|=(1<<(value&1));
             start=end;
         }
     }
-    return TRUE;
+    return true;
 }
 
 UBool BiDiConformanceTest::parseOrdering(const char *start) {
@@ -111,12 +111,12 @@ UBool BiDiConformanceTest::parseOrdering(const char *start) {
         if(end<=start || (!U_IS_INV_WHITESPACE(*end) && *end!=0 && *end!=';') || value>=1000) {
             errln("\nError on line %d: Reorder parse error at %s", (int)lineNumber, start);
             printErrorLine();
-            return FALSE;
+            return false;
         }
         ordering[orderingCount++]=(int32_t)value;
         start=end;
     }
-    return TRUE;
+    return true;
 }
 
 static const UChar charFromBiDiClass[U_CHAR_DIRECTION_COUNT]={
@@ -252,9 +252,9 @@ UBool BiDiConformanceTest::parseInputStringFromBiDiClasses(const char *&start) {
         }
         errln("\nError on line %d: BiDi class string not recognized at %s", (int)lineNumber, start);
         printErrorLine();
-        return FALSE;
+        return false;
     }
-    return TRUE;
+    return true;
 }
 
 void BiDiConformanceTest::TestBidiTest() {
@@ -579,11 +579,11 @@ static uint32_t getDirectionBits(const UBiDiLevel actualLevels[], int32_t actual
 }
 
 UBool BiDiConformanceTest::checkLevels(const UBiDiLevel actualLevels[], int32_t actualCount) {
-    UBool isOk=TRUE;
+    UBool isOk=true;
     if(levelsCount!=actualCount) {
         errln("\nError on line %d: Wrong number of level values; expected %d actual %d",
               (int)lineNumber, (int)levelsCount, (int)actualCount);
-        isOk=FALSE;
+        isOk=false;
     } else {
         for(int32_t i=0; i=UBIDI_DEFAULT_LTR) {
             continue;  // BiDi control, omitted from expected ordering.
@@ -643,7 +643,7 @@ UBool BiDiConformanceTest::checkOrdering(UBiDi *ubidi) {
         if(visualIndexget(field, status);
   if(U_FAILURE(status)) {
     errln((UnicodeString)"Checking field " + fieldName(field) + " and got " + u_errorName(status));
-    return FALSE;
+    return false;
   }
   if(res != value) {
     errln((UnicodeString)"FAIL: Checking field " + fieldName(field) + " expected " + value + " and got " + res + UnicodeString("\n"));
-    return FALSE;
+    return false;
   } else {
     logln((UnicodeString)"Checking field " + fieldName(field) + " == " + value + UnicodeString("\n"));
   }
-  return TRUE;
+  return true;
 }
 
 // =========== Test Cases =====================
@@ -166,8 +166,8 @@ void CalendarCaseTest::IslamicCivil()
 
     UErrorCode status = U_ZERO_ERROR;
     Calendar *c = Calendar::createInstance("ar@calendar=islamic-civil", status);
-    if (failure(status, "Calendar::createInstance", TRUE)) return;
-    c->setLenient(TRUE);
+    if (failure(status, "Calendar::createInstance", true)) return;
+    c->setLenient(true);
     doTestCases(tests, c);
 
     static const UChar expectedUChars[] = {
@@ -297,8 +297,8 @@ void CalendarCaseTest::Hebrew() {
 
     UErrorCode status = U_ZERO_ERROR;
     Calendar *c = Calendar::createInstance("he_HE@calendar=hebrew", status);
-    if (failure(status, "Calendar::createInstance", TRUE)) return;
-    c->setLenient(TRUE);
+    if (failure(status, "Calendar::createInstance", true)) return;
+    c->setLenient(true);
     doTestCases(tests, c);
 
 
@@ -383,8 +383,8 @@ void CalendarCaseTest::Indian() {
 
     UErrorCode status = U_ZERO_ERROR;
     Calendar *c = Calendar::createInstance("hi_IN@calendar=indian", status);
-    if (failure(status, "Calendar::createInstance", TRUE)) return;
-    c->setLenient(TRUE);
+    if (failure(status, "Calendar::createInstance", true)) return;
+    c->setLenient(true);
     doTestCases(tests, c);
 
     delete c;
@@ -427,9 +427,9 @@ void CalendarCaseTest::Coptic() {
 
     UErrorCode status = U_ZERO_ERROR;
     Calendar *c = Calendar::createInstance("cop_EG@calendar=coptic", status);
-    if (failure(status, "Calendar::createInstance", TRUE)) return;
+    if (failure(status, "Calendar::createInstance", true)) return;
 
-    c->setLenient(TRUE);
+    c->setLenient(true);
     doTestCases(tests, c);
 
     delete c;
@@ -476,8 +476,8 @@ void CalendarCaseTest::Ethiopic() {
 
     UErrorCode status = U_ZERO_ERROR;
     Calendar *c = Calendar::createInstance("am_ET@calendar=ethiopic", status);
-    if (failure(status, "Calendar::createInstance", TRUE)) return;
-    c->setLenient(TRUE);
+    if (failure(status, "Calendar::createInstance", true)) return;
+    c->setLenient(true);
     doTestCases(tests, c);
 
     delete c;
@@ -492,8 +492,8 @@ void CalendarCaseTest::Ethiopic() {
         }
     }
     c = Calendar::createInstance("am_ET@calendar=ethiopic-amete-alem", status);
-    if (failure(status, "Calendar::createInstance", TRUE)) return;
-    c->setLenient(TRUE);
+    if (failure(status, "Calendar::createInstance", true)) return;
+    c->setLenient(true);
     doTestCases(tests, c);
 
     delete c;
diff --git a/icu4c/source/test/intltest/calcasts.h b/icu4c/source/test/intltest/calcasts.h
index ad55927f1f3..746390818f6 100644
--- a/icu4c/source/test/intltest/calcasts.h
+++ b/icu4c/source/test/intltest/calcasts.h
@@ -50,7 +50,7 @@ class CalendarCaseTest: public CalendarTest {
    * @param field which field
    * @param value expected value
    * @param status err status 
-   * @return boolean indicating success (TRUE) or failure (FALSE) of the test.
+   * @return boolean indicating success (true) or failure (false) of the test.
    */
   UBool checkField(Calendar *cal, UCalendarDateFields field, int32_t value, UErrorCode &status);
 
diff --git a/icu4c/source/test/intltest/callimts.cpp b/icu4c/source/test/intltest/callimts.cpp
index 70913213e30..3c1f1da3be8 100644
--- a/icu4c/source/test/intltest/callimts.cpp
+++ b/icu4c/source/test/intltest/callimts.cpp
@@ -81,13 +81,13 @@ CalendarLimitTest::test(UDate millis, icu::Calendar* cal, icu::DateFormat* fmt)
 //|double
 //|CalendarLimitTest::nextDouble(double a)
 //|{
-//|    return uprv_nextDouble(a, TRUE);
+//|    return uprv_nextDouble(a, true);
 //|}
 //|
 //|double
 //|CalendarLimitTest::previousDouble(double a)
 //|{
-//|    return uprv_nextDouble(a, FALSE);
+//|    return uprv_nextDouble(a, false);
 //|}
 
 UBool
@@ -101,7 +101,7 @@ CalendarLimitTest::TestCalendarExtremeLimit()
 {
     UErrorCode status = U_ZERO_ERROR;
     Calendar *cal = Calendar::createInstance(status);
-    if (failure(status, "Calendar::createInstance", TRUE)) return;
+    if (failure(status, "Calendar::createInstance", true)) return;
     cal->adoptTimeZone(TimeZone::createTimeZone("GMT"));
     DateFormat *fmt = DateFormat::createDateTimeInstance();
     if(!fmt || !cal) {
@@ -156,21 +156,21 @@ const UDate DEFAULT_START = 944006400000.0; // 1999-12-01T00:00Z
 const int32_t DEFAULT_END = -120; // Default for non-quick is run 2 minutes
 
 TestCase TestCases[] = {
-        {"gregorian",       FALSE,      DEFAULT_START, DEFAULT_END},
-        {"japanese",        FALSE,      596937600000.0, DEFAULT_END}, // 1988-12-01T00:00Z, Showa 63
-        {"buddhist",        FALSE,      DEFAULT_START, DEFAULT_END},
-        {"roc",             FALSE,      DEFAULT_START, DEFAULT_END},
-        {"persian",         FALSE,      DEFAULT_START, DEFAULT_END},
-        {"islamic-civil",   FALSE,      DEFAULT_START, DEFAULT_END},
-        {"islamic",         FALSE,      DEFAULT_START, 800000}, // Approx. 2250 years from now, after which 
+        {"gregorian",       false,      DEFAULT_START, DEFAULT_END},
+        {"japanese",        false,      596937600000.0, DEFAULT_END}, // 1988-12-01T00:00Z, Showa 63
+        {"buddhist",        false,      DEFAULT_START, DEFAULT_END},
+        {"roc",             false,      DEFAULT_START, DEFAULT_END},
+        {"persian",         false,      DEFAULT_START, DEFAULT_END},
+        {"islamic-civil",   false,      DEFAULT_START, DEFAULT_END},
+        {"islamic",         false,      DEFAULT_START, 800000}, // Approx. 2250 years from now, after which 
                                                                 // some rounding errors occur in Islamic calendar
-        {"hebrew",          TRUE,       DEFAULT_START, DEFAULT_END},
-        {"chinese",         TRUE,       DEFAULT_START, DEFAULT_END},
-        {"dangi",           TRUE,       DEFAULT_START, DEFAULT_END},
-        {"indian",          FALSE,      DEFAULT_START, DEFAULT_END},
-        {"coptic",          FALSE,      DEFAULT_START, DEFAULT_END},
-        {"ethiopic",        FALSE,      DEFAULT_START, DEFAULT_END},
-        {"ethiopic-amete-alem", FALSE,  DEFAULT_START, DEFAULT_END}
+        {"hebrew",          true,       DEFAULT_START, DEFAULT_END},
+        {"chinese",         true,       DEFAULT_START, DEFAULT_END},
+        {"dangi",           true,       DEFAULT_START, DEFAULT_END},
+        {"indian",          false,      DEFAULT_START, DEFAULT_END},
+        {"coptic",          false,      DEFAULT_START, DEFAULT_END},
+        {"ethiopic",        false,      DEFAULT_START, DEFAULT_END},
+        {"ethiopic-amete-alem", false,  DEFAULT_START, DEFAULT_END}
 };
     
 struct {
@@ -178,10 +178,10 @@ struct {
     UBool next (int32_t &rIndex) {
         Mutex lock;
         if (fIndex >= UPRV_LENGTHOF(TestCases)) {
-            return FALSE;
+            return false;
         }
         rIndex = fIndex++;
-        return TRUE;
+        return true;
     }
     void reset() {
         fIndex = 0;
@@ -212,7 +212,7 @@ void CalendarLimitTest::TestLimitsThread(int32_t threadNum) {
         uprv_strcpy(buf, "root@calendar=");
         strcat(buf, testCase.type);
         cal.adoptInstead(Calendar::createInstance(buf, status));
-        if (failure(status, "Calendar::createInstance", TRUE)) {
+        if (failure(status, "Calendar::createInstance", true)) {
             continue;
         }
         if (uprv_strcmp(cal->getType(), testCase.type) != 0) {
@@ -473,7 +473,7 @@ CalendarLimitTest::doLimitsTest(Calendar& cal,
     UnicodeString buf;
     for (j = 0; fieldsToTest[j] >= 0; ++j) {
         int32_t rangeLow, rangeHigh;
-        UBool fullRangeSeen = TRUE;
+        UBool fullRangeSeen = true;
         UCalendarDateFields f = (UCalendarDateFields)fieldsToTest[j];
 
         buf.remove();
@@ -483,7 +483,7 @@ CalendarLimitTest::doLimitsTest(Calendar& cal,
         rangeLow = cal.getMinimum(f);
         rangeHigh = cal.getGreatestMinimum(f);
         if (limits[j][0] != rangeLow || limits[j][1] != rangeHigh) {
-            fullRangeSeen = FALSE;
+            fullRangeSeen = false;
         }
         buf.append((UnicodeString)" minima range=" + rangeLow + ".." + rangeHigh);
         buf.append((UnicodeString)" minima actual=" + limits[j][0] + ".." + limits[j][1]);
@@ -492,7 +492,7 @@ CalendarLimitTest::doLimitsTest(Calendar& cal,
         rangeLow = cal.getLeastMaximum(f);
         rangeHigh = cal.getMaximum(f);
         if (limits[j][2] != rangeLow || limits[j][3] != rangeHigh) {
-            fullRangeSeen = FALSE;
+            fullRangeSeen = false;
         }
         buf.append((UnicodeString)" maxima range=" + rangeLow + ".." + rangeHigh);
         buf.append((UnicodeString)" maxima actual=" + limits[j][2] + ".." + limits[j][3]);
diff --git a/icu4c/source/test/intltest/calregts.cpp b/icu4c/source/test/intltest/calregts.cpp
index e4420d715e4..7fff12b7271 100644
--- a/icu4c/source/test/intltest/calregts.cpp
+++ b/icu4c/source/test/intltest/calregts.cpp
@@ -130,10 +130,10 @@ CalendarRegressionTest::failure(UErrorCode status, const char* msg)
 {
     if(U_FAILURE(status)) {
         errcheckln(status, UnicodeString("FAIL: ") + msg + " failed, error " + u_errorName(status));
-        return TRUE;
+        return true;
     }
 
-    return FALSE;
+    return false;
 }
 
 /*
@@ -227,7 +227,7 @@ CalendarRegressionTest::Test9019()
     cal1->set(2011,UCAL_MAY,06);
     cal2->set(2012,UCAL_JANUARY,06);
     printdate(cal1.getAlias(), "cal1: ") ;
-    cal1->setLenient(FALSE);
+    cal1->setLenient(false);
     cal1->add(UCAL_MONTH,8,status);
     failure(status, "->add(UCAL_MONTH,8)");
     printdate(cal1.getAlias(), "cal1 (lenient) after adding 8 months:") ;
@@ -267,7 +267,7 @@ CalendarRegressionTest::test4031502()
         dataerrln("Unable to create TimeZone Enumeration.");
         return;
     }
-    UBool bad = FALSE;
+    UBool bad = false;
     TimeZone* tz =TimeZone::createTimeZone("Asia/Riyadh87");
     failure(status, "new TimeZone");
     GregorianCalendar *cl = new GregorianCalendar(tz, status);
@@ -295,7 +295,7 @@ CalendarRegressionTest::test4031502()
                                cal->get(UCAL_DST_OFFSET,status) / (60*60*1000) + " " +
                                zone->getRawOffset() / (60*60*1000) +
                                ": HOUR = " + cal->get(UCAL_HOUR,status));
-            bad = TRUE;
+            bad = true;
         }
         delete cal;
     }
@@ -387,7 +387,7 @@ void CalendarRegressionTest::test4051765()
       delete cal;
       return;
     }
-    cal->setLenient(FALSE);
+    cal->setLenient(false);
     cal->set(UCAL_DAY_OF_WEEK, 0);
     //try {
         cal->getTime(status);
@@ -576,8 +576,8 @@ CalendarRegressionTest::getAssociatedDate(UDate d, UErrorCode& status)
  */
 void CalendarRegressionTest::test4071197()
 {
-    dowTest(FALSE);
-    dowTest(TRUE);
+    dowTest(false);
+    dowTest(true);
 }
 
 void CalendarRegressionTest::dowTest(UBool lenient)
@@ -1003,7 +1003,7 @@ void CalendarRegressionTest::test4103271()
     testCal->clear();
     sdf.adoptCalendar(testCal);
     sdf.applyPattern("EEE dd MMM yyyy 'WOY'ww'-'YYYY 'DOY'DDD");
-    UBool fail = FALSE;
+    UBool fail = false;
     for (int32_t firstDay=1; firstDay<=2; firstDay++) {
         for (int32_t minDays=1; minDays<=7; minDays++) {
             testCal->setMinimalDaysInFirstWeek((uint8_t)minDays);
@@ -1027,7 +1027,7 @@ void CalendarRegressionTest::test4103271()
                         output = testDesc + " - " + sdf.format(d,temp,pos) + "\t";
                         output = output + "\t" + actWOY;
                         logln(output);
-                        fail = TRUE;
+                        fail = true;
                     }
                 }
             }
@@ -1055,7 +1055,7 @@ void CalendarRegressionTest::test4103271()
                 UnicodeString(" ") + woy);
             if (woy != DATA[j + 1 + i]) {
                 log(" ERROR");
-                fail = TRUE;
+                fail = true;
             }
             logln("");
 
@@ -1070,7 +1070,7 @@ void CalendarRegressionTest::test4103271()
                 str.remove();
                 logln(UnicodeString("  Parse failed: ") +
                       sdf.format(testCal->getTime(status), str));
-                fail= TRUE;
+                fail= true;
             }
 
             testCal->setTime(save,status);
@@ -1141,7 +1141,7 @@ void CalendarRegressionTest::test4103271()
             logln(CalendarTest::calToStr(*testCal));
             testCal->setTime(exp, status);
             logln(CalendarTest::calToStr(*testCal) + UnicodeString( " <<< expected "));
-            fail = TRUE;
+            fail = true;
         }
         logln("");
 
@@ -1157,7 +1157,7 @@ void CalendarRegressionTest::test4103271()
                          " got:" + sdf.format(got, str2));
         if (got != exp) {
             log("  FAIL");
-            fail = TRUE;
+            fail = true;
         }
         logln("");
     }
@@ -1178,10 +1178,10 @@ void CalendarRegressionTest::test4103271()
 
 
     UBool ADDROLL_bool [] = {
-        TRUE,//ADD,
-        TRUE,
-        FALSE,
-        FALSE
+        true,//ADD,
+        true,
+        false,
+        false
     };
 
     testCal->setMinimalDaysInFirstWeek(3);
@@ -1210,7 +1210,7 @@ void CalendarRegressionTest::test4103271()
         if (after != got) {
             str.remove();
             logln(UnicodeString("  exp:") + sdf.format(after, str) + "  FAIL");
-            fail = TRUE;
+            fail = true;
         }
         else logln(" ok");
 
@@ -1227,7 +1227,7 @@ void CalendarRegressionTest::test4103271()
         if (before != got) {
             str.remove();
             logln(UnicodeString("  exp:") + sdf.format(before, str) + "  FAIL");
-            fail = TRUE;
+            fail = true;
         }
         else logln(" ok");
     }
@@ -1332,7 +1332,7 @@ void CalendarRegressionTest::test4114578()
     UDate onset = makeDate(1998, UCAL_APRIL, 5, 1, 0) + ONE_HOUR;
     UDate cease = makeDate(1998, UCAL_OCTOBER, 25, 0, 0) + 2*ONE_HOUR;
 
-    UBool fail = FALSE;
+    UBool fail = false;
 
     const int32_t ADD = 1;
     const int32_t ROLL = 2;
@@ -1372,7 +1372,7 @@ void CalendarRegressionTest::test4114578()
 
         double change = cal->getTime(status) - date;
         if (change != expectedChange) {
-            fail = TRUE;
+            fail = true;
             logln(" FAIL");
         }
         else logln(" OK");
@@ -1589,7 +1589,7 @@ void CalendarRegressionTest::test4142933()
       return;
     }
     //try {
-    calendar->roll((UCalendarDateFields)-1, TRUE, status);
+    calendar->roll((UCalendarDateFields)-1, true, status);
         if(U_SUCCESS(status))
             errln("Test failed, no exception thrown");
     //}
@@ -1692,7 +1692,7 @@ void CalendarRegressionTest::test4147269()
       delete calendar;
       return;
     }
-    calendar->setLenient(FALSE);
+    calendar->setLenient(false);
     UDate date = makeDate(1996, UCAL_JANUARY, 3); // Arbitrary date
     for (int32_t field = 0; field < UCAL_FIELD_COUNT; field++) {
         calendar->setTime(date,status);
@@ -1895,7 +1895,7 @@ CalendarRegressionTest::Test4166109()
      * 22 23 24 25 26 27 28
      * 29 30 31
      */
-    UBool passed = TRUE;
+    UBool passed = true;
     UErrorCode status = U_ZERO_ERROR;
     UCalendarDateFields field = UCAL_WEEK_OF_MONTH;
 
@@ -1923,7 +1923,7 @@ CalendarRegressionTest::Test4166109()
               ((returned == expected) ? "  ok" : "  FAIL"));
 
         if (returned != expected) {
-            passed = FALSE;
+            passed = false;
         }
     }
     if (!passed) {
@@ -2796,8 +2796,8 @@ void CalendarRegressionTest::TestDeprecates(void)
     }
 
     c1->setTime(c2->getTime(status),status);
-    c1->roll(Calendar::HOUR,(UBool)FALSE,status);
-    c2->roll(UCAL_HOUR,(UBool)FALSE,status);
+    c1->roll(Calendar::HOUR,(UBool)false,status);
+    c2->roll(UCAL_HOUR,(UBool)false,status);
 
     if(U_FAILURE(status)) {
         errln("Error code when trying to roll(UBool)");
@@ -2876,7 +2876,7 @@ void CalendarRegressionTest::TestT8057(void) {
         delete cal;
         return;
     }
-    cal->setLenient(FALSE);
+    cal->setLenient(false);
     cal->clear();
     cal->set(2008, UCAL_DECEMBER, 31);
 
diff --git a/icu4c/source/test/intltest/caltest.cpp b/icu4c/source/test/intltest/caltest.cpp
index b9ae656690c..9fc46ef1d4c 100644
--- a/icu4c/source/test/intltest/caltest.cpp
+++ b/icu4c/source/test/intltest/caltest.cpp
@@ -48,7 +48,7 @@
 } UPRV_BLOCK_MACRO_END
 
 #define TEST_ASSERT(expr) UPRV_BLOCK_MACRO_BEGIN { \
-    if ((expr)==FALSE) { \
+    if ((expr)==false) { \
         errln("%s:%d: Test failure \n", __FILE__, __LINE__); \
     } \
 } UPRV_BLOCK_MACRO_END
@@ -399,7 +399,7 @@ CalendarTest::TestGenericAPI()
     UErrorCode status = U_ZERO_ERROR;
     UDate d;
     UnicodeString str;
-    UBool eq = FALSE,b4 = FALSE,af = FALSE;
+    UBool eq = false,b4 = false,af = false;
 
     UDate when = date(90, UCAL_APRIL, 15);
 
@@ -408,7 +408,7 @@ CalendarTest::TestGenericAPI()
 
     SimpleTimeZone *zone = new SimpleTimeZone(tzoffset, tzid);
     Calendar *cal = Calendar::createInstance(zone->clone(), status);
-    if (failure(status, "Calendar::createInstance #1", TRUE)) return;
+    if (failure(status, "Calendar::createInstance #1", true)) return;
 
     if (*zone != cal->getTimeZone()) errln("FAIL: Calendar::getTimeZone failed");
 
@@ -438,7 +438,7 @@ CalendarTest::TestGenericAPI()
         U_FAILURE(status)) errln("FAIL: equals/before/after failed after setTime(+1000)");
 
     logln("cal->roll(UCAL_SECOND)");
-    cal->roll(UCAL_SECOND, (UBool) TRUE, status);
+    cal->roll(UCAL_SECOND, (UBool) true, status);
     logln(UnicodeString("cal=")  +cal->getTime(status)  + UnicodeString(calToStr(*cal)));
     cal->roll(UCAL_SECOND, (int32_t)0, status);
     logln(UnicodeString("cal=")  +cal->getTime(status)  + UnicodeString(calToStr(*cal)));
@@ -634,16 +634,16 @@ CalendarTest::TestGenericAPI()
     }
 
     LocalPointer values(
-        Calendar::getKeywordValuesForLocale("calendar", Locale("he"), FALSE, status));
+        Calendar::getKeywordValuesForLocale("calendar", Locale("he"), false, status));
     if (values.isNull() || U_FAILURE(status)) {
         dataerrln("FAIL: Calendar::getKeywordValuesForLocale(he): %s", u_errorName(status));
     } else {
-        UBool containsHebrew = FALSE;
+        UBool containsHebrew = false;
         const char *charValue;
         int32_t valueLength;
         while ((charValue = values->next(&valueLength, status)) != NULL) {
             if (valueLength == 6 && strcmp(charValue, "hebrew") == 0) {
-                containsHebrew = TRUE;
+                containsHebrew = true;
             }
         }
         if (!containsHebrew) {
@@ -651,13 +651,13 @@ CalendarTest::TestGenericAPI()
         }
 
         values->reset(status);
-        containsHebrew = FALSE;
+        containsHebrew = false;
         UnicodeString hebrew = UNICODE_STRING_SIMPLE("hebrew");
         const UChar *ucharValue;
         while ((ucharValue = values->unext(&valueLength, status)) != NULL) {
-            UnicodeString value(FALSE, ucharValue, valueLength);
+            UnicodeString value(false, ucharValue, valueLength);
             if (value == hebrew) {
-                containsHebrew = TRUE;
+                containsHebrew = true;
             }
         }
         if (!containsHebrew) {
@@ -665,11 +665,11 @@ CalendarTest::TestGenericAPI()
         }
 
         values->reset(status);
-        containsHebrew = FALSE;
+        containsHebrew = false;
         const UnicodeString *stringValue;
         while ((stringValue = values->snext(status)) != NULL) {
             if (*stringValue == hebrew) {
-                containsHebrew = TRUE;
+                containsHebrew = true;
             }
         }
         if (!containsHebrew) {
@@ -690,7 +690,7 @@ CalendarTest::TestRog()
 {
     UErrorCode status = U_ZERO_ERROR;
     GregorianCalendar* gc = new GregorianCalendar(status);
-    if (failure(status, "new GregorianCalendar", TRUE)) return;
+    if (failure(status, "new GregorianCalendar", true)) return;
     int32_t year = 1997, month = UCAL_APRIL, date = 1;
     gc->set(year, month, date);
     gc->set(UCAL_HOUR_OF_DAY, 23);
@@ -716,15 +716,15 @@ CalendarTest::TestRog()
 void
 CalendarTest::TestDOW943()
 {
-    dowTest(FALSE);
-    dowTest(TRUE);
+    dowTest(false);
+    dowTest(true);
 }
 
 void CalendarTest::dowTest(UBool lenient)
 {
     UErrorCode status = U_ZERO_ERROR;
     GregorianCalendar* cal = new GregorianCalendar(status);
-    if (failure(status, "new GregorianCalendar", TRUE)) return;
+    if (failure(status, "new GregorianCalendar", true)) return;
     logln("cal - Aug 12, 1997\n");
     cal->set(1997, UCAL_AUGUST, 12);
     cal->getTime(status);
@@ -756,7 +756,7 @@ CalendarTest::TestClonesUnique908()
 {
     UErrorCode status = U_ZERO_ERROR;
     Calendar *c = Calendar::createInstance(status);
-    if (failure(status, "Calendar::createInstance", TRUE)) return;
+    if (failure(status, "Calendar::createInstance", true)) return;
     Calendar *d = c->clone();
     c->set(UCAL_MILLISECOND, 123);
     d->set(UCAL_MILLISECOND, 456);
@@ -781,18 +781,18 @@ CalendarTest::TestGregorianChange768()
     UErrorCode status = U_ZERO_ERROR;
     UnicodeString str;
     GregorianCalendar* c = new GregorianCalendar(status);
-    if (failure(status, "new GregorianCalendar", TRUE)) return;
+    if (failure(status, "new GregorianCalendar", true)) return;
     logln(UnicodeString("With cutoff ") + dateToString(c->getGregorianChange(), str));
     b = c->isLeapYear(1800);
     logln(UnicodeString(" isLeapYear(1800) = ") + (b ? "true" : "false"));
-    logln(UnicodeString(" (should be FALSE)"));
+    logln(UnicodeString(" (should be false)"));
     if (b) errln("FAIL");
     c->setGregorianChange(date(0, 0, 1), status);
     if (U_FAILURE(status)) { errln("GregorianCalendar::setGregorianChange failed"); return; }
     logln(UnicodeString("With cutoff ") + dateToString(c->getGregorianChange(), str));
     b = c->isLeapYear(1800);
     logln(UnicodeString(" isLeapYear(1800) = ") + (b ? "true" : "false"));
-    logln(UnicodeString(" (should be TRUE)"));
+    logln(UnicodeString(" (should be true)"));
     if (!b) errln("FAIL");
     delete c;
 }
@@ -807,8 +807,8 @@ CalendarTest::TestDisambiguation765()
 {
     UErrorCode status = U_ZERO_ERROR;
     Calendar *c = Calendar::createInstance("en_US", status);
-    if (failure(status, "Calendar::createInstance", TRUE)) return;
-    c->setLenient(FALSE);
+    if (failure(status, "Calendar::createInstance", true)) return;
+    c->setLenient(false);
     c->clear();
     c->set(UCAL_YEAR, 1997);
     c->set(UCAL_MONTH, UCAL_JUNE);
@@ -957,7 +957,7 @@ CalendarTest::test4064654(int32_t yr, int32_t mo, int32_t dt, int32_t hr, int32_
     UErrorCode status = U_ZERO_ERROR;
     UnicodeString str;
     Calendar *gmtcal = Calendar::createInstance(status);
-    if (failure(status, "Calendar::createInstance", TRUE)) return;
+    if (failure(status, "Calendar::createInstance", true)) return;
     gmtcal->adoptTimeZone(TimeZone::createTimeZone("Africa/Casablanca"));
     gmtcal->set(yr, mo - 1, dt, hr, mn, sc);
     gmtcal->set(UCAL_MILLISECOND, 0);
@@ -1000,7 +1000,7 @@ CalendarTest::TestAddSetOrder621()
     UDate d = date(97, 4, 14, 13, 23, 45);
     UErrorCode status = U_ZERO_ERROR;
     Calendar *cal = Calendar::createInstance(status);
-    if (failure(status, "Calendar::createInstance", TRUE)) return;
+    if (failure(status, "Calendar::createInstance", true)) return;
 
     cal->setTime(d, status);
     if (U_FAILURE(status)) {
@@ -1072,7 +1072,7 @@ CalendarTest::TestAdd520()
     int32_t y = 1997, m = UCAL_FEBRUARY, d = 1;
     UErrorCode status = U_ZERO_ERROR;
     GregorianCalendar *temp = new GregorianCalendar(y, m, d, status);
-    if (failure(status, "new GregorianCalendar", TRUE)) return;
+    if (failure(status, "new GregorianCalendar", true)) return;
     check520(temp, y, m, d);
     temp->add(UCAL_YEAR, 1, status);
     if (U_FAILURE(status)) { errln("Calendar::add failed"); return; }
@@ -1109,7 +1109,7 @@ CalendarTest::TestAddRollExtensive()
     int32_t y = 1997, m = UCAL_FEBRUARY, d = 1, hr = 1, min = 1, sec = 0, ms = 0;
     UErrorCode status = U_ZERO_ERROR;
     GregorianCalendar *temp = new GregorianCalendar(y, m, d, status);
-    if (failure(status, "new GregorianCalendar", TRUE)) return;
+    if (failure(status, "new GregorianCalendar", true)) return;
 
     temp->set(UCAL_HOUR, hr);
     temp->set(UCAL_MINUTE, min);
@@ -1244,7 +1244,7 @@ CalendarTest::TestFieldSet4781()
     // try {
         UErrorCode status = U_ZERO_ERROR;
         GregorianCalendar *g = new GregorianCalendar(status);
-        if (failure(status, "new GregorianCalendar", TRUE)) return;
+        if (failure(status, "new GregorianCalendar", true)) return;
         GregorianCalendar *g2 = new GregorianCalendar(status);
         if (U_FAILURE(status)) { errln("Couldn't create GregorianCalendar"); return; }
         g2->set(UCAL_HOUR, 12, status);
@@ -1268,7 +1268,7 @@ void
 CalendarTest::TestSerialize337()
 {
     Calendar cal = Calendar::getInstance();
-    UBool ok = FALSE;
+    UBool ok = false;
     try {
         FileOutputStream f = new FileOutputStream(FILENAME);
         ObjectOutput s = new ObjectOutputStream(f);
@@ -1317,7 +1317,7 @@ CalendarTest::TestSecondsZero121()
 {
     UErrorCode status = U_ZERO_ERROR;
     Calendar *cal = new GregorianCalendar(status);
-    if (failure(status, "new GregorianCalendar", TRUE)) return;
+    if (failure(status, "new GregorianCalendar", true)) return;
     cal->setTime(Calendar::getNow(), status);
     if (U_FAILURE(status)) { errln("Calendar::setTime failed"); return; }
     cal->set(UCAL_SECOND, 0);
@@ -1348,7 +1348,7 @@ CalendarTest::TestAddSetGet0610()
     UErrorCode status = U_ZERO_ERROR;
     {
         Calendar *calendar = new GregorianCalendar(status);
-        if (failure(status, "new GregorianCalendar", TRUE)) return;
+        if (failure(status, "new GregorianCalendar", true)) return;
         calendar->set(1993, UCAL_JANUARY, 4);
         logln("1A) " + value(calendar));
         calendar->add(UCAL_DATE, 1, status);
@@ -1414,7 +1414,7 @@ CalendarTest::TestFields060()
     int32_t dDate = 22;
     GregorianCalendar *calendar = 0;
     calendar = new GregorianCalendar(year, month, dDate, status);
-    if (failure(status, "new GregorianCalendar", TRUE)) return;
+    if (failure(status, "new GregorianCalendar", true)) return;
     for (int32_t i = 0; i < EXPECTED_FIELDS_length;) {
         UCalendarDateFields field = (UCalendarDateFields)EXPECTED_FIELDS[i++];
         int32_t expected = EXPECTED_FIELDS[i++];
@@ -1451,7 +1451,7 @@ CalendarTest::TestEpochStartFields()
     UErrorCode status = U_ZERO_ERROR;
     TimeZone *z = TimeZone::createDefault();
     Calendar *c = Calendar::createInstance(status);
-    if (failure(status, "Calendar::createInstance", TRUE)) return;
+    if (failure(status, "Calendar::createInstance", true)) return;
     UDate d = - z->getRawOffset();
     GregorianCalendar *gc = new GregorianCalendar(status);
     if (U_FAILURE(status)) { errln("Couldn't create GregorianCalendar"); return; }
@@ -1506,7 +1506,7 @@ CalendarTest::TestDOWProgression()
 {
     UErrorCode status = U_ZERO_ERROR;
     Calendar *cal = new GregorianCalendar(1972, UCAL_OCTOBER, 26, status);
-    if (failure(status, "new GregorianCalendar", TRUE)) return;
+    if (failure(status, "new GregorianCalendar", true)) return;
     marchByDelta(cal, 24);
     delete cal;
 }
@@ -1525,7 +1525,7 @@ CalendarTest::TestDOW_LOCALandYEAR_WOY()
     UErrorCode status = U_ZERO_ERROR;
     int32_t times = 20;
     Calendar *cal=Calendar::createInstance(Locale::getGermany(), status);
-    if (failure(status, "Calendar::createInstance", TRUE)) return;
+    if (failure(status, "Calendar::createInstance", true)) return;
     SimpleDateFormat *sdf=new SimpleDateFormat(UnicodeString("YYYY'-W'ww-ee"), Locale::getGermany(), status);
     if (U_FAILURE(status)) { dataerrln("Couldn't create SimpleDateFormat - %s", u_errorName(status)); return; }
 
@@ -1816,7 +1816,7 @@ void CalendarTest::TestWOY(void) {
 
     GregorianCalendar cal(status);
     SimpleDateFormat fmt(UnicodeString("EEE MMM dd yyyy', WOY' w"), status);
-    if (failure(status, "Cannot construct calendar/format", TRUE)) return;
+    if (failure(status, "Cannot construct calendar/format", true)) return;
 
     UCalendarDaysOfWeek fdw = (UCalendarDaysOfWeek) 0;
 
@@ -2041,7 +2041,7 @@ void CalendarTest::TestYWOY()
    UErrorCode status = U_ZERO_ERROR;
 
    GregorianCalendar cal(status);
-   if (failure(status, "construct GregorianCalendar", TRUE)) return;
+   if (failure(status, "construct GregorianCalendar", true)) return;
 
    cal.setFirstDayOfWeek(UCAL_SUNDAY);
    cal.setMinimalDaysInFirstWeek(1);
@@ -2099,7 +2099,7 @@ void CalendarTest::TestJD()
   static const int32_t kEpochStartAsJulianDay = 2440588;
   UErrorCode status = U_ZERO_ERROR;
   GregorianCalendar cal(status);
-  if (failure(status, "construct GregorianCalendar", TRUE)) return;
+  if (failure(status, "construct GregorianCalendar", true)) return;
   cal.setTimeZone(*TimeZone::getGMT());
   cal.clear();
   jd = cal.get(UCAL_JULIAN_DAY, status);
@@ -2226,7 +2226,7 @@ void CalendarTest::Test6703()
 
     Locale loc1("en@calendar=fubar");
     cal = Calendar::createInstance(loc1, status);
-    if (failure(status, "Calendar::createInstance", TRUE)) return;
+    if (failure(status, "Calendar::createInstance", true)) return;
     delete cal;
 
     status = U_ZERO_ERROR;
@@ -2257,7 +2257,7 @@ void CalendarTest::Test3785()
 
     UChar upattern[64];
     u_uastrcpy(upattern, "EEE d MMMM y G, HH:mm:ss");
-    udat_applyPattern(df.getAlias(), FALSE, upattern, u_strlen(upattern));
+    udat_applyPattern(df.getAlias(), false, upattern, u_strlen(upattern));
 
     UChar ubuffer[1024];
     UDate ud0 = 1337557623000.0;
@@ -2300,7 +2300,7 @@ void CalendarTest::Test1624() {
 
         for (int32_t month = HebrewCalendar::TISHRI; month <= HebrewCalendar::ELUL; month++) {
             // skip the adar 1 month if year is not a leap year
-            if (HebrewCalendar::isLeapYear(year) == FALSE && month == HebrewCalendar::ADAR_1) {
+            if (HebrewCalendar::isLeapYear(year) == false && month == HebrewCalendar::ADAR_1) {
                 continue;
             }
             int32_t day = 15;
@@ -2309,7 +2309,7 @@ void CalendarTest::Test1624() {
             int32_t monthHC = hc.get(UCAL_MONTH,status);
             int32_t yearHC = hc.get(UCAL_YEAR,status);
 
-            if (failure(status, "HebrewCalendar.get()", TRUE)) continue;
+            if (failure(status, "HebrewCalendar.get()", true)) continue;
 
             if (dayHC != day) {
                 errln(" ==> day %d incorrect, should be: %d\n",dayHC,day);
@@ -2656,20 +2656,20 @@ typedef struct {
 static SkippedWallTimeTestData SKDATA[] =
 {
      // Time zone           Input wall time                 valid?  WALLTIME_LAST in GMT            WALLTIME_FIRST in GMT           WALLTIME_NEXT_VALID in GMT
-    {"America/New_York",    CalFields(2011,3,13,1,59,59),   TRUE,   CalFields(2011,3,13,6,59,59),   CalFields(2011,3,13,6,59,59),   CalFields(2011,3,13,6,59,59)},
-    {"America/New_York",    CalFields(2011,3,13,2,0,0),     FALSE,  CalFields(2011,3,13,7,0,0),     CalFields(2011,3,13,6,0,0),     CalFields(2011,3,13,7,0,0)},
-    {"America/New_York",    CalFields(2011,3,13,2,1,0),     FALSE,  CalFields(2011,3,13,7,1,0),     CalFields(2011,3,13,6,1,0),     CalFields(2011,3,13,7,0,0)},
-    {"America/New_York",    CalFields(2011,3,13,2,30,0),    FALSE,  CalFields(2011,3,13,7,30,0),    CalFields(2011,3,13,6,30,0),    CalFields(2011,3,13,7,0,0)},
-    {"America/New_York",    CalFields(2011,3,13,2,59,59),   FALSE,  CalFields(2011,3,13,7,59,59),   CalFields(2011,3,13,6,59,59),   CalFields(2011,3,13,7,0,0)},
-    {"America/New_York",    CalFields(2011,3,13,3,0,0),     TRUE,   CalFields(2011,3,13,7,0,0),     CalFields(2011,3,13,7,0,0),     CalFields(2011,3,13,7,0,0)},
+    {"America/New_York",    CalFields(2011,3,13,1,59,59),   true,   CalFields(2011,3,13,6,59,59),   CalFields(2011,3,13,6,59,59),   CalFields(2011,3,13,6,59,59)},
+    {"America/New_York",    CalFields(2011,3,13,2,0,0),     false,  CalFields(2011,3,13,7,0,0),     CalFields(2011,3,13,6,0,0),     CalFields(2011,3,13,7,0,0)},
+    {"America/New_York",    CalFields(2011,3,13,2,1,0),     false,  CalFields(2011,3,13,7,1,0),     CalFields(2011,3,13,6,1,0),     CalFields(2011,3,13,7,0,0)},
+    {"America/New_York",    CalFields(2011,3,13,2,30,0),    false,  CalFields(2011,3,13,7,30,0),    CalFields(2011,3,13,6,30,0),    CalFields(2011,3,13,7,0,0)},
+    {"America/New_York",    CalFields(2011,3,13,2,59,59),   false,  CalFields(2011,3,13,7,59,59),   CalFields(2011,3,13,6,59,59),   CalFields(2011,3,13,7,0,0)},
+    {"America/New_York",    CalFields(2011,3,13,3,0,0),     true,   CalFields(2011,3,13,7,0,0),     CalFields(2011,3,13,7,0,0),     CalFields(2011,3,13,7,0,0)},
 
-    {"Pacific/Apia",        CalFields(2011,12,29,23,59,59), TRUE,   CalFields(2011,12,30,9,59,59),  CalFields(2011,12,30,9,59,59),  CalFields(2011,12,30,9,59,59)},
-    {"Pacific/Apia",        CalFields(2011,12,30,0,0,0),    FALSE,  CalFields(2011,12,30,10,0,0),   CalFields(2011,12,29,10,0,0),   CalFields(2011,12,30,10,0,0)},
-    {"Pacific/Apia",        CalFields(2011,12,30,12,0,0),   FALSE,  CalFields(2011,12,30,22,0,0),   CalFields(2011,12,29,22,0,0),   CalFields(2011,12,30,10,0,0)},
-    {"Pacific/Apia",        CalFields(2011,12,30,23,59,59), FALSE,  CalFields(2011,12,31,9,59,59),  CalFields(2011,12,30,9,59,59),  CalFields(2011,12,30,10,0,0)},
-    {"Pacific/Apia",        CalFields(2011,12,31,0,0,0),    TRUE,   CalFields(2011,12,30,10,0,0),   CalFields(2011,12,30,10,0,0),   CalFields(2011,12,30,10,0,0)},
+    {"Pacific/Apia",        CalFields(2011,12,29,23,59,59), true,   CalFields(2011,12,30,9,59,59),  CalFields(2011,12,30,9,59,59),  CalFields(2011,12,30,9,59,59)},
+    {"Pacific/Apia",        CalFields(2011,12,30,0,0,0),    false,  CalFields(2011,12,30,10,0,0),   CalFields(2011,12,29,10,0,0),   CalFields(2011,12,30,10,0,0)},
+    {"Pacific/Apia",        CalFields(2011,12,30,12,0,0),   false,  CalFields(2011,12,30,22,0,0),   CalFields(2011,12,29,22,0,0),   CalFields(2011,12,30,10,0,0)},
+    {"Pacific/Apia",        CalFields(2011,12,30,23,59,59), false,  CalFields(2011,12,31,9,59,59),  CalFields(2011,12,30,9,59,59),  CalFields(2011,12,30,10,0,0)},
+    {"Pacific/Apia",        CalFields(2011,12,31,0,0,0),    true,   CalFields(2011,12,30,10,0,0),   CalFields(2011,12,30,10,0,0),   CalFields(2011,12,30,10,0,0)},
 
-    {NULL,                  CalFields(0,0,0,0,0,0),         TRUE,   CalFields(0,0,0,0,0,0),         CalFields(0,0,0,0,0,0),         CalFields(0,0,0,0,0,0)}
+    {NULL,                  CalFields(0,0,0,0,0,0),         true,   CalFields(0,0,0,0,0,0),         CalFields(0,0,0,0,0,0),         CalFields(0,0,0,0,0,0)}
 };
 
 
@@ -2849,7 +2849,7 @@ void CalendarTest::TestTimeZoneInLocale(void) {
 
         LocalPointer calendar(
                 Calendar::createInstance(locale, status));
-        if (failure(status, "Calendar::createInstance", TRUE)) continue;
+        if (failure(status, "Calendar::createInstance", true)) continue;
 
         assertEquals("TimeZone from Calendar::createInstance",
                      expected, calendar->getTimeZone().getID(actual));
@@ -2861,7 +2861,7 @@ void CalendarTest::TestTimeZoneInLocale(void) {
 
 void CalendarTest::setAndTestCalendar(Calendar* cal, int32_t initMonth, int32_t initDay, int32_t initYear, UErrorCode& status) {
         cal->clear();
-        cal->setLenient(FALSE);
+        cal->setLenient(false);
         cal->set(initYear, initMonth, initDay);
         int32_t day = cal->get(UCAL_DAY_OF_MONTH, status);
         int32_t month = cal->get(UCAL_MONTH, status);
@@ -3316,7 +3316,7 @@ void CalendarTest::TestIslamicUmAlQura() {
     UErrorCode status = U_ZERO_ERROR;
     Locale umalquraLoc("ar_SA@calendar=islamic-umalqura");
     Locale gregoLoc("ar_SA@calendar=gregorian");
-    TimeZone* tzSA = TimeZone::createTimeZone(UnicodeString(TRUE, zoneSA, -1));
+    TimeZone* tzSA = TimeZone::createTimeZone(UnicodeString(true, zoneSA, -1));
     Calendar* tstCal = Calendar::createInstance(*((const TimeZone *)tzSA), umalquraLoc, status);
     Calendar* gregCal = Calendar::createInstance(*((const TimeZone *)tzSA), gregoLoc, status);
 
@@ -3330,7 +3330,7 @@ void CalendarTest::TestIslamicUmAlQura() {
     //int32_t lastYear = 1480;    // the whole shootin' match
 
     tstCal->clear();
-    tstCal->setLenient(FALSE);
+    tstCal->setLenient(false);
 
     int32_t day=0, month=0, year=0, initDay = 27, initMonth = IslamicCalendar::RAJAB, initYear = 1434;
 
@@ -3351,7 +3351,7 @@ void CalendarTest::TestIslamicUmAlQura() {
         month = tstCal->get(UCAL_MONTH,status);
         year = tstCal->get(UCAL_YEAR,status);
         TEST_CHECK_STATUS;
-        tstCal->roll(UCAL_DAY_OF_MONTH, (UBool)TRUE, status);
+        tstCal->roll(UCAL_DAY_OF_MONTH, (UBool)true, status);
         TEST_CHECK_STATUS;
     }
 
@@ -3459,11 +3459,11 @@ void CalendarTest::TestIslamicTabularDates() {
 void CalendarTest::TestHebrewMonthValidation() {
     UErrorCode status = U_ZERO_ERROR;
     LocalPointer  cal(Calendar::createInstance(Locale::createFromName("he_IL@calendar=hebrew"), status));
-    if (failure(status, "Calendar::createInstance, locale:he_IL@calendar=hebrew", TRUE)) return;
+    if (failure(status, "Calendar::createInstance, locale:he_IL@calendar=hebrew", true)) return;
     Calendar *pCal = cal.getAlias();
 
     UDate d;
-    pCal->setLenient(FALSE);
+    pCal->setLenient(false);
 
     // 5776 is a leap year and has month Adar I
     pCal->set(5776, HebrewCalendar::ADAR_1, 1);
diff --git a/icu4c/source/test/intltest/caltest.h b/icu4c/source/test/intltest/caltest.h
index 7c0e7a9003c..7f14c89b151 100644
--- a/icu4c/source/test/intltest/caltest.h
+++ b/icu4c/source/test/intltest/caltest.h
@@ -202,7 +202,7 @@ public: // package
      * Clone the specified calendar, and determine its earliest supported date
      * by setting the extended year to the minimum value.
      * @param cal Calendar (will be cloned)
-     * @param isGregorian output: returns 'TRUE' if the calendar's class is GregorianCalendar
+     * @param isGregorian output: returns 'true' if the calendar's class is GregorianCalendar
      * @param status error code
      */
     static UDate minDateOfCalendar(const Calendar& cal, UBool &isGregorian, UErrorCode& status);
@@ -211,7 +211,7 @@ public: // package
      * Construct a calendar of the specified locale, and determine its earliest supported date
      * by setting the extended year to the minimum value.
      * @param locale locale of calendar to check
-     * @param isGregorian output: returns 'TRUE' if the calendar's class is GregorianCalendar
+     * @param isGregorian output: returns 'true' if the calendar's class is GregorianCalendar
      * @param status error code
      */
     static UDate minDateOfCalendar(const Locale& locale, UBool &isGregorian, UErrorCode& status);
diff --git a/icu4c/source/test/intltest/caltztst.cpp b/icu4c/source/test/intltest/caltztst.cpp
index 2c952bce674..ebc9f03ff54 100644
--- a/icu4c/source/test/intltest/caltztst.cpp
+++ b/icu4c/source/test/intltest/caltztst.cpp
@@ -35,9 +35,9 @@ UBool CalendarTimeZoneTest::failure(UErrorCode status, const char* msg, UBool po
         } else {
             errcheckln(status, UnicodeString("FAIL: ") + msg + " failed, error " + u_errorName(status));
         }
-        return TRUE;
+        return true;
     }
-    return FALSE;
+    return false;
 }
 
 DateFormat*   CalendarTimeZoneTest::getDateFormat()
diff --git a/icu4c/source/test/intltest/caltztst.h b/icu4c/source/test/intltest/caltztst.h
index da7cb41618d..c4f31e1d65f 100644
--- a/icu4c/source/test/intltest/caltztst.h
+++ b/icu4c/source/test/intltest/caltztst.h
@@ -29,7 +29,7 @@ public:
 protected:
     // Return true if the given status indicates failure.  Also has the side effect
     // of calling errln().  Msg should be of the form "Class::Method" in general.
-    UBool failure(UErrorCode status, const char* msg, UBool possibleDataError=FALSE);
+    UBool failure(UErrorCode status, const char* msg, UBool possibleDataError=false);
 
     // Utility method for formatting dates for printing; useful for Java->C++ conversion.
     // Tries to mimic the Java Date.toString() format.
diff --git a/icu4c/source/test/intltest/canittst.cpp b/icu4c/source/test/intltest/canittst.cpp
index 0a6baebb136..20f63774ec7 100644
--- a/icu4c/source/test/intltest/canittst.cpp
+++ b/icu4c/source/test/intltest/canittst.cpp
@@ -130,11 +130,11 @@ void CanonicalIteratorTest::TestBasic() {
     // check permute
     // NOTE: we use a TreeSet below to sort the output, which is not guaranteed to be sorted!
 
-    Hashtable *permutations = new Hashtable(FALSE, status);
+    Hashtable *permutations = new Hashtable(false, status);
     permutations->setValueDeleter(uprv_deleteUObject);
     UnicodeString toPermute("ABC");
 
-    CanonicalIterator::permute(toPermute, FALSE, permutations, status);
+    CanonicalIterator::permute(toPermute, false, permutations, status);
 
     logln("testing permutation");
   
@@ -144,7 +144,7 @@ void CanonicalIteratorTest::TestBasic() {
     
     // try samples
     logln("testing samples");
-    Hashtable *set = new Hashtable(FALSE, status);
+    Hashtable *set = new Hashtable(false, status);
     set->setValueDeleter(uprv_deleteUObject);
     int32_t i = 0;
     CanonicalIterator it("", status);
@@ -177,12 +177,12 @@ void CanonicalIteratorTest::characterTest(UnicodeString &s, UChar32 ch, Canonica
 {
     UErrorCode status = U_ZERO_ERROR;
     UnicodeString decomp, comp;
-    UBool gotDecomp = FALSE;
-    UBool gotComp = FALSE;
-    UBool gotSource = FALSE;
+    UBool gotDecomp = false;
+    UBool gotComp = false;
+    UBool gotSource = false;
 
-    Normalizer::decompose(s, FALSE, 0, decomp, status);
-    Normalizer::compose(s, FALSE, 0, comp, status);
+    Normalizer::decompose(s, false, 0, decomp, status);
+    Normalizer::compose(s, false, 0, comp, status);
     
     // skip characters that don't have either decomp.
     // need quick test for this!
@@ -195,9 +195,9 @@ void CanonicalIteratorTest::characterTest(UnicodeString &s, UChar32 ch, Canonica
     for (;;) {
         UnicodeString item = it.next();
         if (item.isBogus()) break;
-        if (item == s) gotSource = TRUE;
-        if (item == decomp) gotDecomp = TRUE;
-        if (item == comp) gotComp = TRUE;
+        if (item == s) gotSource = true;
+        if (item == decomp) gotDecomp = true;
+        if (item == comp) gotComp = true;
     }
     
     if (!gotSource || !gotDecomp || !gotComp) {
diff --git a/icu4c/source/test/intltest/citrtest.cpp b/icu4c/source/test/intltest/citrtest.cpp
index d6c37ef96b6..0ae4fce71b7 100644
--- a/icu4c/source/test/intltest/citrtest.cpp
+++ b/icu4c/source/test/intltest/citrtest.cpp
@@ -65,7 +65,7 @@ public:
     }
     virtual UChar nextPostInc(void) override { return text.charAt(pos++);}
     virtual UChar32 next32PostInc(void) override {return text.char32At(pos++);}
-    virtual UBool hasNext() override { return TRUE;}
+    virtual UBool hasNext() override { return true;}
     virtual UChar first() override {return DONE;}
     virtual UChar32 first32() override {return DONE;}
     virtual UChar last() override {return DONE;}
@@ -128,7 +128,7 @@ public:
 
         return pos;
     }
-    virtual UBool hasPrevious() override {return TRUE;}
+    virtual UBool hasPrevious() override {return true;}
 
   SCharacterIterator&  operator=(const SCharacterIterator&    that){
      text = that.text;
@@ -600,7 +600,7 @@ void CharIterTest::TestIterationUChar32() {
             /* logln("c=%d i=%d char32At=%d", c, i, text.char32At(i)); */
             if (c == CharacterIterator::DONE && i != text.length())
                 errln("Iterator reached end prematurely");
-            else if(iter.hasNext() == FALSE && i != text.length())
+            else if(iter.hasNext() == false && i != text.length())
                 errln("Iterator reached end prematurely.  Failed at hasNext");
             else if (c != text.char32At(i))
                 errln("Character mismatch at position %d, iterator has %X, string has %X", i, c, text.char32At(i));
@@ -614,13 +614,13 @@ void CharIterTest::TestIterationUChar32() {
                 i += U16_LENGTH(c);
             }
         } while (c != CharacterIterator::DONE);
-        if(iter.hasNext() == TRUE)
+        if(iter.hasNext() == true)
            errln("hasNext() returned true at the end of the string");
 
 
 
         c=iter.setToEnd();
-        if(iter.getIndex() != text.length() || iter.hasNext() != FALSE)
+        if(iter.getIndex() != text.length() || iter.hasNext() != false)
             errln("setToEnd failed");
 
         c=iter.next32();
@@ -637,7 +637,7 @@ void CharIterTest::TestIterationUChar32() {
         do {
             if (c == CharacterIterator::DONE && i >= 0)
                 errln((UnicodeString)"Iterator reached start prematurely for i=" + i);
-            else if(iter.hasPrevious() == FALSE && i>0)
+            else if(iter.hasPrevious() == false && i>0)
                 errln((UnicodeString)"Iterator reached start prematurely for i=" + i);
             else if (c != text.char32At(i))
                 errln("Character mismatch at position %d, iterator has %X, string has %X", i, c, text.char32At(i));
@@ -653,7 +653,7 @@ void CharIterTest::TestIterationUChar32() {
                 i -= U16_LENGTH(c);
             }
         } while (c != CharacterIterator::DONE);
-        if(iter.hasPrevious() == TRUE)
+        if(iter.hasPrevious() == true)
             errln("hasPrevious returned true after reaching the start");
 
         c=iter.previous32();
@@ -713,7 +713,7 @@ void CharIterTest::TestIterationUChar32() {
         do {
             if (c == CharacterIterator::DONE && i != 11)
                 errln("Iterator reached end prematurely");
-            else if(iter.hasNext() == FALSE)
+            else if(iter.hasNext() == false)
                 errln("Iterator reached end prematurely");
             else if (c != text.char32At(i))
                 errln("Character mismatch at position %d, iterator has %X, string has %X", i, c, text.char32At(i));
@@ -740,7 +740,7 @@ void CharIterTest::TestIterationUChar32() {
         do {
             if (c == CharacterIterator::DONE && i >= 5)
                 errln("Iterator reached start prematurely");
-            else if(iter.hasPrevious() == FALSE && i > 5)
+            else if(iter.hasPrevious() == false && i > 5)
                 errln("Iterator reached start prematurely");
             else if (c != text.char32At(i))
                 errln("Character mismatch at position %d, iterator has %X, string has %X", i, c, text.char32At(i));
@@ -814,13 +814,13 @@ void CharIterTest::TestUCharIterator(UCharIterator *iter, CharacterIterator &ci,
             break;
 
         case '2':
-            h=h2=FALSE;
+            h=h2=false;
             c=(UChar32)iter->move(iter, 2, UITER_CURRENT);
             c2=(UChar32)ci.move(2, CharacterIterator::kCurrent);
             break;
 
         case '8':
-            h=h2=FALSE;
+            h=h2=false;
             c=(UChar32)iter->move(iter, -2, UITER_CURRENT);
             c2=(UChar32)ci.move(-2, CharacterIterator::kCurrent);
             break;
diff --git a/icu4c/source/test/intltest/collationtest.cpp b/icu4c/source/test/intltest/collationtest.cpp
index 5cc45a5423d..671086e8ac4 100644
--- a/icu4c/source/test/intltest/collationtest.cpp
+++ b/icu4c/source/test/intltest/collationtest.cpp
@@ -171,7 +171,7 @@ void CollationTest::TestMinMax() {
 
     static const UChar s[2] = { 0xfffe, 0xffff };
     UVector64 ces(errorCode);
-    rbc->internalGetCEs(UnicodeString(FALSE, s, 2), ces, errorCode);
+    rbc->internalGetCEs(UnicodeString(false, s, 2), ces, errorCode);
     errorCode.assertSuccess();
     if(ces.size() != 2) {
         errln("expected 2 CEs for , got %d", (int)ces.size());
@@ -231,7 +231,7 @@ void CollationTest::TestImplicits() {
     const UnicodeSet *sets[] = { &coreHan, &otherHan, &unassigned };
     UChar32 prev = 0;
     uint32_t prevPrimary = 0;
-    UTF16CollationIterator ci(cd, FALSE, NULL, NULL, NULL);
+    UTF16CollationIterator ci(cd, false, NULL, NULL, NULL);
     for(int32_t i = 0; i < UPRV_LENGTHOF(sets); ++i) {
         LocalPointer iter(new UnicodeSetIterator(*sets[i]));
         while(iter->next()) {
@@ -272,8 +272,8 @@ void CollationTest::TestNulTerminated() {
 
     static const UChar s[] = { 0x61, 0x62, 0x61, 0x62, 0 };
 
-    UTF16CollationIterator ci1(data, FALSE, s, s, s + 2);
-    UTF16CollationIterator ci2(data, FALSE, s + 2, s + 2, NULL);
+    UTF16CollationIterator ci1(data, false, s, s, s + 2);
+    UTF16CollationIterator ci2(data, false, s + 2, s + 2, NULL);
     for(int32_t i = 0;; ++i) {
         int64_t ce1 = ci1.nextCE(errorCode);
         int64_t ce2 = ci2.nextCE(errorCode);
@@ -350,12 +350,12 @@ void CollationTest::TestShortFCDData() {
     diff.remove(0x10000, 0x10ffff);  // hasLccc() only works for the BMP
     UnicodeString empty("[]");
     UnicodeString diffString;
-    diff.toPattern(diffString, TRUE);
+    diff.toPattern(diffString, true);
     assertEquals("CollationFCD::hasLccc() expected-actual", empty, diffString);
     diff = lccc;
     diff.removeAll(expectedLccc);
-    diff.toPattern(diffString, TRUE);
-    assertEquals("CollationFCD::hasLccc() actual-expected", empty, diffString, TRUE);
+    diff.toPattern(diffString, true);
+    assertEquals("CollationFCD::hasLccc() actual-expected", empty, diffString, true);
 
     UnicodeSet expectedTccc("[:^tccc=0:]", errorCode);
     if (errorCode.isSuccess()) {
@@ -371,7 +371,7 @@ void CollationTest::TestShortFCDData() {
         assertEquals("CollationFCD::hasTccc() expected-actual", empty, diffString);
         diff = tccc;
         diff.removeAll(expectedTccc);
-        diff.toPattern(diffString, TRUE);
+        diff.toPattern(diffString, true);
         assertEquals("CollationFCD::hasTccc() actual-expected", empty, diffString);
     }
 }
@@ -477,7 +477,7 @@ void CollationTest::TestFCD() {
         0x4e00, 0xf71, 0xf80
     };
 
-    FCDUTF16CollationIterator u16ci(data, FALSE, s, s, NULL);
+    FCDUTF16CollationIterator u16ci(data, false, s, s, NULL);
     if(errorCode.errIfFailureAndReset("FCDUTF16CollationIterator constructor")) {
         return;
     }
@@ -487,7 +487,7 @@ void CollationTest::TestFCD() {
     cpi.resetToStart();
     std::string utf8;
     UnicodeString(s).toUTF8String(utf8);
-    FCDUTF8CollationIterator u8ci(data, FALSE,
+    FCDUTF8CollationIterator u8ci(data, false,
                                   reinterpret_cast(utf8.c_str()), 0, -1);
     if(errorCode.errIfFailureAndReset("FCDUTF8CollationIterator constructor")) {
         return;
@@ -497,7 +497,7 @@ void CollationTest::TestFCD() {
     cpi.resetToStart();
     UCharIterator iter;
     uiter_setString(&iter, s, UPRV_LENGTHOF(s) - 1);  // -1: without the terminating NUL
-    FCDUIterCollationIterator uici(data, FALSE, iter, 0);
+    FCDUIterCollationIterator uici(data, false, iter, 0);
     if(errorCode.errIfFailureAndReset("FCDUIterCollationIterator constructor")) {
         return;
     }
@@ -508,7 +508,7 @@ void CollationTest::checkAllocWeights(CollationWeights &cw,
                                       uint32_t lowerLimit, uint32_t upperLimit, int32_t n,
                                       int32_t someLength, int32_t minCount) {
     if(!cw.allocWeights(lowerLimit, upperLimit, n)) {
-        errln("CollationWeights::allocWeights(%lx, %lx, %ld) = FALSE",
+        errln("CollationWeights::allocWeights(%lx, %lx, %ld) = false",
               (long)lowerLimit, (long)upperLimit, (long)n);
         return;
     }
@@ -544,7 +544,7 @@ void CollationTest::TestCollationWeights() {
 
     // Non-compressible primaries use 254 second bytes 02..FF.
     logln("CollationWeights.initForPrimary(non-compressible)");
-    cw.initForPrimary(FALSE);
+    cw.initForPrimary(false);
     // Expect 1 weight 11 and 254 weights 12xx.
     checkAllocWeights(cw, 0x10000000, 0x13000000, 255, 1, 1);
     checkAllocWeights(cw, 0x10000000, 0x13000000, 255, 2, 254);
@@ -565,7 +565,7 @@ void CollationTest::TestCollationWeights() {
 
     // Compressible primaries use 251 second bytes 04..FE.
     logln("CollationWeights.initForPrimary(compressible)");
-    cw.initForPrimary(TRUE);
+    cw.initForPrimary(true);
     // Expect 1 weight 11 and 251 weights 12xx.
     checkAllocWeights(cw, 0x10000000, 0x13000000, 252, 1, 1);
     checkAllocWeights(cw, 0x10000000, 0x13000000, 252, 2, 251);
@@ -606,34 +606,34 @@ UBool isValidCE(const CollationRootElements &re, const CollationData &data,
     uint32_t q = ctq & Collation::QUATERNARY_MASK;
     // No leading zero bytes.
     if((p != 0 && p1 == 0) || (s != 0 && s1 == 0) || (t != 0 && t1 == 0)) {
-        return FALSE;
+        return false;
     }
     // No intermediate zero bytes.
     if(p1 != 0 && p2 == 0 && (p & 0xffff) != 0) {
-        return FALSE;
+        return false;
     }
     if(p2 != 0 && p3 == 0 && p4 != 0) {
-        return FALSE;
+        return false;
     }
     // Minimum & maximum lead bytes.
     if((p1 != 0 && p1 <= Collation::MERGE_SEPARATOR_BYTE) ||
             s1 == Collation::LEVEL_SEPARATOR_BYTE ||
             t1 == Collation::LEVEL_SEPARATOR_BYTE || t1 > 0x3f) {
-        return FALSE;
+        return false;
     }
     if(c > 2) {
-        return FALSE;
+        return false;
     }
     // The valid byte range for the second primary byte depends on compressibility.
     if(p2 != 0) {
         if(data.isCompressibleLeadByte(p1)) {
             if(p2 <= Collation::PRIMARY_COMPRESSION_LOW_BYTE ||
                     Collation::PRIMARY_COMPRESSION_HIGH_BYTE <= p2) {
-                return FALSE;
+                return false;
             }
         } else {
             if(p2 <= Collation::LEVEL_SEPARATOR_BYTE) {
-                return FALSE;
+                return false;
             }
         }
     }
@@ -642,7 +642,7 @@ UBool isValidCE(const CollationRootElements &re, const CollationData &data,
     U_ASSERT(Collation::LEVEL_SEPARATOR_BYTE == 1);
     if(p3 == Collation::LEVEL_SEPARATOR_BYTE || p4 == Collation::LEVEL_SEPARATOR_BYTE ||
             s2 == Collation::LEVEL_SEPARATOR_BYTE || t2 == Collation::LEVEL_SEPARATOR_BYTE) {
-        return FALSE;
+        return false;
     }
     // Well-formed CEs.
     if(p == 0) {
@@ -651,31 +651,31 @@ UBool isValidCE(const CollationRootElements &re, const CollationData &data,
                 // Completely ignorable CE.
                 // Quaternary CEs are not supported.
                 if(c != 0 || q != 0) {
-                    return FALSE;
+                    return false;
                 }
             } else {
                 // Tertiary CE.
                 if(t < re.getTertiaryBoundary() || c != 2) {
-                    return FALSE;
+                    return false;
                 }
             }
         } else {
             // Secondary CE.
             if(s < re.getSecondaryBoundary() || t == 0 || t >= re.getTertiaryBoundary()) {
-                return FALSE;
+                return false;
             }
         }
     } else {
         // Primary CE.
         if(s == 0 || (Collation::COMMON_WEIGHT16 < s && s <= re.getLastCommonSecondary()) ||
                 s >= re.getSecondaryBoundary()) {
-            return FALSE;
+            return false;
         }
         if(t == 0 || t >= re.getTertiaryBoundary()) {
-            return FALSE;
+            return false;
         }
     }
-    return TRUE;
+    return true;
 }
 
 UBool isValidCE(const CollationRootElements &re, const CollationData &data, int64_t ce) {
@@ -693,13 +693,13 @@ public:
               index((int32_t)elements[CollationRootElements::IX_FIRST_TERTIARY_INDEX]) {}
 
     UBool next() {
-        if(index >= length) { return FALSE; }
+        if(index >= length) { return false; }
         uint32_t p = elements[index];
-        if(p == CollationRootElements::PRIMARY_SENTINEL) { return FALSE; }
+        if(p == CollationRootElements::PRIMARY_SENTINEL) { return false; }
         if((p & CollationRootElements::SEC_TER_DELTA_FLAG) != 0) {
             ++index;
             secTer = p & ~CollationRootElements::SEC_TER_DELTA_FLAG;
-            return TRUE;
+            return true;
         }
         if((p & CollationRootElements::PRIMARY_STEP_MASK) != 0) {
             // End of a range, enumerate the primaries in the range.
@@ -718,7 +718,7 @@ public:
             } else {
                 pri = Collation::incThreeBytePrimaryByOffset(pri, isCompressible, step);
             }
-            return TRUE;
+            return true;
         }
         // Simple primary CE.
         ++index;
@@ -743,7 +743,7 @@ public:
                 }
             }
         }
-        return TRUE;
+        return true;
     }
 
     uint32_t getPrimary() const { return pri; }
@@ -777,8 +777,8 @@ void CollationTest::TestRootElements() {
     CollationWeights cw2;
     CollationWeights cw3;
 
-    cw1c.initForPrimary(TRUE);
-    cw1u.initForPrimary(FALSE);
+    cw1c.initForPrimary(true);
+    cw1u.initForPrimary(false);
     cw2.initForSecondary();
     cw3.initForTertiary();
 
@@ -889,7 +889,7 @@ void CollationTest::TestTailoredElements() {
     do {
         Locale locale(localeID);
         LocalPointer types(
-                Collator::getKeywordValuesForLocale("collation", locale, FALSE, errorCode));
+                Collator::getKeywordValuesForLocale("collation", locale, false, errorCode));
         errorCode.assertSuccess();
         const char *type;  // first: default type
         while((type = types->next(NULL, errorCode)) != NULL) {
@@ -975,7 +975,7 @@ UBool CollationTest::readNonEmptyLine(UCHARBUF *f, IcuTestErrorCode &errorCode)
         const UChar *line = ucbuf_readline(f, &lineLength, errorCode);
         if(line == NULL || errorCode.isFailure()) {
             fileLine.remove();
-            return FALSE;
+            return false;
         }
         ++fileLineNumber;
         // Strip trailing CR/LF, comments, and spaces.
@@ -987,8 +987,8 @@ UBool CollationTest::readNonEmptyLine(UCHARBUF *f, IcuTestErrorCode &errorCode)
         }
         while(lineLength > 0 && isSpace(line[lineLength - 1])) { --lineLength; }
         if(lineLength != 0) {
-            fileLine.setTo(FALSE, line, lineLength);
-            return TRUE;
+            fileLine.setTo(false, line, lineLength);
+            return true;
         }
         // Empty line, continue.
     }
@@ -1313,7 +1313,7 @@ void CollationTest::setLocaleCollator(IcuTestErrorCode &errorCode) {
 }
 
 UBool CollationTest::needsNormalization(const UnicodeString &s, UErrorCode &errorCode) const {
-    if(U_FAILURE(errorCode) || !fcd->isNormalized(s, errorCode)) { return TRUE; }
+    if(U_FAILURE(errorCode) || !fcd->isNormalized(s, errorCode)) { return true; }
     // In some sequences with Tibetan composite vowel signs,
     // even if the string passes the FCD check,
     // those composites must be decomposed.
@@ -1322,16 +1322,16 @@ UBool CollationTest::needsNormalization(const UnicodeString &s, UErrorCode &erro
     while((index = s.indexOf((UChar)0xf71, index)) >= 0) {
         if(++index < s.length()) {
             UChar c = s[index];
-            if(c == 0xf73 || c == 0xf75 || c == 0xf81) { return TRUE; }
+            if(c == 0xf73 || c == 0xf75 || c == 0xf81) { return true; }
         }
     }
-    return FALSE;
+    return false;
 }
 
 UBool CollationTest::getSortKeyParts(const UChar *s, int32_t length,
                                      CharString &dest, int32_t partSize,
                                      IcuTestErrorCode &errorCode) {
-    if(errorCode.isFailure()) { return FALSE; }
+    if(errorCode.isFailure()) { return false; }
     uint8_t part[32];
     U_ASSERT(partSize <= UPRV_LENGTHOF(part));
     UCharIterator iter;
@@ -1354,14 +1354,14 @@ UBool CollationTest::getSortKeyParts(const UChar *s, int32_t length,
 UBool CollationTest::getCollationKey(const char *norm, const UnicodeString &line,
                                      const UChar *s, int32_t length,
                                      CollationKey &key, IcuTestErrorCode &errorCode) {
-    if(errorCode.isFailure()) { return FALSE; }
+    if(errorCode.isFailure()) { return false; }
     coll->getCollationKey(s, length, key, errorCode);
     if(errorCode.isFailure()) {
         infoln(fileTestName);
         errln("Collator(%s).getCollationKey() failed: %s",
               norm, errorCode.errorName());
         infoln(line);
-        return FALSE;
+        return false;
     }
     int32_t keyLength;
     const uint8_t *keyBytes = key.getByteArray(keyLength);
@@ -1371,7 +1371,7 @@ UBool CollationTest::getCollationKey(const char *norm, const UnicodeString &line
               norm);
         infoln(line);
         infoln(printCollationKey(key));
-        return FALSE;
+        return false;
     }
 
     int32_t numLevels = coll->getAttribute(UCOL_STRENGTH, errorCode);
@@ -1392,7 +1392,7 @@ UBool CollationTest::getCollationKey(const char *norm, const UnicodeString &line
             errln("Collator(%s).getCollationKey() contains a 00 byte", norm);
             infoln(line);
             infoln(printCollationKey(key));
-            return FALSE;
+            return false;
         }
         if(b == 1) { ++numLevelSeparators; }
     }
@@ -1402,7 +1402,7 @@ UBool CollationTest::getCollationKey(const char *norm, const UnicodeString &line
               norm, (int)numLevelSeparators, (int)numLevels);
         infoln(line);
         infoln(printCollationKey(key));
-        return FALSE;
+        return false;
     }
 
     // Check that internalNextSortKeyPart() makes the same key, with several part sizes.
@@ -1415,7 +1415,7 @@ UBool CollationTest::getCollationKey(const char *norm, const UnicodeString &line
             errln("Collator(%s).internalNextSortKeyPart(%d) failed: %s",
                   norm, (int)partSize, errorCode.errorName());
             infoln(line);
-            return FALSE;
+            return false;
         }
         if(keyLength != parts.length() || uprv_memcmp(keyBytes, parts.data(), keyLength) != 0) {
             infoln(fileTestName);
@@ -1424,20 +1424,20 @@ UBool CollationTest::getCollationKey(const char *norm, const UnicodeString &line
             infoln(line);
             infoln(printCollationKey(key));
             infoln(printSortKey(reinterpret_cast(parts.data()), parts.length()));
-            return FALSE;
+            return false;
         }
     }
-    return TRUE;
+    return true;
 }
 
 /**
  * Changes the key to the merged segments of the U+FFFE-separated substrings of s.
  * Leaves key unchanged if s does not contain U+FFFE.
- * @return TRUE if the key was successfully changed
+ * @return true if the key was successfully changed
  */
 UBool CollationTest::getMergedCollationKey(const UChar *s, int32_t length,
                                            CollationKey &key, IcuTestErrorCode &errorCode) {
-    if(errorCode.isFailure()) { return FALSE; }
+    if(errorCode.isFailure()) { return false; }
     LocalMemory mergedKey;
     int32_t mergedKeyLength = 0;
     int32_t mergedKeyCapacity = 0;
@@ -1447,7 +1447,7 @@ UBool CollationTest::getMergedCollationKey(const UChar *s, int32_t length,
         if(i == sLength) {
             if(segmentStart == 0) {
                 // s does not contain any U+FFFE.
-                return FALSE;
+                return false;
             }
         } else if(s[i] != 0xfffe) {
             ++i;
@@ -1489,7 +1489,7 @@ UBool CollationTest::getMergedCollationKey(const UChar *s, int32_t length,
         segmentStart = ++i;
     }
     key = CollationKey(mergedKey.getAlias(), mergedKeyLength);
-    return TRUE;
+    return true;
 }
 
 namespace {
@@ -1548,16 +1548,16 @@ UBool CollationTest::checkCompareTwo(const char *norm, const UnicodeString &prev
                                      const UnicodeString &prevString, const UnicodeString &s,
                                      UCollationResult expectedOrder, Collation::Level expectedLevel,
                                      IcuTestErrorCode &errorCode) {
-    if(errorCode.isFailure()) { return FALSE; }
+    if(errorCode.isFailure()) { return false; }
 
     // Get the sort keys first, for error debug output.
     CollationKey prevKey;
     if(!getCollationKey(norm, prevFileLine, prevString.getBuffer(), prevString.length(),
                         prevKey, errorCode)) {
-        return FALSE;
+        return false;
     }
     CollationKey key;
-    if(!getCollationKey(norm, fileLine, s.getBuffer(), s.length(), key, errorCode)) { return FALSE; }
+    if(!getCollationKey(norm, fileLine, s.getBuffer(), s.length(), key, errorCode)) { return false; }
 
     UCollationResult order = coll->compare(prevString, s, errorCode);
     if(order != expectedOrder || errorCode.isFailure()) {
@@ -1568,7 +1568,7 @@ UBool CollationTest::checkCompareTwo(const char *norm, const UnicodeString &prev
         infoln(fileLine);
         infoln(printCollationKey(prevKey));
         infoln(printCollationKey(key));
-        return FALSE;
+        return false;
     }
     order = coll->compare(s, prevString, errorCode);
     if(order != -expectedOrder || errorCode.isFailure()) {
@@ -1579,7 +1579,7 @@ UBool CollationTest::checkCompareTwo(const char *norm, const UnicodeString &prev
         infoln(fileLine);
         infoln(printCollationKey(prevKey));
         infoln(printCollationKey(key));
-        return FALSE;
+        return false;
     }
     // Test NUL-termination if the strings do not contain NUL characters.
     UBool containNUL = prevString.indexOf((UChar)0) >= 0 || s.indexOf((UChar)0) >= 0;
@@ -1593,7 +1593,7 @@ UBool CollationTest::checkCompareTwo(const char *norm, const UnicodeString &prev
             infoln(fileLine);
             infoln(printCollationKey(prevKey));
             infoln(printCollationKey(key));
-            return FALSE;
+            return false;
         }
         order = coll->compare(s.getBuffer(), -1, prevString.getBuffer(), -1, errorCode);
         if(order != -expectedOrder || errorCode.isFailure()) {
@@ -1604,7 +1604,7 @@ UBool CollationTest::checkCompareTwo(const char *norm, const UnicodeString &prev
             infoln(fileLine);
             infoln(printCollationKey(prevKey));
             infoln(printCollationKey(key));
-            return FALSE;
+            return false;
         }
     }
 
@@ -1634,7 +1634,7 @@ UBool CollationTest::checkCompareTwo(const char *norm, const UnicodeString &prev
         infoln(fileLine);
         infoln(printCollationKey(prevKey));
         infoln(printCollationKey(key));
-        return FALSE;
+        return false;
     }
     order = coll->compareUTF8(sUTF8, prevUTF8, errorCode);
     if(order != -expectedUTF8Order || errorCode.isFailure()) {
@@ -1645,7 +1645,7 @@ UBool CollationTest::checkCompareTwo(const char *norm, const UnicodeString &prev
         infoln(fileLine);
         infoln(printCollationKey(prevKey));
         infoln(printCollationKey(key));
-        return FALSE;
+        return false;
     }
     // Test NUL-termination if the strings do not contain NUL characters.
     if(!containNUL) {
@@ -1658,7 +1658,7 @@ UBool CollationTest::checkCompareTwo(const char *norm, const UnicodeString &prev
             infoln(fileLine);
             infoln(printCollationKey(prevKey));
             infoln(printCollationKey(key));
-            return FALSE;
+            return false;
         }
         order = coll->internalCompareUTF8(sUTF8.c_str(), -1, prevUTF8.c_str(), -1, errorCode);
         if(order != -expectedUTF8Order || errorCode.isFailure()) {
@@ -1669,7 +1669,7 @@ UBool CollationTest::checkCompareTwo(const char *norm, const UnicodeString &prev
             infoln(fileLine);
             infoln(printCollationKey(prevKey));
             infoln(printCollationKey(key));
-            return FALSE;
+            return false;
         }
     }
 
@@ -1687,7 +1687,7 @@ UBool CollationTest::checkCompareTwo(const char *norm, const UnicodeString &prev
         infoln(fileLine);
         infoln(printCollationKey(prevKey));
         infoln(printCollationKey(key));
-        return FALSE;
+        return false;
     }
 
     order = prevKey.compareTo(key, errorCode);
@@ -1699,7 +1699,7 @@ UBool CollationTest::checkCompareTwo(const char *norm, const UnicodeString &prev
         infoln(fileLine);
         infoln(printCollationKey(prevKey));
         infoln(printCollationKey(key));
-        return FALSE;
+        return false;
     }
     UBool collHasCaseLevel = coll->getAttribute(UCOL_CASE_LEVEL, errorCode) == UCOL_ON;
     int32_t level = getDifferenceLevel(prevKey, key, order, collHasCaseLevel);
@@ -1712,7 +1712,7 @@ UBool CollationTest::checkCompareTwo(const char *norm, const UnicodeString &prev
             infoln(fileLine);
             infoln(printCollationKey(prevKey));
             infoln(printCollationKey(key));
-            return FALSE;
+            return false;
         }
     }
 
@@ -1737,7 +1737,7 @@ UBool CollationTest::checkCompareTwo(const char *norm, const UnicodeString &prev
             infoln(fileLine);
             infoln(printCollationKey(prevKey));
             infoln(printCollationKey(key));
-            return FALSE;
+            return false;
         }
         int32_t mergedLevel = getDifferenceLevel(prevKey, key, order, collHasCaseLevel);
         if(order != UCOL_EQUAL && expectedLevel != Collation::NO_LEVEL) {
@@ -1750,11 +1750,11 @@ UBool CollationTest::checkCompareTwo(const char *norm, const UnicodeString &prev
                 infoln(fileLine);
                 infoln(printCollationKey(prevKey));
                 infoln(printCollationKey(key));
-                return FALSE;
+                return false;
             }
         }
     }
-    return TRUE;
+    return true;
 }
 
 void CollationTest::checkCompareStrings(UCHARBUF *f, IcuTestErrorCode &errorCode) {
@@ -1779,7 +1779,7 @@ void CollationTest::checkCompareStrings(UCHARBUF *f, IcuTestErrorCode &errorCode
         UCollationResult expectedOrder = (relation == Collation::ZERO_LEVEL) ? UCOL_EQUAL : UCOL_LESS;
         Collation::Level expectedLevel = relation;
         s.getTerminatedBuffer();  // Ensure NUL-termination.
-        UBool isOk = TRUE;
+        UBool isOk = true;
         if(!needsNormalization(prevString, errorCode) && !needsNormalization(s, errorCode)) {
             coll->setAttribute(UCOL_NORMALIZATION_MODE, UCOL_OFF, errorCode);
             isOk = checkCompareTwo("normalization=on", prevFileLine, prevString, s,
@@ -1820,7 +1820,7 @@ void CollationTest::TestDataDriven() {
     CharString path(getSourceTestData(errorCode), errorCode);
     path.appendPathPart("collationtest.txt", errorCode);
     const char *codePage = "UTF-8";
-    LocalUCHARBUFPointer f(ucbuf_open(path.data(), &codePage, TRUE, FALSE, errorCode));
+    LocalUCHARBUFPointer f(ucbuf_open(path.data(), &codePage, true, false, errorCode));
     if(errorCode.errIfFailureAndReset("ucbuf_open(collationtest.txt)")) {
         return;
     }
diff --git a/icu4c/source/test/intltest/colldata.cpp b/icu4c/source/test/intltest/colldata.cpp
index a06f871b1bb..3841e7b3ed1 100644
--- a/icu4c/source/test/intltest/colldata.cpp
+++ b/icu4c/source/test/intltest/colldata.cpp
@@ -149,16 +149,16 @@ uint32_t &CEList::operator[](int32_t index) const
 UBool CEList::matchesAt(int32_t offset, const CEList *other) const
 {
     if (other == NULL || listSize - offset < other->size()) {
-        return FALSE;
+        return false;
     }
 
     for (int32_t i = offset, j = 0; j < other->size(); i += 1, j += 1) {
         if (ces[i] != (*other)[j]) {
-            return FALSE;
+            return false;
         }
     }
 
-    return TRUE;
+    return true;
 }
 
 int32_t CEList::size() const
@@ -350,7 +350,7 @@ CollData::CollData(UCollator *collator, UErrorCode &status)
     coll = collator;
 #endif
 
-    ucol_getContractionsAndExpansions(coll, contractions, expansions, FALSE, &status);
+    ucol_getContractionsAndExpansions(coll, contractions, expansions, false, &status);
 
     uset_addAll(charsToTest, contractions);
     uset_addAll(charsToTest, expansions);
@@ -428,7 +428,7 @@ bail:
     // Maybe use [:HST=T:] and look for the end of the last range?
     // Maybe use script boundary mappings instead of this code??
     UChar  jamoRanges[] = {Hangul::JAMO_L_BASE, Hangul::JAMO_V_BASE, Hangul::JAMO_T_BASE + 1, 0x11FF};
-     UnicodeString jamoString(FALSE, jamoRanges, UPRV_LENGTHOF(jamoRanges));
+     UnicodeString jamoString(false, jamoRanges, UPRV_LENGTHOF(jamoRanges));
      CEList hanList(coll, hanString, status);
      CEList jamoList(coll, jamoString, status);
      int32_t j = 0;
diff --git a/icu4c/source/test/intltest/colldata.h b/icu4c/source/test/intltest/colldata.h
index d78425c70ec..c31fa436587 100644
--- a/icu4c/source/test/intltest/colldata.h
+++ b/icu4c/source/test/intltest/colldata.h
@@ -97,7 +97,7 @@ public:
      * @param offset - the offset of the suffix
      * @param other - the other CEList
      *
-     * @return TRUE if the CEs match, FALSE otherwise.
+     * @return true if the CEs match, false otherwise.
      */
     UBool matchesAt(int32_t offset, const CEList *other) const; 
 
diff --git a/icu4c/source/test/intltest/convtest.cpp b/icu4c/source/test/intltest/convtest.cpp
index ee421deb5b5..5ca063485a2 100644
--- a/icu4c/source/test/intltest/convtest.cpp
+++ b/icu4c/source/test/intltest/convtest.cpp
@@ -442,7 +442,7 @@ ConversionTest::TestGetUnicodeSet() {
                 // are there items that must be in cnvSet but are not?
                 (diffSet=mapSet).removeAll(cnvSet);
                 if(!diffSet.isEmpty()) {
-                    diffSet.toPattern(s, TRUE);
+                    diffSet.toPattern(s, true);
                     if(s.length()>100) {
                         s.replace(100, 0x7fffffff, ellipsis, UPRV_LENGTHOF(ellipsis));
                     }
@@ -454,7 +454,7 @@ ConversionTest::TestGetUnicodeSet() {
                 // are there items that must not be in cnvSet but are?
                 (diffSet=mapnotSet).retainAll(cnvSet);
                 if(!diffSet.isEmpty()) {
-                    diffSet.toPattern(s, TRUE);
+                    diffSet.toPattern(s, true);
                     if(s.length()>100) {
                         s.replace(100, 0x7fffffff, ellipsis, UPRV_LENGTHOF(ellipsis));
                     }
@@ -570,7 +570,7 @@ ConversionTest::TestGetUnicodeSet2() {
         UConverterUnicodeSet which;
         for(which=UCNV_ROUNDTRIP_SET; which100) {
                         out.replace(100, 0x7fffffff, ellipsis, UPRV_LENGTHOF(ellipsis));
                     }
@@ -629,7 +629,7 @@ ConversionTest::TestGetUnicodeSet2() {
                 // are there items that must not be in the set but are?
                 (diffSet=set).removeAll(expected);
                 if(!diffSet.isEmpty()) {
-                    diffSet.toPattern(out, TRUE);
+                    diffSet.toPattern(out, true);
                     if(out.length()>100) {
                         out.replace(100, 0x7fffffff, ellipsis, UPRV_LENGTHOF(ellipsis));
                     }
@@ -740,7 +740,7 @@ ConversionTest::TestUTF8ToUTF8Overflow() {
     ucnv_convertEx(cnv2.getAlias(), cnv1.getAlias(),
                    &target, result + 2, &source, sourceLimit,
                    buffer16, &pivotSource, &pivotTarget, pivotLimit,
-                   FALSE, FALSE, errorCode);
+                   false, false, errorCode);
     assertEquals("overflow", U_BUFFER_OVERFLOW_ERROR, errorCode.reset());
     length = (int32_t)(target - result);
     assertEquals("number of bytes written", 2, length);
@@ -750,7 +750,7 @@ ConversionTest::TestUTF8ToUTF8Overflow() {
     ucnv_convertEx(cnv2.getAlias(), cnv1.getAlias(),
                    &target, targetLimit, &source, sourceLimit,
                    buffer16, &pivotSource, &pivotTarget, pivotLimit,
-                   FALSE, TRUE, errorCode);
+                   false, true, errorCode);
 
     assertSuccess("UTF-8->UTF-8", errorCode);
     length = (int32_t)(target - result);
@@ -773,7 +773,7 @@ ConversionTest::TestUTF8ToUTF8Overflow() {
     ucnv_convertEx(cnv2.getAlias(), cnv1.getAlias(),
                    &target, result + 3, &source, sourceLimit,
                    buffer16, &pivotSource, &pivotTarget, pivotLimit,
-                   FALSE, FALSE, errorCode);
+                   false, false, errorCode);
     assertEquals("text2 overflow", U_BUFFER_OVERFLOW_ERROR, errorCode.reset());
     length = (int32_t)(target - result);
     assertEquals("text2 number of bytes written", 3, length);
@@ -783,7 +783,7 @@ ConversionTest::TestUTF8ToUTF8Overflow() {
     ucnv_convertEx(cnv2.getAlias(), cnv1.getAlias(),
                    &target, targetLimit, &source, sourceLimit,
                    buffer16, &pivotSource, &pivotTarget, pivotLimit,
-                   FALSE, TRUE, errorCode);
+                   false, true, errorCode);
 
     assertSuccess("text2 UTF-8->UTF-8", errorCode);
     length = (int32_t)(target - result);
@@ -810,7 +810,7 @@ ConversionTest::TestUTF8ToUTF8Overflow() {
     ucnv_convertEx(cnv2.getAlias(), cnv1.getAlias(),
                    &target, targetLimit, &source, source + 2,
                    buffer16, &pivotSource, &pivotTarget, pivotLimit,
-                   FALSE, TRUE, errorCode);
+                   false, true, errorCode);
     assertEquals("illFormed truncated", U_TRUNCATED_CHAR_FOUND, errorCode.reset());
     length = (int32_t)(target - result);
     assertEquals("illFormed number of bytes written", 0, length);
@@ -826,7 +826,7 @@ ConversionTest::TestUTF8ToUTF8Overflow() {
     ucnv_convertEx(cnv2.getAlias(), cnv1.getAlias(),
                    &target, targetLimit, &source, sourceLimit,
                    buffer16, &pivotSource, &pivotTarget, pivotLimit,
-                   FALSE, TRUE, errorCode);
+                   false, true, errorCode);
 
     assertEquals("illFormed trail byte", U_ILLEGAL_CHAR_FOUND, errorCode.reset());
     length = (int32_t)(target - result);
@@ -875,7 +875,7 @@ ConversionTest::TestUTF8ToUTF8Streaming() {
     ucnv_convertEx(cnv2.getAlias(), cnv1.getAlias(),
         &target, result + targetLen, &source, sourceLimit,
         buffer16, &pivotSource, &pivotTarget, pivotLimit,
-        FALSE, FALSE, errorCode);
+        false, false, errorCode);
 
     length = (int32_t)(target - result);
     targetLen -= length;
@@ -888,7 +888,7 @@ ConversionTest::TestUTF8ToUTF8Streaming() {
     ucnv_convertEx(cnv2.getAlias(), cnv1.getAlias(),
         &target, targetLimit, &source, sourceLimit,
         buffer16, &pivotSource, &pivotTarget, pivotLimit,
-        FALSE, TRUE, errorCode);
+        false, true, errorCode);
 
     length = (int32_t)(target - result - length);
     targetLen -= length;
@@ -1034,7 +1034,7 @@ stepToUnicode(ConversionCase &cc, UConverter *cnv,
             // start with empty partial buffers
             sourceLimit=source;
             targetLimit=target;
-            flush=FALSE;
+            flush=false;
 
             // output offsets only for bulk conversion
             resultOffsets=NULL;
@@ -1183,7 +1183,7 @@ stepToUnicode(ConversionCase &cc, UConverter *cnv,
                         break;
                     }
 
-                    // we are done (flush==TRUE) but we continue, to get the index out of bounds error above
+                    // we are done (flush==true) but we continue, to get the index out of bounds error above
                 }
 
                 --step;
@@ -1204,7 +1204,7 @@ ConversionTest::ToUnicodeCase(ConversionCase &cc, UConverterToUCallback callback
         errcheckln(errorCode, "toUnicode[%d](%s cb=\"%s\" fb=%d flush=%d) ucnv_open() failed - %s",
                 cc.caseNr, cc.charset, cc.cbopt, cc.fallbacks, cc.finalFlush, errorCode.errorName());
         errorCode.reset();
-        return FALSE;
+        return false;
     }
 
     // set the callback
@@ -1213,7 +1213,7 @@ ConversionTest::ToUnicodeCase(ConversionCase &cc, UConverterToUCallback callback
         if(U_FAILURE(errorCode)) {
             errln("toUnicode[%d](%s cb=\"%s\" fb=%d flush=%d) ucnv_setToUCallBack() failed - %s",
                     cc.caseNr, cc.charset, cc.cbopt, cc.fallbacks, cc.finalFlush, u_errorName(errorCode));
-            return FALSE;
+            return false;
         }
     }
 
@@ -1240,7 +1240,7 @@ ConversionTest::ToUnicodeCase(ConversionCase &cc, UConverterToUCallback callback
     };
     int32_t i, step;
 
-    ok=TRUE;
+    ok=true;
     for(i=0; isourceLimit || target>targetLimit) {
@@ -1545,7 +1545,7 @@ stepFromUnicode(ConversionCase &cc, UConverter *cnv,
         // start with empty partial buffers
         sourceLimit=source;
         targetLimit=target;
-        flush=FALSE;
+        flush=false;
 
         // output offsets only for bulk conversion
         resultOffsets=NULL;
@@ -1614,7 +1614,7 @@ ConversionTest::FromUnicodeCase(ConversionCase &cc, UConverterFromUCallback call
     if(U_FAILURE(errorCode)) {
         errcheckln(errorCode, "fromUnicode[%d](%s cb=\"%s\" fb=%d flush=%d) ucnv_open() failed - %s",
                 cc.caseNr, cc.charset, cc.cbopt, cc.fallbacks, cc.finalFlush, u_errorName(errorCode));
-        return FALSE;
+        return false;
     }
     ucnv_resetToUnicode(utf8Cnv);
 
@@ -1625,7 +1625,7 @@ ConversionTest::FromUnicodeCase(ConversionCase &cc, UConverterFromUCallback call
             errln("fromUnicode[%d](%s cb=\"%s\" fb=%d flush=%d) ucnv_setFromUCallBack() failed - %s",
                     cc.caseNr, cc.charset, cc.cbopt, cc.fallbacks, cc.finalFlush, u_errorName(errorCode));
             ucnv_close(cnv);
-            return FALSE;
+            return false;
         }
     }
 
@@ -1643,7 +1643,7 @@ ConversionTest::FromUnicodeCase(ConversionCase &cc, UConverterFromUCallback call
             errln("fromUnicode[%d](%s cb=\"%s\" fb=%d flush=%d) ucnv_setSubstChars() failed - %s",
                     cc.caseNr, cc.charset, cc.cbopt, cc.fallbacks, cc.finalFlush, u_errorName(errorCode));
             ucnv_close(cnv);
-            return FALSE;
+            return false;
         }
     } else if(cc.setSub<0) {
         ucnv_setSubstString(cnv, cc.subString, -1, &errorCode);
@@ -1651,7 +1651,7 @@ ConversionTest::FromUnicodeCase(ConversionCase &cc, UConverterFromUCallback call
             errln("fromUnicode[%d](%s cb=\"%s\" fb=%d flush=%d) ucnv_setSubstString() failed - %s",
                     cc.caseNr, cc.charset, cc.cbopt, cc.fallbacks, cc.finalFlush, u_errorName(errorCode));
             ucnv_close(cnv);
-            return FALSE;
+            return false;
         }
     }
 
@@ -1684,7 +1684,7 @@ ConversionTest::FromUnicodeCase(ConversionCase &cc, UConverterFromUCallback call
     };
     int32_t i, step;
 
-    ok=TRUE;
+    ok=true;
     for(i=0; ihandleTransliterate(rsource2, index, FALSE);
-        expectAux(ct1->getID() + ":String, index(0,0,0), incremental=FALSE", rsource2 + "->" + rsource2, rsource2==expectedResult, expectedResult);
+        ct1->handleTransliterate(rsource2, index, false);
+        expectAux(ct1->getID() + ":String, index(0,0,0), incremental=false", rsource2 + "->" + rsource2, rsource2==expectedResult, expectedResult);
         UTransPosition _index = {1,3,2,3};
         uprv_memcpy(&index, &_index, sizeof(index));
         UnicodeString rsource3(s);
-        ct1->handleTransliterate(rsource3, index, TRUE); 
-        expectAux(ct1->getID() + ":String, index(1,2,3), incremental=TRUE", rsource3 + "->" + rsource3, rsource3==expectedResult, expectedResult);
+        ct1->handleTransliterate(rsource3, index, true); 
+        expectAux(ct1->getID() + ":String, index(1,2,3), incremental=true", rsource3 + "->" + rsource3, rsource3==expectedResult, expectedResult);
 #endif
     }
     delete ct1;
diff --git a/icu4c/source/test/intltest/csdetest.cpp b/icu4c/source/test/intltest/csdetest.cpp
index 95f19d43d1a..dc5e7a8699b 100644
--- a/icu4c/source/test/intltest/csdetest.cpp
+++ b/icu4c/source/test/intltest/csdetest.cpp
@@ -287,13 +287,13 @@ void CharsetDetectionTest::ConstructionTest()
 
     while ((activeName = uenum_next(eActive.getAlias(), NULL, status))) {
         // the charset must be included in all list
-        UBool found = FALSE;
+        UBool found = false;
 
         const char *name = NULL;
         uenum_reset(e.getAlias(), status);
         while ((name = uenum_next(e.getAlias(), NULL, status))) {
             if (strcmp(activeName, name) == 0) {
-                found = TRUE;
+                found = true;
                 break;
             }
         }
@@ -303,10 +303,10 @@ void CharsetDetectionTest::ConstructionTest()
         }
 
         // some charsets are disabled by default
-        found = FALSE;
+        found = false;
         for (int32_t i = 0; defDisabled[i] != 0; i++) {
             if (strcmp(activeName, defDisabled[i]) == 0) {
-                found = TRUE;
+                found = true;
                 break;
             }
         }
@@ -419,10 +419,10 @@ void CharsetDetectionTest::InputFilterTest()
     const UCharsetMatch *match;
     const char *lang, *name;
 
-    ucsdet_enableInputFilter(csd, TRUE);
+    ucsdet_enableInputFilter(csd, true);
 
     if (!ucsdet_isInputFilterEnabled(csd)) {
-        errln("ucsdet_enableInputFilter(csd, TRUE) did not enable input filter!");
+        errln("ucsdet_enableInputFilter(csd, true) did not enable input filter!");
     }
 
 
@@ -447,7 +447,7 @@ void CharsetDetectionTest::InputFilterTest()
     }
 
 turn_off:
-    ucsdet_enableInputFilter(csd, FALSE);
+    ucsdet_enableInputFilter(csd, false);
     ucsdet_setText(csd, bytes, byteLength, &status);
     match = ucsdet_detect(csd, &status);
 
@@ -554,7 +554,7 @@ void CharsetDetectionTest::DetectionTest()
         if (testCase->getTagName().compare(test_case) == 0) {
             const UnicodeString *id = testCase->getAttribute(id_attr);
             const UnicodeString *encodings = testCase->getAttribute(enc_attr);
-            const UnicodeString  text = testCase->getText(TRUE);
+            const UnicodeString  text = testCase->getText(true);
             int32_t encodingCount;
             UnicodeString *encodingList = split(*encodings, CH_SPACE, encodingCount);
 
@@ -626,10 +626,10 @@ void CharsetDetectionTest::IBM424Test()
     char *bytes_r = extractBytes(s2, "IBM424", brLength);
     
     UCharsetDetector *csd = ucsdet_open(&status);
-	ucsdet_setDetectableCharset(csd, "IBM424_rtl", TRUE, &status);
-	ucsdet_setDetectableCharset(csd, "IBM424_ltr", TRUE, &status);
-	ucsdet_setDetectableCharset(csd, "IBM420_rtl", TRUE, &status);
-	ucsdet_setDetectableCharset(csd, "IBM420_ltr", TRUE, &status);
+	ucsdet_setDetectableCharset(csd, "IBM424_rtl", true, &status);
+	ucsdet_setDetectableCharset(csd, "IBM424_ltr", true, &status);
+	ucsdet_setDetectableCharset(csd, "IBM420_rtl", true, &status);
+	ucsdet_setDetectableCharset(csd, "IBM420_ltr", true, &status);
     if (U_FAILURE(status)) {
         errln("Error opening charset detector. - %s", u_errorName(status));
     }
@@ -719,10 +719,10 @@ void CharsetDetectionTest::IBM420Test()
     if (U_FAILURE(status)) {
         errln("Error opening charset detector. - %s", u_errorName(status));
     }
-	ucsdet_setDetectableCharset(csd, "IBM424_rtl", TRUE, &status);
-	ucsdet_setDetectableCharset(csd, "IBM424_ltr", TRUE, &status);
-	ucsdet_setDetectableCharset(csd, "IBM420_rtl", TRUE, &status);
-	ucsdet_setDetectableCharset(csd, "IBM420_ltr", TRUE, &status);
+	ucsdet_setDetectableCharset(csd, "IBM424_rtl", true, &status);
+	ucsdet_setDetectableCharset(csd, "IBM424_ltr", true, &status);
+	ucsdet_setDetectableCharset(csd, "IBM420_rtl", true, &status);
+	ucsdet_setDetectableCharset(csd, "IBM420_ltr", true, &status);
     const UCharsetMatch *match;
     const char *name;
 
diff --git a/icu4c/source/test/intltest/dadrcal.cpp b/icu4c/source/test/intltest/dadrcal.cpp
index c74f387714d..6ac6630767f 100644
--- a/icu4c/source/test/intltest/dadrcal.cpp
+++ b/icu4c/source/test/intltest/dadrcal.cpp
@@ -73,7 +73,7 @@ void DataDrivenCalendarTest::runIndexedTest(int32_t index, UBool exec,
 void DataDrivenCalendarTest::testOps(TestData *testData,
         const DataMap * /*settings*/) {
     UErrorCode status = U_ZERO_ERROR;
-    UBool useDate = FALSE; // TODO
+    UBool useDate = false; // TODO
     UnicodeString kMILLIS("MILLIS="); // TODO: static
     UDate fromDate = 0; // TODO
     UDate toDate = 0;
@@ -136,7 +136,7 @@ void DataDrivenCalendarTest::testOps(TestData *testData,
                 
         if(from.startsWith(kMILLIS)){
         	UnicodeString millis = UnicodeString(from, kMILLIS.length());
-        	useDate = TRUE;
+        	useDate = true;
         	fromDate = udbg_stod(millis);
         } else if(fromSet.parseFrom(testSetting, status)<0 || U_FAILURE(status)){
         	errln(caseString+": Failed to parse '"+param+"' parameter: "
@@ -187,7 +187,7 @@ void DataDrivenCalendarTest::testOps(TestData *testData,
         }
         if(to.startsWith(kMILLIS)){
         	UnicodeString millis = UnicodeString(to, kMILLIS.length());
-            useDate = TRUE;
+            useDate = true;
             toDate = udbg_stod(millis);
         } else if(toSet.parseFrom(testSetting, &fromSet, status)<0 || U_FAILURE(status)){
             errln(caseString+": Failed to parse '"+param+"' parameter: "
diff --git a/icu4c/source/test/intltest/dadrfmt.cpp b/icu4c/source/test/intltest/dadrfmt.cpp
index bff134a2662..e59e45997aa 100644
--- a/icu4c/source/test/intltest/dadrfmt.cpp
+++ b/icu4c/source/test/intltest/dadrfmt.cpp
@@ -115,11 +115,11 @@ void DataDrivenFormatTest::testConvertDate(TestData *testData,
         char calLoc[256] = "";
         DateTimeStyleSet styleSet;
         UnicodeString pattern;
-        UBool usePattern = FALSE;
+        UBool usePattern = false;
         (void)usePattern;   // Suppress unused warning.
         CalendarFieldsSet fromSet;
         UDate fromDate = 0;
-        UBool useDate = FALSE;
+        UBool useDate = false;
         
         UDate now = Calendar::getNow();
         
@@ -163,7 +163,7 @@ void DataDrivenFormatTest::testConvertDate(TestData *testData,
         Locale loc(calLoc);
         if(spec.startsWith(kPATTERN)) {
             pattern = UnicodeString(spec,kPATTERN.length());
-            usePattern = TRUE;
+            usePattern = true;
             format = new SimpleDateFormat(pattern, loc, status);
             if(U_FAILURE(status)) {
                 errln("case %d: could not create SimpleDateFormat from pattern: %s", n, u_errorName(status));
@@ -196,11 +196,11 @@ void DataDrivenFormatTest::testConvertDate(TestData *testData,
         // parse 'date'
         if(date.startsWith(kMILLIS)) {
             UnicodeString millis = UnicodeString(date, kMILLIS.length());
-            useDate = TRUE;
+            useDate = true;
             fromDate = udbg_stod(millis);
         } else if(date.startsWith(kRELATIVE_MILLIS)) {
             UnicodeString millis = UnicodeString(date, kRELATIVE_MILLIS.length());
-            useDate = TRUE;
+            useDate = true;
             fromDate = udbg_stod(millis) + now;
         } else if(date.startsWith(kRELATIVE_ADD)) {
             UnicodeString add = UnicodeString(date, kRELATIVE_ADD.length());  // "add" is a string indicating which fields to add
@@ -208,7 +208,7 @@ void DataDrivenFormatTest::testConvertDate(TestData *testData,
                 errln("case %d: could not parse date as RELATIVE_ADD calendar fields: %s", n, u_errorName(status));
                 continue;
             }
-            useDate=TRUE;
+            useDate=true;
             cal->clear();
             cal->setTime(now, status);
             for (int q=0; q 0 && isCROrLF(line[lineLength - 1])) { --lineLength; }
-    fFileLine.setTo(FALSE, line, lineLength);
+    fFileLine.setTo(false, line, lineLength);
     while(lineLength > 0 && isSpace(line[lineLength - 1])) { --lineLength; }
     if (lineLength == 0) {
         fFileLine.remove();
     }
-    return TRUE;
+    return true;
 }
 
 UBool DataDrivenNumberFormatTestSuite::isPass(
@@ -211,9 +211,9 @@ UBool DataDrivenNumberFormatTestSuite::isPass(
         UnicodeString &appendErrorMessage,
         UErrorCode &status) {
     if (U_FAILURE(status)) {
-        return FALSE;
+        return false;
     }
-    UBool result = FALSE;
+    UBool result = false;
     if (tuple.formatFlag && tuple.outputFlag) {
         ++fFormatTestNumber;
         result = isFormatPass(
@@ -254,9 +254,9 @@ UBool DataDrivenNumberFormatTestSuite::isFormatPass(
         UnicodeString & /*appendErrorMessage*/,
         UErrorCode &status) {
     if (U_FAILURE(status)) {
-        return FALSE;
+        return false;
     }
-    return TRUE;
+    return true;
 }
     
 UBool DataDrivenNumberFormatTestSuite::isFormatPass(
@@ -277,9 +277,9 @@ UBool DataDrivenNumberFormatTestSuite::isToPatternPass(
         UnicodeString & /*appendErrorMessage*/,
         UErrorCode &status) {
     if (U_FAILURE(status)) {
-        return FALSE;
+        return false;
     }
-    return TRUE;
+    return true;
 }
 
 UBool DataDrivenNumberFormatTestSuite::isParsePass(
@@ -287,9 +287,9 @@ UBool DataDrivenNumberFormatTestSuite::isParsePass(
         UnicodeString & /*appendErrorMessage*/,
         UErrorCode &status) {
     if (U_FAILURE(status)) {
-        return FALSE;
+        return false;
     }
-    return TRUE;
+    return true;
 }
 
 UBool DataDrivenNumberFormatTestSuite::isParseCurrencyPass(
@@ -297,9 +297,9 @@ UBool DataDrivenNumberFormatTestSuite::isParseCurrencyPass(
         UnicodeString & /*appendErrorMessage*/,
         UErrorCode &status) {
     if (U_FAILURE(status)) {
-        return FALSE;
+        return false;
     }
-    return TRUE;
+    return true;
 }
 
 UBool DataDrivenNumberFormatTestSuite::isSelectPass(
@@ -307,8 +307,8 @@ UBool DataDrivenNumberFormatTestSuite::isSelectPass(
         UnicodeString & /*appendErrorMessage*/,
         UErrorCode &status) {
     if (U_FAILURE(status)) {
-        return FALSE;
+        return false;
     }
-    return TRUE;
+    return true;
 }
 #endif /* !UCONFIG_NO_FORMATTING */
diff --git a/icu4c/source/test/intltest/datadrivennumberformattestsuite.h b/icu4c/source/test/intltest/datadrivennumberformattestsuite.h
index 623ddad1a9e..b2b1281932e 100644
--- a/icu4c/source/test/intltest/datadrivennumberformattestsuite.h
+++ b/icu4c/source/test/intltest/datadrivennumberformattestsuite.h
@@ -39,7 +39,7 @@ class DataDrivenNumberFormatTestSuite : public IntlTest {
       *
       * @param fileName is the name of the file in the source/test/testdata.
       *  This should be just a filename such as "numberformattest.txt"
-      * @param runAllTests If TRUE, runs every test in fileName. if FALSE,
+      * @param runAllTests If true, runs every test in fileName. if false,
       *  skips the tests that are known to break for ICU4C.
       */
      void run(const char *fileName, UBool runAllTests);
@@ -53,7 +53,7 @@ class DataDrivenNumberFormatTestSuite : public IntlTest {
      * @param appendErrorMessage any message describing failures appended
      *   here.
      * @param status any error returned here.
-     * @return TRUE if test passed or FALSE if test failed.
+     * @return true if test passed or false if test failed.
      */
     virtual UBool isFormatPass(
             const NumberFormatTestTuple &tuple,
@@ -74,7 +74,7 @@ class DataDrivenNumberFormatTestSuite : public IntlTest {
      * @param appendErrorMessage any message describing failures appended
      *   here.
      * @param status any error returned here.
-     * @return TRUE if test passed or FALSE if test failed.
+     * @return true if test passed or false if test failed.
      */
     virtual UBool isFormatPass(
             const NumberFormatTestTuple &tuple,
diff --git a/icu4c/source/test/intltest/dcfmapts.cpp b/icu4c/source/test/intltest/dcfmapts.cpp
index 1dde7c3ec9d..db97c7fe778 100644
--- a/icu4c/source/test/intltest/dcfmapts.cpp
+++ b/icu4c/source/test/intltest/dcfmapts.cpp
@@ -127,7 +127,7 @@ void IntlTestDecimalFormatAPI::testAPI(/*char *par*/)
     status = U_ZERO_ERROR;
     DecimalFormat noGrouping("###0.##", status);
     assertEquals("Grouping size should be 0 for no grouping.", 0, noGrouping.getGroupingSize());
-    noGrouping.setGroupingUsed(TRUE);
+    noGrouping.setGroupingUsed(true);
     assertEquals("Grouping size should still be 0.", 0, noGrouping.getGroupingSize());
     // end bug 10864
 
@@ -137,7 +137,7 @@ void IntlTestDecimalFormatAPI::testAPI(/*char *par*/)
         DecimalFormat df("0", {"en", status}, status);
         UnicodeString result;
         assertEquals("pat 0: ", 0, df.getGroupingSize());
-        assertEquals("pat 0: ", (UBool) FALSE, (UBool) df.isGroupingUsed());
+        assertEquals("pat 0: ", (UBool) false, (UBool) df.isGroupingUsed());
         df.setGroupingUsed(false);
         assertEquals("pat 0 then disabled: ", 0, df.getGroupingSize());
         assertEquals("pat 0 then disabled: ", u"1111", df.format(1111, result.remove()));
@@ -149,7 +149,7 @@ void IntlTestDecimalFormatAPI::testAPI(/*char *par*/)
         DecimalFormat df("#,##0", {"en", status}, status);
         UnicodeString result;
         assertEquals("pat #,##0: ", 3, df.getGroupingSize());
-        assertEquals("pat #,##0: ", (UBool) TRUE, (UBool) df.isGroupingUsed());
+        assertEquals("pat #,##0: ", (UBool) true, (UBool) df.isGroupingUsed());
         df.setGroupingUsed(false);
         assertEquals("pat #,##0 then disabled: ", 3, df.getGroupingSize());
         assertEquals("pat #,##0 then disabled: ", u"1111", df.format(1111, result.remove()));
@@ -333,25 +333,25 @@ void IntlTestDecimalFormatAPI::testAPI(/*char *par*/)
         errln((UnicodeString)"ERROR: setGroupingSize() failed");
     }
 
-    pat.setDecimalSeparatorAlwaysShown(TRUE);
+    pat.setDecimalSeparatorAlwaysShown(true);
     UBool tf = pat.isDecimalSeparatorAlwaysShown();
-    logln((UnicodeString)"DecimalSeparatorIsAlwaysShown (should be TRUE) is " + (UnicodeString) (tf ? "TRUE" : "FALSE"));
-    if(tf != TRUE) {
+    logln((UnicodeString)"DecimalSeparatorIsAlwaysShown (should be true) is " + (UnicodeString) (tf ? "true" : "false"));
+    if(tf != true) {
         errln((UnicodeString)"ERROR: setDecimalSeparatorAlwaysShown() failed");
     }
     // Added by Ken Liu testing set/isExponentSignAlwaysShown
-    pat.setExponentSignAlwaysShown(TRUE);
+    pat.setExponentSignAlwaysShown(true);
     UBool esas = pat.isExponentSignAlwaysShown();
-    logln((UnicodeString)"ExponentSignAlwaysShown (should be TRUE) is " + (UnicodeString) (esas ? "TRUE" : "FALSE"));
-    if(esas != TRUE) {
+    logln((UnicodeString)"ExponentSignAlwaysShown (should be true) is " + (UnicodeString) (esas ? "true" : "false"));
+    if(esas != true) {
         errln((UnicodeString)"ERROR: ExponentSignAlwaysShown() failed");
     }
 
     // Added by Ken Liu testing set/isScientificNotation
-    pat.setScientificNotation(TRUE);
+    pat.setScientificNotation(true);
     UBool sn = pat.isScientificNotation();
-    logln((UnicodeString)"isScientificNotation (should be TRUE) is " + (UnicodeString) (sn ? "TRUE" : "FALSE"));
-    if(sn != TRUE) {
+    logln((UnicodeString)"isScientificNotation (should be true) is " + (UnicodeString) (sn ? "true" : "false"));
+    if(sn != true) {
         errln((UnicodeString)"ERROR: setScientificNotation() failed");
     }
 
@@ -532,14 +532,14 @@ void IntlTestDecimalFormatAPI::testRounding(/*char *par*/)
         //for +2.55 with RoundingIncrement=1.0
         pat.setRoundingIncrement(1.0);
         pat.format(Roundingnumber, resultStr);
-        message= (UnicodeString)"round(" + (double)Roundingnumber + UnicodeString(",") + mode + UnicodeString(",FALSE) with RoundingIncrement=1.0==>");
+        message= (UnicodeString)"round(" + (double)Roundingnumber + UnicodeString(",") + mode + UnicodeString(",false) with RoundingIncrement=1.0==>");
         verify(message, resultStr, result[i++]);
         message.remove();
         resultStr.remove();
 
         //for -2.55 with RoundingIncrement=1.0
         pat.format(Roundingnumber1, resultStr);
-        message= (UnicodeString)"round(" + (double)Roundingnumber1 + UnicodeString(",") + mode + UnicodeString(",FALSE) with RoundingIncrement=1.0==>");
+        message= (UnicodeString)"round(" + (double)Roundingnumber1 + UnicodeString(",") + mode + UnicodeString(",false) with RoundingIncrement=1.0==>");
         verify(message, resultStr, result[i++]);
         message.remove();
         resultStr.remove();
@@ -654,11 +654,11 @@ void IntlTestDecimalFormatAPI::TestScale()
     auto rhs = (actual); \
     char tmp[200]; \
     sprintf(tmp, "(%g==%g)", (double)lhs, (double)rhs); \
-    assertTrue(tmp, (lhs==rhs), FALSE, TRUE, __FILE__, __LINE__); \
+    assertTrue(tmp, (lhs==rhs), false, true, __FILE__, __LINE__); \
 } UPRV_BLOCK_MACRO_END
 
 #if defined(_MSC_VER)
-// Ignore the noisy warning 4805 (comparisons between int and bool) in the function below as we use the ICU TRUE/FALSE macros
+// Ignore the noisy warning 4805 (comparisons between int and bool) in the function below as we use the ICU true/false macros
 // which are int values, whereas some of the DecimalQuantity methods return C++ bools.
 #pragma warning(push)
 #pragma warning(disable: 4805)
@@ -676,13 +676,13 @@ void IntlTestDecimalFormatAPI::TestFixedDecimal() {
     assertSuccess(WHERE, status);
     ASSERT_EQUAL(44, fd.getPluralOperand(PLURAL_OPERAND_N));
     ASSERT_EQUAL(0, fd.getPluralOperand(PLURAL_OPERAND_V));
-    ASSERT_EQUAL(FALSE, fd.isNegative());
+    ASSERT_EQUAL(false, fd.isNegative());
 
     df->formatToDecimalQuantity(-44, fd, status);
     assertSuccess(WHERE, status);
     ASSERT_EQUAL(44, fd.getPluralOperand(PLURAL_OPERAND_N));
     ASSERT_EQUAL(0, fd.getPluralOperand(PLURAL_OPERAND_V));
-    ASSERT_EQUAL(TRUE, fd.isNegative());
+    ASSERT_EQUAL(true, fd.isNegative());
 
     df.adoptInsteadAndCheckErrorCode(new DecimalFormat("###.00##", status), status);
     assertSuccess(WHERE, status);
@@ -693,8 +693,8 @@ void IntlTestDecimalFormatAPI::TestFixedDecimal() {
     ASSERT_EQUAL(456, fd.getPluralOperand(PLURAL_OPERAND_T)); // t
     ASSERT_EQUAL(123, fd.getPluralOperand(PLURAL_OPERAND_I)); // i
     ASSERT_EQUAL(123.456, fd.getPluralOperand(PLURAL_OPERAND_N)); // n
-    ASSERT_EQUAL(FALSE, fd.hasIntegerValue());
-    ASSERT_EQUAL(FALSE, fd.isNegative());
+    ASSERT_EQUAL(false, fd.hasIntegerValue());
+    ASSERT_EQUAL(false, fd.isNegative());
 
     df->formatToDecimalQuantity(-123.456, fd, status);
     assertSuccess(WHERE, status);
@@ -703,8 +703,8 @@ void IntlTestDecimalFormatAPI::TestFixedDecimal() {
     ASSERT_EQUAL(456, fd.getPluralOperand(PLURAL_OPERAND_T)); // t
     ASSERT_EQUAL(123, fd.getPluralOperand(PLURAL_OPERAND_I)); // i
     ASSERT_EQUAL(123.456, fd.getPluralOperand(PLURAL_OPERAND_N)); // n
-    ASSERT_EQUAL(FALSE, fd.hasIntegerValue());
-    ASSERT_EQUAL(TRUE, fd.isNegative());
+    ASSERT_EQUAL(false, fd.hasIntegerValue());
+    ASSERT_EQUAL(true, fd.isNegative());
 
     // test max int digits
     df->setMaximumIntegerDigits(2);
@@ -715,8 +715,8 @@ void IntlTestDecimalFormatAPI::TestFixedDecimal() {
     ASSERT_EQUAL(456, fd.getPluralOperand(PLURAL_OPERAND_T)); // t
     ASSERT_EQUAL(23, fd.getPluralOperand(PLURAL_OPERAND_I)); // i
     ASSERT_EQUAL(23.456, fd.getPluralOperand(PLURAL_OPERAND_N)); // n
-    ASSERT_EQUAL(FALSE, fd.hasIntegerValue());
-    ASSERT_EQUAL(FALSE, fd.isNegative());
+    ASSERT_EQUAL(false, fd.hasIntegerValue());
+    ASSERT_EQUAL(false, fd.isNegative());
 
     df->formatToDecimalQuantity(-123.456, fd, status);
     assertSuccess(WHERE, status);
@@ -725,8 +725,8 @@ void IntlTestDecimalFormatAPI::TestFixedDecimal() {
     ASSERT_EQUAL(456, fd.getPluralOperand(PLURAL_OPERAND_T)); // t
     ASSERT_EQUAL(23, fd.getPluralOperand(PLURAL_OPERAND_I)); // i
     ASSERT_EQUAL(23.456, fd.getPluralOperand(PLURAL_OPERAND_N)); // n
-    ASSERT_EQUAL(FALSE, fd.hasIntegerValue());
-    ASSERT_EQUAL(TRUE, fd.isNegative());
+    ASSERT_EQUAL(false, fd.hasIntegerValue());
+    ASSERT_EQUAL(true, fd.isNegative());
 
     // test max fraction digits
     df->setMaximumIntegerDigits(2000000000);
@@ -738,8 +738,8 @@ void IntlTestDecimalFormatAPI::TestFixedDecimal() {
     ASSERT_EQUAL(46, fd.getPluralOperand(PLURAL_OPERAND_T)); // t
     ASSERT_EQUAL(123, fd.getPluralOperand(PLURAL_OPERAND_I)); // i
     ASSERT_EQUAL(123.46, fd.getPluralOperand(PLURAL_OPERAND_N)); // n
-    ASSERT_EQUAL(FALSE, fd.hasIntegerValue());
-    ASSERT_EQUAL(FALSE, fd.isNegative());
+    ASSERT_EQUAL(false, fd.hasIntegerValue());
+    ASSERT_EQUAL(false, fd.isNegative());
 
     df->formatToDecimalQuantity(-123.456, fd, status);
     assertSuccess(WHERE, status);
@@ -748,8 +748,8 @@ void IntlTestDecimalFormatAPI::TestFixedDecimal() {
     ASSERT_EQUAL(46, fd.getPluralOperand(PLURAL_OPERAND_T)); // t
     ASSERT_EQUAL(123, fd.getPluralOperand(PLURAL_OPERAND_I)); // i
     ASSERT_EQUAL(123.46, fd.getPluralOperand(PLURAL_OPERAND_N)); // n
-    ASSERT_EQUAL(FALSE, fd.hasIntegerValue());
-    ASSERT_EQUAL(TRUE, fd.isNegative());
+    ASSERT_EQUAL(false, fd.hasIntegerValue());
+    ASSERT_EQUAL(true, fd.isNegative());
 
     // test esoteric rounding
     df->setMaximumFractionDigits(6);
@@ -762,8 +762,8 @@ void IntlTestDecimalFormatAPI::TestFixedDecimal() {
     ASSERT_EQUAL(2, fd.getPluralOperand(PLURAL_OPERAND_T)); // t
     ASSERT_EQUAL(29, fd.getPluralOperand(PLURAL_OPERAND_I)); // i
     ASSERT_EQUAL(29.2, fd.getPluralOperand(PLURAL_OPERAND_N)); // n
-    ASSERT_EQUAL(FALSE, fd.hasIntegerValue());
-    ASSERT_EQUAL(FALSE, fd.isNegative());
+    ASSERT_EQUAL(false, fd.hasIntegerValue());
+    ASSERT_EQUAL(false, fd.isNegative());
 
     df->formatToDecimalQuantity(-30.0, fd, status);
     assertSuccess(WHERE, status);
@@ -772,8 +772,8 @@ void IntlTestDecimalFormatAPI::TestFixedDecimal() {
     ASSERT_EQUAL(2, fd.getPluralOperand(PLURAL_OPERAND_T)); // t
     ASSERT_EQUAL(29, fd.getPluralOperand(PLURAL_OPERAND_I)); // i
     ASSERT_EQUAL(29.2, fd.getPluralOperand(PLURAL_OPERAND_N)); // n
-    ASSERT_EQUAL(FALSE, fd.hasIntegerValue());
-    ASSERT_EQUAL(TRUE, fd.isNegative());
+    ASSERT_EQUAL(false, fd.hasIntegerValue());
+    ASSERT_EQUAL(true, fd.isNegative());
 
     df.adoptInsteadAndCheckErrorCode(new DecimalFormat("###", status), status);
     assertSuccess(WHERE, status);
@@ -783,8 +783,8 @@ void IntlTestDecimalFormatAPI::TestFixedDecimal() {
     ASSERT_EQUAL(0, fd.getPluralOperand(PLURAL_OPERAND_F));
     ASSERT_EQUAL(0, fd.getPluralOperand(PLURAL_OPERAND_T));
     ASSERT_EQUAL(123, fd.getPluralOperand(PLURAL_OPERAND_I));
-    ASSERT_EQUAL(TRUE, fd.hasIntegerValue());
-    ASSERT_EQUAL(FALSE, fd.isNegative());
+    ASSERT_EQUAL(true, fd.hasIntegerValue());
+    ASSERT_EQUAL(false, fd.isNegative());
 
     df.adoptInsteadAndCheckErrorCode(new DecimalFormat("###.0", status), status);
     assertSuccess(WHERE, status);
@@ -794,8 +794,8 @@ void IntlTestDecimalFormatAPI::TestFixedDecimal() {
     ASSERT_EQUAL(0, fd.getPluralOperand(PLURAL_OPERAND_F));
     ASSERT_EQUAL(0, fd.getPluralOperand(PLURAL_OPERAND_T));
     ASSERT_EQUAL(123, fd.getPluralOperand(PLURAL_OPERAND_I));
-    ASSERT_EQUAL(TRUE, fd.hasIntegerValue());
-    ASSERT_EQUAL(FALSE, fd.isNegative());
+    ASSERT_EQUAL(true, fd.hasIntegerValue());
+    ASSERT_EQUAL(false, fd.isNegative());
 
     df.adoptInsteadAndCheckErrorCode(new DecimalFormat("###.0", status), status);
     assertSuccess(WHERE, status);
@@ -805,8 +805,8 @@ void IntlTestDecimalFormatAPI::TestFixedDecimal() {
     ASSERT_EQUAL(1, fd.getPluralOperand(PLURAL_OPERAND_F));
     ASSERT_EQUAL(1, fd.getPluralOperand(PLURAL_OPERAND_T));
     ASSERT_EQUAL(123, fd.getPluralOperand(PLURAL_OPERAND_I));
-    ASSERT_EQUAL(FALSE, fd.hasIntegerValue());
-    ASSERT_EQUAL(FALSE, fd.isNegative());
+    ASSERT_EQUAL(false, fd.hasIntegerValue());
+    ASSERT_EQUAL(false, fd.isNegative());
 
     df.adoptInsteadAndCheckErrorCode(new DecimalFormat("@@@@@", status), status);  // Significant Digits
     assertSuccess(WHERE, status);
@@ -816,8 +816,8 @@ void IntlTestDecimalFormatAPI::TestFixedDecimal() {
     ASSERT_EQUAL(0, fd.getPluralOperand(PLURAL_OPERAND_F));
     ASSERT_EQUAL(0, fd.getPluralOperand(PLURAL_OPERAND_T));
     ASSERT_EQUAL(123, fd.getPluralOperand(PLURAL_OPERAND_I));
-    ASSERT_EQUAL(TRUE, fd.hasIntegerValue());
-    ASSERT_EQUAL(FALSE, fd.isNegative());
+    ASSERT_EQUAL(true, fd.hasIntegerValue());
+    ASSERT_EQUAL(false, fd.isNegative());
 
     df.adoptInsteadAndCheckErrorCode(new DecimalFormat("@@@@@", status), status);  // Significant Digits
     assertSuccess(WHERE, status);
@@ -827,16 +827,16 @@ void IntlTestDecimalFormatAPI::TestFixedDecimal() {
     ASSERT_EQUAL(2300, fd.getPluralOperand(PLURAL_OPERAND_F));
     ASSERT_EQUAL(23, fd.getPluralOperand(PLURAL_OPERAND_T));
     ASSERT_EQUAL(1, fd.getPluralOperand(PLURAL_OPERAND_I));
-    ASSERT_EQUAL(FALSE, fd.hasIntegerValue());
-    ASSERT_EQUAL(FALSE, fd.isNegative());
+    ASSERT_EQUAL(false, fd.hasIntegerValue());
+    ASSERT_EQUAL(false, fd.isNegative());
 
     df->formatToDecimalQuantity(uprv_getInfinity(), fd, status);
     assertSuccess(WHERE, status);
-    ASSERT_EQUAL(TRUE, fd.isNaN() || fd.isInfinite());
+    ASSERT_EQUAL(true, fd.isNaN() || fd.isInfinite());
     df->formatToDecimalQuantity(0.0, fd, status);
-    ASSERT_EQUAL(FALSE, fd.isNaN() || fd.isInfinite());
+    ASSERT_EQUAL(false, fd.isNaN() || fd.isInfinite());
     df->formatToDecimalQuantity(uprv_getNaN(), fd, status);
-    ASSERT_EQUAL(TRUE, fd.isNaN() || fd.isInfinite());
+    ASSERT_EQUAL(true, fd.isNaN() || fd.isInfinite());
     assertSuccess(WHERE, status);
 
     // Test Big Decimal input.
@@ -853,8 +853,8 @@ void IntlTestDecimalFormatAPI::TestFixedDecimal() {
     ASSERT_EQUAL(34, fd.getPluralOperand(PLURAL_OPERAND_F));
     ASSERT_EQUAL(34, fd.getPluralOperand(PLURAL_OPERAND_T));
     ASSERT_EQUAL(12, fd.getPluralOperand(PLURAL_OPERAND_I));
-    ASSERT_EQUAL(FALSE, fd.hasIntegerValue());
-    ASSERT_EQUAL(FALSE, fd.isNegative());
+    ASSERT_EQUAL(false, fd.hasIntegerValue());
+    ASSERT_EQUAL(false, fd.isNegative());
 
     fable.setDecimalNumber("12.3456789012345678900123456789", status);
     assertSuccess(WHERE, status);
@@ -864,8 +864,8 @@ void IntlTestDecimalFormatAPI::TestFixedDecimal() {
     ASSERT_EQUAL(3456789012345678900LL, fd.getPluralOperand(PLURAL_OPERAND_F));
     ASSERT_EQUAL(34567890123456789LL, fd.getPluralOperand(PLURAL_OPERAND_T));
     ASSERT_EQUAL(12, fd.getPluralOperand(PLURAL_OPERAND_I));
-    ASSERT_EQUAL(FALSE, fd.hasIntegerValue());
-    ASSERT_EQUAL(FALSE, fd.isNegative());
+    ASSERT_EQUAL(false, fd.hasIntegerValue());
+    ASSERT_EQUAL(false, fd.isNegative());
 
     // On field overflow, Integer part is truncated on the left, fraction part on the right.
     fable.setDecimalNumber("123456789012345678901234567890.123456789012345678901234567890", status);
@@ -876,8 +876,8 @@ void IntlTestDecimalFormatAPI::TestFixedDecimal() {
     ASSERT_EQUAL(1234567890123456789LL, fd.getPluralOperand(PLURAL_OPERAND_F));
     ASSERT_EQUAL(1234567890123456789LL, fd.getPluralOperand(PLURAL_OPERAND_T));
     ASSERT_EQUAL(345678901234567890LL, fd.getPluralOperand(PLURAL_OPERAND_I));
-    ASSERT_EQUAL(FALSE, fd.hasIntegerValue());
-    ASSERT_EQUAL(FALSE, fd.isNegative());
+    ASSERT_EQUAL(false, fd.hasIntegerValue());
+    ASSERT_EQUAL(false, fd.isNegative());
 
     // Digits way to the right of the decimal but within the format's precision aren't truncated
     fable.setDecimalNumber("1.0000000000000000000012", status);
@@ -888,8 +888,8 @@ void IntlTestDecimalFormatAPI::TestFixedDecimal() {
     ASSERT_EQUAL(12, fd.getPluralOperand(PLURAL_OPERAND_F));
     ASSERT_EQUAL(12, fd.getPluralOperand(PLURAL_OPERAND_T));
     ASSERT_EQUAL(1, fd.getPluralOperand(PLURAL_OPERAND_I));
-    ASSERT_EQUAL(FALSE, fd.hasIntegerValue());
-    ASSERT_EQUAL(FALSE, fd.isNegative());
+    ASSERT_EQUAL(false, fd.hasIntegerValue());
+    ASSERT_EQUAL(false, fd.isNegative());
 
     // Digits beyond the precision of the format are rounded away
     fable.setDecimalNumber("1.000000000000000000000012", status);
@@ -900,8 +900,8 @@ void IntlTestDecimalFormatAPI::TestFixedDecimal() {
     ASSERT_EQUAL(0, fd.getPluralOperand(PLURAL_OPERAND_F));
     ASSERT_EQUAL(0, fd.getPluralOperand(PLURAL_OPERAND_T));
     ASSERT_EQUAL(1, fd.getPluralOperand(PLURAL_OPERAND_I));
-    ASSERT_EQUAL(TRUE, fd.hasIntegerValue());
-    ASSERT_EQUAL(FALSE, fd.isNegative());
+    ASSERT_EQUAL(true, fd.hasIntegerValue());
+    ASSERT_EQUAL(false, fd.isNegative());
 
     // Negative numbers come through
     fable.setDecimalNumber("-1.0000000000000000000012", status);
@@ -912,8 +912,8 @@ void IntlTestDecimalFormatAPI::TestFixedDecimal() {
     ASSERT_EQUAL(12, fd.getPluralOperand(PLURAL_OPERAND_F));
     ASSERT_EQUAL(12, fd.getPluralOperand(PLURAL_OPERAND_T));
     ASSERT_EQUAL(1, fd.getPluralOperand(PLURAL_OPERAND_I));
-    ASSERT_EQUAL(FALSE, fd.hasIntegerValue());
-    ASSERT_EQUAL(TRUE, fd.isNegative());
+    ASSERT_EQUAL(false, fd.hasIntegerValue());
+    ASSERT_EQUAL(true, fd.isNegative());
 
     // MinFractionDigits from format larger than from number.
     fable.setDecimalNumber("1000000000000000000000.3", status);
@@ -924,8 +924,8 @@ void IntlTestDecimalFormatAPI::TestFixedDecimal() {
     ASSERT_EQUAL(30, fd.getPluralOperand(PLURAL_OPERAND_F));
     ASSERT_EQUAL(3, fd.getPluralOperand(PLURAL_OPERAND_T));
     ASSERT_EQUAL(0, fd.getPluralOperand(PLURAL_OPERAND_I));
-    ASSERT_EQUAL(FALSE, fd.hasIntegerValue());
-    ASSERT_EQUAL(FALSE, fd.isNegative());
+    ASSERT_EQUAL(false, fd.hasIntegerValue());
+    ASSERT_EQUAL(false, fd.isNegative());
 
     fable.setDecimalNumber("1000000000000000050000.3", status);
     assertSuccess(WHERE, status);
@@ -935,8 +935,8 @@ void IntlTestDecimalFormatAPI::TestFixedDecimal() {
     ASSERT_EQUAL(30, fd.getPluralOperand(PLURAL_OPERAND_F));
     ASSERT_EQUAL(3, fd.getPluralOperand(PLURAL_OPERAND_T));
     ASSERT_EQUAL(50000LL, fd.getPluralOperand(PLURAL_OPERAND_I));
-    ASSERT_EQUAL(FALSE, fd.hasIntegerValue());
-    ASSERT_EQUAL(FALSE, fd.isNegative());
+    ASSERT_EQUAL(false, fd.hasIntegerValue());
+    ASSERT_EQUAL(false, fd.isNegative());
 
     // Test some int64_t values that are out of the range of a double
     fable.setInt64(4503599627370496LL);
@@ -947,8 +947,8 @@ void IntlTestDecimalFormatAPI::TestFixedDecimal() {
     ASSERT_EQUAL(0, fd.getPluralOperand(PLURAL_OPERAND_F));
     ASSERT_EQUAL(0, fd.getPluralOperand(PLURAL_OPERAND_T));
     ASSERT_EQUAL(4503599627370496LL, fd.getPluralOperand(PLURAL_OPERAND_I));
-    ASSERT_EQUAL(TRUE, fd.hasIntegerValue());
-    ASSERT_EQUAL(FALSE, fd.isNegative());
+    ASSERT_EQUAL(true, fd.hasIntegerValue());
+    ASSERT_EQUAL(false, fd.isNegative());
 
     fable.setInt64(4503599627370497LL);
     assertSuccess(WHERE, status);
@@ -958,8 +958,8 @@ void IntlTestDecimalFormatAPI::TestFixedDecimal() {
     ASSERT_EQUAL(0, fd.getPluralOperand(PLURAL_OPERAND_F));
     ASSERT_EQUAL(0, fd.getPluralOperand(PLURAL_OPERAND_T));
     ASSERT_EQUAL(4503599627370497LL, fd.getPluralOperand(PLURAL_OPERAND_I));
-    ASSERT_EQUAL(TRUE, fd.hasIntegerValue());
-    ASSERT_EQUAL(FALSE, fd.isNegative());
+    ASSERT_EQUAL(true, fd.hasIntegerValue());
+    ASSERT_EQUAL(false, fd.isNegative());
 
     fable.setInt64(9223372036854775807LL);
     assertSuccess(WHERE, status);
@@ -971,8 +971,8 @@ void IntlTestDecimalFormatAPI::TestFixedDecimal() {
     // note: going through DigitList path to FixedDecimal, which is trimming
     //       int64_t fields to 18 digits. See ticket Ticket #10374
     ASSERT_EQUAL(223372036854775807LL, fd.getPluralOperand(PLURAL_OPERAND_I));
-    ASSERT_EQUAL(TRUE, fd.hasIntegerValue());
-    ASSERT_EQUAL(FALSE, fd.isNegative());
+    ASSERT_EQUAL(true, fd.hasIntegerValue());
+    ASSERT_EQUAL(false, fd.isNegative());
 
 }
 #if defined(_MSC_VER)
@@ -992,10 +992,10 @@ void IntlTestDecimalFormatAPI::TestBadFastpath() {
     UnicodeString fmt;
     fmt.remove();
     assertEquals("Format 1234", "1234", df->format((int32_t)1234, fmt));
-    df->setGroupingUsed(FALSE);
+    df->setGroupingUsed(false);
     fmt.remove();
     assertEquals("Format 1234", "1234", df->format((int32_t)1234, fmt));
-    df->setGroupingUsed(TRUE);
+    df->setGroupingUsed(true);
     df->setGroupingSize(3);
     fmt.remove();
     assertEquals("Format 1234 w/ grouping", "1,234", df->format((int32_t)1234, fmt));
@@ -1023,7 +1023,7 @@ void IntlTestDecimalFormatAPI::TestRequiredDecimalPoint() {
     if(U_FAILURE(status)) {
         errln((UnicodeString)"ERROR: parse() failed");
     }
-    df->setDecimalPatternMatchRequired(TRUE);
+    df->setDecimalPatternMatchRequired(true);
     df->parse(text, result1, status);
     if(U_SUCCESS(status)) {
         errln((UnicodeString)"ERROR: unexpected parse()");
@@ -1032,7 +1032,7 @@ void IntlTestDecimalFormatAPI::TestRequiredDecimalPoint() {
 
     status = U_ZERO_ERROR;
     df->applyPattern(pat2, status);
-    df->setDecimalPatternMatchRequired(FALSE);
+    df->setDecimalPatternMatchRequired(false);
     if(U_FAILURE(status)) {
         errln((UnicodeString)"ERROR: applyPattern(2) failed");
     }
@@ -1040,7 +1040,7 @@ void IntlTestDecimalFormatAPI::TestRequiredDecimalPoint() {
     if(U_FAILURE(status)) {
         errln((UnicodeString)"ERROR: parse(2) failed - " + u_errorName(status));
     }
-    df->setDecimalPatternMatchRequired(TRUE);
+    df->setDecimalPatternMatchRequired(true);
     df->parse(text, result1, status);
     if(U_SUCCESS(status)) {
         errln((UnicodeString)"ERROR: unexpected parse(2)");
diff --git a/icu4c/source/test/intltest/dcfmtest.cpp b/icu4c/source/test/intltest/dcfmtest.cpp
index 0734a44822f..9c114240395 100644
--- a/icu4c/source/test/intltest/dcfmtest.cpp
+++ b/icu4c/source/test/intltest/dcfmtest.cpp
@@ -88,7 +88,7 @@ void DecimalFormatTest::runIndexedTest( int32_t index, UBool exec, const char* &
 } UPRV_BLOCK_MACRO_END
 
 #define DF_ASSERT(expr) UPRV_BLOCK_MACRO_BEGIN { \
-    if ((expr)==FALSE) { \
+    if ((expr)==false) { \
         errln("DecimalFormatTest failure at line %d.\n", __LINE__); \
     } \
 } UPRV_BLOCK_MACRO_END
@@ -109,7 +109,7 @@ void DecimalFormatTest::runIndexedTest( int32_t index, UBool exec, const char* &
 } UPRV_BLOCK_MACRO_END
 
 #define DF_ASSERT_L(expr, line) UPRV_BLOCK_MACRO_BEGIN { \
-    if ((expr)==FALSE) { \
+    if ((expr)==false) { \
         errln("DecimalFormatTest failure at line %d, from %d.", __LINE__, (line)); \
         return; \
     } \
@@ -226,7 +226,7 @@ void DecimalFormatTest::DataDrivenTests() {
     //
     //  Put the test data into a UnicodeString
     //
-    UnicodeString testString(FALSE, testData, len);
+    UnicodeString testString(false, testData, len);
 
     RegexMatcher    parseLineMat(UnicodeString(
             "(?i)\\s*parse\\s+"
diff --git a/icu4c/source/test/intltest/dtfmrgts.cpp b/icu4c/source/test/intltest/dtfmrgts.cpp
index fe3d1df7cd1..70e7a94d20f 100644
--- a/icu4c/source/test/intltest/dtfmrgts.cpp
+++ b/icu4c/source/test/intltest/dtfmrgts.cpp
@@ -198,7 +198,7 @@ void DateFormatRegressionTest::Test4052408(void)
         (UnicodeString) "TIMEZONE_FIELD"
     };
 
-    UBool pass = TRUE;
+    UBool pass = true;
     for(int i = 0; i <= 17; ++i) {
         FieldPosition pos(i);
         UnicodeString buf;
@@ -216,7 +216,7 @@ void DateFormatRegressionTest::Test4052408(void)
             logln(" ok");
         else {
             errln(UnicodeString(" expected ") + exp);
-            pass = FALSE;
+            pass = false;
         }
         
     }
@@ -236,7 +236,7 @@ void DateFormatRegressionTest::Test4056591(void)
 
     //try {
         SimpleDateFormat *fmt = new SimpleDateFormat(UnicodeString("yyMMdd"), Locale::getUS(), status);
-        if (failure(status, "new SimpleDateFormat", TRUE)) {
+        if (failure(status, "new SimpleDateFormat", true)) {
             delete fmt;
             return;
         }
@@ -294,7 +294,7 @@ void DateFormatRegressionTest::Test4059917(void)
     UnicodeString myDate;
 
     SimpleDateFormat fmt(UnicodeString(u"yyyy/MM/dd"), status );
-    if (failure(status, "new SimpleDateFormat", TRUE)) return;
+    if (failure(status, "new SimpleDateFormat", true)) return;
     myDate = "1997/01/01";
     aux917( &fmt, myDate );
 
@@ -345,7 +345,7 @@ void DateFormatRegressionTest::Test4060212(void)
     logln("Using yyyy-DDD.hh:mm:ss");
     UErrorCode status = U_ZERO_ERROR;
     SimpleDateFormat formatter(UnicodeString("yyyy-DDD.hh:mm:ss"), status);
-    if (failure(status, "new SimpleDateFormat", TRUE)) return;
+    if (failure(status, "new SimpleDateFormat", true)) return;
     ParsePosition pos(0);
     UDate myDate = formatter.parse( dateString, pos );
     UnicodeString myString;
@@ -406,14 +406,14 @@ void DateFormatRegressionTest::Test4061287(void)
         errln("Fail: " + e);
         e.printStackTrace();
     }*/
-    df->setLenient(FALSE);
-    UBool ok = FALSE;
+    df->setLenient(false);
+    UBool ok = false;
     //try {
     logln(UnicodeString("") + df->parse("35/01/1971", status));
     if(U_FAILURE(status))
-        ok = TRUE;
+        ok = true;
     //logln(df.parse("35/01/1971").toString());
-    //} catch (ParseException e) {ok=TRUE;}
+    //} catch (ParseException e) {ok=true;}
     if(!ok) 
         errln("Fail: Lenient not working");
     delete df;
@@ -661,7 +661,7 @@ void DateFormatRegressionTest::Test4100302(void)
         Locale::US
         };
     //try {
-        UBool pass = TRUE;
+        UBool pass = true;
         for(int i = 0; i < 21; i++) {
 
             Format *format = DateFormat::createDateTimeInstance(DateFormat::FULL,
@@ -681,7 +681,7 @@ void DateFormatRegressionTest::Test4100302(void)
                 new ObjectInputStream(new ByteArrayInputStream(bytes));
         
             if (!format.equals(ois.readObject())) {
-                pass = FALSE;
+                pass = false;
                 logln("DateFormat instance for locale " +
                       locales[i] + " is incorrectly serialized/deserialized.");
             } else {
@@ -708,7 +708,7 @@ void DateFormatRegressionTest::Test4101483(void)
 {
     UErrorCode status = U_ZERO_ERROR;
     SimpleDateFormat sdf(UnicodeString("z"), Locale::getUS(), status);
-    if (failure(status, "new SimpleDateFormat", TRUE)) return;
+    if (failure(status, "new SimpleDateFormat", true)) return;
     FieldPosition fp(UDAT_TIMEZONE_FIELD);
     //Date d = date(9234567890L);
     UDate d = 9234567890.0;
@@ -739,7 +739,7 @@ void DateFormatRegressionTest::Test4103340(void)
     // and some arbitrary time 
     UDate d = date(97, 3, 1, 1, 1, 1); 
     SimpleDateFormat df(UnicodeString(u"MMMM"), Locale::getUS(), status); 
-    if (failure(status, "new SimpleDateFormat", TRUE)) return;
+    if (failure(status, "new SimpleDateFormat", true)) return;
 
     UnicodeString s;
     s = dateToString(d, s);
@@ -997,7 +997,7 @@ void DateFormatRegressionTest::Test4134203(void)
     UErrorCode status = U_ZERO_ERROR;
     UnicodeString dateFormat = "MM/dd/yy HH:mm:ss zzz";
     SimpleDateFormat fmt (dateFormat, status);
-    if (failure(status, "new SimpleDateFormat", TRUE)) return;
+    if (failure(status, "new SimpleDateFormat", true)) return;
     ParsePosition p0(0);
     UDate d = fmt.parse("01/22/92 04:52:00 GMT", p0);
     logln(dateToString(d));
@@ -1017,7 +1017,7 @@ void DateFormatRegressionTest::Test4151631(void)
     logln("pattern=" + pattern);
     UErrorCode status = U_ZERO_ERROR;
     SimpleDateFormat format(pattern, Locale::getUS(), status);
-    if (failure(status, "new SimpleDateFormat", TRUE)) return;
+    if (failure(status, "new SimpleDateFormat", true)) return;
     UnicodeString result;
     FieldPosition pos(FieldPosition::DONT_CARE);
     result = format.format(date(1998-1900, UCAL_JUNE, 30, 13, 30, 0), result, pos);
@@ -1039,7 +1039,7 @@ void DateFormatRegressionTest::Test4151706(void)
     UnicodeString dateString("Thursday, 31-Dec-98 23:00:00 GMT");
     UErrorCode status = U_ZERO_ERROR;
     SimpleDateFormat fmt(UnicodeString("EEEE, dd-MMM-yy HH:mm:ss z"), Locale::getUS(), status);
-    if (failure(status, "new SimpleDateFormat", TRUE)) return;
+    if (failure(status, "new SimpleDateFormat", true)) return;
     //try {
         UDate d = fmt.parse(dateString, status);
         failure(status, "fmt->parse");
@@ -1126,7 +1126,7 @@ void DateFormatRegressionTest::Test4182066(void) {
     };
 
     UnicodeString out;
-    UBool pass = TRUE;
+    UBool pass = true;
     for (int32_t i=0; i " + actStr
                        + ", expected " + expStr + "\n");
-            pass = FALSE;
+            pass = false;
         }
     }
     if (pass) {
@@ -1182,7 +1182,7 @@ DateFormatRegressionTest::Test4210209(void) {
         return;
     }
     Calendar* calx = (Calendar*)fmt.getCalendar(); // cast away const!
-    calx->setLenient(FALSE);
+    calx->setLenient(false);
     UDate d = date(2000-1900, UCAL_FEBRUARY, 29);
     UnicodeString s, ss;
     fmt.format(d, s);
@@ -1207,7 +1207,7 @@ DateFormatRegressionTest::Test4210209(void) {
         return;
     }
     cal.clear();
-    cal.setLenient(FALSE);
+    cal.setLenient(false);
     cal.set(2000, UCAL_FEBRUARY, 29); // This should work!
     logln(UnicodeString("Attempt to set Calendar to Feb 29 2000: ") +
                         disp.format(cal.getTime(status), ss.remove()));
@@ -1570,14 +1570,14 @@ void DateFormatRegressionTest::TestT10334(void) {
         return;
     }
 
-    format.setBooleanAttribute(UDAT_PARSE_PARTIAL_LITERAL_MATCH, FALSE, status);
+    format.setBooleanAttribute(UDAT_PARSE_PARTIAL_LITERAL_MATCH, false, status);
     format.parse(text, status);
     if (!U_FAILURE(status)) {
         errln("parse partial match did NOT fail in strict mode - %s", u_errorName(status));
     }
 
     status = U_ZERO_ERROR;
-    format.setBooleanAttribute(UDAT_PARSE_PARTIAL_LITERAL_MATCH, TRUE, status);
+    format.setBooleanAttribute(UDAT_PARSE_PARTIAL_LITERAL_MATCH, true, status);
     format.parse(text, status);
     if (U_FAILURE(status)) {
         errln("parse partial match failure in lenient mode - %s", u_errorName(status));
@@ -1601,7 +1601,7 @@ void DateFormatRegressionTest::TestT10334(void) {
     pattern = UnicodeString(patternArray);
     text = UnicodeString("2013 12 10 03 3 04 04");
     status = U_ZERO_ERROR;
-    format.setBooleanAttribute(UDAT_PARSE_ALLOW_NUMERIC, TRUE, status);
+    format.setBooleanAttribute(UDAT_PARSE_ALLOW_NUMERIC, true, status);
     format.applyPattern(pattern);
     ParsePosition pp(0);
     format.parse(text, pp);
@@ -1610,7 +1610,7 @@ void DateFormatRegressionTest::TestT10334(void) {
     }
 
     status = U_ZERO_ERROR;
-    format.setBooleanAttribute(UDAT_PARSE_ALLOW_NUMERIC, FALSE, status);
+    format.setBooleanAttribute(UDAT_PARSE_ALLOW_NUMERIC, false, status);
     format.parse(text, status);
     if (!U_FAILURE(status)) {
         errln("numeric parse did NOT fail in strict mode", u_errorName(status));
diff --git a/icu4c/source/test/intltest/dtfmtrtts.cpp b/icu4c/source/test/intltest/dtfmtrtts.cpp
index 5fb5e5c6d97..26726650f87 100644
--- a/icu4c/source/test/intltest/dtfmtrtts.cpp
+++ b/icu4c/source/test/intltest/dtfmtrtts.cpp
@@ -24,7 +24,7 @@
 // class DateFormatRoundTripTest
 // *****************************************************************************
 
-// Useful for turning up subtle bugs: Change the following to TRUE, recompile,
+// Useful for turning up subtle bugs: Change the following to true, recompile,
 // and run while at lunch.
 // Warning -- makes test run infinite loop!!!
 #ifndef INFINITE
@@ -67,10 +67,10 @@ DateFormatRoundTripTest::failure(UErrorCode status, const char* msg)
 {
     if(U_FAILURE(status)) {
         errln(UnicodeString("FAIL: ") + msg + " failed, error " + u_errorName(status));
-        return TRUE;
+        return true;
     }
 
-    return FALSE;
+    return false;
 }
 
 UBool 
@@ -80,10 +80,10 @@ DateFormatRoundTripTest::failure(UErrorCode status, const char* msg, const Unico
         UnicodeString escaped;
         escape(str,escaped);
         errln(UnicodeString("FAIL: ") + msg + " failed, error " + u_errorName(status) + ", str=" + escaped);
-        return TRUE;
+        return true;
     }
 
-    return FALSE;
+    return false;
 }
 
 void DateFormatRoundTripTest::TestCentury()
@@ -220,14 +220,14 @@ void DateFormatRoundTripTest::test(const Locale& loc)
     UBool TEST_TABLE [24];//= new boolean[24];
     int32_t i = 0;
     for(i = 0; i < 24; ++i) 
-        TEST_TABLE[i] = TRUE;
+        TEST_TABLE[i] = true;
 
     // If we have some sparseness, implement it here.  Sparseness decreases
     // test time by eliminating some tests, up to 23.
     for(i = 0; i < SPARSENESS; ) {
         int random = (int)(randFraction() * 24);
         if (random >= 0 && random < 24 && TEST_TABLE[i]) {
-            TEST_TABLE[i] = FALSE;
+            TEST_TABLE[i] = false;
             ++i;
         }
     }
@@ -254,7 +254,7 @@ void DateFormatRoundTripTest::test(const Locale& loc)
             if(df == NULL) {
               errln(UnicodeString("Could not DF::createTimeInstance ") + UnicodeString(styleName((DateFormat::EStyle)style)) + " Locale: " + loc.getDisplayName(temp));
             } else {
-              test(df, loc, TRUE);
+              test(df, loc, true);
               delete df;
             }
         }
@@ -284,7 +284,7 @@ void DateFormatRoundTripTest::test(DateFormat *fmt, const Locale &origLocale, UB
         return;
     }
     
-    UBool isGregorian = FALSE;
+    UBool isGregorian = false;
     UErrorCode minStatus = U_ZERO_ERROR;
     if(fmt->getCalendar() == NULL) {
       errln((UnicodeString)"DateFormatRoundTripTest::test, DateFormat getCalendar() returns null for " + origLocale.getName());
@@ -322,7 +322,7 @@ void DateFormatRoundTripTest::test(DateFormat *fmt, const Locale &origLocale, UB
             UDate *d                = new UDate    [DEPTH];
             UnicodeString *s    = new UnicodeString[DEPTH];
 
-            if(isGregorian == TRUE) {
+            if(isGregorian == true) {
               d[0] = generateDate();
             } else {
               d[0] = generateDate(minDate);
@@ -395,7 +395,7 @@ void DateFormatRoundTripTest::test(DateFormat *fmt, const Locale &origLocale, UB
                 // Time-only pattern with zone information and a starting date in PST.
                 if(timeOnly && hasZoneDisplayName) {
                     int32_t startRaw, startDst;
-                    fmt->getTimeZone().getOffset(d[0], FALSE, startRaw, startDst, status);
+                    fmt->getTimeZone().getOffset(d[0], false, startRaw, startDst, status);
                     failure(status, "TimeZone::getOffset");
                     // if the start offset is greater than the offset on Jan 1, 1970
                     // in PST, then need one more round trip.  There are two cases
@@ -445,7 +445,7 @@ void DateFormatRoundTripTest::test(DateFormat *fmt, const Locale &origLocale, UB
                 }
                 else if (timeOnly && !isGregorian && hasZoneDisplayName && maxSmatch == 1) {
                     int32_t startRaw, startDst;
-                    fmt->getTimeZone().getOffset(d[1], FALSE, startRaw, startDst, status);
+                    fmt->getTimeZone().getOffset(d[1], false, startRaw, startDst, status);
                     failure(status, "TimeZone::getOffset");
                     // If the calendar type is not Gregorian and the pattern is time only,
                     // the calendar implementation may use a date before 1970 as day 0.
diff --git a/icu4c/source/test/intltest/dtfmtrtts.h b/icu4c/source/test/intltest/dtfmtrtts.h
index 1f76c3e46be..987ee9fe0f9 100644
--- a/icu4c/source/test/intltest/dtfmtrtts.h
+++ b/icu4c/source/test/intltest/dtfmtrtts.h
@@ -34,7 +34,7 @@ public:
     void TestDateFormatRoundTrip(void);
     void TestCentury(void);
     void test(const Locale& loc);
-    void test(DateFormat *fmt, const Locale &origLocale, UBool timeOnly = FALSE );
+    void test(DateFormat *fmt, const Locale &origLocale, UBool timeOnly = false );
     int32_t getField(UDate d, int32_t f);
     UnicodeString& escape(const UnicodeString& src, UnicodeString& dst);
     UDate generateDate(void); 
@@ -86,7 +86,7 @@ private:
     static int32_t TRIALS;
     static int32_t DEPTH;
 
-    UBool optionv; // TRUE if @v option is given on command line
+    UBool optionv; // true if @v option is given on command line
     SimpleDateFormat *dateFormat;
     UnicodeString fgStr;
     Calendar *getFieldCal;
diff --git a/icu4c/source/test/intltest/dtfmttst.cpp b/icu4c/source/test/intltest/dtfmttst.cpp
index f34555d21d1..317ae437ba2 100644
--- a/icu4c/source/test/intltest/dtfmttst.cpp
+++ b/icu4c/source/test/intltest/dtfmttst.cpp
@@ -2349,7 +2349,7 @@ void DateFormatTest::TestZTimeZoneParsing(void) {
     UnicodeString test;
     //SimpleDateFormat univ("yyyy-MM-dd'T'HH:mm Z", en, status);
     SimpleDateFormat univ("HH:mm Z", en, status);
-    if (failure(status, "construct SimpleDateFormat", TRUE)) return;
+    if (failure(status, "construct SimpleDateFormat", true)) return;
     const TimeZone *t = TimeZone::getGMT();
     univ.setTimeZone(*t);
 
@@ -2599,11 +2599,11 @@ static UBool getActualAndValidLocales(
         const Format &fmt, Locale &valid, Locale &actual) {
     const SimpleDateFormat* dat = dynamic_cast(&fmt);
     if (dat == NULL) {
-        return FALSE;
+        return false;
     }
     const DateFormatSymbols *sym = dat->getDateFormatSymbols();
     if (sym == NULL) {
-        return FALSE;
+        return false;
     }
     UErrorCode status = U_ZERO_ERROR;
     valid = sym->getLocale(ULOC_VALID_LOCALE, status);
@@ -3422,9 +3422,9 @@ void DateFormatTest::TestTimeZoneDisplayName()
 
     UErrorCode status = U_ZERO_ERROR;
     LocalPointer cal(GregorianCalendar::createInstance(status));
-    if (failure(status, "GregorianCalendar::createInstance", TRUE)) return;
+    if (failure(status, "GregorianCalendar::createInstance", true)) return;
     SimpleDateFormat testfmt(UnicodeString("yyyy-MM-dd'T'HH:mm:ss'Z'"), status);
-    if (failure(status, "SimpleDateFormat constructor", TRUE)) return;
+    if (failure(status, "SimpleDateFormat constructor", true)) return;
     testfmt.setTimeZone(*TimeZone::getGMT());
 
     for (int i = 0; fallbackTests[i][0]; i++) {
@@ -3681,7 +3681,7 @@ void DateFormatTest::Test6338(void)
     UErrorCode status = U_ZERO_ERROR;
 
     SimpleDateFormat fmt1(UnicodeString(u"y-M-d"), Locale("ar"), status);
-    if (failure(status, "new SimpleDateFormat", TRUE)) return;
+    if (failure(status, "new SimpleDateFormat", true)) return;
 
     UDate dt1 = date(2008-1900, UCAL_JUNE, 10, 12, 00);
     UnicodeString str1;
@@ -3857,7 +3857,7 @@ void DateFormatTest::Test6880() {
 
     TimeZone *tz = TimeZone::createTimeZone("Asia/Shanghai");
     GregorianCalendar gcal(*tz, status);
-    if (failure(status, "construct GregorianCalendar", TRUE)) return;
+    if (failure(status, "construct GregorianCalendar", true)) return;
 
     gcal.clear();
     gcal.set(1900, UCAL_JULY, 1, 12, 00);   // offset 8:05:43
@@ -3915,29 +3915,29 @@ void DateFormatTest::TestNumberAsStringParsing()
 {
     const NumAsStringItem items[] = {
         // loc lenient fail?  datePattern                                         dateString
-        { "",   FALSE, TRUE,  UnicodeString("y MMMM d HH:mm:ss"),                 UnicodeString("2009 7 14 08:43:57") },
-        { "",   TRUE,  FALSE, UnicodeString("y MMMM d HH:mm:ss"),                 UnicodeString("2009 7 14 08:43:57") },
-        { "en", FALSE, FALSE, UnicodeString("MMM d, y"),                          UnicodeString("Jul 14, 2009") },
-        { "en", TRUE,  FALSE, UnicodeString("MMM d, y"),                          UnicodeString("Jul 14, 2009") },
-        { "en", FALSE, TRUE,  UnicodeString("MMM d, y"),                          UnicodeString("7 14, 2009") },
-        { "en", TRUE,  FALSE, UnicodeString("MMM d, y"),                          UnicodeString("7 14, 2009") },
-        { "ja", FALSE, FALSE, UnicodeString("yyyy/MM/dd"),                        UnicodeString("2009/07/14")         },
-        { "ja", TRUE,  FALSE, UnicodeString("yyyy/MM/dd"),                        UnicodeString("2009/07/14")         },
-      //{ "ja", FALSE, FALSE, UnicodeString("yyyy/MMMMM/d"),                      UnicodeString("2009/7/14")          }, // #8860 covers test failure
-        { "ja", TRUE,  FALSE, UnicodeString("yyyy/MMMMM/d"),                      UnicodeString("2009/7/14")          },
-        { "ja", FALSE, FALSE, CharsToUnicodeString("y\\u5E74M\\u6708d\\u65E5"),   CharsToUnicodeString("2009\\u5E747\\u670814\\u65E5")   },
-        { "ja", TRUE,  FALSE, CharsToUnicodeString("y\\u5E74M\\u6708d\\u65E5"),   CharsToUnicodeString("2009\\u5E747\\u670814\\u65E5")   },
-        { "ja", FALSE, FALSE, CharsToUnicodeString("y\\u5E74MMMd\\u65E5"),        CharsToUnicodeString("2009\\u5E747\\u670814\\u65E5")   },
-        { "ja", TRUE,  FALSE, CharsToUnicodeString("y\\u5E74MMMd\\u65E5"),        CharsToUnicodeString("2009\\u5E747\\u670814\\u65E5")   }, // #8820 fixes test failure
-        { "ko", FALSE, FALSE, UnicodeString("yyyy. M. d."),                       UnicodeString("2009. 7. 14.")       },
-        { "ko", TRUE,  FALSE, UnicodeString("yyyy. M. d."),                       UnicodeString("2009. 7. 14.")       },
-        { "ko", FALSE, FALSE, UnicodeString("yyyy. MMMMM d."),                    CharsToUnicodeString("2009. 7\\uC6D4 14.")             },
-        { "ko", TRUE,  FALSE, UnicodeString("yyyy. MMMMM d."),                    CharsToUnicodeString("2009. 7\\uC6D4 14.")             }, // #8820 fixes test failure
-        { "ko", FALSE, FALSE, CharsToUnicodeString("y\\uB144 M\\uC6D4 d\\uC77C"), CharsToUnicodeString("2009\\uB144 7\\uC6D4 14\\uC77C") },
-        { "ko", TRUE,  FALSE, CharsToUnicodeString("y\\uB144 M\\uC6D4 d\\uC77C"), CharsToUnicodeString("2009\\uB144 7\\uC6D4 14\\uC77C") },
-        { "ko", FALSE, FALSE, CharsToUnicodeString("y\\uB144 MMM d\\uC77C"),      CharsToUnicodeString("2009\\uB144 7\\uC6D4 14\\uC77C") },
-        { "ko", TRUE,  FALSE, CharsToUnicodeString("y\\uB144 MMM d\\uC77C"),      CharsToUnicodeString("2009\\uB144 7\\uC6D4 14\\uC77C") }, // #8820 fixes test failure
-        { NULL, FALSE, FALSE, UnicodeString(""),                                  UnicodeString("")                   }
+        { "",   false, true,  UnicodeString("y MMMM d HH:mm:ss"),                 UnicodeString("2009 7 14 08:43:57") },
+        { "",   true,  false, UnicodeString("y MMMM d HH:mm:ss"),                 UnicodeString("2009 7 14 08:43:57") },
+        { "en", false, false, UnicodeString("MMM d, y"),                          UnicodeString("Jul 14, 2009") },
+        { "en", true,  false, UnicodeString("MMM d, y"),                          UnicodeString("Jul 14, 2009") },
+        { "en", false, true,  UnicodeString("MMM d, y"),                          UnicodeString("7 14, 2009") },
+        { "en", true,  false, UnicodeString("MMM d, y"),                          UnicodeString("7 14, 2009") },
+        { "ja", false, false, UnicodeString("yyyy/MM/dd"),                        UnicodeString("2009/07/14")         },
+        { "ja", true,  false, UnicodeString("yyyy/MM/dd"),                        UnicodeString("2009/07/14")         },
+      //{ "ja", false, false, UnicodeString("yyyy/MMMMM/d"),                      UnicodeString("2009/7/14")          }, // #8860 covers test failure
+        { "ja", true,  false, UnicodeString("yyyy/MMMMM/d"),                      UnicodeString("2009/7/14")          },
+        { "ja", false, false, CharsToUnicodeString("y\\u5E74M\\u6708d\\u65E5"),   CharsToUnicodeString("2009\\u5E747\\u670814\\u65E5")   },
+        { "ja", true,  false, CharsToUnicodeString("y\\u5E74M\\u6708d\\u65E5"),   CharsToUnicodeString("2009\\u5E747\\u670814\\u65E5")   },
+        { "ja", false, false, CharsToUnicodeString("y\\u5E74MMMd\\u65E5"),        CharsToUnicodeString("2009\\u5E747\\u670814\\u65E5")   },
+        { "ja", true,  false, CharsToUnicodeString("y\\u5E74MMMd\\u65E5"),        CharsToUnicodeString("2009\\u5E747\\u670814\\u65E5")   }, // #8820 fixes test failure
+        { "ko", false, false, UnicodeString("yyyy. M. d."),                       UnicodeString("2009. 7. 14.")       },
+        { "ko", true,  false, UnicodeString("yyyy. M. d."),                       UnicodeString("2009. 7. 14.")       },
+        { "ko", false, false, UnicodeString("yyyy. MMMMM d."),                    CharsToUnicodeString("2009. 7\\uC6D4 14.")             },
+        { "ko", true,  false, UnicodeString("yyyy. MMMMM d."),                    CharsToUnicodeString("2009. 7\\uC6D4 14.")             }, // #8820 fixes test failure
+        { "ko", false, false, CharsToUnicodeString("y\\uB144 M\\uC6D4 d\\uC77C"), CharsToUnicodeString("2009\\uB144 7\\uC6D4 14\\uC77C") },
+        { "ko", true,  false, CharsToUnicodeString("y\\uB144 M\\uC6D4 d\\uC77C"), CharsToUnicodeString("2009\\uB144 7\\uC6D4 14\\uC77C") },
+        { "ko", false, false, CharsToUnicodeString("y\\uB144 MMM d\\uC77C"),      CharsToUnicodeString("2009\\uB144 7\\uC6D4 14\\uC77C") },
+        { "ko", true,  false, CharsToUnicodeString("y\\uB144 MMM d\\uC77C"),      CharsToUnicodeString("2009\\uB144 7\\uC6D4 14\\uC77C") }, // #8820 fixes test failure
+        { NULL, false, false, UnicodeString(""),                                  UnicodeString("")                   }
     };
     const NumAsStringItem * itemPtr;
     for (itemPtr = items; itemPtr->localeStr != NULL; itemPtr++ ) {
@@ -3987,7 +3987,7 @@ void DateFormatTest::TestISOEra() {
 
     // create formatter
     SimpleDateFormat *fmt1 = new SimpleDateFormat(UnicodeString("GGG yyyy-MM-dd'T'HH:mm:ss'Z"), status);
-    failure(status, "new SimpleDateFormat", TRUE);
+    failure(status, "new SimpleDateFormat", true);
     if (status == U_MISSING_RESOURCE_ERROR) {
         if (fmt1 != NULL) {
             delete fmt1;
@@ -4000,7 +4000,7 @@ void DateFormatTest::TestISOEra() {
 
         // parse string to date
         UDate dt1 = fmt1->parse(in, status);
-        failure(status, "fmt->parse", TRUE);
+        failure(status, "fmt->parse", true);
 
         // format date back to string
         UnicodeString out;
@@ -4092,7 +4092,7 @@ void DateFormatTest::TestParsePosition() {
     for (int32_t i = 0; TestData[i][0]; i++) {
         UErrorCode status = U_ZERO_ERROR;
         SimpleDateFormat sdf(UnicodeString(TestData[i][0]), status);
-        if (failure(status, "new SimpleDateFormat", TRUE)) return;
+        if (failure(status, "new SimpleDateFormat", true)) return;
 
         int32_t startPos, resPos;
 
@@ -4756,39 +4756,39 @@ void DateFormatTest::TestParseLeniencyAPIs() {
     assertTrue("MULTIPLE_PATTERNS default", fmt->getBooleanAttribute(UDAT_PARSE_MULTIPLE_PATTERNS_FOR_MATCH, status));
 
     // Set calendar to strict
-    fmt->setCalendarLenient(FALSE);
+    fmt->setCalendarLenient(false);
 
-    assertFalse("isLenient after setCalendarLenient(FALSE)", fmt->isLenient());
-    assertFalse("isCalendarLenient after setCalendarLenient(FALSE)", fmt->isCalendarLenient());
-    assertTrue("ALLOW_WHITESPACE after setCalendarLenient(FALSE)", fmt->getBooleanAttribute(UDAT_PARSE_ALLOW_WHITESPACE, status));
-    assertTrue("ALLOW_NUMERIC  after setCalendarLenient(FALSE)", fmt->getBooleanAttribute(UDAT_PARSE_ALLOW_NUMERIC, status));
+    assertFalse("isLenient after setCalendarLenient(false)", fmt->isLenient());
+    assertFalse("isCalendarLenient after setCalendarLenient(false)", fmt->isCalendarLenient());
+    assertTrue("ALLOW_WHITESPACE after setCalendarLenient(false)", fmt->getBooleanAttribute(UDAT_PARSE_ALLOW_WHITESPACE, status));
+    assertTrue("ALLOW_NUMERIC  after setCalendarLenient(false)", fmt->getBooleanAttribute(UDAT_PARSE_ALLOW_NUMERIC, status));
 
     // Set to strict
-    fmt->setLenient(FALSE);
+    fmt->setLenient(false);
 
-    assertFalse("isLenient after setLenient(FALSE)", fmt->isLenient());
-    assertFalse("isCalendarLenient after setLenient(FALSE)", fmt->isCalendarLenient());
-    assertFalse("ALLOW_WHITESPACE after setLenient(FALSE)", fmt->getBooleanAttribute(UDAT_PARSE_ALLOW_WHITESPACE, status));
-    assertFalse("ALLOW_NUMERIC  after setLenient(FALSE)", fmt->getBooleanAttribute(UDAT_PARSE_ALLOW_NUMERIC, status));
+    assertFalse("isLenient after setLenient(false)", fmt->isLenient());
+    assertFalse("isCalendarLenient after setLenient(false)", fmt->isCalendarLenient());
+    assertFalse("ALLOW_WHITESPACE after setLenient(false)", fmt->getBooleanAttribute(UDAT_PARSE_ALLOW_WHITESPACE, status));
+    assertFalse("ALLOW_NUMERIC  after setLenient(false)", fmt->getBooleanAttribute(UDAT_PARSE_ALLOW_NUMERIC, status));
     // These two boolean attributes are NOT affected according to the API specification
-    assertTrue("PARTIAL_MATCH after setLenient(FALSE)", fmt->getBooleanAttribute(UDAT_PARSE_PARTIAL_LITERAL_MATCH, status));
-    assertTrue("MULTIPLE_PATTERNS after setLenient(FALSE)", fmt->getBooleanAttribute(UDAT_PARSE_MULTIPLE_PATTERNS_FOR_MATCH, status));
+    assertTrue("PARTIAL_MATCH after setLenient(false)", fmt->getBooleanAttribute(UDAT_PARSE_PARTIAL_LITERAL_MATCH, status));
+    assertTrue("MULTIPLE_PATTERNS after setLenient(false)", fmt->getBooleanAttribute(UDAT_PARSE_MULTIPLE_PATTERNS_FOR_MATCH, status));
 
     // Allow white space leniency
-    fmt->setBooleanAttribute(UDAT_PARSE_ALLOW_WHITESPACE, TRUE, status);
+    fmt->setBooleanAttribute(UDAT_PARSE_ALLOW_WHITESPACE, true, status);
 
-    assertFalse("isLenient after ALLOW_WHITESPACE/TRUE", fmt->isLenient());
-    assertFalse("isCalendarLenient after ALLOW_WHITESPACE/TRUE", fmt->isCalendarLenient());
-    assertTrue("ALLOW_WHITESPACE after ALLOW_WHITESPACE/TRUE", fmt->getBooleanAttribute(UDAT_PARSE_ALLOW_WHITESPACE, status));
-    assertFalse("ALLOW_NUMERIC  after ALLOW_WHITESPACE/TRUE", fmt->getBooleanAttribute(UDAT_PARSE_ALLOW_NUMERIC, status));
+    assertFalse("isLenient after ALLOW_WHITESPACE/true", fmt->isLenient());
+    assertFalse("isCalendarLenient after ALLOW_WHITESPACE/true", fmt->isCalendarLenient());
+    assertTrue("ALLOW_WHITESPACE after ALLOW_WHITESPACE/true", fmt->getBooleanAttribute(UDAT_PARSE_ALLOW_WHITESPACE, status));
+    assertFalse("ALLOW_NUMERIC  after ALLOW_WHITESPACE/true", fmt->getBooleanAttribute(UDAT_PARSE_ALLOW_NUMERIC, status));
 
     // Set to lenient
-    fmt->setLenient(TRUE);
+    fmt->setLenient(true);
 
-    assertTrue("isLenient after setLenient(TRUE)", fmt->isLenient());
-    assertTrue("isCalendarLenient after setLenient(TRUE)", fmt->isCalendarLenient());
-    assertTrue("ALLOW_WHITESPACE after setLenient(TRUE)", fmt->getBooleanAttribute(UDAT_PARSE_ALLOW_WHITESPACE, status));
-    assertTrue("ALLOW_NUMERIC after setLenient(TRUE)", fmt->getBooleanAttribute(UDAT_PARSE_ALLOW_NUMERIC, status));
+    assertTrue("isLenient after setLenient(true)", fmt->isLenient());
+    assertTrue("isCalendarLenient after setLenient(true)", fmt->isCalendarLenient());
+    assertTrue("ALLOW_WHITESPACE after setLenient(true)", fmt->getBooleanAttribute(UDAT_PARSE_ALLOW_WHITESPACE, status));
+    assertTrue("ALLOW_NUMERIC after setLenient(true)", fmt->getBooleanAttribute(UDAT_PARSE_ALLOW_NUMERIC, status));
 }
 
 void DateFormatTest::TestNumberFormatOverride() {
diff --git a/icu4c/source/test/intltest/dtifmtts.cpp b/icu4c/source/test/intltest/dtifmtts.cpp
index cdaa206711d..3fc2af1235a 100644
--- a/icu4c/source/test/intltest/dtifmtts.cpp
+++ b/icu4c/source/test/intltest/dtifmtts.cpp
@@ -1986,7 +1986,7 @@ void DateIntervalFormatTest::testCreateInstanceForAllLocales() {
     for (int32_t i = 0; i < locale_count; i++) {
         std::unique_ptr calendars(
             icu::Calendar::getKeywordValuesForLocale(
-                "calendar", locales[i], FALSE, status));
+                "calendar", locales[i], false, status));
         int32_t calendar_count = calendars->count(status);
         if (status.errIfFailureAndReset()) { break; }
         // In quick mode, only run 1/5 of locale combination
diff --git a/icu4c/source/test/intltest/dtptngts.cpp b/icu4c/source/test/intltest/dtptngts.cpp
index f2de3d9835d..6c5acef2348 100644
--- a/icu4c/source/test/intltest/dtptngts.cpp
+++ b/icu4c/source/test/intltest/dtptngts.cpp
@@ -1110,7 +1110,7 @@ void IntlTestDateTimePatternGeneratorAPI::testAllFieldPatterns(/*char *par*/)
                         // test that resulting pattern has at least one char in mustIncludeOneOf
                         UnicodeString mustIncludeOneOf(testDataPtr->mustIncludeOneOf, -1, US_INV);
                         int32_t patIndx, patLen = pattern.length();
-                        UBool inQuoted = FALSE;
+                        UBool inQuoted = false;
                         for (patIndx = 0; patIndx < patLen; patIndx++) {
                             UChar c = pattern.charAt(patIndx);
                             if (c == 0x27) {
@@ -1256,7 +1256,7 @@ void IntlTestDateTimePatternGeneratorAPI::testSkeletonsWithDayPeriods() {
         int32_t i, len = UPRV_LENGTHOF(patterns);
         for (i = 0; i < len; i++) {
             UnicodeString conflictingPattern;
-            (void)gen->addPattern(UnicodeString(patterns[i]), TRUE, conflictingPattern, status);
+            (void)gen->addPattern(UnicodeString(patterns[i]), true, conflictingPattern, status);
             if (U_FAILURE(status)) {
                 errln("ERROR: addPattern %s fail, status: %s", patterns[i], u_errorName(status));
                 break;
diff --git a/icu4c/source/test/intltest/erarulestest.cpp b/icu4c/source/test/intltest/erarulestest.cpp
index 115e7eacbd1..1cd4d719659 100644
--- a/icu4c/source/test/intltest/erarulestest.cpp
+++ b/icu4c/source/test/intltest/erarulestest.cpp
@@ -51,13 +51,13 @@ void EraRulesTest::testAPIs() {
         UErrorCode status = U_ZERO_ERROR;
         const char *calId = calTypes[i];
 
-        LocalPointer rules1(EraRules::createInstance(calId, FALSE, status));
+        LocalPointer rules1(EraRules::createInstance(calId, false, status));
         if (U_FAILURE(status)) {
             errln(UnicodeString("Era rules for ") + calId + " is not available.");
             continue;
         }
 
-        LocalPointer rules2(EraRules::createInstance(calId, TRUE, status));
+        LocalPointer rules2(EraRules::createInstance(calId, true, status));
         if (U_FAILURE(status)) {
             errln(UnicodeString("Era rules for ") + calId + " (including tentative eras) is not available.");
             continue;
@@ -107,7 +107,7 @@ void EraRulesTest::testJapanese() {
     const int32_t HEISEI = 235; // ICU4C does not define constants for eras
 
     UErrorCode status = U_ZERO_ERROR;
-    LocalPointer rules(EraRules::createInstance("japanese", TRUE, status));
+    LocalPointer rules(EraRules::createInstance("japanese", true, status));
     if (U_FAILURE(status)) {
         errln("Failed to get era rules for Japanese calendar.");
         return;
diff --git a/icu4c/source/test/intltest/fldset.cpp b/icu4c/source/test/intltest/fldset.cpp
index b288b4fced3..4486e3a1f1a 100644
--- a/icu4c/source/test/intltest/fldset.cpp
+++ b/icu4c/source/test/intltest/fldset.cpp
@@ -160,7 +160,7 @@ UBool FieldsSet::isSameType(const FieldsSet& other) const {
 void FieldsSet::clear() {
     for (int i=0; i=fieldCount()) {
         return;
     }
     fValue[field] = amount;
-    fIsSet[field] = TRUE;
+    fIsSet[field] = true;
 }
 
 UBool FieldsSet::isSet(int32_t field) const {
     if (field<0|| field>=fieldCount()) {
-        return FALSE;
+        return false;
     }
     return fIsSet[field];
 }
@@ -274,17 +274,17 @@ void CalendarFieldsSet::setOnCalendar(Calendar *cal, UErrorCode& /*status*/) con
  */
 UBool CalendarFieldsSet::matches(Calendar *cal, CalendarFieldsSet &diffSet,
         UErrorCode& status) const {
-    UBool match = TRUE;
+    UBool match = true;
     if (U_FAILURE(status)) {
-        return FALSE;
+        return false;
     }
     for (int i=0; iget((UCalendarDateFields)i, status);
             if (U_FAILURE(status))
-                return FALSE;
+                return false;
             if (calVal != get((UCalendarDateFields)i)) {
-                match = FALSE;
+                match = false;
                 diffSet.set((UCalendarDateFields)i, calVal);
                 //fprintf(stderr, "match failed: %s#%d=%d != %d\n",udbg_enumName(UDBG_UCalendarDateFields,i),i,cal->get((UCalendarDateFields)i,status), get((UCalendarDateFields)i));;
             }
diff --git a/icu4c/source/test/intltest/icusvtst.cpp b/icu4c/source/test/intltest/icusvtst.cpp
index cb863c5b71b..60b2f2eeddb 100644
--- a/icu4c/source/test/intltest/icusvtst.cpp
+++ b/icu4c/source/test/intltest/icusvtst.cpp
@@ -28,7 +28,7 @@ class WrongListener : public EventListener {
 class ICUNSubclass : public ICUNotifier {
     public:
     UBool acceptsListener(const EventListener& /*l*/) const override {
-        return TRUE;
+        return true;
         // return l instanceof MyListener;
     }
 
@@ -450,7 +450,7 @@ ICUServiceTest::testAPI_One()
     // be visible by default, but if you know the secret password you
     // can still access these services...
     Integer* singleton5 = new Integer(5);
-    service.registerInstance(singleton5, "en_US_BAR", FALSE, status);
+    service.registerInstance(singleton5, "en_US_BAR", false, status);
     {
         UErrorCode status = U_ZERO_ERROR;
         Integer* result = (Integer*)service.get("en_US_BAR", status);
@@ -1048,7 +1048,7 @@ void ICUServiceTest::testLocale() {
     service.registerInstance(root, "", status);
     service.registerInstance(german, "de", status);
     service.registerInstance(germany, Locale::getGermany(), status);
-    service.registerInstance(japanese, (UnicodeString)"ja", TRUE, status);
+    service.registerInstance(japanese, (UnicodeString)"ja", true, status);
     service.registerInstance(japan, Locale::getJapan(), status);
 
     {
@@ -1413,7 +1413,7 @@ void ICUServiceTest::testCoverage()
     key = LocaleKey::createWithCanonicalFallback(&primary, &fallback, status);
 
     UnicodeString result;
-    LKFSubclass lkf(TRUE); // empty
+    LKFSubclass lkf(true); // empty
     Hashtable table;
 
     UObject *obj = lkf.create(*key, NULL, status);
@@ -1425,7 +1425,7 @@ void ICUServiceTest::testCoverage()
       errln("visible IDs does not contain en_US");
     }
 
-    LKFSubclass invisibleLKF(FALSE);
+    LKFSubclass invisibleLKF(false);
     obj = lkf.create(*key, NULL, status);
     logln("obj: " + UnicodeString(obj ? "obj" : "null"));
     logln(invisibleLKF.getDisplayName("en_US", Locale::getDefault(), result.remove()));
diff --git a/icu4c/source/test/intltest/icusvtst.h b/icu4c/source/test/intltest/icusvtst.h
index 1be6fa41fa7..09c46484cbb 100644
--- a/icu4c/source/test/intltest/icusvtst.h
+++ b/icu4c/source/test/intltest/icusvtst.h
@@ -50,9 +50,9 @@ class ICUServiceTest : public IntlTest
   void confirmIdentical(const UnicodeString& message, const UObject* lhs, const UObject* rhs);
   void confirmIdentical(const UnicodeString& message, int32_t lhs, int32_t rhs);
 
-  void msgstr(const UnicodeString& message, UObject* obj, UBool err = TRUE);
+  void msgstr(const UnicodeString& message, UObject* obj, UBool err = true);
   void logstr(const UnicodeString& message, UObject* obj) {
-        msgstr(message, obj, FALSE);
+        msgstr(message, obj, false);
   }
 };
 
diff --git a/icu4c/source/test/intltest/idnaconf.cpp b/icu4c/source/test/intltest/idnaconf.cpp
index 3b5c490883f..69c6cb4cf89 100644
--- a/icu4c/source/test/intltest/idnaconf.cpp
+++ b/icu4c/source/test/intltest/idnaconf.cpp
@@ -82,7 +82,7 @@ int IdnaConfTest::isNewlineMark(){
  *
  */
 UBool IdnaConfTest::ReadOneLine(UnicodeString& buf){
-    if ( !(curOffset < len) ) return FALSE; // stream end
+    if ( !(curOffset < len) ) return false; // stream end
 
     static const UChar BACKSLASH = 0x5c;
     buf.remove();
@@ -102,7 +102,7 @@ UBool IdnaConfTest::ReadOneLine(UnicodeString& buf){
         buf.append(c);
         curOffset++;
     }
-    return TRUE;
+    return true;
 }
 
 //
diff --git a/icu4c/source/test/intltest/idnaref.cpp b/icu4c/source/test/intltest/idnaref.cpp
index afec7c9f505..c06a0ee2400 100644
--- a/icu4c/source/test/intltest/idnaref.cpp
+++ b/icu4c/source/test/intltest/idnaref.cpp
@@ -47,15 +47,15 @@ static const UChar ACE_PREFIX[] ={ 0x0078,0x006E,0x002d,0x002d } ;
 
 inline static UBool
 startsWithPrefix(const UChar* src , int32_t srcLength){
-    UBool startsWithPrefix = TRUE;
+    UBool startsWithPrefix = true;
 
     if(srcLength < ACE_PREFIX_LENGTH){
-        return FALSE;
+        return false;
     }
 
     for(int8_t i=0; i< ACE_PREFIX_LENGTH; i++){
         if(u_tolower(src[i]) != ACE_PREFIX[i]){
-            startsWithPrefix = FALSE;
+            startsWithPrefix = false;
         }
     }
     return startsWithPrefix;
@@ -282,9 +282,9 @@ idnaref_toASCII(const UChar* src, int32_t srcLength,
     UBool* caseFlags = NULL;
 
     // assume the source contains all ascii codepoints
-    UBool srcIsASCII  = TRUE;
+    UBool srcIsASCII  = true;
     // assume the source contains all LDH codepoints
-    UBool srcIsLDH = TRUE;
+    UBool srcIsLDH = true;
     int32_t j=0;
 
     if(srcLength == -1){
@@ -294,7 +294,7 @@ idnaref_toASCII(const UChar* src, int32_t srcLength,
     // step 1
     for( j=0;j 0x7F){
-            srcIsASCII = FALSE;
+            srcIsASCII = false;
         }
         b1[b1Len++] = src[j];
     }
@@ -332,19 +332,19 @@ idnaref_toASCII(const UChar* src, int32_t srcLength,
         goto CLEANUP;
     }
 
-    srcIsASCII = TRUE;
+    srcIsASCII = true;
     // step 3 & 4
     for( j=0;j 0x7F){// check if output of usprep_prepare is all ASCII
-            srcIsASCII = FALSE;
-        }else if(prep->isLDHChar(b1[j])==FALSE){  // if the char is in ASCII range verify that it is an LDH character{
-            srcIsLDH = FALSE;
+            srcIsASCII = false;
+        }else if(prep->isLDHChar(b1[j])==false){  // if the char is in ASCII range verify that it is an LDH character{
+            srcIsLDH = false;
         }
     }
 
-    if(useSTD3ASCIIRules == TRUE){
+    if(useSTD3ASCIIRules == true){
         // verify 3a and 3b
-        if( srcIsLDH == FALSE /* source contains some non-LDH characters */
+        if( srcIsLDH == false /* source contains some non-LDH characters */
             || b1[0] ==  HYPHEN || b1[b1Len-1] == HYPHEN){
             *status = U_IDNA_STD3_ASCII_RULES_ERROR;
             goto CLEANUP;
@@ -458,8 +458,8 @@ idnaref_toUnicode(const UChar* src, int32_t srcLength,
     UBool allowUnassigned   = (UBool)((options & IDNAREF_ALLOW_UNASSIGNED) != 0);
     UBool useSTD3ASCIIRules = (UBool)((options & IDNAREF_USE_STD3_RULES) != 0);
 
-    UBool srcIsASCII = TRUE;
-    UBool srcIsLDH = TRUE;
+    UBool srcIsASCII = true;
+    UBool srcIsLDH = true;
     int32_t failPos =0;
 
     if(U_FAILURE(*status)){
@@ -470,12 +470,12 @@ idnaref_toUnicode(const UChar* src, int32_t srcLength,
         srcLength = 0;
         for(;src[srcLength]!=0;){
             if(src[srcLength]> 0x7f){
-                srcIsASCII = FALSE;
-            }if(prep->isLDHChar(src[srcLength])==FALSE){
+                srcIsASCII = false;
+            }if(prep->isLDHChar(src[srcLength])==false){
                 // here we do not assemble surrogates
                 // since we know that LDH code points
                 // are in the ASCII range only
-                srcIsLDH = FALSE;
+                srcIsLDH = false;
                 failPos = srcLength;
             }
             srcLength++;
@@ -483,18 +483,18 @@ idnaref_toUnicode(const UChar* src, int32_t srcLength,
     }else{
         for(int32_t j=0; j 0x7f){
-                srcIsASCII = FALSE;
-            }else if(prep->isLDHChar(src[j])==FALSE){
+                srcIsASCII = false;
+            }else if(prep->isLDHChar(src[j])==false){
                 // here we do not assemble surrogates
                 // since we know that LDH code points
                 // are in the ASCII range only
-                srcIsLDH = FALSE;
+                srcIsLDH = false;
                 failPos = j;
             }
         }
     }
 
-    if(srcIsASCII == FALSE){
+    if(srcIsASCII == false){
         // step 2: process the string
         b1Len = prep->process(src,srcLength,b1,b1Capacity,allowUnassigned, parseError, *status);
         if(*status == U_BUFFER_OVERFLOW_ERROR){
@@ -592,13 +592,13 @@ idnaref_toUnicode(const UChar* src, int32_t srcLength,
         }
     }else{
         // verify that STD3 ASCII rules are satisfied
-        if(useSTD3ASCIIRules == TRUE){
-            if( srcIsLDH == FALSE /* source contains some non-LDH characters */
+        if(useSTD3ASCIIRules == true){
+            if( srcIsLDH == false /* source contains some non-LDH characters */
                 || src[0] ==  HYPHEN || src[srcLength-1] == HYPHEN){
                 *status = U_IDNA_STD3_ASCII_RULES_ERROR;
 
                 /* populate the parseError struct */
-                if(srcIsLDH==FALSE){
+                if(srcIsLDH==false){
                     // failPos is always set the index of failure
                     uprv_syntaxError(src,failPos, srcLength,parseError);
                 }else if(src[0] == HYPHEN){
@@ -661,7 +661,7 @@ getNextSeparator(UChar *src,int32_t srcLength,NamePrepTransform* prep,
         for(i=0 ; ;i++){
             if(src[i] == 0){
                 *limit = src + i; // point to null
-                *done = TRUE;
+                *done = true;
                 return i;
             }
             if(prep->isLabelSeparator(src[i],*status)){
@@ -681,7 +681,7 @@ getNextSeparator(UChar *src,int32_t srcLength,NamePrepTransform* prep,
         // we have not found the delimiter
         if(i==srcLength){
             *limit = src+srcLength;
-            *done = TRUE;
+            *done = true;
         }
         return i;
     }
@@ -719,7 +719,7 @@ idnaref_IDNToASCII(  const UChar* src, int32_t srcLength,
     //get the options
 //    UBool allowUnassigned   = (UBool)((options & IDNAREF_ALLOW_UNASSIGNED) != 0);
 //    UBool useSTD3ASCIIRules = (UBool)((options & IDNAREF_USE_STD3_RULES) != 0);
-    UBool done = FALSE;
+    UBool done = false;
 
     if(U_FAILURE(*status)){
         goto CLEANUP;
@@ -769,7 +769,7 @@ idnaref_IDNToASCII(  const UChar* src, int32_t srcLength,
             reqLength = tempLen;
 
             // add the label separator
-            if(done == FALSE){
+            if(done == false){
                 if(reqLength < destCapacity){
                     dest[reqLength] = FULL_STOP;
                 }
@@ -818,7 +818,7 @@ idnaref_IDNToASCII(  const UChar* src, int32_t srcLength,
             reqLength = tempLen;
 
             // add the label separator
-            if(done == FALSE){
+            if(done == false){
                 if(reqLength < destCapacity){
                     dest[reqLength] = FULL_STOP;
                 }
@@ -859,7 +859,7 @@ idnaref_IDNToUnicode(  const UChar* src, int32_t srcLength,
 
     int32_t reqLength = 0;
 
-    UBool done = FALSE;
+    UBool done = false;
 
     NamePrepTransform* prep = getInstance(*status);
 
@@ -889,7 +889,7 @@ idnaref_IDNToUnicode(  const UChar* src, int32_t srcLength,
 
             labelLen = getNextSeparator(labelStart, -1, prep, &delimiter, &done, status);
 
-           if(labelLen==0 && done==FALSE){
+           if(labelLen==0 && done==false){
                 *status = U_IDNA_ZERO_LENGTH_LABEL_ERROR;
             }
             b1Len = idnaref_toUnicode(labelStart, labelLen, b1, b1Capacity,
@@ -922,7 +922,7 @@ idnaref_IDNToUnicode(  const UChar* src, int32_t srcLength,
 
             reqLength = tempLen;
             // add the label separator
-            if(done == FALSE){
+            if(done == false){
                 if(reqLength < destCapacity){
                     dest[reqLength] = FULL_STOP;
                 }
@@ -940,7 +940,7 @@ idnaref_IDNToUnicode(  const UChar* src, int32_t srcLength,
 
             labelLen = getNextSeparator(labelStart, remainingLen, prep, &delimiter, &done, status);
 
-            if(labelLen==0 && done==FALSE){
+            if(labelLen==0 && done==false){
                 *status = U_IDNA_ZERO_LENGTH_LABEL_ERROR;
             }
 
@@ -975,7 +975,7 @@ idnaref_IDNToUnicode(  const UChar* src, int32_t srcLength,
             reqLength = tempLen;
 
             // add the label separator
-            if(done == FALSE){
+            if(done == false){
                 if(reqLength < destCapacity){
                     dest[reqLength] = FULL_STOP;
                 }
diff --git a/icu4c/source/test/intltest/idnaref.h b/icu4c/source/test/intltest/idnaref.h
index 7c940a9d88b..f13d6fcf468 100644
--- a/icu4c/source/test/intltest/idnaref.h
+++ b/icu4c/source/test/intltest/idnaref.h
@@ -44,10 +44,10 @@
  * @param options           A bit set of options:
  *  
  *  - idnaref_UNASSIGNED        Unassigned values can be converted to ASCII for query operations
- *                          If TRUE unassigned values are treated as normal Unicode code points.
- *                          If FALSE the operation fails with U_UNASSIGNED_CODE_POINT_FOUND error code.
+ *                          If true unassigned values are treated as normal Unicode code points.
+ *                          If false the operation fails with U_UNASSIGNED_CODE_POINT_FOUND error code.
  *  - idnaref_USE_STD3_RULES    Use STD3 ASCII rules for host name syntax restrictions
- *                          If TRUE and the input does not satisfy STD3 rules, the operation 
+ *                          If true and the input does not satisfy STD3 rules, the operation 
  *                          will fail with U_IDNA_STD3_ASCII_RULES_ERROR
  *
  * @param parseError        Pointer to UParseError struct to receive information on position 
@@ -82,10 +82,10 @@ idnaref_toASCII(const UChar* src, int32_t srcLength,
  * @param options           A bit set of options:
  *  
  *  - idnaref_UNASSIGNED        Unassigned values can be converted to ASCII for query operations
- *                          If TRUE unassigned values are treated as normal Unicode code points.
- *                          If FALSE the operation fails with U_UNASSIGNED_CODE_POINT_FOUND error code.
+ *                          If true unassigned values are treated as normal Unicode code points.
+ *                          If false the operation fails with U_UNASSIGNED_CODE_POINT_FOUND error code.
  *  - idnaref_USE_STD3_RULES    Use STD3 ASCII rules for host name syntax restrictions
- *                          If TRUE and the input does not satisfy STD3 rules, the operation 
+ *                          If true and the input does not satisfy STD3 rules, the operation 
  *                          will fail with U_IDNA_STD3_ASCII_RULES_ERROR
  *
  * @param parseError        Pointer to UParseError struct to receive information on position 
@@ -125,10 +125,10 @@ idnaref_toUnicode(const UChar* src, int32_t srcLength,
  * @param options           A bit set of options:
  *  
  *  - idnaref_UNASSIGNED        Unassigned values can be converted to ASCII for query operations
- *                          If TRUE unassigned values are treated as normal Unicode code points.
- *                          If FALSE the operation fails with U_UNASSIGNED_CODE_POINT_FOUND error code.
+ *                          If true unassigned values are treated as normal Unicode code points.
+ *                          If false the operation fails with U_UNASSIGNED_CODE_POINT_FOUND error code.
  *  - idnaref_USE_STD3_RULES    Use STD3 ASCII rules for host name syntax restrictions
- *                          If TRUE and the input does not satisfy STD3 rules, the operation 
+ *                          If true and the input does not satisfy STD3 rules, the operation 
  *                          will fail with U_IDNA_STD3_ASCII_RULES_ERROR
  * 
  * @param parseError        Pointer to UParseError struct to receive information on position 
@@ -164,10 +164,10 @@ idnaref_IDNToASCII(  const UChar* src, int32_t srcLength,
  * @param options           A bit set of options:
  *  
  *  - idnaref_UNASSIGNED        Unassigned values can be converted to ASCII for query operations
- *                          If TRUE unassigned values are treated as normal Unicode code points.
- *                          If FALSE the operation fails with U_UNASSIGNED_CODE_POINT_FOUND error code.
+ *                          If true unassigned values are treated as normal Unicode code points.
+ *                          If false the operation fails with U_UNASSIGNED_CODE_POINT_FOUND error code.
  *  - idnaref_USE_STD3_RULES    Use STD3 ASCII rules for host name syntax restrictions
- *                          If TRUE and the input does not satisfy STD3 rules, the operation 
+ *                          If true and the input does not satisfy STD3 rules, the operation 
  *                          will fail with U_IDNA_STD3_ASCII_RULES_ERROR
  *
  * @param parseError        Pointer to UParseError struct to receive information on position 
@@ -204,10 +204,10 @@ idnaref_IDNToUnicode(  const UChar* src, int32_t srcLength,
  * @param options           A bit set of options:
  *  
  *  - idnaref_UNASSIGNED        Unassigned values can be converted to ASCII for query operations
- *                          If TRUE unassigned values are treated as normal Unicode code points.
- *                          If FALSE the operation fails with U_UNASSIGNED_CODE_POINT_FOUND error code.
+ *                          If true unassigned values are treated as normal Unicode code points.
+ *                          If false the operation fails with U_UNASSIGNED_CODE_POINT_FOUND error code.
  *  - idnaref_USE_STD3_RULES    Use STD3 ASCII rules for host name syntax restrictions
- *                          If TRUE and the input does not satisfy STD3 rules, the operation 
+ *                          If true and the input does not satisfy STD3 rules, the operation 
  *                          will fail with U_IDNA_STD3_ASCII_RULES_ERROR
  *
  * @param status            ICU error code in/out parameter.
diff --git a/icu4c/source/test/intltest/intltest.cpp b/icu4c/source/test/intltest/intltest.cpp
index f2956ebcb48..3686e7fd547 100644
--- a/icu4c/source/test/intltest/intltest.cpp
+++ b/icu4c/source/test/intltest/intltest.cpp
@@ -59,7 +59,7 @@ static char* _testDataPath=NULL;
 // Static list of errors found
 static UnicodeString errorList;
 static void *knownList = NULL; // known issues
-static UBool noKnownIssues = FALSE; // if TRUE, don't emit known issues
+static UBool noKnownIssues = false; // if true, don't emit known issues
 
 //-----------------------------------------------------------------------------
 //convenience classes to ease porting code that uses the Java
@@ -238,7 +238,7 @@ UnicodeString toString(int32_t n) {
 
 
 UnicodeString toString(UBool b) {
-  return b ? UnicodeString("TRUE"):UnicodeString("FALSE");
+  return b ? UnicodeString("true"):UnicodeString("false");
 }
 
 UnicodeString toString(const UnicodeSet& uniset, UErrorCode& status) {
@@ -569,15 +569,15 @@ IntlTest::IntlTest()
 {
     caller = NULL;
     testPath = NULL;
-    LL_linestart = TRUE;
+    LL_linestart = true;
     errorCount = 0;
     dataErrorCount = 0;
-    verbose = FALSE;
-    no_time = FALSE;
-    no_err_msg = FALSE;
-    warn_on_missing_data = FALSE;
-    quick = FALSE;
-    leaks = FALSE;
+    verbose = false;
+    no_time = false;
+    no_err_msg = false;
+    warn_on_missing_data = false;
+    quick = false;
+    leaks = false;
     threadCount = 12;
     testoutfp = stdout;
     LL_indentlevel = indentLevel_offset;
@@ -713,7 +713,7 @@ UBool IntlTest::runTest( char* name, char* par, char *baseName )
 
     }else if (strcmp( name, "LIST" ) == 0) {
         this->usage();
-        rval = TRUE;
+        rval = true;
 
     }else{
       rval = runTestLoop( name, par, baseName );
@@ -748,12 +748,12 @@ UBool IntlTest::runTestLoop( char* testname, char* par, char *baseName )
     const char*   name;
     UBool  run_this_test;
     int32_t    lastErrorCount;
-    UBool  rval = FALSE;
+    UBool  rval = false;
     UBool   lastTestFailed;
 
     if(baseName == NULL) {
       printf("ERROR: baseName can't be null.\n");
-      return FALSE;
+      return false;
     } else {
       if ((char *)this->basePath != baseName) {
         strcpy(this->basePath, baseName);
@@ -765,14 +765,14 @@ UBool IntlTest::runTestLoop( char* testname, char* par, char *baseName )
     IntlTest* saveTest = gTest;
     gTest = this;
     do {
-        this->runIndexedTest( index, FALSE, name, par );
+        this->runIndexedTest( index, false, name, par );
         if (strcmp(name,"skip") == 0) {
-            run_this_test = FALSE;
+            run_this_test = false;
         } else {
             if (!name || (name[0] == 0))
                 break;
             if (!testname) {
-                run_this_test = TRUE;
+                run_this_test = true;
             }else{
                 run_this_test = (UBool) (strcmp( name, testname ) == 0);
             }
@@ -782,17 +782,17 @@ UBool IntlTest::runTestLoop( char* testname, char* par, char *baseName )
             execCount++;
             char msg[256];
             sprintf(msg, "%s {", name);
-            LL_message(msg, TRUE);
+            LL_message(msg, true);
             UDate timeStart = uprv_getRawUTCtime();
             strcpy(saveBaseLoc,name);
             strcat(saveBaseLoc,"/");
 
             strcpy(currName, name); // set
-            this->runIndexedTest( index, TRUE, name, par );
+            this->runIndexedTest( index, true, name, par );
             currName[0]=0; // reset
 
             UDate timeStop = uprv_getRawUTCtime();
-            rval = TRUE; // at least one test has been called
+            rval = true; // at least one test has been called
             char secs[256];
             if(!no_time) {
               sprintf(secs, "%f", (timeStop-timeStart)/1000.0);
@@ -812,7 +812,7 @@ UBool IntlTest::runTestLoop( char* testname, char* par, char *baseName )
             if (lastErrorCount == errorCount) {
                 sprintf( msg, "   } OK:   %s ", name );
                 if(!no_time) str_timeDelta(msg+strlen(msg),timeStop-timeStart);
-                lastTestFailed = FALSE;
+                lastTestFailed = false;
             }else{
                 sprintf(msg,  "   } ERRORS (%li) in %s", (long)(errorCount-lastErrorCount), name);
                 if(!no_time) str_timeDelta(msg+strlen(msg),timeStop-timeStart);
@@ -822,15 +822,15 @@ UBool IntlTest::runTestLoop( char* testname, char* par, char *baseName )
                 }
                 errorList += name;
                 errorList += "\n";
-                lastTestFailed = TRUE;
+                lastTestFailed = true;
             }
             LL_indentlevel -= 3;
             if (lastTestFailed) {
-                LL_message( "", TRUE);
+                LL_message( "", true);
             }
-            LL_message( msg, TRUE);
+            LL_message( msg, true);
             if (lastTestFailed) {
-                LL_message( "", TRUE);
+                LL_message( "", true);
             }
             LL_indentlevel += 3;
         }
@@ -850,7 +850,7 @@ UBool IntlTest::runTestLoop( char* testname, char* par, char *baseName )
 void IntlTest::log( const UnicodeString &message )
 {
     if( verbose ) {
-        LL_message( message, FALSE );
+        LL_message( message, false );
     }
 }
 
@@ -861,14 +861,14 @@ void IntlTest::log( const UnicodeString &message )
 void IntlTest::logln( const UnicodeString &message )
 {
     if( verbose ) {
-        LL_message( message, TRUE );
+        LL_message( message, true );
     }
 }
 
 void IntlTest::logln( void )
 {
     if( verbose ) {
-        LL_message( "", TRUE );
+        LL_message( "", true );
     }
 }
 
@@ -877,7 +877,7 @@ void IntlTest::logln( void )
 */
 void IntlTest::info( const UnicodeString &message )
 {
-  LL_message( message, FALSE );
+  LL_message( message, false );
 }
 
 /**
@@ -886,12 +886,12 @@ void IntlTest::info( const UnicodeString &message )
 */
 void IntlTest::infoln( const UnicodeString &message )
 {
-  LL_message( message, TRUE );
+  LL_message( message, true );
 }
 
 void IntlTest::infoln( void )
 {
-  LL_message( "", TRUE );
+  LL_message( "", true );
 }
 
 int32_t IntlTest::IncErrorCount( void )
@@ -916,13 +916,13 @@ void IntlTest::err()
 void IntlTest::err( const UnicodeString &message )
 {
     IncErrorCount();
-    if (!no_err_msg) LL_message( message, FALSE );
+    if (!no_err_msg) LL_message( message, false );
 }
 
 void IntlTest::errln( const UnicodeString &message )
 {
     IncErrorCount();
-    if (!no_err_msg) LL_message( message, TRUE );
+    if (!no_err_msg) LL_message( message, true );
 }
 
 void IntlTest::dataerr( const UnicodeString &message )
@@ -933,7 +933,7 @@ void IntlTest::dataerr( const UnicodeString &message )
         IncErrorCount();
     }
 
-    if (!no_err_msg) LL_message( message, FALSE );
+    if (!no_err_msg) LL_message( message, false );
 }
 
 void IntlTest::dataerrln( const UnicodeString &message )
@@ -949,9 +949,9 @@ void IntlTest::dataerrln( const UnicodeString &message )
 
     if (!no_err_msg) {
       if ( errCount == 1) {
-          LL_message( msg + " - (Are you missing data?)", TRUE ); // only show this message the first time
+          LL_message( msg + " - (Are you missing data?)", true ); // only show this message the first time
       } else {
-          LL_message( msg , TRUE );
+          LL_message( msg , true );
       }
     }
 }
@@ -1010,13 +1010,13 @@ UBool IntlTest::logKnownIssue(const char *ticket) {
 }
 
 UBool IntlTest::logKnownIssue(const char *ticket, const UnicodeString &msg) {
-  if(noKnownIssues) return FALSE;
+  if(noKnownIssues) return false;
 
   char fullpath[2048];
   strcpy(fullpath, basePath);
   strcat(fullpath, currName);
   UnicodeString msg2 = msg;
-  UBool firstForTicket = TRUE, firstForWhere = TRUE;
+  UBool firstForTicket = true, firstForWhere = true;
   knownList = udbg_knownIssue_openU(knownList, ticket, fullpath, msg2.getTerminatedBuffer(), &firstForTicket, &firstForWhere);
 
   msg2 = UNICODE_STRING_SIMPLE("(Known issue ") +
@@ -1027,7 +1027,7 @@ UBool IntlTest::logKnownIssue(const char *ticket, const UnicodeString &msg) {
     logln(msg2);
   }
 
-  return TRUE;
+  return true;
 }
 
 /* convenience functions that include sprintf formatting */
@@ -1106,7 +1106,7 @@ void IntlTest::errcheckln(UErrorCode status, const char *fmt, ...)
 
 void IntlTest::printErrors()
 {
-     IntlTest::LL_message(errorList, TRUE);
+     IntlTest::LL_message(errorList, true);
 }
 
 UBool IntlTest::printKnownIssues()
@@ -1114,9 +1114,9 @@ UBool IntlTest::printKnownIssues()
   if(knownList != NULL) {
     udbg_knownIssue_print(knownList);
     udbg_knownIssue_close(knownList);
-    return TRUE;
+    return true;
   } else {
-    return FALSE;
+    return false;
   }
 }
 
@@ -1146,7 +1146,7 @@ void IntlTest::LL_message( UnicodeString message, UBool newline )
         32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32
     };
     U_ASSERT(1 + LL_indentlevel <= UPRV_LENGTHOF(indentUChars));
-    UnicodeString indent(FALSE, indentUChars, 1 + LL_indentlevel);
+    UnicodeString indent(false, indentUChars, 1 + LL_indentlevel);
 
     char buffer[30000];
     int32_t length;
@@ -1182,14 +1182,14 @@ void IntlTest::LL_message( UnicodeString message, UBool newline )
 */
 void IntlTest::usage( void )
 {
-    UBool save_verbose = setVerbose( TRUE );
+    UBool save_verbose = setVerbose( true );
     logln("Test names:");
     logln("-----------");
 
     int32_t index = 0;
     const char* name = NULL;
     do{
-        this->runIndexedTest( index, FALSE, name );
+        this->runIndexedTest( index, false, name );
         if (!name) break;
         logln(name);
         index++;
@@ -1224,19 +1224,19 @@ U_CAPI void unistr_printLengths();
 int
 main(int argc, char* argv[])
 {
-    UBool syntax = FALSE;
-    UBool all = FALSE;
-    UBool verbose = FALSE;
-    UBool no_err_msg = FALSE;
-    UBool no_time = FALSE;
-    UBool quick = TRUE;
-    UBool name = FALSE;
-    UBool leaks = FALSE;
-    UBool utf8 = FALSE;
+    UBool syntax = false;
+    UBool all = false;
+    UBool verbose = false;
+    UBool no_err_msg = false;
+    UBool no_time = false;
+    UBool quick = true;
+    UBool name = false;
+    UBool leaks = false;
+    UBool utf8 = false;
     const char *summary_file = NULL;
-    UBool warnOnMissingData = FALSE;
-    UBool writeGoldenData = FALSE;
-    UBool defaultDataFound = FALSE;
+    UBool warnOnMissingData = false;
+    UBool writeGoldenData = false;
+    UBool defaultDataFound = false;
     int32_t threadCount = 12;
     UErrorCode errorCode = U_ZERO_ERROR;
     UConverter *cnv = NULL;
@@ -1255,43 +1255,43 @@ main(int argc, char* argv[])
             const char* str = argv[i] + 1;
             if (strcmp("verbose", str) == 0 ||
                 strcmp("v", str) == 0)
-                verbose = TRUE;
+                verbose = true;
             else if (strcmp("noerrormsg", str) == 0 ||
                      strcmp("n", str) == 0)
-                no_err_msg = TRUE;
+                no_err_msg = true;
             else if (strcmp("exhaustive", str) == 0 ||
                      strcmp("e", str) == 0)
-                quick = FALSE;
+                quick = false;
             else if (strcmp("all", str) == 0 ||
                      strcmp("a", str) == 0)
-                all = TRUE;
+                all = true;
             else if (strcmp("utf-8", str) == 0 ||
                      strcmp("u", str) == 0)
-                utf8 = TRUE;
+                utf8 = true;
             else if (strcmp("noknownissues", str) == 0 ||
                      strcmp("K", str) == 0)
-                noKnownIssues = TRUE;
+                noKnownIssues = true;
             else if (strcmp("leaks", str) == 0 ||
                      strcmp("l", str) == 0)
-                leaks = TRUE;
+                leaks = true;
             else if (strcmp("notime", str) == 0 ||
                      strcmp("T", str) == 0)
-                no_time = TRUE;
+                no_time = true;
             else if (strcmp("goldens", str) == 0 ||
                      strcmp("G", str) == 0)
-                writeGoldenData = TRUE;
+                writeGoldenData = true;
             else if (strncmp("E", str, 1) == 0)
                 summary_file = str+1;
             else if (strcmp("x", str)==0) {
               if(++i>=argc) {
                 printf("* Error: '-x' option requires an argument. usage: '-x outfile.xml'.\n");
-                syntax = TRUE;
+                syntax = true;
               }
               if(ctest_xml_setFileName(argv[i])) { /* set the name */
                 return 1; /* error */
               }
             } else if (strcmp("w", str) == 0) {
-              warnOnMissingData = TRUE;
+              warnOnMissingData = true;
               warnOrErr = "WARNING";
             }
             else if (strncmp("threads:", str, 8) == 0) {
@@ -1304,17 +1304,17 @@ main(int argc, char* argv[])
                 nProps++;
             }
             else {
-                syntax = TRUE;
+                syntax = true;
             }
         }else{
-            name = TRUE;
+            name = true;
         }
     }
 
     if (!all && !name) {
-        all = TRUE;
+        all = true;
     } else if (all && name) {
-        syntax = TRUE;
+        syntax = true;
     }
 
     if (syntax) {
@@ -1412,10 +1412,10 @@ main(int argc, char* argv[])
     if (U_FAILURE(errorCode)) {
         fprintf(stderr,
             "#### Note:  ICU Init without build-specific setDataDirectory() failed.\n");
-        defaultDataFound = FALSE;
+        defaultDataFound = false;
     }
     else {
-        defaultDataFound = TRUE;
+        defaultDataFound = true;
     }
     u_cleanup();
     if(utf8) {
@@ -1817,10 +1817,10 @@ static int32_t RAND_SEED;
  */
 float IntlTest::random(int32_t* seedp) {
     static int32_t iy, ir[98];
-    static UBool first=TRUE;
+    static UBool first=true;
     int32_t j;
     if (*seedp < 0 || first) {
-        first = FALSE;
+        first = false;
         if ((*seedp=(RAND_IC-(*seedp)) % RAND_M) < 0) *seedp = -(*seedp);
         for (j=1;j<=97;++j) {
             *seedp=(RAND_IA*(*seedp)+RAND_IC) % RAND_M;
@@ -1949,11 +1949,11 @@ UBool IntlTest::assertSuccess(const char* message, UErrorCode ec, UBool possible
         } else {
           errcheckln(ec, "FAIL: %s:%d: %s (%s)", file, line, message, u_errorName(ec));
         }
-        return FALSE;
+        return false;
     } else {
       logln("OK: %s:%d: %s - (%s)", file, line, message, u_errorName(ec));
     }
-    return TRUE;
+    return true;
 }
 
 UBool IntlTest::assertEquals(const char* message,
@@ -1970,14 +1970,14 @@ UBool IntlTest::assertEquals(const char* message,
                   prettify(actual) +
                   "; expected " + prettify(expected));
         }
-        return FALSE;
+        return false;
     }
 #ifdef VERBOSE_ASSERTIONS
     else {
         logln((UnicodeString)"Ok: " + message + "; got " + prettify(actual));
     }
 #endif
-    return TRUE;
+    return true;
 }
 
 UBool IntlTest::assertEquals(const char* message,
@@ -1989,14 +1989,14 @@ UBool IntlTest::assertEquals(const char* message,
         errln((UnicodeString)"FAIL: " + message + "; got \"" +
               actual +
               "\"; expected \"" + expected + "\"");
-        return FALSE;
+        return false;
     }
 #ifdef VERBOSE_ASSERTIONS
     else {
         logln((UnicodeString)"Ok: " + message + "; got \"" + actual + "\"");
     }
 #endif
-    return TRUE;
+    return true;
 }
 
 UBool IntlTest::assertEquals(const char* message,
@@ -2006,14 +2006,14 @@ UBool IntlTest::assertEquals(const char* message,
         errln((UnicodeString)"FAIL: " + message + "; got " +
               actual + "=0x" + toHex(actual) +
               "; expected " + expected + "=0x" + toHex(expected));
-        return FALSE;
+        return false;
     }
 #ifdef VERBOSE_ASSERTIONS
     else {
         logln((UnicodeString)"Ok: " + message + "; got " + actual + "=0x" + toHex(actual));
     }
 #endif
-    return TRUE;
+    return true;
 }
 
 UBool IntlTest::assertEquals(const char* message,
@@ -2023,14 +2023,14 @@ UBool IntlTest::assertEquals(const char* message,
         errln((UnicodeString)"FAIL: " + message + "; got int64 " +
               Int64ToUnicodeString(actual) + 
               "; expected " + Int64ToUnicodeString(expected) );
-        return FALSE;
+        return false;
     }
 #ifdef VERBOSE_ASSERTIONS
     else {
       logln((UnicodeString)"Ok: " + message + "; got int64 " + Int64ToUnicodeString(actual));
     }
 #endif
-    return TRUE;
+    return true;
 }
 
 UBool IntlTest::assertEquals(const char* message,
@@ -2041,14 +2041,14 @@ UBool IntlTest::assertEquals(const char* message,
         errln((UnicodeString)"FAIL: " + message + "; got " +
               actual + 
               "; expected " + expected);
-        return FALSE;
+        return false;
     }
 #ifdef VERBOSE_ASSERTIONS
     else {
         logln((UnicodeString)"Ok: " + message + "; got " + actual);
     }
 #endif
-    return TRUE;
+    return true;
 }
 
 UBool IntlTest::assertEquals(const char* message,
@@ -2058,14 +2058,14 @@ UBool IntlTest::assertEquals(const char* message,
         errln((UnicodeString)"FAIL: " + message + "; got " +
               toString(actual) +
               "; expected " + toString(expected));
-        return FALSE;
+        return false;
     }
 #ifdef VERBOSE_ASSERTIONS
     else {
       logln((UnicodeString)"Ok: " + message + "; got " + toString(actual));
     }
 #endif
-    return TRUE;
+    return true;
 }
 
 
@@ -2076,14 +2076,14 @@ UBool IntlTest::assertEquals(const char* message,
         errln((UnicodeString)"FAIL: " + message + "; got " +
               u_errorName(actual) + 
               "; expected " + u_errorName(expected));
-        return FALSE;
+        return false;
     }
 #ifdef VERBOSE_ASSERTIONS
     else {
         logln((UnicodeString)"Ok: " + message + "; got " + u_errorName(actual));
     }
 #endif
-    return TRUE;
+    return true;
 }
 
 UBool IntlTest::assertEquals(const char* message,
@@ -2094,14 +2094,14 @@ UBool IntlTest::assertEquals(const char* message,
         errln((UnicodeString)"FAIL: " + message + "; got " +
               toString(actual, status) +
               "; expected " + toString(expected, status));
-        return FALSE;
+        return false;
     }
 #ifdef VERBOSE_ASSERTIONS
     else {
         logln((UnicodeString)"Ok: " + message + "; got " + toString(actual, status));
     }
 #endif
-    return TRUE;
+    return true;
 }
 
 
@@ -2120,14 +2120,14 @@ UBool IntlTest::assertEquals(const char* message,
                   toString(actual) +
                   "; expected " + toString(expected));
         }
-        return FALSE;
+        return false;
     }
 #ifdef VERBOSE_ASSERTIONS
     else {
         logln((UnicodeString)"Ok: " + message + "; got " + toString(actual));
     }
 #endif
-    return TRUE;
+    return true;
 }
 #endif
 
@@ -2157,14 +2157,14 @@ UBool IntlTest::assertEquals(const char* message,
         errln((UnicodeString)"FAIL: " + message +
             "; got " + actualAsString.c_str() +
             "; expected " + expectedAsString.c_str());
-        return FALSE;
+        return false;
     }
 #ifdef VERBOSE_ASSERTIONS
     else {
         logln((UnicodeString)"Ok: " + message + "; got " + vectorToString(actual).c_str());
     }
 #endif
-    return TRUE;
+    return true;
 }
 
 UBool IntlTest::assertNotEquals(const char* message,
@@ -2173,7 +2173,7 @@ UBool IntlTest::assertNotEquals(const char* message,
     if (expectedNot == actual) {
         errln((UnicodeString)("FAIL: ") + message + "; got " + actual + "=0x" + toHex(actual) +
               "; expected != " + expectedNot);
-        return FALSE;
+        return false;
     }
 #ifdef VERBOSE_ASSERTIONS
     else {
@@ -2181,7 +2181,7 @@ UBool IntlTest::assertNotEquals(const char* message,
               " != " + expectedNot);
     }
 #endif
-    return TRUE;
+    return true;
 }
 
 UBool IntlTest::assertEqualsNear(const char* message,
@@ -2193,25 +2193,25 @@ UBool IntlTest::assertEqualsNear(const char* message,
     bool bothNegInf = uprv_isNegativeInfinity(expected) && uprv_isNegativeInfinity(actual);
     if (bothPosInf || bothNegInf || bothNaN) {
         // We don't care about delta in these cases
-        return TRUE;
+        return true;
     }
     if (std::isnan(delta) || std::isinf(delta)) {
         errln((UnicodeString)("FAIL: ") + message + "; nonsensical delta " + delta +
               " - delta may not be NaN or Inf. (Got " + actual + "; expected " + expected + ".)");
-        return FALSE;
+        return false;
     }
     double difference = std::abs(expected - actual);
     if (expected != actual && (difference > delta || std::isnan(difference))) {
         errln((UnicodeString)("FAIL: ") + message + "; got " + actual + "; expected " + expected +
               "; acceptable delta " + delta);
-        return FALSE;
+        return false;
     }
 #ifdef VERBOSE_ASSERTIONS
     else {
         logln((UnicodeString)("Ok: ") + message + "; got " + actual);
     }
 #endif
-    return TRUE;
+    return true;
 }
 
 static char ASSERT_BUF[256];
diff --git a/icu4c/source/test/intltest/intltest.h b/icu4c/source/test/intltest/intltest.h
index 8c5777789c3..31bbe1f13d8 100644
--- a/icu4c/source/test/intltest/intltest.h
+++ b/icu4c/source/test/intltest/intltest.h
@@ -128,7 +128,7 @@ UnicodeString toString(UBool b);
 #define TESTCASE_AUTO_END \
         name = ""; \
         break; \
-    } while (TRUE)
+    } while (true)
 
 
 // WHERE Macro yields a literal string of the form "source_file_name:line number "
@@ -144,13 +144,13 @@ public:
 
     virtual UBool runTest( char* name = NULL, char* par = NULL, char *baseName = NULL); // not to be overridden
 
-    virtual UBool setVerbose( UBool verbose = TRUE );
-    virtual UBool setNoErrMsg( UBool no_err_msg = TRUE );
-    virtual UBool setQuick( UBool quick = TRUE );
-    virtual UBool setLeaks( UBool leaks = TRUE );
-    virtual UBool setNotime( UBool no_time = TRUE );
-    virtual UBool setWarnOnMissingData( UBool warn_on_missing_data = TRUE );
-    virtual UBool setWriteGoldenData( UBool write_golden_data = TRUE );
+    virtual UBool setVerbose( UBool verbose = true );
+    virtual UBool setNoErrMsg( UBool no_err_msg = true );
+    virtual UBool setQuick( UBool quick = true );
+    virtual UBool setLeaks( UBool leaks = true );
+    virtual UBool setNotime( UBool no_time = true );
+    virtual UBool setWarnOnMissingData( UBool warn_on_missing_data = true );
+    virtual UBool setWriteGoldenData( UBool write_golden_data = true );
     virtual int32_t setThreadCount( int32_t count = 1);
 
     virtual int32_t getErrors( void );
@@ -236,7 +236,7 @@ public:
     // Print ALL named errors encountered so far
     void printErrors();
 
-    // print known issues. return TRUE if there were any.
+    // print known issues. return true if there were any.
     UBool printKnownIssues();
 
     virtual void usage( void ) ;
@@ -286,16 +286,16 @@ public:
     virtual void setProperty(const char* propline);
     virtual const char* getProperty(const char* prop);
 
-    /* JUnit-like assertions. Each returns TRUE if it succeeds. */
-    UBool assertTrue(const char* message, UBool condition, UBool quiet=FALSE, UBool possibleDataError=FALSE, const char *file=NULL, int line=0);
-    UBool assertFalse(const char* message, UBool condition, UBool quiet=FALSE, UBool possibleDataError=FALSE);
+    /* JUnit-like assertions. Each returns true if it succeeds. */
+    UBool assertTrue(const char* message, UBool condition, UBool quiet=false, UBool possibleDataError=false, const char *file=NULL, int line=0);
+    UBool assertFalse(const char* message, UBool condition, UBool quiet=false, UBool possibleDataError=false);
     /**
-     * @param possibleDataError - if TRUE, use dataerrln instead of errcheckln on failure
-     * @return TRUE on success, FALSE on failure.
+     * @param possibleDataError - if true, use dataerrln instead of errcheckln on failure
+     * @return true on success, false on failure.
      */
-    UBool assertSuccess(const char* message, UErrorCode ec, UBool possibleDataError=FALSE, const char *file=NULL, int line=0);
+    UBool assertSuccess(const char* message, UErrorCode ec, UBool possibleDataError=false, const char *file=NULL, int line=0);
     UBool assertEquals(const char* message, const UnicodeString& expected,
-                       const UnicodeString& actual, UBool possibleDataError=FALSE);
+                       const UnicodeString& actual, UBool possibleDataError=false);
     UBool assertEquals(const char* message, const char* expected, const char* actual);
     UBool assertEquals(const char* message, UBool expected, UBool actual);
     UBool assertEquals(const char* message, int32_t expected, int32_t actual);
@@ -322,16 +322,16 @@ public:
 
 #if !UCONFIG_NO_FORMATTING
     UBool assertEquals(const char* message, const Formattable& expected,
-                       const Formattable& actual, UBool possibleDataError=FALSE);
+                       const Formattable& actual, UBool possibleDataError=false);
     UBool assertEquals(const UnicodeString& message, const Formattable& expected,
                        const Formattable& actual);
 #endif
     UBool assertNotEquals(const char* message, int32_t expectedNot, int32_t actual);
-    UBool assertTrue(const UnicodeString& message, UBool condition, UBool quiet=FALSE, UBool possibleDataError=FALSE);
-    UBool assertFalse(const UnicodeString& message, UBool condition, UBool quiet=FALSE, UBool possibleDataError=FALSE);
+    UBool assertTrue(const UnicodeString& message, UBool condition, UBool quiet=false, UBool possibleDataError=false);
+    UBool assertFalse(const UnicodeString& message, UBool condition, UBool quiet=false, UBool possibleDataError=false);
     UBool assertSuccess(const UnicodeString& message, UErrorCode ec);
     UBool assertEquals(const UnicodeString& message, const UnicodeString& expected,
-                       const UnicodeString& actual, UBool possibleDataError=FALSE);
+                       const UnicodeString& actual, UBool possibleDataError=false);
     UBool assertEquals(const UnicodeString& message, const char* expected, const char* actual);
     UBool assertEquals(const UnicodeString& message, UBool expected, UBool actual);
     UBool assertEquals(const UnicodeString& message, int32_t expected, int32_t actual);
@@ -402,7 +402,7 @@ protected:
     // used for collation result reporting, defined here for convenience
 
     static UnicodeString &prettify(const UnicodeString &source, UnicodeString &target);
-    static UnicodeString prettify(const UnicodeString &source, UBool parseBackslash=FALSE);
+    static UnicodeString prettify(const UnicodeString &source, UBool parseBackslash=false);
     // digits=-1 determines the number of digits automatically
     static UnicodeString &appendHex(uint32_t number, int32_t digits, UnicodeString &target);
     static UnicodeString toHex(uint32_t number, int32_t digits=-1);
diff --git a/icu4c/source/test/intltest/itrbnf.cpp b/icu4c/source/test/intltest/itrbnf.cpp
index 672b73ddd66..3db1350ae0c 100644
--- a/icu4c/source/test/intltest/itrbnf.cpp
+++ b/icu4c/source/test/intltest/itrbnf.cpp
@@ -278,17 +278,17 @@ IntlTestRBNF::TestAPI() {
       }
       logln(intFormatResult);
       logln(doubleFormatResult);
-      formatter->setLenient(TRUE);
+      formatter->setLenient(true);
       formatter->parse(intFormatResult, intParseResult, status);
       formatter->parse(doubleFormatResult, doubleParseResult, status);
 
-      logln("Parse results for lenient = TRUE, %i, %f", intParseResult.getLong(), doubleParseResult.getDouble());
+      logln("Parse results for lenient = true, %i, %f", intParseResult.getLong(), doubleParseResult.getDouble());
 
-      formatter->setLenient(FALSE);
+      formatter->setLenient(false);
       formatter->parse(intFormatResult, intParseResult, status);
       formatter->parse(doubleFormatResult, doubleParseResult, status);
 
-      logln("Parse results for lenient = FALSE, %i, %f", intParseResult.getLong(), doubleParseResult.getDouble());
+      logln("Parse results for lenient = false, %i, %f", intParseResult.getLong(), doubleParseResult.getDouble());
 
       if(U_FAILURE(status)) {
         errln("Error during parsing");
@@ -417,7 +417,7 @@ void IntlTestRBNF::TestMultiplePluralRules() {
         { "0.02", "two hundredth" },
         { NULL, NULL }
     };
-    doTest(&formatter, testData, TRUE);
+    doTest(&formatter, testData, true);
 }
 
 void IntlTestRBNF::TestFractionalRuleSet()
@@ -505,7 +505,7 @@ void IntlTestRBNF::TestFractionalRuleSet()
             { "1.2856", "1 2/7" },
             { NULL, NULL }
         };
-        doTest(&formatter, testData, FALSE); // exact values aren't parsable from fractions
+        doTest(&formatter, testData, false); // exact values aren't parsable from fractions
     }
 }
 
@@ -1171,10 +1171,10 @@ IntlTestRBNF::TestEnglishSpellout()
             { NULL, NULL}
         };
 
-        doTest(formatter, testData, TRUE);
+        doTest(formatter, testData, true);
 
 #if !UCONFIG_NO_COLLATION
-        formatter->setLenient(TRUE);
+        formatter->setLenient(true);
         static const char* lpTestData[][2] = {
             { "fifty-7", "57" },
             { " fifty-7", "57" },
@@ -1221,7 +1221,7 @@ IntlTestRBNF::TestOrdinalAbbreviations()
             { NULL, NULL}
         };
         
-        doTest(formatter, testData, FALSE);
+        doTest(formatter, testData, false);
     }
     delete formatter;
 }
@@ -1251,10 +1251,10 @@ IntlTestRBNF::TestDurations()
             { NULL, NULL}
         };
         
-        doTest(formatter, testData, TRUE);
+        doTest(formatter, testData, true);
         
 #if !UCONFIG_NO_COLLATION
-        formatter->setLenient(TRUE);
+        formatter->setLenient(true);
         static const char* lpTestData[][2] = {
             { "2-51-33", "10,293" },
             { NULL, NULL}
@@ -1300,7 +1300,7 @@ IntlTestRBNF::TestSpanishSpellout()
             { NULL, NULL}
         };
         
-        doTest(formatter, testData, TRUE);
+        doTest(formatter, testData, true);
     }
     delete formatter;
 }
@@ -1345,10 +1345,10 @@ IntlTestRBNF::TestFrenchSpellout()
             { NULL, NULL}
         };
         
-        doTest(formatter, testData, TRUE);
+        doTest(formatter, testData, true);
         
 #if !UCONFIG_NO_COLLATION
-        formatter->setLenient(TRUE);
+        formatter->setLenient(true);
         static const char* lpTestData[][2] = {
             { "trente-et-un", "31" },
             { "un cent quatre vingt dix huit", "198" },
@@ -1400,7 +1400,7 @@ IntlTestRBNF::TestSwissFrenchSpellout()
     if (U_FAILURE(status)) {
         errcheckln(status, "FAIL: could not construct formatter - %s", u_errorName(status));
     } else {
-        doTest(formatter, swissFrenchTestData, TRUE);
+        doTest(formatter, swissFrenchTestData, true);
     }
     delete formatter;
 }
@@ -1451,7 +1451,7 @@ IntlTestRBNF::TestBelgianFrenchSpellout()
         errcheckln(status, "FAIL: could not construct formatter - %s", u_errorName(status));
     } else {
         // Belgian french should match Swiss french.
-        doTest(formatter, belgianFrenchTestData, TRUE);
+        doTest(formatter, belgianFrenchTestData, true);
     }
     delete formatter;
 }
@@ -1492,7 +1492,7 @@ IntlTestRBNF::TestItalianSpellout()
             { NULL, NULL}
         };
         
-        doTest(formatter, testData, TRUE);
+        doTest(formatter, testData, true);
     }
     delete formatter;
 }
@@ -1531,7 +1531,7 @@ IntlTestRBNF::TestPortugueseSpellout()
             { NULL, NULL}
         };
         
-        doTest(formatter, testData, TRUE);
+        doTest(formatter, testData, true);
     }
     delete formatter;
 }
@@ -1566,10 +1566,10 @@ IntlTestRBNF::TestGermanSpellout()
             { NULL, NULL}
         };
         
-        doTest(formatter, testData, TRUE);
+        doTest(formatter, testData, true);
         
 #if !UCONFIG_NO_COLLATION
-        formatter->setLenient(TRUE);
+        formatter->setLenient(true);
         static const char* lpTestData[][2] = {
             { "ein Tausend sechs Hundert fuenfunddreissig", "1,635" },
             { NULL, NULL}
@@ -1601,7 +1601,7 @@ IntlTestRBNF::TestThaiSpellout()
             { NULL, NULL}
         };
         
-        doTest(formatter, testData, TRUE);
+        doTest(formatter, testData, true);
     }
     delete formatter;
 }
@@ -1631,8 +1631,8 @@ IntlTestRBNF::TestNorwegianSpellout()
             { "-5.678", "minus fem komma seks sju \\u00E5tte" },
             { NULL, NULL }
         };
-        doTest(noFormatter, testDataDefault, TRUE);
-        doTest(nbFormatter, testDataDefault, TRUE);
+        doTest(noFormatter, testDataDefault, true);
+        doTest(nbFormatter, testDataDefault, true);
     }
     delete nbFormatter;
     delete noFormatter;
@@ -1670,7 +1670,7 @@ IntlTestRBNF::TestSwedishSpellout()
             { "-12,345.678", "minus tolv\\u00adtusen tre\\u00adhundra\\u00adfyrtio\\u00adfem komma sex sju \\u00e5tta" },
             { NULL, NULL }
         };
-        doTest(formatter, testDataDefault, TRUE);
+        doTest(formatter, testDataDefault, true);
 
           static const char* testDataNeutrum[][2] = {
               { "101", "ett\\u00adhundra\\u00adett" },
@@ -1684,7 +1684,7 @@ IntlTestRBNF::TestSwedishSpellout()
           formatter->setDefaultRuleSet("%spellout-cardinal-neuter", status);
           if (U_SUCCESS(status)) {
           logln("        testing spellout-cardinal-neuter rules");
-          doTest(formatter, testDataNeutrum, TRUE);
+          doTest(formatter, testDataNeutrum, true);
           }
           else {
           errln("Can't test spellout-cardinal-neuter rules");
@@ -1706,7 +1706,7 @@ IntlTestRBNF::TestSwedishSpellout()
         formatter->setDefaultRuleSet("%spellout-numbering-year", status);
         if (U_SUCCESS(status)) {
             logln("testing year rules");
-            doTest(formatter, testDataYear, TRUE);
+            doTest(formatter, testDataYear, true);
         }
         else {
             errln("Can't test year rules");
@@ -1761,7 +1761,7 @@ IntlTestRBNF::TestSmallValues()
         { NULL, NULL }
         };
 
-        doTest(formatter, testDataDefault, TRUE);
+        doTest(formatter, testDataDefault, true);
 
         delete formatter;
     }
@@ -1788,7 +1788,7 @@ IntlTestRBNF::TestLocalizations(void)
                 { "12345", "more'n you'll ever need" },
                 { NULL, NULL }
             };
-            doTest(&formatter, testData, FALSE);
+            doTest(&formatter, testData, false);
         }
 
         {
@@ -1804,7 +1804,7 @@ IntlTestRBNF::TestLocalizations(void)
             if (U_FAILURE(status)) {
                 errln("failed to build second formatter");
             } else {
-                doTest(&formatter0, testData, FALSE);
+                doTest(&formatter0, testData, false);
 
                 {
                 // exercise localization info
@@ -1953,7 +1953,7 @@ IntlTestRBNF::TestAllLocales()
 
                 // regular parse
                 status = U_ZERO_ERROR;
-                f->setLenient(FALSE);
+                f->setLenient(false);
                 f->parse(str, num, status);
                 if (U_FAILURE(status)) {
                     errln(UnicodeString(loc->getName()) + names[j]
@@ -1975,7 +1975,7 @@ IntlTestRBNF::TestAllLocales()
                 }
                 // lenient parse
                 status = U_ZERO_ERROR;
-                f->setLenient(TRUE);
+                f->setLenient(true);
                 f->parse(str, num, status);
                 if (U_FAILURE(status)) {
                     errln(UnicodeString(loc->getName()) + names[j]
@@ -2060,7 +2060,7 @@ IntlTestRBNF::TestSetDecimalFormatSymbols() {
     result.remove();
 
     /* Set new symbol for testing */
-    dfs.setSymbol(DecimalFormatSymbols::kGroupingSeparatorSymbol, UnicodeString("&"), TRUE);
+    dfs.setSymbol(DecimalFormatSymbols::kGroupingSeparatorSymbol, UnicodeString("&"), true);
     rbnf.setDecimalFormatSymbols(dfs);
 
     rbnf.format(number, result);
@@ -2094,7 +2094,7 @@ void IntlTestRBNF::TestPluralRules() {
             { NULL, NULL }
     };
 
-    doTest(&enFormatter, enTestData, TRUE);
+    doTest(&enFormatter, enTestData, true);
 
     // This is trying to model the feminine form, but don't worry about the details too much.
     // We're trying to test the plural rules.
@@ -2159,7 +2159,7 @@ void IntlTestRBNF::TestPluralRules() {
         errln("Unable to create RuleBasedNumberFormat - " + UnicodeString(u_errorName(status)));
         return;
     }
-    doTest(&ruFormatter, ruTestData, TRUE);
+    doTest(&ruFormatter, ruTestData, true);
 
     // Make sure there are no divide by 0 errors.
     UnicodeString result;
diff --git a/icu4c/source/test/intltest/itspoof.cpp b/icu4c/source/test/intltest/itspoof.cpp
index 41e00c90268..e7f3aa54b45 100644
--- a/icu4c/source/test/intltest/itspoof.cpp
+++ b/icu4c/source/test/intltest/itspoof.cpp
@@ -36,13 +36,13 @@
 } UPRV_BLOCK_MACRO_END
 
 #define TEST_ASSERT(expr) UPRV_BLOCK_MACRO_BEGIN { \
-    if ((expr)==FALSE) { \
+    if ((expr)==false) { \
         errln("Test Failure at file %s, line %d: \"%s\" is false.", __FILE__, __LINE__, #expr); \
     } \
 } UPRV_BLOCK_MACRO_END
 
 #define TEST_ASSERT_MSG(expr, msg) UPRV_BLOCK_MACRO_BEGIN { \
-    if ((expr)==FALSE) { \
+    if ((expr)==false) { \
         dataerrln("Test Failure at file %s, line %d, %s: \"%s\" is false.", __FILE__, __LINE__, msg, #expr); \
     } \
 } UPRV_BLOCK_MACRO_END
@@ -320,14 +320,14 @@ static UnicodeString parseHex(const UnicodeString &in) {
 // Minimum of 4 digits, no leading zeroes for positions 5 and up.
 //
 static void appendHexUChar(UnicodeString &dest, UChar32 c) {
-    UBool   doZeroes = FALSE;    
+    UBool   doZeroes = false;    
     for (int bitNum=28; bitNum>=0; bitNum-=4) {
         if (bitNum <= 12) {
-            doZeroes = TRUE;
+            doZeroes = true;
         }
         int hexDigit = (c>>bitNum) & 0x0f;
         if (hexDigit != 0 || doZeroes) {
-            doZeroes = TRUE;
+            doZeroes = true;
             dest.append((UChar)(hexDigit<=9? hexDigit + 0x30: hexDigit -10 + 0x41));
         }
     }
@@ -386,7 +386,7 @@ void IntlTestSpoof::testConfData() {
 
         UnicodeString rawExpected = parseHex(parseLine.group(2, status));
         UnicodeString expected;
-        Normalizer::decompose(rawExpected, FALSE /*NFD*/, 0, expected, status);
+        Normalizer::decompose(rawExpected, false /*NFD*/, 0, expected, status);
         TEST_ASSERT_SUCCESS(status);
 
         int32_t skeletonType = 0;
@@ -440,7 +440,7 @@ void IntlTestSpoof::testScriptSet() {
     TEST_ASSERT_SUCCESS(status);
     TEST_ASSERT(!(s1 == s2));
     TEST_ASSERT(s1.test(USCRIPT_ARABIC, status));
-    TEST_ASSERT(s1.test(USCRIPT_GREEK, status) == FALSE);
+    TEST_ASSERT(s1.test(USCRIPT_GREEK, status) == false);
 
     status = U_ZERO_ERROR;
     s1.reset(USCRIPT_ARABIC, status);
@@ -512,7 +512,7 @@ void IntlTestSpoof::testScriptSet() {
           case 1: TEST_ASSERT_EQ(USCRIPT_VAI, n); break;
           case 2: TEST_ASSERT_EQ(USCRIPT_AFAKA, n); break;
           case 3: TEST_ASSERT_EQ(-1, (int32_t)n); break;
-          default: TEST_ASSERT(FALSE);
+          default: TEST_ASSERT(false);
         }
     }
     TEST_ASSERT_SUCCESS(status);
diff --git a/icu4c/source/test/intltest/itutil.cpp b/icu4c/source/test/intltest/itutil.cpp
index 5793261a91d..641abf194a3 100644
--- a/icu4c/source/test/intltest/itutil.cpp
+++ b/icu4c/source/test/intltest/itutil.cpp
@@ -204,7 +204,7 @@ class IcuTestErrorCodeTestHelper : public IntlTest {
   public:
     void errln( const UnicodeString &message ) U_OVERRIDE {
         test->assertFalse("Already saw an error", seenError);
-        seenError = TRUE;
+        seenError = true;
         test->assertEquals("Message for Error", expectedErrln, message);
         if (expectedDataErr) {
             test->errln("Got non-data error, but expected data error");
@@ -213,7 +213,7 @@ class IcuTestErrorCodeTestHelper : public IntlTest {
 
     void dataerrln( const UnicodeString &message ) U_OVERRIDE {
         test->assertFalse("Already saw an error", seenError);
-        seenError = TRUE;
+        seenError = true;
         test->assertEquals("Message for Error", expectedErrln, message);
         if (!expectedDataErr) {
             test->errln("Got data error, but expected non-data error");
@@ -232,8 +232,8 @@ void ErrorCodeTest::TestIcuTestErrorCode() {
 
     // Test destructor message
     helper.expectedErrln = u"AAA destructor: expected success but got error: U_ILLEGAL_PAD_POSITION";
-    helper.expectedDataErr = FALSE;
-    helper.seenError = FALSE;
+    helper.expectedDataErr = false;
+    helper.seenError = false;
     {
         IcuTestErrorCode testStatus(helper, "AAA");
         testStatus.set(U_ILLEGAL_PAD_POSITION);
@@ -242,8 +242,8 @@ void ErrorCodeTest::TestIcuTestErrorCode() {
 
     // Test destructor message with scope
     helper.expectedErrln = u"BBB destructor: expected success but got error: U_ILLEGAL_PAD_POSITION scope: foo";
-    helper.expectedDataErr = FALSE;
-    helper.seenError = FALSE;
+    helper.expectedDataErr = false;
+    helper.seenError = false;
     {
         IcuTestErrorCode testStatus(helper, "BBB");
         testStatus.setScope("foo");
@@ -253,15 +253,15 @@ void ErrorCodeTest::TestIcuTestErrorCode() {
 
     // Check errIfFailure message with scope
     helper.expectedErrln = u"CCC expected success but got error: U_ILLEGAL_PAD_POSITION scope: foo";
-    helper.expectedDataErr = FALSE;
-    helper.seenError = FALSE;
+    helper.expectedDataErr = false;
+    helper.seenError = false;
     {
         IcuTestErrorCode testStatus(helper, "CCC");
         testStatus.setScope("foo");
         testStatus.set(U_ILLEGAL_PAD_POSITION);
         testStatus.errIfFailureAndReset();
         assertTrue("Should have seen an error", helper.seenError);
-        helper.seenError = FALSE;
+        helper.seenError = false;
         helper.expectedErrln = u"CCC expected success but got error: U_ILLEGAL_CHAR_FOUND scope: foo - 5.4300";
         testStatus.set(U_ILLEGAL_CHAR_FOUND);
         testStatus.errIfFailureAndReset("%6.4f", 5.43);
@@ -270,14 +270,14 @@ void ErrorCodeTest::TestIcuTestErrorCode() {
 
     // Check errDataIfFailure message without scope
     helper.expectedErrln = u"DDD data: expected success but got error: U_ILLEGAL_PAD_POSITION";
-    helper.expectedDataErr = TRUE;
-    helper.seenError = FALSE;
+    helper.expectedDataErr = true;
+    helper.seenError = false;
     {
         IcuTestErrorCode testStatus(helper, "DDD");
         testStatus.set(U_ILLEGAL_PAD_POSITION);
         testStatus.errDataIfFailureAndReset();
         assertTrue("Should have seen an error", helper.seenError);
-        helper.seenError = FALSE;
+        helper.seenError = false;
         helper.expectedErrln = u"DDD data: expected success but got error: U_ILLEGAL_CHAR_FOUND - 5.4300";
         testStatus.set(U_ILLEGAL_CHAR_FOUND);
         testStatus.errDataIfFailureAndReset("%6.4f", 5.43);
@@ -286,8 +286,8 @@ void ErrorCodeTest::TestIcuTestErrorCode() {
 
     // Check expectFailure
     helper.expectedErrln = u"EEE expected: U_ILLEGAL_CHAR_FOUND but got error: U_ILLEGAL_PAD_POSITION";
-    helper.expectedDataErr = FALSE;
-    helper.seenError = FALSE;
+    helper.expectedDataErr = false;
+    helper.seenError = false;
     {
         IcuTestErrorCode testStatus(helper, "EEE");
         testStatus.set(U_ILLEGAL_PAD_POSITION);
@@ -296,7 +296,7 @@ void ErrorCodeTest::TestIcuTestErrorCode() {
         testStatus.set(U_ILLEGAL_PAD_POSITION);
         testStatus.expectErrorAndReset(U_ILLEGAL_CHAR_FOUND);
         assertTrue("Should have seen an error", helper.seenError);
-        helper.seenError = FALSE;
+        helper.seenError = false;
         helper.expectedErrln = u"EEE expected: U_ILLEGAL_CHAR_FOUND but got error: U_ZERO_ERROR scope: scopety scope - 5.4300";
         testStatus.setScope("scopety scope");
         testStatus.set(U_ILLEGAL_PAD_POSITION);
diff --git a/icu4c/source/test/intltest/listformattertest.cpp b/icu4c/source/test/intltest/listformattertest.cpp
index 1a4ec97f37d..e98980cfb2b 100644
--- a/icu4c/source/test/intltest/listformattertest.cpp
+++ b/icu4c/source/test/intltest/listformattertest.cpp
@@ -72,14 +72,14 @@ void ListFormatterTest::ExpectPositions(
     ConstrainedFieldPosition cfp;
     cfp.constrainCategory(UFIELD_CATEGORY_LIST);
     if (tupleCount > 10) {
-      assertTrue("internal error, tupleCount too large", FALSE);
+      assertTrue("internal error, tupleCount too large", false);
     } else {
         for (int i = 0; i < tupleCount; ++i) {
-            found[i] = FALSE;
+            found[i] = false;
         }
     }
     while (iter.nextPosition(cfp, status)) {
-        UBool ok = FALSE;
+        UBool ok = false;
         int32_t id = cfp.getField();
         int32_t start = cfp.getStart();
         int32_t limit = cfp.getLimit();
@@ -91,17 +91,17 @@ void ListFormatterTest::ExpectPositions(
                 continue;
             }
             if (values[i*3] == id && values[i*3+1] == start && values[i*3+2] == limit) {
-                found[i] = ok = TRUE;
+                found[i] = ok = true;
                 break;
             }
         }
         assertTrue((UnicodeString)"found [" + attrString(id) + "," + start + "," + limit + "]", ok);
     }
     // check that all were found
-    UBool ok = TRUE;
+    UBool ok = true;
     for (int i = 0; i < tupleCount; ++i) {
         if (!found[i]) {
-            ok = FALSE;
+            ok = false;
             assertTrue((UnicodeString) "missing [" + attrString(values[i*3]) + "," + values[i*3+1] +
                        "," + values[i*3+2] + "]", found[i]);
         }
@@ -153,7 +153,7 @@ UBool ListFormatterTest::RecordFourCases(const Locale& locale, UnicodeString one
     LocalPointer formatter(ListFormatter::createInstance(locale, errorCode));
     if (U_FAILURE(errorCode)) {
         dataerrln("ListFormatter::createInstance(\"%s\", errorCode) failed in RecordFourCases: %s", locale.getName(), u_errorName(errorCode));
-        return FALSE;
+        return false;
     }
     UnicodeString input1[] = {one};
     formatter->format(input1, 1, results[0], errorCode);
@@ -165,9 +165,9 @@ UBool ListFormatterTest::RecordFourCases(const Locale& locale, UnicodeString one
     formatter->format(input4, 4, results[3], errorCode);
     if (U_FAILURE(errorCode)) {
         errln("RecordFourCases failed: %s", u_errorName(errorCode));
-        return FALSE;
+        return false;
     }
-    return TRUE;
+    return true;
 }
 
 void ListFormatterTest::TestRoot() {
diff --git a/icu4c/source/test/intltest/localebuildertest.cpp b/icu4c/source/test/intltest/localebuildertest.cpp
index 7cade3650c1..5623dd1e37c 100644
--- a/icu4c/source/test/intltest/localebuildertest.cpp
+++ b/icu4c/source/test/intltest/localebuildertest.cpp
@@ -62,7 +62,7 @@ void LocaleBuilderTest::Verify(LocaleBuilder& bld, const char* expected, const c
         errln(msg, u_errorName(copyStatus));
     }
     if (!bld.copyErrorTo(errorStatus) || errorStatus != U_ILLEGAL_ARGUMENT_ERROR) {
-        errln("Should always get the previous error and return FALSE");
+        errln("Should always get the previous error and return false");
     }
     Locale loc = bld.build(status);
     if (U_FAILURE(status)) {
diff --git a/icu4c/source/test/intltest/localematchertest.cpp b/icu4c/source/test/intltest/localematchertest.cpp
index 06bf8f8c7a6..07382efbf0b 100644
--- a/icu4c/source/test/intltest/localematchertest.cpp
+++ b/icu4c/source/test/intltest/localematchertest.cpp
@@ -572,20 +572,20 @@ UBool LocaleMatcherTest::dataDriven(const TestCase &test, IcuTestErrorCode &erro
             favor = ULOCMATCH_FAVOR_SCRIPT;
         } else {
             errln(UnicodeString(u"unsupported FavorSubtag value ") + test.favor);
-            return FALSE;
+            return false;
         }
         builder.setFavorSubtag(favor);
     }
     if (!test.threshold.isEmpty()) {
         infoln("skipping test case on line %d with non-default threshold: not exposed via API",
                (int)test.lineNr);
-        return TRUE;
+        return true;
         // int32_t threshold = Integer.valueOf(test.threshold);
         // builder.internalSetThresholdDistance(threshold);
     }
     LocaleMatcher matcher = builder.build(errorCode);
     if (errorCode.errIfFailureAndReset("LocaleMatcher::Builder::build()")) {
-        return FALSE;
+        return false;
     }
 
     Locale expMatchLocale("");
@@ -595,7 +595,7 @@ UBool LocaleMatcherTest::dataDriven(const TestCase &test, IcuTestErrorCode &erro
         const Locale *bestSupported = matcher.getBestMatchForListString(desiredSP, errorCode);
         if (!assertEquals("bestSupported from string",
                           locString(expMatch), locString(bestSupported))) {
-            return FALSE;
+            return false;
         }
         LocalePriorityList desired(test.desired.toStringPiece(), errorCode);
         LocalePriorityList::Iterator desiredIter = desired.iterator();
@@ -646,7 +646,7 @@ void LocaleMatcherTest::testDataDriven() {
     CharString path(getSourceTestData(errorCode), errorCode);
     path.appendPathPart("localeMatcherTest.txt", errorCode);
     const char *codePage = "UTF-8";
-    LocalUCHARBUFPointer f(ucbuf_open(path.data(), &codePage, TRUE, FALSE, errorCode));
+    LocalUCHARBUFPointer f(ucbuf_open(path.data(), &codePage, true, false, errorCode));
     if(errorCode.errIfFailureAndReset("ucbuf_open(localeMatcherTest.txt)")) {
         return;
     }
@@ -657,7 +657,7 @@ void LocaleMatcherTest::testDataDriven() {
     int32_t numPassed = 0;
     while ((p = ucbuf_readline(f.getAlias(), &lineLength, errorCode)) != nullptr &&
             errorCode.isSuccess()) {
-        line.setTo(FALSE, p, lineLength);
+        line.setTo(false, p, lineLength);
         if (!readTestCase(line, test, errorCode)) {
             if (errorCode.errIfFailureAndReset(
                     "test data syntax error on line %d", (int)test.lineNr)) {
diff --git a/icu4c/source/test/intltest/locnmtst.cpp b/icu4c/source/test/intltest/locnmtst.cpp
index 157e7d3fbc2..811988b5ac5 100644
--- a/icu4c/source/test/intltest/locnmtst.cpp
+++ b/icu4c/source/test/intltest/locnmtst.cpp
@@ -12,7 +12,7 @@
 
 /*
  Usage:
-    test_assert(    Test (should be TRUE)  )
+    test_assert(    Test (should be true)  )
 
    Example:
        test_assert(i==3);
@@ -29,7 +29,7 @@
 
 /*
  Usage:
-    test_assert_print(    Test (should be TRUE),  printable  )
+    test_assert_print(    Test (should be true),  printable  )
 
    Example:
        test_assert(i==3, toString(i));
@@ -519,40 +519,40 @@ void LocaleDisplayNamesTest::VerifyNoSubstitute(LocaleDisplayNames* ldn) {
   test_assert(UDISPCTX_NO_SUBSTITUTE == context);
 
   ldn->regionDisplayName(unknown_region, temp);
-  test_assert(TRUE == temp.isBogus());
+  test_assert(true == temp.isBogus());
   ldn->languageDisplayName(unknown_lang, temp);
-  test_assert(TRUE == temp.isBogus());
+  test_assert(true == temp.isBogus());
   ldn->scriptDisplayName(unknown_script, temp);
-  test_assert(TRUE == temp.isBogus());
+  test_assert(true == temp.isBogus());
   ldn->variantDisplayName(unknown_variant, temp);
-  test_assert(TRUE == temp.isBogus());
+  test_assert(true == temp.isBogus());
   ldn->keyDisplayName(unknown_key, temp);
-  test_assert(TRUE == temp.isBogus());
+  test_assert(true == temp.isBogus());
   ldn->keyValueDisplayName("ca", unknown_ca_value, temp);
-  test_assert(TRUE == temp.isBogus());
+  test_assert(true == temp.isBogus());
 
   ldn->localeDisplayName(unknown_lang, temp);
-  test_assert(TRUE == temp.isBogus());
+  test_assert(true == temp.isBogus());
   ldn->localeDisplayName(known_lang_unknown_script, temp);
-  test_assert(TRUE == temp.isBogus());
+  test_assert(true == temp.isBogus());
   ldn->localeDisplayName(unknown_lang_unknown_script, temp);
-  test_assert(TRUE == temp.isBogus());
+  test_assert(true == temp.isBogus());
   ldn->localeDisplayName(unknown_lang_known_script, temp);
-  test_assert(TRUE == temp.isBogus());
+  test_assert(true == temp.isBogus());
   ldn->localeDisplayName(unknown_lang_unknown_region, temp);
-  test_assert(TRUE == temp.isBogus());
+  test_assert(true == temp.isBogus());
   ldn->localeDisplayName(known_lang_unknown_region, temp);
-  test_assert(TRUE == temp.isBogus());
+  test_assert(true == temp.isBogus());
   ldn->localeDisplayName(unknown_lang_known_region, temp);
-  test_assert(TRUE == temp.isBogus());
+  test_assert(true == temp.isBogus());
   ldn->localeDisplayName(unknown_lang_unknown_script_unknown_region, temp);
-  test_assert(TRUE == temp.isBogus());
+  test_assert(true == temp.isBogus());
   ldn->localeDisplayName(known_lang_unknown_script_unknown_region, temp);
-  test_assert(TRUE == temp.isBogus());
+  test_assert(true == temp.isBogus());
   ldn->localeDisplayName(unknown_lang_known_script_unknown_region, temp);
-  test_assert(TRUE == temp.isBogus());
+  test_assert(true == temp.isBogus());
   ldn->localeDisplayName(unknown_lang_known_script_known_region, temp);
-  test_assert(TRUE == temp.isBogus());
+  test_assert(true == temp.isBogus());
 
   ldn->localeDisplayName(known_lang, temp);
   test_assert_equal("Englisch", temp);
diff --git a/icu4c/source/test/intltest/loctest.cpp b/icu4c/source/test/intltest/loctest.cpp
index cb902fd0140..db3401b073a 100644
--- a/icu4c/source/test/intltest/loctest.cpp
+++ b/icu4c/source/test/intltest/loctest.cpp
@@ -142,7 +142,7 @@ static const char* const rawData[33][8] = {
 
 /*
  Usage:
-    test_assert(    Test (should be TRUE)  )
+    test_assert(    Test (should be true)  )
 
    Example:
        test_assert(i==3);
@@ -159,7 +159,7 @@ static const char* const rawData[33][8] = {
 
 /*
  Usage:
-    test_assert_print(    Test (should be TRUE),  printable  )
+    test_assert_print(    Test (should be true),  printable  )
 
    Example:
        test_assert(i==3, toString(i));
@@ -382,7 +382,7 @@ void LocaleTest::TestBasicGetters() {
 
     Locale bogusLang("THISISABOGUSLANGUAGE"); // Jitterbug 2864: language code too long
     if(!bogusLang.isBogus()) {
-        errln("Locale(\"THISISABOGUSLANGUAGE\").isBogus()==FALSE");
+        errln("Locale(\"THISISABOGUSLANGUAGE\").isBogus()==false");
     }
 
     bogusLang=Locale("eo");
@@ -1662,12 +1662,12 @@ void
 LocaleTest::TestSetIsBogus() {
     Locale l("en_US");
     l.setToBogus();
-    if(l.isBogus() != TRUE) {
-        errln("After setting bogus, didn't return TRUE");
+    if(l.isBogus() != true) {
+        errln("After setting bogus, didn't return true");
     }
     l = "en_US"; // This should reset bogus
-    if(l.isBogus() != FALSE) {
-        errln("After resetting bogus, didn't return FALSE");
+    if(l.isBogus() != false) {
+        errln("After resetting bogus, didn't return false");
     }
 }
 
@@ -4692,12 +4692,12 @@ void LocaleTest::checkRegisteredCollators(const char *expectExtra) {
 
     // 2. add all of NEW
     const UnicodeString *locStr;
-    UBool foundExpected = FALSE;
+    UBool foundExpected = false;
     while((locStr = newEnum->snext(status)) && U_SUCCESS(status)) {
         count2++;
 
         if(expectExtra != NULL && expectStr == *locStr) {
-            foundExpected = TRUE;
+            foundExpected = true;
             logln(UnicodeString("Found expected registered collator: ","") + expectStr);
         }
         (void)foundExpected;    // Hush unused variable compiler warning.
@@ -5385,10 +5385,10 @@ void LocaleTest::TestIsRightToLeft() {
     assertFalse("root LTR", Locale::getRoot().isRightToLeft());
     assertFalse("zh LTR", Locale::getChinese().isRightToLeft());
     assertTrue("ar RTL", Locale("ar").isRightToLeft());
-    assertTrue("und-EG RTL", Locale("und-EG").isRightToLeft(), FALSE, TRUE);
+    assertTrue("und-EG RTL", Locale("und-EG").isRightToLeft(), false, true);
     assertFalse("fa-Cyrl LTR", Locale("fa-Cyrl").isRightToLeft());
     assertTrue("en-Hebr RTL", Locale("en-Hebr").isRightToLeft());
-    assertTrue("ckb RTL", Locale("ckb").isRightToLeft(), FALSE, TRUE);  // Sorani Kurdish
+    assertTrue("ckb RTL", Locale("ckb").isRightToLeft(), false, true);  // Sorani Kurdish
     assertFalse("fil LTR", Locale("fil").isRightToLeft());
     assertFalse("he-Zyxw LTR", Locale("he-Zyxw").isRightToLeft());
 }
diff --git a/icu4c/source/test/intltest/lstmbetst.cpp b/icu4c/source/test/intltest/lstmbetst.cpp
index 0ffc0fa20e5..39bc6174b8b 100644
--- a/icu4c/source/test/intltest/lstmbetst.cpp
+++ b/icu4c/source/test/intltest/lstmbetst.cpp
@@ -89,7 +89,7 @@ void LSTMBETest::runTestFromFile(const char* filename) {
     }
 
     //  Put the test data into a UnicodeString
-    UnicodeString testString(FALSE, testFile, len);
+    UnicodeString testString(false, testFile, len);
 
     int32_t start = 0;
 
diff --git a/icu4c/source/test/intltest/measfmttest.cpp b/icu4c/source/test/intltest/measfmttest.cpp
index cf5428a1c20..9f8b5b0203a 100644
--- a/icu4c/source/test/intltest/measfmttest.cpp
+++ b/icu4c/source/test/intltest/measfmttest.cpp
@@ -4691,7 +4691,7 @@ void MeasureFormatTest::TestIndividualPluralFallback() {
     if (errorCode.errIfFailureAndReset("mf.format(...) failed.")) {
         return;
     }
-    assertEquals("2 deg temp in fr_CA", expected, actual, TRUE);
+    assertEquals("2 deg temp in fr_CA", expected, actual, true);
     errorCode.errIfFailureAndReset("mf.format failed");
 }
 
@@ -5350,7 +5350,7 @@ void MeasureFormatTest::Test21223_FrenchDuration() {
     //     auto& loc = locales[i];
     //     MeasureFormat mf1(loc, UMEASFMT_WIDTH_NARROW, status);
     //     mf1.formatMeasures(H5M10, UPRV_LENGTHOF(H5M10), result.remove(), pos, status);
-    //     assertFalse(result + u" " + loc.getName(), TRUE);
+    //     assertFalse(result + u" " + loc.getName(), true);
     // }
 }
 
diff --git a/icu4c/source/test/intltest/miscdtfm.cpp b/icu4c/source/test/intltest/miscdtfm.cpp
index 134f9136834..4fc2460251d 100644
--- a/icu4c/source/test/intltest/miscdtfm.cpp
+++ b/icu4c/source/test/intltest/miscdtfm.cpp
@@ -46,10 +46,10 @@ DateFormatMiscTests::failure(UErrorCode status, const char* msg)
 {
     if(U_FAILURE(status)) {
         errcheckln(status, UnicodeString("FAIL: ") + msg + " failed, error " + u_errorName(status));
-        return TRUE;
+        return true;
     }
 
-    return FALSE;
+    return false;
 }
 
 /*
@@ -96,20 +96,20 @@ DateFormatMiscTests::test4097450()
     };
     
 /*    UBool dresult [] = {
-        TRUE, 
-        FALSE, 
-        FALSE,  
-        TRUE,
-        TRUE, 
-        FALSE, 
-        FALSE,  
-        TRUE,
-        FALSE,
-        FALSE,
-        TRUE, 
-        FALSE,
-        FALSE, 
-        FALSE
+        true, 
+        false, 
+        false,  
+        true,
+        true, 
+        false, 
+        false,  
+        true,
+        false,
+        false,
+        true, 
+        false,
+        false, 
+        false
     };*/
 
     UErrorCode status = U_ZERO_ERROR;
diff --git a/icu4c/source/test/intltest/msfmrgts.cpp b/icu4c/source/test/intltest/msfmrgts.cpp
index d7c8573b944..067c1238228 100644
--- a/icu4c/source/test/intltest/msfmrgts.cpp
+++ b/icu4c/source/test/intltest/msfmrgts.cpp
@@ -67,10 +67,10 @@ MessageFormatRegressionTest::failure(UErrorCode status, const char* msg, UBool p
         } else {
             errln(UnicodeString("FAIL: ") + msg + " failed, error " + u_errorName(status));
         }
-        return TRUE;
+        return true;
     }
 
-    return FALSE;
+    return false;
 }
 
 /* @bug 4074764
@@ -186,7 +186,7 @@ void MessageFormatRegressionTest::Test4031438()
     MessageFormat *messageFormatter = new MessageFormat("", status);
     failure(status, "new MessageFormat");
 
-    const UBool possibleDataError = TRUE;
+    const UBool possibleDataError = true;
 
     //try {
         logln("Apply with pattern : " + pattern1);
@@ -344,7 +344,7 @@ void MessageFormatRegressionTest::Test4104976()
     failure(status, "new ChoiceFormat");
     //try {
         log("Compares to null is always false, returned : ");
-        logln(cf == NULL ? "TRUE" : "FALSE");
+        logln(cf == NULL ? "true" : "false");
     /*} catch (Exception foo) {
         errln("ChoiceFormat.equals(null) throws exception.");
     }*/
@@ -488,7 +488,7 @@ void MessageFormatRegressionTest::Test4116444()
     for (int i = 0; i < 3; i++) {
         UnicodeString pattern = patterns[i];
         mf->applyPattern(pattern, status);
-        failure(status, "mf->applyPattern", TRUE);
+        failure(status, "mf->applyPattern", true);
 
         //try {
         int32_t count = 0;
@@ -738,7 +738,7 @@ void MessageFormatRegressionTest::Test4118592()
 void MessageFormatRegressionTest::Test4118594()
 {
     UErrorCode status = U_ZERO_ERROR;
-    const UBool possibleDataError = TRUE;
+    const UBool possibleDataError = true;
     MessageFormat *mf = new MessageFormat("{0}, {0}, {0}", status);
     failure(status, "new MessageFormat");
     UnicodeString forParsing("x, y, z");
@@ -790,7 +790,7 @@ void MessageFormatRegressionTest::Test4105380()
     UnicodeString patternText1("The disk \"{1}\" contains {0}.");
     UnicodeString patternText2("There are {0} on the disk \"{1}\"");
     UErrorCode status = U_ZERO_ERROR;
-    const UBool possibleDataError = TRUE;
+    const UBool possibleDataError = true;
     MessageFormat *form1 = new MessageFormat(patternText1, status);
     failure(status, "new MessageFormat");
     MessageFormat *form2 = new MessageFormat(patternText2, status);
@@ -890,7 +890,7 @@ void MessageFormatRegressionTest::Test4142938()
         };
         FieldPosition pos(FieldPosition::DONT_CARE);
         out = mf->format(objs, 1, out, pos, status);
-        if (!failure(status, "mf->format", TRUE)) {
+        if (!failure(status, "mf->format", true)) {
             if (SUFFIX[i] == "") {
                 if (out != PREFIX[i])
                     errln((UnicodeString)"" + i + ": Got \"" + out + "\"; Want \"" + PREFIX[i] + "\"");
diff --git a/icu4c/source/test/intltest/msfmrgts.h b/icu4c/source/test/intltest/msfmrgts.h
index fbf37fa23be..72ea6f5ba44 100644
--- a/icu4c/source/test/intltest/msfmrgts.h
+++ b/icu4c/source/test/intltest/msfmrgts.h
@@ -49,7 +49,7 @@ public:
     void TestAPI(void);
 
 protected:
-    UBool failure(UErrorCode status, const char* msg, UBool possibleDataError=FALSE);
+    UBool failure(UErrorCode status, const char* msg, UBool possibleDataError=false);
 
 };
 
diff --git a/icu4c/source/test/intltest/nmfmapts.cpp b/icu4c/source/test/intltest/nmfmapts.cpp
index 3a209a6756e..a8b8f649e7f 100644
--- a/icu4c/source/test/intltest/nmfmapts.cpp
+++ b/icu4c/source/test/intltest/nmfmapts.cpp
@@ -260,7 +260,7 @@ class NFTestFactory : public SimpleNumberFormatFactory {
 
 public:
     NFTestFactory() 
-        : SimpleNumberFormatFactory(SRC_LOC, TRUE)
+        : SimpleNumberFormatFactory(SRC_LOC, true)
     {
         UErrorCode status = U_ZERO_ERROR;
         currencyStyle = NumberFormat::createInstance(SWAP_LOC, status);
diff --git a/icu4c/source/test/intltest/nmfmtrt.cpp b/icu4c/source/test/intltest/nmfmtrt.cpp
index 30ff2ac763f..8133f4a34d4 100644
--- a/icu4c/source/test/intltest/nmfmtrt.cpp
+++ b/icu4c/source/test/intltest/nmfmtrt.cpp
@@ -26,10 +26,10 @@
 // class NumberFormatRoundTripTest
 // *****************************************************************************
 
-UBool NumberFormatRoundTripTest::verbose                  = FALSE;
-UBool NumberFormatRoundTripTest::STRING_COMPARE           = TRUE;
-UBool NumberFormatRoundTripTest::EXACT_NUMERIC_COMPARE    = FALSE;
-UBool NumberFormatRoundTripTest::DEBUG_VAR                = FALSE;
+UBool NumberFormatRoundTripTest::verbose                  = false;
+UBool NumberFormatRoundTripTest::STRING_COMPARE           = true;
+UBool NumberFormatRoundTripTest::EXACT_NUMERIC_COMPARE    = false;
+UBool NumberFormatRoundTripTest::DEBUG_VAR                = false;
 double NumberFormatRoundTripTest::MAX_ERROR               = 1e-14;
 double NumberFormatRoundTripTest::max_numeric_error       = 0.0;
 double NumberFormatRoundTripTest::min_numeric_error       = 1.0;
@@ -54,10 +54,10 @@ NumberFormatRoundTripTest::failure(UErrorCode status, const char* msg, UBool pos
         } else {
             errln(UnicodeString("FAIL: ") + msg + " failed, error " + u_errorName(status));
         }
-        return TRUE;
+        return true;
     }
 
-    return FALSE;
+    return false;
 }
 
 uint32_t
@@ -97,19 +97,19 @@ NumberFormatRoundTripTest::start()
     logln("Default Locale");
 
     fmt = NumberFormat::createInstance(status);
-    if (!failure(status, "NumberFormat::createInstance", TRUE)){
+    if (!failure(status, "NumberFormat::createInstance", true)){
         test(fmt);
     }
     delete fmt;
 
     fmt = NumberFormat::createCurrencyInstance(status);
-    if (!failure(status, "NumberFormat::createCurrencyInstance", TRUE)){
+    if (!failure(status, "NumberFormat::createCurrencyInstance", true)){
         test(fmt);
     }
     delete fmt;
 
     fmt = NumberFormat::createPercentInstance(status);
-    if (!failure(status, "NumberFormat::createPercentInstance", TRUE)){
+    if (!failure(status, "NumberFormat::createPercentInstance", true)){
         test(fmt);
     }
     delete fmt;
@@ -270,14 +270,14 @@ NumberFormatRoundTripTest::test(NumberFormat *fmt, const Formattable& value)
     if(STRING_COMPARE) {
         if (s != s2) {
             errln("*** STRING ERROR \"" + escape(s) + "\" != \"" + escape(s2) + "\"");
-            show = TRUE;
+            show = true;
         }
     }
 
     if(EXACT_NUMERIC_COMPARE) {
         if(value != n) {
             errln("*** NUMERIC ERROR");
-            show = TRUE;
+            show = true;
         }
     }
     else {
@@ -286,7 +286,7 @@ NumberFormatRoundTripTest::test(NumberFormat *fmt, const Formattable& value)
 
         if(error > MAX_ERROR) {
             errln(UnicodeString("*** NUMERIC ERROR ") + error);
-            show = TRUE;
+            show = true;
         }
 
         if (error > max_numeric_error) 
diff --git a/icu4c/source/test/intltest/nmfmtrt.h b/icu4c/source/test/intltest/nmfmtrt.h
index 4770e55c428..6585693eb13 100644
--- a/icu4c/source/test/intltest/nmfmtrt.h
+++ b/icu4c/source/test/intltest/nmfmtrt.h
@@ -69,7 +69,7 @@ public:
     }
 
 protected:
-    UBool failure(UErrorCode status, const char* msg, UBool possibleDataError=FALSE);
+    UBool failure(UErrorCode status, const char* msg, UBool possibleDataError=false);
 
 };
 
diff --git a/icu4c/source/test/intltest/normconf.cpp b/icu4c/source/test/intltest/normconf.cpp
index 8129ea14787..e2ddc0d49ea 100644
--- a/icu4c/source/test/intltest/normconf.cpp
+++ b/icu4c/source/test/intltest/normconf.cpp
@@ -311,7 +311,7 @@ UBool NormalizerConformanceTest::checkConformance(const UnicodeString* field,
                                                   const char *line,
                                                   int32_t options,
                                                   UErrorCode &status) {
-    UBool pass = TRUE, result;
+    UBool pass = true, result;
     UnicodeString out, fcd;
     int32_t fieldNum;
 
@@ -329,19 +329,19 @@ UBool NormalizerConformanceTest::checkConformance(const UnicodeString* field,
     // test quick checks
     if(UNORM_NO == Normalizer::quickCheck(field[1], UNORM_NFC, options, status)) {
         errln("Normalizer error: quickCheck(NFC(s), UNORM_NFC) is UNORM_NO");
-        pass = FALSE;
+        pass = false;
     }
     if(UNORM_NO == Normalizer::quickCheck(field[2], UNORM_NFD, options, status)) {
         errln("Normalizer error: quickCheck(NFD(s), UNORM_NFD) is UNORM_NO");
-        pass = FALSE;
+        pass = false;
     }
     if(UNORM_NO == Normalizer::quickCheck(field[3], UNORM_NFKC, options, status)) {
         errln("Normalizer error: quickCheck(NFKC(s), UNORM_NFKC) is UNORM_NO");
-        pass = FALSE;
+        pass = false;
     }
     if(UNORM_NO == Normalizer::quickCheck(field[4], UNORM_NFKD, options, status)) {
         errln("Normalizer error: quickCheck(NFKD(s), UNORM_NFKD) is UNORM_NO");
-        pass = FALSE;
+        pass = false;
     }
 
     // branch on options==0 for better code coverage
@@ -351,75 +351,75 @@ UBool NormalizerConformanceTest::checkConformance(const UnicodeString* field,
         result = Normalizer::isNormalized(field[1], UNORM_NFC, options, status);
     }
     if(!result) {
-        dataerrln("Normalizer error: isNormalized(NFC(s), UNORM_NFC) is FALSE");
-        pass = FALSE;
+        dataerrln("Normalizer error: isNormalized(NFC(s), UNORM_NFC) is false");
+        pass = false;
     }
     if(options==0 && !isNormalizedUTF8(nfc, field[1], status)) {
-        dataerrln("Normalizer error: nfc.isNormalizedUTF8(NFC(s)) is FALSE");
-        pass = FALSE;
+        dataerrln("Normalizer error: nfc.isNormalizedUTF8(NFC(s)) is false");
+        pass = false;
     }
     if(field[0]!=field[1]) {
         if(Normalizer::isNormalized(field[0], UNORM_NFC, options, status)) {
-            errln("Normalizer error: isNormalized(s, UNORM_NFC) is TRUE");
-            pass = FALSE;
+            errln("Normalizer error: isNormalized(s, UNORM_NFC) is true");
+            pass = false;
         }
         if(isNormalizedUTF8(nfc, field[0], status)) {
-            errln("Normalizer error: nfc.isNormalizedUTF8(s) is TRUE");
-            pass = FALSE;
+            errln("Normalizer error: nfc.isNormalizedUTF8(s) is true");
+            pass = false;
         }
     }
     if(options==0 && !isNormalizedUTF8(nfd, field[2], status)) {
-        dataerrln("Normalizer error: nfd.isNormalizedUTF8(NFD(s)) is FALSE");
-        pass = FALSE;
+        dataerrln("Normalizer error: nfd.isNormalizedUTF8(NFD(s)) is false");
+        pass = false;
     }
     if(!Normalizer::isNormalized(field[3], UNORM_NFKC, options, status)) {
-        dataerrln("Normalizer error: isNormalized(NFKC(s), UNORM_NFKC) is FALSE");
-        pass = FALSE;
+        dataerrln("Normalizer error: isNormalized(NFKC(s), UNORM_NFKC) is false");
+        pass = false;
     } else {
         if(options==0 && !isNormalizedUTF8(nfkc, field[3], status)) {
-            dataerrln("Normalizer error: nfkc.isNormalizedUTF8(NFKC(s)) is FALSE");
-            pass = FALSE;
+            dataerrln("Normalizer error: nfkc.isNormalizedUTF8(NFKC(s)) is false");
+            pass = false;
         }
         if(field[0]!=field[3]) {
             if(Normalizer::isNormalized(field[0], UNORM_NFKC, options, status)) {
-                errln("Normalizer error: isNormalized(s, UNORM_NFKC) is TRUE");
-                pass = FALSE;
+                errln("Normalizer error: isNormalized(s, UNORM_NFKC) is true");
+                pass = false;
             }
             if(options==0 && isNormalizedUTF8(nfkc, field[0], status)) {
-                errln("Normalizer error: nfkc.isNormalizedUTF8(s) is TRUE");
-                pass = FALSE;
+                errln("Normalizer error: nfkc.isNormalizedUTF8(s) is true");
+                pass = false;
             }
         }
     }
     if(options==0 && !isNormalizedUTF8(nfkd, field[4], status)) {
-        dataerrln("Normalizer error: nfkd.isNormalizedUTF8(NFKD(s)) is FALSE");
-        pass = FALSE;
+        dataerrln("Normalizer error: nfkd.isNormalizedUTF8(NFKD(s)) is false");
+        pass = false;
     }
 
     // test FCD quick check and "makeFCD"
     Normalizer::normalize(field[0], UNORM_FCD, options, fcd, status);
     if(UNORM_NO == Normalizer::quickCheck(fcd, UNORM_FCD, options, status)) {
         errln("Normalizer error: quickCheck(FCD(s), UNORM_FCD) is UNORM_NO");
-        pass = FALSE;
+        pass = false;
     }
     if(UNORM_NO == Normalizer::quickCheck(field[2], UNORM_FCD, options, status)) {
         errln("Normalizer error: quickCheck(NFD(s), UNORM_FCD) is UNORM_NO");
-        pass = FALSE;
+        pass = false;
     }
     if(UNORM_NO == Normalizer::quickCheck(field[4], UNORM_FCD, options, status)) {
         errln("Normalizer error: quickCheck(NFKD(s), UNORM_FCD) is UNORM_NO");
-        pass = FALSE;
+        pass = false;
     }
 
     Normalizer::normalize(fcd, UNORM_NFD, options, out, status);
     if(out != field[2]) {
         dataerrln("Normalizer error: NFD(FCD(s))!=NFD(s)");
-        pass = FALSE;
+        pass = false;
     }
 
     if (U_FAILURE(status)) {
         dataerrln("Normalizer::normalize returned error status: %s", u_errorName(status));
-        pass = FALSE;
+        pass = false;
     }
 
     if(field[0]!=field[2]) {
@@ -433,10 +433,10 @@ UBool NormalizerConformanceTest::checkConformance(const UnicodeString* field,
         rc=Normalizer::compare(field[0], field[2], (options<0x007A){
-        return FALSE;
+        return false;
     }
     //[\\u002D \\u0030-\\u0039 \\u0041-\\u005A \\u0061-\\u007A]
     if( (ch==0x002D) || 
@@ -136,9 +136,9 @@ inline UBool NamePrepTransform::isLDHChar(UChar32 ch){
         (0x0041 <= ch && ch <= 0x005A) ||
         (0x0061 <= ch && ch <= 0x007A)
       ){
-        return TRUE;
+        return true;
     }
-    return FALSE;
+    return false;
 }
 
 #endif /* #if !UCONFIG_NO_TRANSLITERATION */
diff --git a/icu4c/source/test/intltest/numberformattesttuple.cpp b/icu4c/source/test/intltest/numberformattesttuple.cpp
index 6565a4bb97f..0cf50b4a065 100644
--- a/icu4c/source/test/intltest/numberformattesttuple.cpp
+++ b/icu4c/source/test/intltest/numberformattesttuple.cpp
@@ -137,9 +137,9 @@ static void strToInt(
     }
     int32_t len = str.length();
     int32_t start = 0;
-    UBool neg = FALSE;
+    UBool neg = false;
     if (len > 0 && str[0] == 0x2D) { // negative
-        neg = TRUE;
+        neg = true;
         start = 1;
     }
     if (start == len) {
@@ -346,19 +346,19 @@ NumberFormatTestTuple::setField(
         const UnicodeString &fieldValue,
         UErrorCode &status) {
     if (U_FAILURE(status)) {
-        return FALSE;
+        return false;
     }
     if (fieldId == kNumberFormatTestTupleFieldCount) {
         status = U_ILLEGAL_ARGUMENT_ERROR;
-        return FALSE;
+        return false;
     }
     gFieldData[fieldId].ops->toValue(
             fieldValue, getMutableFieldAddress(fieldId), status);
     if (U_FAILURE(status)) {
-        return FALSE;
+        return false;
     }
-    setFlag(fieldId, TRUE);
-    return TRUE;
+    setFlag(fieldId, true);
+    return true;
 }
 
 UBool
@@ -366,20 +366,20 @@ NumberFormatTestTuple::clearField(
         ENumberFormatTestTupleField fieldId, 
         UErrorCode &status) {
     if (U_FAILURE(status)) {
-        return FALSE;
+        return false;
     }
     if (fieldId == kNumberFormatTestTupleFieldCount) {
         status = U_ILLEGAL_ARGUMENT_ERROR;
-        return FALSE;
+        return false;
     }
-    setFlag(fieldId, FALSE);
-    return TRUE;
+    setFlag(fieldId, false);
+    return true;
 }
 
 void
 NumberFormatTestTuple::clear() {
     for (int32_t i = 0; i < kNumberFormatTestTupleFieldCount; ++i) {
-        setFlag(i, FALSE);
+        setFlag(i, false);
     }
 }
 
@@ -387,7 +387,7 @@ UnicodeString &
 NumberFormatTestTuple::toString(
         UnicodeString &appendTo) const {
     appendTo.append("{");
-    UBool first = TRUE;
+    UBool first = true;
     for (int32_t i = 0; i < kNumberFormatTestTupleFieldCount; ++i) {
         if (!isFlag(i)) {
             continue;
@@ -395,7 +395,7 @@ NumberFormatTestTuple::toString(
         if (!first) {
             appendTo.append(", ");
         }
-        first = FALSE;
+        first = false;
         appendTo.append(gFieldData[i].name);
         appendTo.append(": ");
         gFieldData[i].ops->toString(getFieldAddress(i), appendTo);
diff --git a/icu4c/source/test/intltest/numberformattesttuple.h b/icu4c/source/test/intltest/numberformattesttuple.h
index a2ad2f7e746..ea294e09c92 100644
--- a/icu4c/source/test/intltest/numberformattesttuple.h
+++ b/icu4c/source/test/intltest/numberformattesttuple.h
@@ -78,7 +78,7 @@ enum ENumberFormatTestTupleField {
  * https://docs.google.com/document/d/1T2P0p953_Lh1pRwo-5CuPVrHlIBa_wcXElG-Hhg_WHM/edit?usp=sharing
  * Each field is optional. That is, a certain field may be unset for a given
  * test. The UBool fields ending in "Flag" indicate whether the corresponding
- * field is set or not. TRUE means set; FALSE means unset. An unset field
+ * field is set or not. true means set; false means unset. An unset field
  * generally means that the corresponding setter method is not called on
  * the NumberFormat object.
  */
@@ -189,7 +189,7 @@ public:
      * @param fieldValue the string representation of the field value.
      * @param status error returned here such as when the string representation
      *  of the field value cannot be parsed.
-     * @return TRUE on success or FALSE if an error was set in status.
+     * @return true on success or false if an error was set in status.
      */
     UBool setField(
             ENumberFormatTestTupleField field,
@@ -199,7 +199,7 @@ public:
      * Clears a particular field.
      * @param field the field to clear.
      * @param status error set here.
-     * @return TRUE on success or FALSE if error was set.
+     * @return true on success or false if error was set.
      */
     UBool clearField(
             ENumberFormatTestTupleField field,
diff --git a/icu4c/source/test/intltest/numbertest_api.cpp b/icu4c/source/test/intltest/numbertest_api.cpp
index ac9234909bc..f4c9a46541f 100644
--- a/icu4c/source/test/intltest/numbertest_api.cpp
+++ b/icu4c/source/test/intltest/numbertest_api.cpp
@@ -1352,7 +1352,7 @@ void NumberFormatterApiTest::unitSkeletons() {
             continue;
         }
         assertEquals(                                                       //
-            UnicodeString(TRUE, cas.inputSkeleton, -1) + u" normalization", //
+            UnicodeString(true, cas.inputSkeleton, -1) + u" normalization", //
             cas.normalizedSkeleton,                                         //
             nf.toSkeleton(status));
         status.errIfFailureAndReset("NumberFormatter::toSkeleton failed");
@@ -6280,7 +6280,7 @@ void NumberFormatterApiTest::assertFormatDescending(
         ...) {
     va_list args;
     va_start(args, locale);
-    UnicodeString message(TRUE, umessage, -1);
+    UnicodeString message(true, umessage, -1);
     static double inputs[] = {87650, 8765, 876.5, 87.65, 8.765, 0.8765, 0.08765, 0.008765, 0};
     const LocalizedNumberFormatter l1 = f.threshold(0).locale(locale); // no self-regulation
     const LocalizedNumberFormatter l2 = f.threshold(1).locale(locale); // all self-regulation
@@ -6300,7 +6300,7 @@ void NumberFormatterApiTest::assertFormatDescending(
         assertEquals(message + u": Safe Path: " + caseNumber, expected, actual2);
     }
     if (uskeleton != nullptr) { // if null, skeleton is declared as undefined.
-        UnicodeString skeleton(TRUE, uskeleton, -1);
+        UnicodeString skeleton(true, uskeleton, -1);
         // Only compare normalized skeletons: the tests need not provide the normalized forms.
         // Use the normalized form to construct the testing formatter to guarantee no loss of info.
         UnicodeString normalized = NumberFormatter::forSkeleton(skeleton, status).toSkeleton(status);
@@ -6350,7 +6350,7 @@ void NumberFormatterApiTest::assertFormatDescendingBig(
         ...) {
     va_list args;
     va_start(args, locale);
-    UnicodeString message(TRUE, umessage, -1);
+    UnicodeString message(true, umessage, -1);
     static double inputs[] = {87650000, 8765000, 876500, 87650, 8765, 876.5, 87.65, 8.765, 0};
     const LocalizedNumberFormatter l1 = f.threshold(0).locale(locale); // no self-regulation
     const LocalizedNumberFormatter l2 = f.threshold(1).locale(locale); // all self-regulation
@@ -6370,7 +6370,7 @@ void NumberFormatterApiTest::assertFormatDescendingBig(
         assertEquals(message + u": Safe Path: " + caseNumber, expected, actual2);
     }
     if (uskeleton != nullptr) { // if null, skeleton is declared as undefined.
-        UnicodeString skeleton(TRUE, uskeleton, -1);
+        UnicodeString skeleton(true, uskeleton, -1);
         // Only compare normalized skeletons: the tests need not provide the normalized forms.
         // Use the normalized form to construct the testing formatter to guarantee no loss of info.
         UnicodeString normalized = NumberFormatter::forSkeleton(skeleton, status).toSkeleton(status);
@@ -6420,7 +6420,7 @@ NumberFormatterApiTest::assertFormatSingle(
         Locale locale,
         double input,
         const UnicodeString& expected) {
-    UnicodeString message(TRUE, umessage, -1);
+    UnicodeString message(true, umessage, -1);
     const LocalizedNumberFormatter l1 = f.threshold(0).locale(locale); // no self-regulation
     const LocalizedNumberFormatter l2 = f.threshold(1).locale(locale); // all self-regulation
     IcuTestErrorCode status(*this, "assertFormatSingle");
@@ -6433,7 +6433,7 @@ NumberFormatterApiTest::assertFormatSingle(
     assertSuccess(message + u": Safe Path", status);
     assertEquals(message + u": Safe Path", expected, actual2);
     if (uskeleton != nullptr) { // if null, skeleton is declared as undefined.
-        UnicodeString skeleton(TRUE, uskeleton, -1);
+        UnicodeString skeleton(true, uskeleton, -1);
         // Only compare normalized skeletons: the tests need not provide the normalized forms.
         // Use the normalized form to construct the testing formatter to ensure no loss of info.
         UnicodeString normalized = NumberFormatter::forSkeleton(skeleton, status).toSkeleton(status);
diff --git a/icu4c/source/test/intltest/numbertest_permutation.cpp b/icu4c/source/test/intltest/numbertest_permutation.cpp
index a96dd75c6fa..5ca838bd6a3 100644
--- a/icu4c/source/test/intltest/numbertest_permutation.cpp
+++ b/icu4c/source/test/intltest/numbertest_permutation.cpp
@@ -163,7 +163,7 @@ outerEnd:
 
     // Compare it to the golden file
     const char* codePage = "UTF-8";
-    LocalUCHARBUFPointer f(ucbuf_open(goldenFilePath.data(), &codePage, TRUE, FALSE, status));
+    LocalUCHARBUFPointer f(ucbuf_open(goldenFilePath.data(), &codePage, true, false, status));
     if (!assertSuccess("Can't open data file", status)) {
         return;
     }
diff --git a/icu4c/source/test/intltest/numfmtdatadriventest.cpp b/icu4c/source/test/intltest/numfmtdatadriventest.cpp
index 8842f757728..e520c28cc33 100644
--- a/icu4c/source/test/intltest/numfmtdatadriventest.cpp
+++ b/icu4c/source/test/intltest/numfmtdatadriventest.cpp
@@ -227,16 +227,16 @@ static DecimalFormat* newDecimalFormat(const NumberFormatTestTuple& tuple, UErro
 UBool NumberFormatDataDrivenTest::isFormatPass(const NumberFormatTestTuple& tuple,
                                                UnicodeString& appendErrorMessage, UErrorCode& status) {
     if (U_FAILURE(status)) {
-        return FALSE;
+        return false;
     }
     LocalPointer fmtPtr(newDecimalFormat(tuple, status));
     if (U_FAILURE(status)) {
         appendErrorMessage.append("Error creating DecimalFormat.");
-        return FALSE;
+        return false;
     }
     adjustDecimalFormat(tuple, *fmtPtr, appendErrorMessage);
     if (appendErrorMessage.length() > 0) {
-        return FALSE;
+        return false;
     }
     DecimalQuantity digitList;
     strToDigitList(tuple.format, digitList, status);
@@ -245,12 +245,12 @@ UBool NumberFormatDataDrivenTest::isFormatPass(const NumberFormatTestTuple& tupl
         format(*fmtPtr, digitList, appendTo, status);
         if (U_FAILURE(status)) {
             appendErrorMessage.append("Error formatting.");
-            return FALSE;
+            return false;
         }
         if (appendTo != tuple.output) {
             appendErrorMessage.append(
                     UnicodeString("Expected: ") + tuple.output + ", got: " + appendTo);
-            return FALSE;
+            return false;
         }
     }
     double doubleVal = digitList.toDouble();
@@ -261,12 +261,12 @@ UBool NumberFormatDataDrivenTest::isFormatPass(const NumberFormatTestTuple& tupl
         format(*fmtPtr, doubleVal, appendTo, status);
         if (U_FAILURE(status)) {
             appendErrorMessage.append("Error formatting.");
-            return FALSE;
+            return false;
         }
         if (appendTo != tuple.output) {
             appendErrorMessage.append(
                     UnicodeString("double Expected: ") + tuple.output + ", got: " + appendTo);
-            return FALSE;
+            return false;
         }
     }
     if (!uprv_isNaN(doubleVal) && !uprv_isInfinite(doubleVal) && digitList.fitsInLong()) {
@@ -276,31 +276,31 @@ UBool NumberFormatDataDrivenTest::isFormatPass(const NumberFormatTestTuple& tupl
             format(*fmtPtr, intVal, appendTo, status);
             if (U_FAILURE(status)) {
                 appendErrorMessage.append("Error formatting.");
-                return FALSE;
+                return false;
             }
             if (appendTo != tuple.output) {
                 appendErrorMessage.append(
                         UnicodeString("int64 Expected: ") + tuple.output + ", got: " + appendTo);
-                return FALSE;
+                return false;
             }
         }
     }
-    return TRUE;
+    return true;
 }
 
 UBool NumberFormatDataDrivenTest::isToPatternPass(const NumberFormatTestTuple& tuple,
                                                   UnicodeString& appendErrorMessage, UErrorCode& status) {
     if (U_FAILURE(status)) {
-        return FALSE;
+        return false;
     }
     LocalPointer fmtPtr(newDecimalFormat(tuple, status));
     if (U_FAILURE(status)) {
         appendErrorMessage.append("Error creating DecimalFormat.");
-        return FALSE;
+        return false;
     }
     adjustDecimalFormat(tuple, *fmtPtr, appendErrorMessage);
     if (appendErrorMessage.length() > 0) {
-        return FALSE;
+        return false;
     }
     if (tuple.toPatternFlag) {
         UnicodeString actual;
@@ -324,16 +324,16 @@ UBool NumberFormatDataDrivenTest::isToPatternPass(const NumberFormatTestTuple& t
 UBool NumberFormatDataDrivenTest::isParsePass(const NumberFormatTestTuple& tuple,
                                               UnicodeString& appendErrorMessage, UErrorCode& status) {
     if (U_FAILURE(status)) {
-        return FALSE;
+        return false;
     }
     LocalPointer fmtPtr(newDecimalFormat(tuple, status));
     if (U_FAILURE(status)) {
         appendErrorMessage.append("Error creating DecimalFormat.");
-        return FALSE;
+        return false;
     }
     adjustDecimalFormat(tuple, *fmtPtr, appendErrorMessage);
     if (appendErrorMessage.length() > 0) {
-        return FALSE;
+        return false;
     }
     Formattable result;
     ParsePosition ppos;
@@ -341,37 +341,37 @@ UBool NumberFormatDataDrivenTest::isParsePass(const NumberFormatTestTuple& tuple
     if (ppos.getIndex() == 0) {
         appendErrorMessage.append("Parse failed; got error index ");
         appendErrorMessage = appendErrorMessage + ppos.getErrorIndex();
-        return FALSE;
+        return false;
     }
     if (tuple.output == "fail") {
         appendErrorMessage.append(
                 UnicodeString("Parse succeeded: ") + result.getDouble() + ", but was expected to fail.");
-        return TRUE; // TRUE because failure handling is in the test suite
+        return true; // true because failure handling is in the test suite
     }
     if (tuple.output == "NaN") {
         if (!uprv_isNaN(result.getDouble())) {
             appendErrorMessage.append(UnicodeString("Expected NaN, but got: ") + result.getDouble());
-            return FALSE;
+            return false;
         }
-        return TRUE;
+        return true;
     } else if (tuple.output == "Inf") {
         if (!uprv_isInfinite(result.getDouble()) || result.getDouble() < 0) {
             appendErrorMessage.append(UnicodeString("Expected Inf, but got: ") + result.getDouble());
-            return FALSE;
+            return false;
         }
-        return TRUE;
+        return true;
     } else if (tuple.output == "-Inf") {
         if (!uprv_isInfinite(result.getDouble()) || result.getDouble() > 0) {
             appendErrorMessage.append(UnicodeString("Expected -Inf, but got: ") + result.getDouble());
-            return FALSE;
+            return false;
         }
-        return TRUE;
+        return true;
     } else if (tuple.output == "-0.0") {
         if (!std::signbit(result.getDouble()) || result.getDouble() != 0) {
             appendErrorMessage.append(UnicodeString("Expected -0.0, but got: ") + result.getDouble());
-            return FALSE;
+            return false;
         }
-        return TRUE;
+        return true;
     }
     // All other cases parse to a DecimalQuantity, not a double.
 
@@ -390,26 +390,26 @@ UBool NumberFormatDataDrivenTest::isParsePass(const NumberFormatTestTuple& tuple
         appendErrorMessage.append(
                 UnicodeString("Expected: ") + tuple.output + " (i.e., " + expectedString + "), but got: " +
                 actualString + " (" + ppos.getIndex() + ":" + ppos.getErrorIndex() + ")");
-        return FALSE;
+        return false;
     }
 
-    return TRUE;
+    return true;
 }
 
 UBool NumberFormatDataDrivenTest::isParseCurrencyPass(const NumberFormatTestTuple& tuple,
                                                       UnicodeString& appendErrorMessage,
                                                       UErrorCode& status) {
     if (U_FAILURE(status)) {
-        return FALSE;
+        return false;
     }
     LocalPointer fmtPtr(newDecimalFormat(tuple, status));
     if (U_FAILURE(status)) {
         appendErrorMessage.append("Error creating DecimalFormat.");
-        return FALSE;
+        return false;
     }
     adjustDecimalFormat(tuple, *fmtPtr, appendErrorMessage);
     if (appendErrorMessage.length() > 0) {
-        return FALSE;
+        return false;
     }
     ParsePosition ppos;
     LocalPointer currAmt(
@@ -417,7 +417,7 @@ UBool NumberFormatDataDrivenTest::isParseCurrencyPass(const NumberFormatTestTupl
     if (ppos.getIndex() == 0) {
         appendErrorMessage.append("Parse failed; got error index ");
         appendErrorMessage = appendErrorMessage + ppos.getErrorIndex();
-        return FALSE;
+        return false;
     }
     UnicodeString currStr(currAmt->getISOCurrency());
     U_ASSERT(currAmt->getNumber().getDecimalQuantity() != nullptr); // no doubles in currency tests
@@ -425,7 +425,7 @@ UBool NumberFormatDataDrivenTest::isParseCurrencyPass(const NumberFormatTestTupl
     if (tuple.output == "fail") {
         appendErrorMessage.append(
                 UnicodeString("Parse succeeded: ") + resultStr + ", but was expected to fail.");
-        return TRUE; // TRUE because failure handling is in the test suite
+        return true; // true because failure handling is in the test suite
     }
 
     DecimalQuantity expectedQuantity;
@@ -442,16 +442,16 @@ UBool NumberFormatDataDrivenTest::isParseCurrencyPass(const NumberFormatTestTupl
         appendErrorMessage.append(
                 UnicodeString("Expected: ") + tuple.output + " (i.e., " + expectedString + "), but got: " +
                 resultStr + " (" + ppos.getIndex() + ":" + ppos.getErrorIndex() + ")");
-        return FALSE;
+        return false;
     }
 
     if (currStr != tuple.outputCurrency) {
         appendErrorMessage.append(
                 UnicodeString(
                         "Expected currency: ") + tuple.outputCurrency + ", got: " + currStr + ". ");
-        return FALSE;
+        return false;
     }
-    return TRUE;
+    return true;
 }
 
 void NumberFormatDataDrivenTest::TestNumberFormatTestTuple() {
@@ -499,7 +499,7 @@ void NumberFormatDataDrivenTest::TestNumberFormatTestTuple() {
 }
 
 void NumberFormatDataDrivenTest::TestDataDrivenICU4C() {
-    run("numberformattestspecification.txt", TRUE);
+    run("numberformattestspecification.txt", true);
 }
 
 #endif  // !UCONFIG_NO_FORMATTING
diff --git a/icu4c/source/test/intltest/numfmtspectest.cpp b/icu4c/source/test/intltest/numfmtspectest.cpp
index 892a9de4de5..12fd9c09af1 100644
--- a/icu4c/source/test/intltest/numfmtspectest.cpp
+++ b/icu4c/source/test/intltest/numfmtspectest.cpp
@@ -67,7 +67,7 @@ public:
     void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=0) override;
 private:
     void assertPatternFr(
-            const char *expected, double x, const char *pattern, UBool possibleDataError=FALSE);
+            const char *expected, double x, const char *pattern, UBool possibleDataError=false);
     
 };
 
@@ -89,14 +89,14 @@ void NumberFormatSpecificationTest::runIndexedTest(
 }
 
 void NumberFormatSpecificationTest::TestBasicPatterns() {
-    assertPatternFr("1\\u202F234,57", 1234.567, "#,##0.##", TRUE);
-    assertPatternFr("1234,57", 1234.567, "0.##", TRUE);
-    assertPatternFr("1235", 1234.567, "0", TRUE);
-    assertPatternFr("1\\u202F234,567", 1234.567, "#,##0.###", TRUE);
-    assertPatternFr("1234,567", 1234.567, "###0.#####", TRUE);
-    assertPatternFr("1234,5670", 1234.567, "###0.0000#", TRUE);
-    assertPatternFr("01234,5670", 1234.567, "00000.0000", TRUE);
-    assertPatternFr("1\\u202F234,57 \\u20ac", 1234.567, "#,##0.00 \\u00a4", TRUE);
+    assertPatternFr("1\\u202F234,57", 1234.567, "#,##0.##", true);
+    assertPatternFr("1234,57", 1234.567, "0.##", true);
+    assertPatternFr("1235", 1234.567, "0", true);
+    assertPatternFr("1\\u202F234,567", 1234.567, "#,##0.###", true);
+    assertPatternFr("1234,567", 1234.567, "###0.#####", true);
+    assertPatternFr("1234,5670", 1234.567, "###0.0000#", true);
+    assertPatternFr("01234,5670", 1234.567, "00000.0000", true);
+    assertPatternFr("1\\u202F234,57 \\u20ac", 1234.567, "#,##0.00 \\u00a4", true);
 }
 
 void NumberFormatSpecificationTest::TestNfSetters() {
@@ -107,82 +107,82 @@ void NumberFormatSpecificationTest::TestNfSetters() {
     }
     nf->setMaximumIntegerDigits(5);
     nf->setMinimumIntegerDigits(4);
-    assertEquals("", u"34\u202F567,89", format(1234567.89, *nf), TRUE);
-    assertEquals("", u"0\u202F034,56", format(34.56, *nf), TRUE);
+    assertEquals("", u"34\u202F567,89", format(1234567.89, *nf), true);
+    assertEquals("", u"0\u202F034,56", format(34.56, *nf), true);
 }
 
 void NumberFormatSpecificationTest::TestRounding() {
-    assertPatternFr("1,0", 1.25, "0.5", TRUE);
-    assertPatternFr("2,0", 1.75, "0.5", TRUE);
-    assertPatternFr("-1,0", -1.25, "0.5", TRUE);
-    assertPatternFr("-02,0", -1.75, "00.5", TRUE);
-    assertPatternFr("0", 2.0, "4", TRUE);
-    assertPatternFr("8", 6.0, "4", TRUE);
-    assertPatternFr("8", 10.0, "4", TRUE);
-    assertPatternFr("99,90", 99.0, "2.70", TRUE);
-    assertPatternFr("273,00", 272.0, "2.73", TRUE);
-    assertPatternFr("1\\u202F03,60", 104.0, "#,#3.70", TRUE);
+    assertPatternFr("1,0", 1.25, "0.5", true);
+    assertPatternFr("2,0", 1.75, "0.5", true);
+    assertPatternFr("-1,0", -1.25, "0.5", true);
+    assertPatternFr("-02,0", -1.75, "00.5", true);
+    assertPatternFr("0", 2.0, "4", true);
+    assertPatternFr("8", 6.0, "4", true);
+    assertPatternFr("8", 10.0, "4", true);
+    assertPatternFr("99,90", 99.0, "2.70", true);
+    assertPatternFr("273,00", 272.0, "2.73", true);
+    assertPatternFr("1\\u202F03,60", 104.0, "#,#3.70", true);
 }
 
 void NumberFormatSpecificationTest::TestSignificantDigits() {
-    assertPatternFr("1230", 1234.0, "@@@", TRUE);
-    assertPatternFr("1\\u202F234", 1234.0, "@,@@@", TRUE);
-    assertPatternFr("1\\u202F235\\u202F000", 1234567.0, "@,@@@", TRUE);
-    assertPatternFr("1\\u202F234\\u202F567", 1234567.0, "@@@@,@@@", TRUE);
-    assertPatternFr("12\\u202F34\\u202F567,00", 1234567.0, "@@@@,@@,@@@", TRUE);
-    assertPatternFr("12\\u202F34\\u202F567,0", 1234567.0, "@@@@,@@,@@#", TRUE);
-    assertPatternFr("12\\u202F34\\u202F567", 1234567.0, "@@@@,@@,@##", TRUE);
-    assertPatternFr("12\\u202F34\\u202F567", 1234567.001, "@@@@,@@,@##", TRUE);
-    assertPatternFr("12\\u202F34\\u202F567", 1234567.001, "@@@@,@@,###", TRUE);
-    assertPatternFr("1\\u202F200", 1234.0, "#,#@@", TRUE);
+    assertPatternFr("1230", 1234.0, "@@@", true);
+    assertPatternFr("1\\u202F234", 1234.0, "@,@@@", true);
+    assertPatternFr("1\\u202F235\\u202F000", 1234567.0, "@,@@@", true);
+    assertPatternFr("1\\u202F234\\u202F567", 1234567.0, "@@@@,@@@", true);
+    assertPatternFr("12\\u202F34\\u202F567,00", 1234567.0, "@@@@,@@,@@@", true);
+    assertPatternFr("12\\u202F34\\u202F567,0", 1234567.0, "@@@@,@@,@@#", true);
+    assertPatternFr("12\\u202F34\\u202F567", 1234567.0, "@@@@,@@,@##", true);
+    assertPatternFr("12\\u202F34\\u202F567", 1234567.001, "@@@@,@@,@##", true);
+    assertPatternFr("12\\u202F34\\u202F567", 1234567.001, "@@@@,@@,###", true);
+    assertPatternFr("1\\u202F200", 1234.0, "#,#@@", true);
 }
 
 void NumberFormatSpecificationTest::TestScientificNotation() {
-    assertPatternFr("1,23E4", 12345.0, "0.00E0", TRUE);
-    assertPatternFr("123,00E2", 12300.0, "000.00E0", TRUE);
-    assertPatternFr("123,0E2", 12300.0, "000.0#E0", TRUE);
-    assertPatternFr("123,0E2", 12300.1, "000.0#E0", TRUE);
-    assertPatternFr("123,01E2", 12301.0, "000.0#E0", TRUE);
-    assertPatternFr("123,01E+02", 12301.0, "000.0#E+00", TRUE);
-    assertPatternFr("12,3E3", 12345.0, "##0.00E0", TRUE);
-    assertPatternFr("12,300E3", 12300.1, "##0.0000E0", TRUE);
-    assertPatternFr("12,30E3", 12300.1, "##0.000#E0", TRUE);
-    assertPatternFr("12,301E3", 12301.0, "##0.000#E0", TRUE);
+    assertPatternFr("1,23E4", 12345.0, "0.00E0", true);
+    assertPatternFr("123,00E2", 12300.0, "000.00E0", true);
+    assertPatternFr("123,0E2", 12300.0, "000.0#E0", true);
+    assertPatternFr("123,0E2", 12300.1, "000.0#E0", true);
+    assertPatternFr("123,01E2", 12301.0, "000.0#E0", true);
+    assertPatternFr("123,01E+02", 12301.0, "000.0#E+00", true);
+    assertPatternFr("12,3E3", 12345.0, "##0.00E0", true);
+    assertPatternFr("12,300E3", 12300.1, "##0.0000E0", true);
+    assertPatternFr("12,30E3", 12300.1, "##0.000#E0", true);
+    assertPatternFr("12,301E3", 12301.0, "##0.000#E0", true);
     assertPatternFr("1,25E4", 12301.2, "0.05E0");
-    assertPatternFr("170,0E-3", 0.17, "##0.000#E0", TRUE);
+    assertPatternFr("170,0E-3", 0.17, "##0.000#E0", true);
 
 }
 
 void NumberFormatSpecificationTest::TestPercent() {
-    assertPatternFr("57,3%", 0.573, "0.0%", TRUE);
-    assertPatternFr("%57,3", 0.573, "%0.0", TRUE);
-    assertPatternFr("p%p57,3", 0.573, "p%p0.0", TRUE);
-    assertPatternFr("p%p0,6", 0.573, "p'%'p0.0", TRUE);
-    assertPatternFr("%3,260", 0.0326, "%@@@@", TRUE);
-    assertPatternFr("%1\\u202F540", 15.43, "%#,@@@", TRUE);
-    assertPatternFr("%1\\u202F656,4", 16.55, "%#,##4.1", TRUE);
-    assertPatternFr("%16,3E3", 162.55, "%##0.00E0", TRUE);
+    assertPatternFr("57,3%", 0.573, "0.0%", true);
+    assertPatternFr("%57,3", 0.573, "%0.0", true);
+    assertPatternFr("p%p57,3", 0.573, "p%p0.0", true);
+    assertPatternFr("p%p0,6", 0.573, "p'%'p0.0", true);
+    assertPatternFr("%3,260", 0.0326, "%@@@@", true);
+    assertPatternFr("%1\\u202F540", 15.43, "%#,@@@", true);
+    assertPatternFr("%1\\u202F656,4", 16.55, "%#,##4.1", true);
+    assertPatternFr("%16,3E3", 162.55, "%##0.00E0", true);
 }
 
 void NumberFormatSpecificationTest::TestPerMilli() {
-    assertPatternFr("573,0\\u2030", 0.573, "0.0\\u2030", TRUE);
-    assertPatternFr("\\u2030573,0", 0.573, "\\u20300.0", TRUE);
-    assertPatternFr("p\\u2030p573,0", 0.573, "p\\u2030p0.0", TRUE);
-    assertPatternFr("p\\u2030p0,6", 0.573, "p'\\u2030'p0.0", TRUE);
-    assertPatternFr("\\u203032,60", 0.0326, "\\u2030@@@@", TRUE);
-    assertPatternFr("\\u203015\\u202F400", 15.43, "\\u2030#,@@@", TRUE);
-    assertPatternFr("\\u203016\\u202F551,7", 16.55, "\\u2030#,##4.1", TRUE);
-    assertPatternFr("\\u2030163E3", 162.55, "\\u2030##0.00E0", TRUE);
+    assertPatternFr("573,0\\u2030", 0.573, "0.0\\u2030", true);
+    assertPatternFr("\\u2030573,0", 0.573, "\\u20300.0", true);
+    assertPatternFr("p\\u2030p573,0", 0.573, "p\\u2030p0.0", true);
+    assertPatternFr("p\\u2030p0,6", 0.573, "p'\\u2030'p0.0", true);
+    assertPatternFr("\\u203032,60", 0.0326, "\\u2030@@@@", true);
+    assertPatternFr("\\u203015\\u202F400", 15.43, "\\u2030#,@@@", true);
+    assertPatternFr("\\u203016\\u202F551,7", 16.55, "\\u2030#,##4.1", true);
+    assertPatternFr("\\u2030163E3", 162.55, "\\u2030##0.00E0", true);
 }
 
 void NumberFormatSpecificationTest::TestPadding() {
-    assertPatternFr("$***1\\u202F234", 1234, "$**####,##0", TRUE);
-    assertPatternFr("xxx$1\\u202F234", 1234, "*x$####,##0", TRUE);
-    assertPatternFr("1\\u202F234xxx$", 1234, "####,##0*x$", TRUE);
-    assertPatternFr("1\\u202F234$xxx", 1234, "####,##0$*x", TRUE);
-    assertPatternFr("ne1\\u202F234nx", -1234, "####,##0$*x;ne#n", TRUE);
-    assertPatternFr("n1\\u202F234*xx", -1234, "####,##0$*x;n#'*'", TRUE);
-    assertPatternFr("yyyy%432,6", 4.33, "*y%4.2######",  TRUE);
+    assertPatternFr("$***1\\u202F234", 1234, "$**####,##0", true);
+    assertPatternFr("xxx$1\\u202F234", 1234, "*x$####,##0", true);
+    assertPatternFr("1\\u202F234xxx$", 1234, "####,##0*x$", true);
+    assertPatternFr("1\\u202F234$xxx", 1234, "####,##0$*x", true);
+    assertPatternFr("ne1\\u202F234nx", -1234, "####,##0$*x;ne#n", true);
+    assertPatternFr("n1\\u202F234*xx", -1234, "####,##0$*x;n#'*'", true);
+    assertPatternFr("yyyy%432,6", 4.33, "*y%4.2######",  true);
     assertPatternFr("EUR *433,00", 433.0, "\\u00a4\\u00a4 **####0.00");
     assertPatternFr("EUR *433,00", 433.0, "\\u00a4\\u00a4 **#######0");
     {
@@ -198,7 +198,7 @@ void NumberFormatSpecificationTest::TestPadding() {
             fmt.setCurrency(kJPY);
             fmt.format(433.22, result);
             assertSuccess("", status);
-            assertEquals("", "JPY ****433", result, TRUE);
+            assertEquals("", "JPY ****433", result, true);
         }
     }
     {
@@ -216,11 +216,11 @@ void NumberFormatSpecificationTest::TestPadding() {
         } else {
             fmt.format(-433.22, result);
             assertSuccess("", status);
-            assertEquals("", "USD (433.22)", result, TRUE);
+            assertEquals("", "USD (433.22)", result, true);
         }
     }
     const char *paddedSciPattern = "QU**00.#####E0";
-    assertPatternFr("QU***43,3E-1", 4.33, paddedSciPattern, TRUE);
+    assertPatternFr("QU***43,3E-1", 4.33, paddedSciPattern, true);
     {
         UErrorCode status = U_ZERO_ERROR;
         DecimalFormatSymbols *sym = new DecimalFormatSymbols("fr", status);
@@ -235,11 +235,11 @@ void NumberFormatSpecificationTest::TestPadding() {
             UnicodeString result;
             fmt.format(4.33, result);
             assertSuccess("", status);
-            assertEquals("", "QU**43,3EE-1", result, TRUE);
+            assertEquals("", "QU**43,3EE-1", result, true);
         }
     }
     // padding cannot work as intended with scientific notation.
-    assertPatternFr("QU**43,32E-1", 4.332, paddedSciPattern, TRUE);
+    assertPatternFr("QU**43,32E-1", 4.332, paddedSciPattern, true);
 }
 
 void NumberFormatSpecificationTest::assertPatternFr(
diff --git a/icu4c/source/test/intltest/numfmtst.cpp b/icu4c/source/test/intltest/numfmtst.cpp
index f74ce9ef776..bdcce79c50c 100644
--- a/icu4c/source/test/intltest/numfmtst.cpp
+++ b/icu4c/source/test/intltest/numfmtst.cpp
@@ -585,7 +585,7 @@ NumberFormatTest::TestExponential(void)
             Formattable af;
             fmt.parse(s, af, pos);
             double a;
-            UBool useEpsilon = FALSE;
+            UBool useEpsilon = false;
             if (af.getType() == Formattable::kLong)
                 a = af.getLong();
             else if (af.getType() == Formattable::kDouble) {
@@ -598,7 +598,7 @@ NumberFormatTest::TestExponential(void)
                 // To compensate, we use an epsilon-based equality
                 // test on S/390 only.  We don't want to do this in
                 // general because it's less exacting.
-                useEpsilon = TRUE;
+                useEpsilon = true;
 #endif
             }
             else {
@@ -664,9 +664,9 @@ NumberFormatTest::TestScientific2() {
     if (U_SUCCESS(status)) {
         double num = 12.34;
         expect(*fmt, num, "$12.34");
-        fmt->setScientificNotation(TRUE);
+        fmt->setScientificNotation(true);
         expect(*fmt, num, "$1.23E1");
-        fmt->setScientificNotation(FALSE);
+        fmt->setScientificNotation(false);
         expect(*fmt, num, "$12.34");
     }
     delete fmt;
@@ -689,16 +689,16 @@ NumberFormatTest::TestScientificGrouping() {
 
 /*static void setFromString(DigitList& dl, const char* str) {
     char c;
-    UBool decimalSet = FALSE;
+    UBool decimalSet = false;
     dl.clear();
     while ((c = *str++)) {
         if (c == '-') {
-            dl.fIsPositive = FALSE;
+            dl.fIsPositive = false;
         } else if (c == '+') {
-            dl.fIsPositive = TRUE;
+            dl.fIsPositive = true;
         } else if (c == '.') {
             dl.fDecimalAt = dl.fCount;
-            decimalSet = TRUE;
+            decimalSet = true;
         } else {
             dl.append(c);
         }
@@ -738,7 +738,7 @@ NumberFormatTest::TestInt64() {
     DigitList dl;
     setFromString(dl, int64maxstr);
     {
-        if (!dl.fitsIntoInt64(FALSE)) {
+        if (!dl.fitsIntoInt64(false)) {
             errln(fail + int64maxstr + " didn't fit");
         }
         int64_t int64Value = dl.getInt64();
@@ -752,9 +752,9 @@ NumberFormatTest::TestInt64() {
         }
     }
     // test negative of max int64 value (1 shy of min int64 value)
-    dl.fIsPositive = FALSE;
+    dl.fIsPositive = false;
     {
-        if (!dl.fitsIntoInt64(FALSE)) {
+        if (!dl.fitsIntoInt64(false)) {
             errln(fail + "-" + int64maxstr + " didn't fit");
         }
         int64_t int64Value = dl.getInt64();
@@ -770,7 +770,7 @@ NumberFormatTest::TestInt64() {
     // test min int64 value
     setFromString(dl, int64minstr);
     {
-        if (!dl.fitsIntoInt64(FALSE)) {
+        if (!dl.fitsIntoInt64(false)) {
             errln(fail + "-" + int64minstr + " didn't fit");
         }
         int64_t int64Value = dl.getInt64();
@@ -784,9 +784,9 @@ NumberFormatTest::TestInt64() {
         }
     }
     // test negative of min int 64 value (1 more than max int64 value)
-    dl.fIsPositive = TRUE; // won't fit
+    dl.fIsPositive = true; // won't fit
     {
-        if (dl.fitsIntoInt64(FALSE)) {
+        if (dl.fitsIntoInt64(false)) {
             errln(fail + "-(" + int64minstr + ") didn't fit");
         }
     }*/
@@ -1147,7 +1147,7 @@ NumberFormatTest::TestLenientParse(void)
     if (format == NULL || U_FAILURE(status)) {
         dataerrln("Unable to create DecimalFormat (#,##0) - %s", u_errorName(status));
     } else {
-        format->setLenient(TRUE);
+        format->setLenient(true);
         for (int32_t t = 0; t < UPRV_LENGTHOF (lenientAffixTestCases); t += 1) {
         	UnicodeString testCase = ctou(lenientAffixTestCases[t]);
 
@@ -1172,7 +1172,7 @@ NumberFormatTest::TestLenientParse(void)
     if (mFormat == NULL || U_FAILURE(status)) {
         dataerrln("Unable to create NumberFormat (sv_SE, UNUM_DECIMAL) - %s", u_errorName(status));
     } else {
-        mFormat->setLenient(TRUE);
+        mFormat->setLenient(true);
         for (int32_t t = 0; t < UPRV_LENGTHOF(lenientMinusTestCases); t += 1) {
             UnicodeString testCase = ctou(lenientMinusTestCases[t]);
 
@@ -1193,7 +1193,7 @@ NumberFormatTest::TestLenientParse(void)
     if (mFormat == NULL || U_FAILURE(status)) {
         dataerrln("Unable to create NumberFormat (en_US, UNUM_DECIMAL) - %s", u_errorName(status));
     } else {
-        mFormat->setLenient(TRUE);
+        mFormat->setLenient(true);
         for (int32_t t = 0; t < UPRV_LENGTHOF(lenientMinusTestCases); t += 1) {
             UnicodeString testCase = ctou(lenientMinusTestCases[t]);
 
@@ -1214,7 +1214,7 @@ NumberFormatTest::TestLenientParse(void)
     if (cFormat == NULL || U_FAILURE(status)) {
         dataerrln("Unable to create NumberFormat (en_US, UNUM_CURRENCY) - %s", u_errorName(status));
     } else {
-        cFormat->setLenient(TRUE);
+        cFormat->setLenient(true);
         for (int32_t t = 0; t < UPRV_LENGTHOF (lenientCurrencyTestCases); t += 1) {
         	UnicodeString testCase = ctou(lenientCurrencyTestCases[t]);
 
@@ -1251,7 +1251,7 @@ NumberFormatTest::TestLenientParse(void)
     if (pFormat == NULL || U_FAILURE(status)) {
         dataerrln("Unable to create NumberFormat::createPercentInstance (en_US) - %s", u_errorName(status));
     } else {
-        pFormat->setLenient(TRUE);
+        pFormat->setLenient(true);
         for (int32_t t = 0; t < UPRV_LENGTHOF (lenientPercentTestCases); t += 1) {
         	UnicodeString testCase = ctou(lenientPercentTestCases[t]);
 
@@ -1308,7 +1308,7 @@ NumberFormatTest::TestLenientParse(void)
        }
 
        // then, make sure that they pass with a lenient parse
-       nFormat->setLenient(TRUE);
+       nFormat->setLenient(true);
        for (int32_t t = 0; t < UPRV_LENGTHOF(strictFailureTestCases); t += 1) {
 	       UnicodeString testCase = ctou(strictFailureTestCases[t]);
 
@@ -1381,25 +1381,25 @@ void NumberFormatTest::TestSecondaryGrouping(void) {
     delete g;
     // expect "1,87,65,43,210", but with Hindi digits
     //         01234567890123
-    UBool ok = TRUE;
+    UBool ok = true;
     if (out.length() != 14) {
-        ok = FALSE;
+        ok = false;
     } else {
         for (int32_t i=0; isetMaximumFractionDigits(4);
-        f->setGroupingUsed(FALSE);
+        f->setGroupingUsed(false);
         f->format(value, v);
     }
     delete f;
@@ -3427,12 +3427,12 @@ void NumberFormatTest::TestNonpositiveMultiplier() {
     expect(df, "1.2", -1.2);
     expect(df, "-1.2", 1.2);
 
-    // Note:  the tests with the final parameter of FALSE will not round trip.
+    // Note:  the tests with the final parameter of false will not round trip.
     //        The initial numeric value will format correctly, after the multiplier.
     //        Parsing the formatted text will be out-of-range for an int64, however.
     //        The expect() function could be modified to detect this and fall back
     //        to looking at the decimal parsed value, but it doesn't.
-    expect(df, U_INT64_MIN,    "9223372036854775808", FALSE);
+    expect(df, U_INT64_MIN,    "9223372036854775808", false);
     expect(df, U_INT64_MIN+1,  "9223372036854775807");
     expect(df, (int64_t)-123,                  "123");
     expect(df, (int64_t)123,                  "-123");
@@ -3442,10 +3442,10 @@ void NumberFormatTest::TestNonpositiveMultiplier() {
     df.setMultiplier(-2);
     expect(df, -(U_INT64_MIN/2)-1, "-9223372036854775806");
     expect(df, -(U_INT64_MIN/2),   "-9223372036854775808");
-    expect(df, -(U_INT64_MIN/2)+1, "-9223372036854775810", FALSE);
+    expect(df, -(U_INT64_MIN/2)+1, "-9223372036854775810", false);
 
     df.setMultiplier(-7);
-    expect(df, -(U_INT64_MAX/7)-1, "9223372036854775814", FALSE);
+    expect(df, -(U_INT64_MAX/7)-1, "9223372036854775814", false);
     expect(df, -(U_INT64_MAX/7),   "9223372036854775807");
     expect(df, -(U_INT64_MAX/7)+1, "9223372036854775800");
 
@@ -3475,24 +3475,24 @@ NumberFormatTest::TestSpaceParsing() {
     // the data are:
     // the string to be parsed, parsed position, parsed error index
     const TestSpaceParsingItem DATA[] = {
-        {"$124",           4, -1, FALSE},
-        {"$124 $124",      4, -1, FALSE},
-        {"$124 ",          4, -1, FALSE},
-        {"$ 124 ",         0,  1, FALSE},
-        {"$\\u00A0124 ",   5, -1, FALSE},
-        {" $ 124 ",        0,  0, FALSE},
-        {"124$",           0,  4, FALSE},
-        {"124 $",          0,  3, FALSE},
-        {"$124",           4, -1, TRUE},
-        {"$124 $124",      4, -1, TRUE},
-        {"$124 ",          4, -1, TRUE},
-        {"$ 124 ",         5, -1, TRUE},
-        {"$\\u00A0124 ",   5, -1, TRUE},
-        {" $ 124 ",        6, -1, TRUE},
-        {"124$",           4, -1, TRUE},
-        {"124$",           4, -1, TRUE},
-        {"124 $",          5, -1, TRUE},
-        {"124 $",          5, -1, TRUE},
+        {"$124",           4, -1, false},
+        {"$124 $124",      4, -1, false},
+        {"$124 ",          4, -1, false},
+        {"$ 124 ",         0,  1, false},
+        {"$\\u00A0124 ",   5, -1, false},
+        {" $ 124 ",        0,  0, false},
+        {"124$",           0,  4, false},
+        {"124 $",          0,  3, false},
+        {"$124",           4, -1, true},
+        {"$124 $124",      4, -1, true},
+        {"$124 ",          4, -1, true},
+        {"$ 124 ",         5, -1, true},
+        {"$\\u00A0124 ",   5, -1, true},
+        {" $ 124 ",        6, -1, true},
+        {"124$",           4, -1, true},
+        {"124$",           4, -1, true},
+        {"124 $",          5, -1, true},
+        {"124 $",          5, -1, true},
     };
     UErrorCode status = U_ZERO_ERROR;
     Locale locale("en_US");
@@ -3537,20 +3537,20 @@ typedef struct {
 void NumberFormatTest::TestNumberingSystems() {
 
     const TestNumberingSystemItem DATA[] = {
-        { "en_US@numbers=thai", 1234.567, FALSE, "\\u0E51,\\u0E52\\u0E53\\u0E54.\\u0E55\\u0E56\\u0E57" },
-        { "en_US@numbers=hebr", 5678.0, TRUE, "\\u05D4\\u05F3\\u05EA\\u05E8\\u05E2\\u05F4\\u05D7" },
-        { "en_US@numbers=arabext", 1234.567, FALSE, "\\u06F1\\u066c\\u06F2\\u06F3\\u06F4\\u066b\\u06F5\\u06F6\\u06F7" },
-        { "ar_EG", 1234.567, FALSE, "\\u0661\\u066C\\u0662\\u0663\\u0664\\u066b\\u0665\\u0666\\u0667" },
-        { "th_TH@numbers=traditional", 1234.567, FALSE, "\\u0E51,\\u0E52\\u0E53\\u0E54.\\u0E55\\u0E56\\u0E57" }, // fall back to native per TR35
-        { "ar_MA", 1234.567, FALSE, "1.234,567" },
-        { "en_US@numbers=hanidec", 1234.567, FALSE, "\\u4e00,\\u4e8c\\u4e09\\u56db.\\u4e94\\u516d\\u4e03" },
-        { "ta_IN@numbers=native", 1234.567, FALSE, "\\u0BE7,\\u0BE8\\u0BE9\\u0BEA.\\u0BEB\\u0BEC\\u0BED" },
-        { "ta_IN@numbers=traditional", 1235.0, TRUE, "\\u0BF2\\u0BE8\\u0BF1\\u0BE9\\u0BF0\\u0BEB" },
-        { "ta_IN@numbers=finance", 1234.567, FALSE, "1,234.567" }, // fall back to default per TR35
-        { "zh_TW@numbers=native", 1234.567, FALSE, "\\u4e00,\\u4e8c\\u4e09\\u56db.\\u4e94\\u516d\\u4e03" },
-        { "zh_TW@numbers=traditional", 1234.567, TRUE, "\\u4E00\\u5343\\u4E8C\\u767E\\u4E09\\u5341\\u56DB\\u9EDE\\u4E94\\u516D\\u4E03" },
-        { "zh_TW@numbers=finance", 1234.567, TRUE, "\\u58F9\\u4EDF\\u8CB3\\u4F70\\u53C3\\u62FE\\u8086\\u9EDE\\u4F0D\\u9678\\u67D2" },
-        { NULL, 0, FALSE, NULL }
+        { "en_US@numbers=thai", 1234.567, false, "\\u0E51,\\u0E52\\u0E53\\u0E54.\\u0E55\\u0E56\\u0E57" },
+        { "en_US@numbers=hebr", 5678.0, true, "\\u05D4\\u05F3\\u05EA\\u05E8\\u05E2\\u05F4\\u05D7" },
+        { "en_US@numbers=arabext", 1234.567, false, "\\u06F1\\u066c\\u06F2\\u06F3\\u06F4\\u066b\\u06F5\\u06F6\\u06F7" },
+        { "ar_EG", 1234.567, false, "\\u0661\\u066C\\u0662\\u0663\\u0664\\u066b\\u0665\\u0666\\u0667" },
+        { "th_TH@numbers=traditional", 1234.567, false, "\\u0E51,\\u0E52\\u0E53\\u0E54.\\u0E55\\u0E56\\u0E57" }, // fall back to native per TR35
+        { "ar_MA", 1234.567, false, "1.234,567" },
+        { "en_US@numbers=hanidec", 1234.567, false, "\\u4e00,\\u4e8c\\u4e09\\u56db.\\u4e94\\u516d\\u4e03" },
+        { "ta_IN@numbers=native", 1234.567, false, "\\u0BE7,\\u0BE8\\u0BE9\\u0BEA.\\u0BEB\\u0BEC\\u0BED" },
+        { "ta_IN@numbers=traditional", 1235.0, true, "\\u0BF2\\u0BE8\\u0BF1\\u0BE9\\u0BF0\\u0BEB" },
+        { "ta_IN@numbers=finance", 1234.567, false, "1,234.567" }, // fall back to default per TR35
+        { "zh_TW@numbers=native", 1234.567, false, "\\u4e00,\\u4e8c\\u4e09\\u56db.\\u4e94\\u516d\\u4e03" },
+        { "zh_TW@numbers=traditional", 1234.567, true, "\\u4E00\\u5343\\u4E8C\\u767E\\u4E09\\u5341\\u56DB\\u9EDE\\u4E94\\u516D\\u4E03" },
+        { "zh_TW@numbers=finance", 1234.567, true, "\\u58F9\\u4EDF\\u8CB3\\u4F70\\u53C3\\u62FE\\u8086\\u9EDE\\u4F0D\\u9678\\u67D2" },
+        { NULL, 0, false, NULL }
     };
 
     UErrorCode ec;
@@ -3759,11 +3759,11 @@ void NumberFormatTest::TestMismatchedCurrencyFormatFail() {
     df->setCurrency(u"EUR", status);
     expect2(*df, 1.23, u"\u20AC1.23");
     // Should parse with currency in the wrong place in lenient mode
-    df->setLenient(TRUE);
+    df->setLenient(true);
     expect(*df, u"1.23\u20AC", 1.23);
     expectParseCurrency(*df, u"EUR", 1.23, "1.23\\u20AC");
     // Should NOT parse with currency in the wrong place in STRICT mode
-    df->setLenient(FALSE);
+    df->setLenient(false);
     {
         Formattable result;
         ErrorCode failStatus;
@@ -3808,7 +3808,7 @@ NumberFormatTest::TestDecimalFormatCurrencyParse() {
         {"1,234.56 US dollar", "1234.56"},
     };
     // NOTE: ICU 62 requires that the currency format match the pattern in strict mode.
-    fmt->setLenient(TRUE);
+    fmt->setLenient(true);
     for (uint32_t i = 0; i < UPRV_LENGTHOF(DATA); ++i) {
         UnicodeString stringToBeParsed = ctou(DATA[i][0]);
         double parsedResult = atof(DATA[i][1]);
@@ -3896,7 +3896,7 @@ NumberFormatTest::TestCurrencyIsoPluralFormat() {
         }
         // test parsing, and test parsing for all currency formats.
         // NOTE: ICU 62 requires that the currency format match the pattern in strict mode.
-        numFmt->setLenient(TRUE);
+        numFmt->setLenient(true);
         for (int j = 3; j < 6; ++j) {
             // DATA[i][3] is the currency format result using
             // CURRENCYSTYLE formatter.
@@ -4011,7 +4011,7 @@ for (;;) {
         }
         // test parsing, and test parsing for all currency formats.
         // NOTE: ICU 62 requires that the currency format match the pattern in strict mode.
-        numFmt->setLenient(TRUE);
+        numFmt->setLenient(true);
         for (int j = 3; j < 6; ++j) {
             // DATA[i][3] is the currency format result using
             // CURRENCYSTYLE formatter.
@@ -6602,7 +6602,7 @@ NumberFormatTest::TestParseCurrencyInUCurr() {
             return;
         }
         // NOTE: ICU 62 requires that the currency format match the pattern in strict mode.
-        numFmt->setLenient(TRUE);
+        numFmt->setLenient(true);
         ParsePosition parsePos;
         LocalPointer currAmt(numFmt->parseCurrency(formatted, parsePos));
         if (parsePos.getIndex() > 0) {
@@ -6646,16 +6646,16 @@ void NumberFormatTest::expectPositions(FieldPositionIterator& iter, int32_t *val
   FieldPosition fp;
 
   if (tupleCount > 10) {
-    assertTrue("internal error, tupleCount too large", FALSE);
+    assertTrue("internal error, tupleCount too large", false);
   } else {
     for (int i = 0; i < tupleCount; ++i) {
-      found[i] = FALSE;
+      found[i] = false;
     }
   }
 
   logln(str);
   while (iter.next(fp)) {
-    UBool ok = FALSE;
+    UBool ok = false;
     int32_t id = fp.getField();
     int32_t start = fp.getBeginIndex();
     int32_t limit = fp.getEndIndex();
@@ -6672,7 +6672,7 @@ void NumberFormatTest::expectPositions(FieldPositionIterator& iter, int32_t *val
       if (values[i*3] == id &&
           values[i*3+1] == start &&
           values[i*3+2] == limit) {
-        found[i] = ok = TRUE;
+        found[i] = ok = true;
         break;
       }
     }
@@ -6681,10 +6681,10 @@ void NumberFormatTest::expectPositions(FieldPositionIterator& iter, int32_t *val
   }
 
   // check that all were found
-  UBool ok = TRUE;
+  UBool ok = true;
   for (int i = 0; i < tupleCount; ++i) {
     if (!found[i]) {
-      ok = FALSE;
+      ok = false;
       assertTrue((UnicodeString) "missing [" + values[i*3] + "," + values[i*3+1] + "," + values[i*3+2] + "]", found[i]);
     }
   }
@@ -6707,7 +6707,7 @@ void NumberFormatTest::TestFieldPositionIterator() {
   FieldPosition pos;
 
   DecimalFormat *decFmt = (DecimalFormat *) NumberFormat::createInstance(status);
-  if (failure(status, "NumberFormat::createInstance", TRUE)) return;
+  if (failure(status, "NumberFormat::createInstance", true)) return;
 
   double num = 1234.56;
   UnicodeString str1;
@@ -6737,7 +6737,7 @@ void NumberFormatTest::TestFormatAttributes() {
   Locale locale("en_US");
   UErrorCode status = U_ZERO_ERROR;
   DecimalFormat *decFmt = (DecimalFormat *) NumberFormat::createInstance(locale, UNUM_CURRENCY, status);
-    if (failure(status, "NumberFormat::createInstance", TRUE)) return;
+    if (failure(status, "NumberFormat::createInstance", true)) return;
   double val = 12345.67;
 
   {
@@ -7304,7 +7304,7 @@ UBool NumberFormatTest::testFormattableAsUFormattable(const char *file, int line
   logln();
   if (u == NULL) {
     errln("%s:%d: Error: f.toUFormattable() retuned NULL.");
-    return FALSE;
+    return false;
   }
   logln("%s:%d: comparing Formattable with UFormattable", file, line);
   logln(fileLine + toString(f));
@@ -7313,24 +7313,24 @@ UBool NumberFormatTest::testFormattableAsUFormattable(const char *file, int line
   UErrorCode valueStatus = U_ZERO_ERROR;
   UFormattableType expectUType = UFMT_COUNT; // invalid
 
-  UBool triedExact = FALSE; // did we attempt an exact comparison?
-  UBool exactMatch = FALSE; // was the exact comparison true?
+  UBool triedExact = false; // did we attempt an exact comparison?
+  UBool exactMatch = false; // was the exact comparison true?
 
   switch( f.getType() ) {
   case Formattable::kDate:
     expectUType = UFMT_DATE;
     exactMatch = (f.getDate()==ufmt_getDate(u, &valueStatus));
-    triedExact = TRUE;
+    triedExact = true;
     break;
   case Formattable::kDouble:
     expectUType = UFMT_DOUBLE;
     exactMatch = (f.getDouble()==ufmt_getDouble(u, &valueStatus));
-    triedExact = TRUE;
+    triedExact = true;
     break;
   case Formattable::kLong:
     expectUType = UFMT_LONG;
     exactMatch = (f.getLong()==ufmt_getLong(u, &valueStatus));
-    triedExact = TRUE;
+    triedExact = true;
     break;
   case Formattable::kString:
     expectUType = UFMT_STRING;
@@ -7344,12 +7344,12 @@ UBool NumberFormatTest::testFormattableAsUFormattable(const char *file, int line
         assertTrue("UChar* NULL-terminated", uch[len]==0);
         exactMatch = (str == str2);
       }
-      triedExact = TRUE;
+      triedExact = true;
     }
     break;
   case Formattable::kArray:
     expectUType = UFMT_ARRAY;
-    triedExact = TRUE;
+    triedExact = true;
     {
       int32_t count = ufmt_getArrayLength(u, &valueStatus);
       int32_t count2;
@@ -7362,10 +7362,10 @@ UBool NumberFormatTest::testFormattableAsUFormattable(const char *file, int line
           if(*Formattable::fromUFormattable(uu) != (array2[i])) {
             errln("%s:%d: operator== did not match at index[%d] - %p vs %p", file, line, i,
                   (const void*)Formattable::fromUFormattable(uu), (const void*)&(array2[i]));
-            exactMatch = FALSE;
+            exactMatch = false;
           } else {
             if(!testFormattableAsUFormattable("(sub item)",i,*Formattable::fromUFormattable(uu))) {
-              exactMatch = FALSE;
+              exactMatch = false;
             }
           }
         }
@@ -7375,19 +7375,19 @@ UBool NumberFormatTest::testFormattableAsUFormattable(const char *file, int line
   case Formattable::kInt64:
     expectUType = UFMT_INT64;
     exactMatch = (f.getInt64()==ufmt_getInt64(u, &valueStatus));
-    triedExact = TRUE;
+    triedExact = true;
     break;
   case Formattable::kObject:
     expectUType = UFMT_OBJECT;
     exactMatch = (f.getObject()==ufmt_getObject(u, &valueStatus));
-    triedExact = TRUE;
+    triedExact = true;
     break;
   }
   UFormattableType uType = ufmt_getType(u, &status);
 
   if(U_FAILURE(status)) {
     errln("%s:%d: Error calling ufmt_getType - %s", file, line, u_errorName(status));
-    return FALSE;
+    return false;
   }
 
   if(uType != expectUType) {
@@ -7559,7 +7559,7 @@ void NumberFormatTest::TestSignificantDigits(void) {
             NumberFormat::createInstance(locale, status)));
     CHECK_DATA(status,"NumberFormat::createInstance");
 
-    numberFormat->setSignificantDigitsUsed(TRUE);
+    numberFormat->setSignificantDigitsUsed(true);
     numberFormat->setMinimumSignificantDigits(3);
     numberFormat->setMaximumSignificantDigits(5);
     numberFormat->setGroupingUsed(false);
@@ -7578,28 +7578,28 @@ void NumberFormatTest::TestSignificantDigits(void) {
     // Test for ICU-20063
     {
         DecimalFormat df({"en-us", status}, status);
-        df.setSignificantDigitsUsed(TRUE);
+        df.setSignificantDigitsUsed(true);
         expect(df, 9.87654321, u"9.87654");
         df.setMaximumSignificantDigits(3);
         expect(df, 9.87654321, u"9.88");
         // setSignificantDigitsUsed with maxSig only
-        df.setSignificantDigitsUsed(TRUE);
+        df.setSignificantDigitsUsed(true);
         expect(df, 9.87654321, u"9.88");
         df.setMinimumSignificantDigits(2);
         expect(df, 9, u"9.0");
         // setSignificantDigitsUsed with both minSig and maxSig
-        df.setSignificantDigitsUsed(TRUE);
+        df.setSignificantDigitsUsed(true);
         expect(df, 9, u"9.0");
         // setSignificantDigitsUsed to false: should revert to fraction rounding
-        df.setSignificantDigitsUsed(FALSE);
+        df.setSignificantDigitsUsed(false);
         expect(df, 9.87654321, u"9.876543");
         expect(df, 9, u"9");
-        df.setSignificantDigitsUsed(TRUE);
+        df.setSignificantDigitsUsed(true);
         df.setMinimumSignificantDigits(2);
         expect(df, 9.87654321, u"9.87654");
         expect(df, 9, u"9.0");
         // setSignificantDigitsUsed with minSig only
-        df.setSignificantDigitsUsed(TRUE);
+        df.setSignificantDigitsUsed(true);
         expect(df, 9.87654321, u"9.87654");
         expect(df, 9, u"9.0");
     }
@@ -7612,7 +7612,7 @@ void NumberFormatTest::TestShowZero() {
             NumberFormat::createInstance(locale, status)));
     CHECK_DATA(status, "NumberFormat::createInstance");
 
-    numberFormat->setSignificantDigitsUsed(TRUE);
+    numberFormat->setSignificantDigitsUsed(true);
     numberFormat->setMaximumSignificantDigits(3);
 
     UnicodeString result;
@@ -7632,28 +7632,28 @@ void NumberFormatTest::TestBug9936() {
         return;
     }
 
-    if (numberFormat->areSignificantDigitsUsed() == TRUE) {
-        errln("File %s, Line %d: areSignificantDigitsUsed() was TRUE, expected FALSE.\n", __FILE__, __LINE__);
+    if (numberFormat->areSignificantDigitsUsed() == true) {
+        errln("File %s, Line %d: areSignificantDigitsUsed() was true, expected false.\n", __FILE__, __LINE__);
     }
-    numberFormat->setSignificantDigitsUsed(TRUE);
-    if (numberFormat->areSignificantDigitsUsed() == FALSE) {
-        errln("File %s, Line %d: areSignificantDigitsUsed() was FALSE, expected TRUE.\n", __FILE__, __LINE__);
+    numberFormat->setSignificantDigitsUsed(true);
+    if (numberFormat->areSignificantDigitsUsed() == false) {
+        errln("File %s, Line %d: areSignificantDigitsUsed() was false, expected true.\n", __FILE__, __LINE__);
     }
 
-    numberFormat->setSignificantDigitsUsed(FALSE);
-    if (numberFormat->areSignificantDigitsUsed() == TRUE) {
-        errln("File %s, Line %d: areSignificantDigitsUsed() was TRUE, expected FALSE.\n", __FILE__, __LINE__);
+    numberFormat->setSignificantDigitsUsed(false);
+    if (numberFormat->areSignificantDigitsUsed() == true) {
+        errln("File %s, Line %d: areSignificantDigitsUsed() was true, expected false.\n", __FILE__, __LINE__);
     }
 
     numberFormat->setMinimumSignificantDigits(3);
-    if (numberFormat->areSignificantDigitsUsed() == FALSE) {
-        errln("File %s, Line %d: areSignificantDigitsUsed() was FALSE, expected TRUE.\n", __FILE__, __LINE__);
+    if (numberFormat->areSignificantDigitsUsed() == false) {
+        errln("File %s, Line %d: areSignificantDigitsUsed() was false, expected true.\n", __FILE__, __LINE__);
     }
 
-    numberFormat->setSignificantDigitsUsed(FALSE);
+    numberFormat->setSignificantDigitsUsed(false);
     numberFormat->setMaximumSignificantDigits(6);
-    if (numberFormat->areSignificantDigitsUsed() == FALSE) {
-        errln("File %s, Line %d: areSignificantDigitsUsed() was FALSE, expected TRUE.\n", __FILE__, __LINE__);
+    if (numberFormat->areSignificantDigitsUsed() == false) {
+        errln("File %s, Line %d: areSignificantDigitsUsed() was false, expected true.\n", __FILE__, __LINE__);
     }
 
 }
@@ -7662,7 +7662,7 @@ void NumberFormatTest::TestParseNegativeWithFaLocale() {
     UErrorCode status = U_ZERO_ERROR;
     DecimalFormat *test = (DecimalFormat *) NumberFormat::createInstance("fa", status);
     CHECK_DATA(status, "NumberFormat::createInstance");
-    test->setLenient(TRUE);
+    test->setLenient(true);
     Formattable af;
     ParsePosition ppos;
     UnicodeString value("\\u200e-0,5");
@@ -7678,7 +7678,7 @@ void NumberFormatTest::TestParseNegativeWithAlternateMinusSign() {
     UErrorCode status = U_ZERO_ERROR;
     DecimalFormat *test = (DecimalFormat *) NumberFormat::createInstance("en", status);
     CHECK_DATA(status, "NumberFormat::createInstance");
-    test->setLenient(TRUE);
+    test->setLenient(true);
     Formattable af;
     ParsePosition ppos;
     UnicodeString value("\\u208B0.5");
@@ -7720,80 +7720,80 @@ typedef struct {
 void NumberFormatTest::TestParseSignsAndMarks() {
     const SignsAndMarksItem items[] = {
         // locale               lenient numString                                                       value
-        { "en",                 FALSE,  CharsToUnicodeString("12"),                                      12 },
-        { "en",                 TRUE,   CharsToUnicodeString("12"),                                      12 },
-        { "en",                 FALSE,  CharsToUnicodeString("-23"),                                    -23 },
-        { "en",                 TRUE,   CharsToUnicodeString("-23"),                                    -23 },
-        { "en",                 TRUE,   CharsToUnicodeString("- 23"),                                   -23 },
-        { "en",                 FALSE,  CharsToUnicodeString("\\u200E-23"),                             -23 },
-        { "en",                 TRUE,   CharsToUnicodeString("\\u200E-23"),                             -23 },
-        { "en",                 TRUE,   CharsToUnicodeString("\\u200E- 23"),                            -23 },
+        { "en",                 false,  CharsToUnicodeString("12"),                                      12 },
+        { "en",                 true,   CharsToUnicodeString("12"),                                      12 },
+        { "en",                 false,  CharsToUnicodeString("-23"),                                    -23 },
+        { "en",                 true,   CharsToUnicodeString("-23"),                                    -23 },
+        { "en",                 true,   CharsToUnicodeString("- 23"),                                   -23 },
+        { "en",                 false,  CharsToUnicodeString("\\u200E-23"),                             -23 },
+        { "en",                 true,   CharsToUnicodeString("\\u200E-23"),                             -23 },
+        { "en",                 true,   CharsToUnicodeString("\\u200E- 23"),                            -23 },
 
-        { "en@numbers=arab",    FALSE,  CharsToUnicodeString("\\u0663\\u0664"),                          34 },
-        { "en@numbers=arab",    TRUE,   CharsToUnicodeString("\\u0663\\u0664"),                          34 },
-        { "en@numbers=arab",    FALSE,  CharsToUnicodeString("-\\u0664\\u0665"),                        -45 },
-        { "en@numbers=arab",    TRUE,   CharsToUnicodeString("-\\u0664\\u0665"),                        -45 },
-        { "en@numbers=arab",    TRUE,   CharsToUnicodeString("- \\u0664\\u0665"),                       -45 },
-        { "en@numbers=arab",    FALSE,  CharsToUnicodeString("\\u200F-\\u0664\\u0665"),                 -45 },
-        { "en@numbers=arab",    TRUE,   CharsToUnicodeString("\\u200F-\\u0664\\u0665"),                 -45 },
-        { "en@numbers=arab",    TRUE,   CharsToUnicodeString("\\u200F- \\u0664\\u0665"),                -45 },
+        { "en@numbers=arab",    false,  CharsToUnicodeString("\\u0663\\u0664"),                          34 },
+        { "en@numbers=arab",    true,   CharsToUnicodeString("\\u0663\\u0664"),                          34 },
+        { "en@numbers=arab",    false,  CharsToUnicodeString("-\\u0664\\u0665"),                        -45 },
+        { "en@numbers=arab",    true,   CharsToUnicodeString("-\\u0664\\u0665"),                        -45 },
+        { "en@numbers=arab",    true,   CharsToUnicodeString("- \\u0664\\u0665"),                       -45 },
+        { "en@numbers=arab",    false,  CharsToUnicodeString("\\u200F-\\u0664\\u0665"),                 -45 },
+        { "en@numbers=arab",    true,   CharsToUnicodeString("\\u200F-\\u0664\\u0665"),                 -45 },
+        { "en@numbers=arab",    true,   CharsToUnicodeString("\\u200F- \\u0664\\u0665"),                -45 },
 
-        { "en@numbers=arabext", FALSE,  CharsToUnicodeString("\\u06F5\\u06F6"),                          56 },
-        { "en@numbers=arabext", TRUE,   CharsToUnicodeString("\\u06F5\\u06F6"),                          56 },
-        { "en@numbers=arabext", FALSE,  CharsToUnicodeString("-\\u06F6\\u06F7"),                        -67 },
-        { "en@numbers=arabext", TRUE,   CharsToUnicodeString("-\\u06F6\\u06F7"),                        -67 },
-        { "en@numbers=arabext", TRUE,   CharsToUnicodeString("- \\u06F6\\u06F7"),                       -67 },
-        { "en@numbers=arabext", FALSE,  CharsToUnicodeString("\\u200E-\\u200E\\u06F6\\u06F7"),          -67 },
-        { "en@numbers=arabext", TRUE,   CharsToUnicodeString("\\u200E-\\u200E\\u06F6\\u06F7"),          -67 },
-        { "en@numbers=arabext", TRUE,   CharsToUnicodeString("\\u200E-\\u200E \\u06F6\\u06F7"),         -67 },
+        { "en@numbers=arabext", false,  CharsToUnicodeString("\\u06F5\\u06F6"),                          56 },
+        { "en@numbers=arabext", true,   CharsToUnicodeString("\\u06F5\\u06F6"),                          56 },
+        { "en@numbers=arabext", false,  CharsToUnicodeString("-\\u06F6\\u06F7"),                        -67 },
+        { "en@numbers=arabext", true,   CharsToUnicodeString("-\\u06F6\\u06F7"),                        -67 },
+        { "en@numbers=arabext", true,   CharsToUnicodeString("- \\u06F6\\u06F7"),                       -67 },
+        { "en@numbers=arabext", false,  CharsToUnicodeString("\\u200E-\\u200E\\u06F6\\u06F7"),          -67 },
+        { "en@numbers=arabext", true,   CharsToUnicodeString("\\u200E-\\u200E\\u06F6\\u06F7"),          -67 },
+        { "en@numbers=arabext", true,   CharsToUnicodeString("\\u200E-\\u200E \\u06F6\\u06F7"),         -67 },
 
-        { "he",                 FALSE,  CharsToUnicodeString("12"),                                      12 },
-        { "he",                 TRUE,   CharsToUnicodeString("12"),                                      12 },
-        { "he",                 FALSE,  CharsToUnicodeString("-23"),                                    -23 },
-        { "he",                 TRUE,   CharsToUnicodeString("-23"),                                    -23 },
-        { "he",                 TRUE,   CharsToUnicodeString("- 23"),                                   -23 },
-        { "he",                 FALSE,  CharsToUnicodeString("\\u200E-23"),                             -23 },
-        { "he",                 TRUE,   CharsToUnicodeString("\\u200E-23"),                             -23 },
-        { "he",                 TRUE,   CharsToUnicodeString("\\u200E- 23"),                            -23 },
+        { "he",                 false,  CharsToUnicodeString("12"),                                      12 },
+        { "he",                 true,   CharsToUnicodeString("12"),                                      12 },
+        { "he",                 false,  CharsToUnicodeString("-23"),                                    -23 },
+        { "he",                 true,   CharsToUnicodeString("-23"),                                    -23 },
+        { "he",                 true,   CharsToUnicodeString("- 23"),                                   -23 },
+        { "he",                 false,  CharsToUnicodeString("\\u200E-23"),                             -23 },
+        { "he",                 true,   CharsToUnicodeString("\\u200E-23"),                             -23 },
+        { "he",                 true,   CharsToUnicodeString("\\u200E- 23"),                            -23 },
 
-        { "ar",                 FALSE,  CharsToUnicodeString("\\u0663\\u0664"),                          34 },
-        { "ar",                 TRUE,   CharsToUnicodeString("\\u0663\\u0664"),                          34 },
-        { "ar",                 FALSE,  CharsToUnicodeString("-\\u0664\\u0665"),                        -45 },
-        { "ar",                 TRUE,   CharsToUnicodeString("-\\u0664\\u0665"),                        -45 },
-        { "ar",                 TRUE,   CharsToUnicodeString("- \\u0664\\u0665"),                       -45 },
-        { "ar",                 FALSE,  CharsToUnicodeString("\\u200F-\\u0664\\u0665"),                 -45 },
-        { "ar",                 TRUE,   CharsToUnicodeString("\\u200F-\\u0664\\u0665"),                 -45 },
-        { "ar",                 TRUE,   CharsToUnicodeString("\\u200F- \\u0664\\u0665"),                -45 },
+        { "ar",                 false,  CharsToUnicodeString("\\u0663\\u0664"),                          34 },
+        { "ar",                 true,   CharsToUnicodeString("\\u0663\\u0664"),                          34 },
+        { "ar",                 false,  CharsToUnicodeString("-\\u0664\\u0665"),                        -45 },
+        { "ar",                 true,   CharsToUnicodeString("-\\u0664\\u0665"),                        -45 },
+        { "ar",                 true,   CharsToUnicodeString("- \\u0664\\u0665"),                       -45 },
+        { "ar",                 false,  CharsToUnicodeString("\\u200F-\\u0664\\u0665"),                 -45 },
+        { "ar",                 true,   CharsToUnicodeString("\\u200F-\\u0664\\u0665"),                 -45 },
+        { "ar",                 true,   CharsToUnicodeString("\\u200F- \\u0664\\u0665"),                -45 },
 
-        { "ar_MA",              FALSE,  CharsToUnicodeString("12"),                                      12 },
-        { "ar_MA",              TRUE,   CharsToUnicodeString("12"),                                      12 },
-        { "ar_MA",              FALSE,  CharsToUnicodeString("-23"),                                    -23 },
-        { "ar_MA",              TRUE,   CharsToUnicodeString("-23"),                                    -23 },
-        { "ar_MA",              TRUE,   CharsToUnicodeString("- 23"),                                   -23 },
-        { "ar_MA",              FALSE,  CharsToUnicodeString("\\u200E-23"),                             -23 },
-        { "ar_MA",              TRUE,   CharsToUnicodeString("\\u200E-23"),                             -23 },
-        { "ar_MA",              TRUE,   CharsToUnicodeString("\\u200E- 23"),                            -23 },
+        { "ar_MA",              false,  CharsToUnicodeString("12"),                                      12 },
+        { "ar_MA",              true,   CharsToUnicodeString("12"),                                      12 },
+        { "ar_MA",              false,  CharsToUnicodeString("-23"),                                    -23 },
+        { "ar_MA",              true,   CharsToUnicodeString("-23"),                                    -23 },
+        { "ar_MA",              true,   CharsToUnicodeString("- 23"),                                   -23 },
+        { "ar_MA",              false,  CharsToUnicodeString("\\u200E-23"),                             -23 },
+        { "ar_MA",              true,   CharsToUnicodeString("\\u200E-23"),                             -23 },
+        { "ar_MA",              true,   CharsToUnicodeString("\\u200E- 23"),                            -23 },
 
-        { "fa",                 FALSE,  CharsToUnicodeString("\\u06F5\\u06F6"),                          56 },
-        { "fa",                 TRUE,   CharsToUnicodeString("\\u06F5\\u06F6"),                          56 },
-        { "fa",                 FALSE,  CharsToUnicodeString("\\u2212\\u06F6\\u06F7"),                  -67 },
-        { "fa",                 TRUE,   CharsToUnicodeString("\\u2212\\u06F6\\u06F7"),                  -67 },
-        { "fa",                 TRUE,   CharsToUnicodeString("\\u2212 \\u06F6\\u06F7"),                 -67 },
-        { "fa",                 FALSE,  CharsToUnicodeString("\\u200E\\u2212\\u200E\\u06F6\\u06F7"),    -67 },
-        { "fa",                 TRUE,   CharsToUnicodeString("\\u200E\\u2212\\u200E\\u06F6\\u06F7"),    -67 },
-        { "fa",                 TRUE,   CharsToUnicodeString("\\u200E\\u2212\\u200E \\u06F6\\u06F7"),   -67 },
+        { "fa",                 false,  CharsToUnicodeString("\\u06F5\\u06F6"),                          56 },
+        { "fa",                 true,   CharsToUnicodeString("\\u06F5\\u06F6"),                          56 },
+        { "fa",                 false,  CharsToUnicodeString("\\u2212\\u06F6\\u06F7"),                  -67 },
+        { "fa",                 true,   CharsToUnicodeString("\\u2212\\u06F6\\u06F7"),                  -67 },
+        { "fa",                 true,   CharsToUnicodeString("\\u2212 \\u06F6\\u06F7"),                 -67 },
+        { "fa",                 false,  CharsToUnicodeString("\\u200E\\u2212\\u200E\\u06F6\\u06F7"),    -67 },
+        { "fa",                 true,   CharsToUnicodeString("\\u200E\\u2212\\u200E\\u06F6\\u06F7"),    -67 },
+        { "fa",                 true,   CharsToUnicodeString("\\u200E\\u2212\\u200E \\u06F6\\u06F7"),   -67 },
 
-        { "ps",                 FALSE,  CharsToUnicodeString("\\u06F5\\u06F6"),                          56 },
-        { "ps",                 TRUE,   CharsToUnicodeString("\\u06F5\\u06F6"),                          56 },
-        { "ps",                 FALSE,  CharsToUnicodeString("-\\u06F6\\u06F7"),                        -67 },
-        { "ps",                 TRUE,   CharsToUnicodeString("-\\u06F6\\u06F7"),                        -67 },
-        { "ps",                 TRUE,   CharsToUnicodeString("- \\u06F6\\u06F7"),                       -67 },
-        { "ps",                 FALSE,  CharsToUnicodeString("\\u200E-\\u200E\\u06F6\\u06F7"),          -67 },
-        { "ps",                 TRUE,   CharsToUnicodeString("\\u200E-\\u200E\\u06F6\\u06F7"),          -67 },
-        { "ps",                 TRUE,   CharsToUnicodeString("\\u200E-\\u200E \\u06F6\\u06F7"),         -67 },
-        { "ps",                 FALSE,  CharsToUnicodeString("-\\u200E\\u06F6\\u06F7"),                 -67 },
-        { "ps",                 TRUE,   CharsToUnicodeString("-\\u200E\\u06F6\\u06F7"),                 -67 },
-        { "ps",                 TRUE,   CharsToUnicodeString("-\\u200E \\u06F6\\u06F7"),                -67 },
+        { "ps",                 false,  CharsToUnicodeString("\\u06F5\\u06F6"),                          56 },
+        { "ps",                 true,   CharsToUnicodeString("\\u06F5\\u06F6"),                          56 },
+        { "ps",                 false,  CharsToUnicodeString("-\\u06F6\\u06F7"),                        -67 },
+        { "ps",                 true,   CharsToUnicodeString("-\\u06F6\\u06F7"),                        -67 },
+        { "ps",                 true,   CharsToUnicodeString("- \\u06F6\\u06F7"),                       -67 },
+        { "ps",                 false,  CharsToUnicodeString("\\u200E-\\u200E\\u06F6\\u06F7"),          -67 },
+        { "ps",                 true,   CharsToUnicodeString("\\u200E-\\u200E\\u06F6\\u06F7"),          -67 },
+        { "ps",                 true,   CharsToUnicodeString("\\u200E-\\u200E \\u06F6\\u06F7"),         -67 },
+        { "ps",                 false,  CharsToUnicodeString("-\\u200E\\u06F6\\u06F7"),                 -67 },
+        { "ps",                 true,   CharsToUnicodeString("-\\u200E\\u06F6\\u06F7"),                 -67 },
+        { "ps",                 true,   CharsToUnicodeString("-\\u200E \\u06F6\\u06F7"),                -67 },
         // terminator
         { NULL,                 0,      UnicodeString(""),                                                0 },
     };
@@ -8085,27 +8085,27 @@ void NumberFormatTest::TestAccountingCurrency() {
     UNumberFormatStyle style = UNUM_CURRENCY_ACCOUNTING;
 
     expect(NumberFormat::createInstance("en_US", style, status),
-        (Formattable)(double)1234.5, "$1,234.50", TRUE, status);
+        (Formattable)(double)1234.5, "$1,234.50", true, status);
     expect(NumberFormat::createInstance("en_US", style, status),
-        (Formattable)(double)-1234.5, "($1,234.50)", TRUE, status);
+        (Formattable)(double)-1234.5, "($1,234.50)", true, status);
     expect(NumberFormat::createInstance("en_US", style, status),
-        (Formattable)(double)0, "$0.00", TRUE, status);
+        (Formattable)(double)0, "$0.00", true, status);
     expect(NumberFormat::createInstance("en_US", style, status),
-        (Formattable)(double)-0.2, "($0.20)", TRUE, status);
+        (Formattable)(double)-0.2, "($0.20)", true, status);
     expect(NumberFormat::createInstance("ja_JP", style, status),
-        (Formattable)(double)10000, UnicodeString("\\uFFE510,000").unescape(), TRUE, status);
+        (Formattable)(double)10000, UnicodeString("\\uFFE510,000").unescape(), true, status);
     expect(NumberFormat::createInstance("ja_JP", style, status),
-        (Formattable)(double)-1000.5, UnicodeString("(\\uFFE51,000)").unescape(), FALSE, status);
+        (Formattable)(double)-1000.5, UnicodeString("(\\uFFE51,000)").unescape(), false, status);
     expect(NumberFormat::createInstance("de_DE", style, status),
-        (Formattable)(double)-23456.7, UnicodeString("-23.456,70\\u00A0\\u20AC").unescape(), TRUE, status);
+        (Formattable)(double)-23456.7, UnicodeString("-23.456,70\\u00A0\\u20AC").unescape(), true, status);
     expect(NumberFormat::createInstance("en_ID", style, status),
-        (Formattable)(double)0, UnicodeString("IDR\\u00A00.00").unescape(), TRUE, status);
+        (Formattable)(double)0, UnicodeString("IDR\\u00A00.00").unescape(), true, status);
     expect(NumberFormat::createInstance("en_ID", style, status),
-        (Formattable)(double)-0.2, UnicodeString("(IDR\\u00A00.20)").unescape(), TRUE, status);
+        (Formattable)(double)-0.2, UnicodeString("(IDR\\u00A00.20)").unescape(), true, status);
     expect(NumberFormat::createInstance("sh_ME", style, status),
-        (Formattable)(double)0, UnicodeString("0,00\\u00A0\\u20AC").unescape(), TRUE, status);
+        (Formattable)(double)0, UnicodeString("0,00\\u00A0\\u20AC").unescape(), true, status);
     expect(NumberFormat::createInstance("sh_ME", style, status),
-        (Formattable)(double)-0.2, UnicodeString("(0,20\\u00A0\\u20AC)").unescape(), TRUE, status);
+        (Formattable)(double)-0.2, UnicodeString("(0,20\\u00A0\\u20AC)").unescape(), true, status);
 }
 
 /**
@@ -8186,7 +8186,7 @@ void NumberFormatTest::TestCurrencyUsage() {
         status = U_ZERO_ERROR;
         if(i == 0){
             fmt = (DecimalFormat *) NumberFormat::createInstance(enUS_ISK, UNUM_CURRENCY, status);
-            if (assertSuccess("en_US@currency=ISK/CURRENCY", status, TRUE) == FALSE) {
+            if (assertSuccess("en_US@currency=ISK/CURRENCY", status, true) == false) {
                 continue;
             }
 
@@ -8201,7 +8201,7 @@ void NumberFormatTest::TestCurrencyUsage() {
             fmt->setCurrencyUsage(UCURR_USAGE_CASH, &status);
         }else{
             fmt = (DecimalFormat *) NumberFormat::createInstance(enUS_ISK, UNUM_CASH_CURRENCY, status);
-            if (assertSuccess("en_US@currency=ISK/CASH", status, TRUE) == FALSE) {
+            if (assertSuccess("en_US@currency=ISK/CASH", status, true) == false) {
                 continue;
             }
         }
@@ -8223,7 +8223,7 @@ void NumberFormatTest::TestCurrencyUsage() {
         status = U_ZERO_ERROR;
         if(i == 0){
             fmt = (DecimalFormat *) NumberFormat::createInstance(enUS_CAD, UNUM_CURRENCY, status);
-            if (assertSuccess("en_US@currency=CAD/CURRENCY", status, TRUE) == FALSE) {
+            if (assertSuccess("en_US@currency=CAD/CURRENCY", status, true) == false) {
                 continue;
             }
 
@@ -8233,7 +8233,7 @@ void NumberFormatTest::TestCurrencyUsage() {
             fmt->setCurrencyUsage(UCURR_USAGE_CASH, &status);
         }else{
             fmt = (DecimalFormat *) NumberFormat::createInstance(enUS_CAD, UNUM_CASH_CURRENCY, status);
-            if (assertSuccess("en_US@currency=CAD/CASH", status, TRUE) == FALSE) {
+            if (assertSuccess("en_US@currency=CAD/CASH", status, true) == false) {
                 continue;
             }
         }
@@ -8251,13 +8251,13 @@ void NumberFormatTest::TestCurrencyUsage() {
         status = U_ZERO_ERROR;
         if(i == 0){
             fmt = (DecimalFormat *) NumberFormat::createInstance(enUS_CAD, UNUM_CURRENCY, status);
-            if (assertSuccess("en_US@currency=CAD/CURRENCY", status, TRUE) == FALSE) {
+            if (assertSuccess("en_US@currency=CAD/CURRENCY", status, true) == false) {
                 continue;
             }
             fmt->setCurrencyUsage(UCURR_USAGE_CASH, &status);
         }else{
             fmt = (DecimalFormat *) NumberFormat::createInstance(enUS_CAD, UNUM_CASH_CURRENCY, status);
-            if (assertSuccess("en_US@currency=CAD/CASH", status, TRUE) == FALSE) {
+            if (assertSuccess("en_US@currency=CAD/CASH", status, true) == false) {
                 continue;
             }
         }
@@ -8379,7 +8379,7 @@ void NumberFormatTest::TestToPatternScientific11648() {
         dataerrln("Error creating DecimalFormat - %s", u_errorName(status));
         return;
     }
-    fmt.setScientificNotation(TRUE);
+    fmt.setScientificNotation(true);
     UnicodeString pattern;
     assertEquals("", "0.00E0", fmt.toPattern(pattern));
     DecimalFormat fmt2(pattern, sym, status);
@@ -8595,7 +8595,7 @@ void NumberFormatTest::Test13737_ParseScientificStrict() {
     IcuTestErrorCode status(*this, "Test13737_ParseScientificStrict");
     LocalPointer df(NumberFormat::createScientificInstance("en", status), status);
     if (!assertSuccess("", status, true, __FILE__, __LINE__)) {return;}
-    df->setLenient(FALSE);
+    df->setLenient(false);
     // Parse Test
     expect(*df, u"1.2", 1.2);
 }
@@ -8885,8 +8885,8 @@ void NumberFormatTest::TestParsePercentRegression() {
     LocalPointer df1((DecimalFormat*) NumberFormat::createInstance("en", status), status);
     LocalPointer df2((DecimalFormat*) NumberFormat::createPercentInstance("en", status), status);
     if (status.isFailure()) {return; }
-    df1->setLenient(TRUE);
-    df2->setLenient(TRUE);
+    df1->setLenient(true);
+    df2->setLenient(true);
 
     {
         ParsePosition ppos;
@@ -9030,9 +9030,9 @@ void NumberFormatTest::TestFormatFailIfMoreThanMaxDigits() {
     if (status.errDataIfFailureAndReset()) {
         return;
     }
-    assertEquals("Coverage for getter 1", (UBool) FALSE, df.isFormatFailIfMoreThanMaxDigits());
-    df.setFormatFailIfMoreThanMaxDigits(TRUE);
-    assertEquals("Coverage for getter 2", (UBool) TRUE, df.isFormatFailIfMoreThanMaxDigits());
+    assertEquals("Coverage for getter 1", (UBool) false, df.isFormatFailIfMoreThanMaxDigits());
+    df.setFormatFailIfMoreThanMaxDigits(true);
+    assertEquals("Coverage for getter 2", (UBool) true, df.isFormatFailIfMoreThanMaxDigits());
     df.setMaximumIntegerDigits(2);
     UnicodeString result;
     df.format(1234, result, status);
@@ -9046,9 +9046,9 @@ void NumberFormatTest::TestParseCaseSensitive() {
     if (status.errDataIfFailureAndReset()) {
         return;
     }
-    assertEquals("Coverage for getter 1", (UBool) FALSE, df.isParseCaseSensitive());
-    df.setParseCaseSensitive(TRUE);
-    assertEquals("Coverage for getter 1", (UBool) TRUE, df.isParseCaseSensitive());
+    assertEquals("Coverage for getter 1", (UBool) false, df.isParseCaseSensitive());
+    df.setParseCaseSensitive(true);
+    assertEquals("Coverage for getter 1", (UBool) true, df.isParseCaseSensitive());
     Formattable result;
     ParsePosition ppos;
     df.parse(u"1e2", result, ppos);
@@ -9063,9 +9063,9 @@ void NumberFormatTest::TestParseNoExponent() {
     if (status.errDataIfFailureAndReset()) {
         return;
     }
-    assertEquals("Coverage for getter 1", (UBool) FALSE, df.isParseNoExponent());
-    df.setParseNoExponent(TRUE);
-    assertEquals("Coverage for getter 1", (UBool) TRUE, df.isParseNoExponent());
+    assertEquals("Coverage for getter 1", (UBool) false, df.isParseNoExponent());
+    df.setParseNoExponent(true);
+    assertEquals("Coverage for getter 1", (UBool) true, df.isParseNoExponent());
     Formattable result;
     ParsePosition ppos;
     df.parse(u"1E2", result, ppos);
@@ -9080,9 +9080,9 @@ void NumberFormatTest::TestSignAlwaysShown() {
     if (status.errDataIfFailureAndReset()) {
         return;
     }
-    assertEquals("Coverage for getter 1", (UBool) FALSE, df.isSignAlwaysShown());
-    df.setSignAlwaysShown(TRUE);
-    assertEquals("Coverage for getter 1", (UBool) TRUE, df.isSignAlwaysShown());
+    assertEquals("Coverage for getter 1", (UBool) false, df.isSignAlwaysShown());
+    df.setSignAlwaysShown(true);
+    assertEquals("Coverage for getter 1", (UBool) true, df.isSignAlwaysShown());
     UnicodeString result;
     df.format(1234, result, status);
     status.errIfFailureAndReset();
@@ -9161,7 +9161,7 @@ void NumberFormatTest::Test11897_LocalizedPatternSeparator() {
     // when set manually via API
     {
         DecimalFormatSymbols dfs("en", status);
-        dfs.setSymbol(DecimalFormatSymbols::kPatternSeparatorSymbol, u"!", FALSE);
+        dfs.setSymbol(DecimalFormatSymbols::kPatternSeparatorSymbol, u"!", false);
         DecimalFormat df(u"0", dfs, status);
         if (!assertSuccess("", status, true, __FILE__, __LINE__)) { return; }
         df.applyPattern("a0;b0", status); // should not throw
@@ -9325,7 +9325,7 @@ void NumberFormatTest::Test20073_StrictPercentParseErrorIndex() {
         dataerrln("Unable to create DecimalFormat instance.");
         return;
     }
-    df.setLenient(FALSE);
+    df.setLenient(false);
     Formattable result;
     df.parse(u"%2%", result, parsePosition);
     assertEquals("", 0, parsePosition.getIndex());
@@ -9364,7 +9364,7 @@ void NumberFormatTest::Test11648_ExpDecFormatMalPattern() {
 
     DecimalFormat fmt("0.00", {"en", status}, status);
     if (!assertSuccess("", status, true, __FILE__, __LINE__)) { return; }
-    fmt.setScientificNotation(TRUE);
+    fmt.setScientificNotation(true);
     UnicodeString pattern;
 
     assertEquals("A valid scientific notation pattern should be produced",
@@ -9507,40 +9507,40 @@ void NumberFormatTest::Test13804_EmptyStringsWhenParsing() {
     if (status.errIfFailureAndReset()) {
         return;
     }
-    dfs.setSymbol(DecimalFormatSymbols::kCurrencySymbol, u"", FALSE);
-    dfs.setSymbol(DecimalFormatSymbols::kDecimalSeparatorSymbol, u"", FALSE);
-    dfs.setSymbol(DecimalFormatSymbols::kZeroDigitSymbol, u"", FALSE);
-    dfs.setSymbol(DecimalFormatSymbols::kOneDigitSymbol, u"", FALSE);
-    dfs.setSymbol(DecimalFormatSymbols::kTwoDigitSymbol, u"", FALSE);
-    dfs.setSymbol(DecimalFormatSymbols::kThreeDigitSymbol, u"", FALSE);
-    dfs.setSymbol(DecimalFormatSymbols::kFourDigitSymbol, u"", FALSE);
-    dfs.setSymbol(DecimalFormatSymbols::kFiveDigitSymbol, u"", FALSE);
-    dfs.setSymbol(DecimalFormatSymbols::kSixDigitSymbol, u"", FALSE);
-    dfs.setSymbol(DecimalFormatSymbols::kSevenDigitSymbol, u"", FALSE);
-    dfs.setSymbol(DecimalFormatSymbols::kEightDigitSymbol, u"", FALSE);
-    dfs.setSymbol(DecimalFormatSymbols::kNineDigitSymbol, u"", FALSE);
-    dfs.setSymbol(DecimalFormatSymbols::kExponentMultiplicationSymbol, u"", FALSE);
-    dfs.setSymbol(DecimalFormatSymbols::kExponentialSymbol, u"", FALSE);
-    dfs.setSymbol(DecimalFormatSymbols::kGroupingSeparatorSymbol, u"", FALSE);
-    dfs.setSymbol(DecimalFormatSymbols::kInfinitySymbol, u"", FALSE);
-    dfs.setSymbol(DecimalFormatSymbols::kIntlCurrencySymbol, u"", FALSE);
-    dfs.setSymbol(DecimalFormatSymbols::kMinusSignSymbol, u"", FALSE);
-    dfs.setSymbol(DecimalFormatSymbols::kMonetarySeparatorSymbol, u"", FALSE);
-    dfs.setSymbol(DecimalFormatSymbols::kMonetaryGroupingSeparatorSymbol, u"", FALSE);
-    dfs.setSymbol(DecimalFormatSymbols::kNaNSymbol, u"", FALSE);
-    dfs.setPatternForCurrencySpacing(UNUM_CURRENCY_INSERT, FALSE, u"");
-    dfs.setPatternForCurrencySpacing(UNUM_CURRENCY_INSERT, TRUE, u"");
-    dfs.setSymbol(DecimalFormatSymbols::kPercentSymbol, u"", FALSE);
-    dfs.setSymbol(DecimalFormatSymbols::kPerMillSymbol, u"", FALSE);
-    dfs.setSymbol(DecimalFormatSymbols::kPlusSignSymbol, u"", FALSE);
+    dfs.setSymbol(DecimalFormatSymbols::kCurrencySymbol, u"", false);
+    dfs.setSymbol(DecimalFormatSymbols::kDecimalSeparatorSymbol, u"", false);
+    dfs.setSymbol(DecimalFormatSymbols::kZeroDigitSymbol, u"", false);
+    dfs.setSymbol(DecimalFormatSymbols::kOneDigitSymbol, u"", false);
+    dfs.setSymbol(DecimalFormatSymbols::kTwoDigitSymbol, u"", false);
+    dfs.setSymbol(DecimalFormatSymbols::kThreeDigitSymbol, u"", false);
+    dfs.setSymbol(DecimalFormatSymbols::kFourDigitSymbol, u"", false);
+    dfs.setSymbol(DecimalFormatSymbols::kFiveDigitSymbol, u"", false);
+    dfs.setSymbol(DecimalFormatSymbols::kSixDigitSymbol, u"", false);
+    dfs.setSymbol(DecimalFormatSymbols::kSevenDigitSymbol, u"", false);
+    dfs.setSymbol(DecimalFormatSymbols::kEightDigitSymbol, u"", false);
+    dfs.setSymbol(DecimalFormatSymbols::kNineDigitSymbol, u"", false);
+    dfs.setSymbol(DecimalFormatSymbols::kExponentMultiplicationSymbol, u"", false);
+    dfs.setSymbol(DecimalFormatSymbols::kExponentialSymbol, u"", false);
+    dfs.setSymbol(DecimalFormatSymbols::kGroupingSeparatorSymbol, u"", false);
+    dfs.setSymbol(DecimalFormatSymbols::kInfinitySymbol, u"", false);
+    dfs.setSymbol(DecimalFormatSymbols::kIntlCurrencySymbol, u"", false);
+    dfs.setSymbol(DecimalFormatSymbols::kMinusSignSymbol, u"", false);
+    dfs.setSymbol(DecimalFormatSymbols::kMonetarySeparatorSymbol, u"", false);
+    dfs.setSymbol(DecimalFormatSymbols::kMonetaryGroupingSeparatorSymbol, u"", false);
+    dfs.setSymbol(DecimalFormatSymbols::kNaNSymbol, u"", false);
+    dfs.setPatternForCurrencySpacing(UNUM_CURRENCY_INSERT, false, u"");
+    dfs.setPatternForCurrencySpacing(UNUM_CURRENCY_INSERT, true, u"");
+    dfs.setSymbol(DecimalFormatSymbols::kPercentSymbol, u"", false);
+    dfs.setSymbol(DecimalFormatSymbols::kPerMillSymbol, u"", false);
+    dfs.setSymbol(DecimalFormatSymbols::kPlusSignSymbol, u"", false);
 
     DecimalFormat df("0", dfs, status);
     if (status.errIfFailureAndReset()) {
         return;
     }
-    df.setGroupingUsed(TRUE);
-    df.setScientificNotation(TRUE);
-    df.setLenient(TRUE); // enable all matchers
+    df.setGroupingUsed(true);
+    df.setScientificNotation(true);
+    df.setLenient(true); // enable all matchers
     {
         UnicodeString result;
         df.format(0, result); // should not crash or hit infinite loop
@@ -9567,7 +9567,7 @@ void NumberFormatTest::Test13804_EmptyStringsWhenParsing() {
     }
 
     // Test with a nonempty exponent separator symbol to cover more code
-    dfs.setSymbol(DecimalFormatSymbols::kExponentialSymbol, u"E", FALSE);
+    dfs.setSymbol(DecimalFormatSymbols::kExponentialSymbol, u"E", false);
     df.setDecimalFormatSymbols(dfs);
     {
         Formattable result;
@@ -9869,7 +9869,7 @@ void NumberFormatTest::Test13734_StrictFlexibleWhitespace() {
     IcuTestErrorCode status(*this, "Test13734_StrictFlexibleWhitespace");
     {
         DecimalFormat df("+0", {"en", status}, status);
-        df.setLenient(FALSE);
+        df.setLenient(false);
         Formattable result;
         ParsePosition ppos;
         df.parse("+  33", result, ppos);
@@ -9878,7 +9878,7 @@ void NumberFormatTest::Test13734_StrictFlexibleWhitespace() {
     }
     {
         DecimalFormat df("+ 0", {"en", status}, status);
-        df.setLenient(FALSE);
+        df.setLenient(false);
         Formattable result;
         ParsePosition ppos;
         df.parse("+  33", result, ppos);
@@ -10024,7 +10024,7 @@ void NumberFormatTest::Test13733_StrictAndLenient() {
         if (status.errDataIfFailureAndReset()) {
             return;
         }
-        df.setLenient(FALSE);
+        df.setLenient(false);
         LocalPointer ca_strict(df.parseCurrency(inputString, ppos));
         if (ca_strict != nullptr) {
             parsedStrictValue = ca_strict->getNumber().getInt64();
@@ -10033,7 +10033,7 @@ void NumberFormatTest::Test13733_StrictAndLenient() {
             parsedStrictValue, cas.expectedStrictParse);
 
         ppos.setIndex(0);
-        df.setLenient(TRUE);
+        df.setLenient(true);
         LocalPointer ca_lenient(df.parseCurrency(inputString, ppos));
         Formattable parsedNumber_lenient = ca_lenient->getNumber();
         if (ca_lenient != nullptr) {
diff --git a/icu4c/source/test/intltest/numfmtst.h b/icu4c/source/test/intltest/numfmtst.h
index 526e90cd367..5b20204e174 100644
--- a/icu4c/source/test/intltest/numfmtst.h
+++ b/icu4c/source/test/intltest/numfmtst.h
@@ -344,10 +344,10 @@ class NumberFormatTest: public CalendarTimeZoneTest {
     }
 
     void expect(NumberFormat& fmt, const Formattable& n,
-                const UnicodeString& exp, UBool rt=TRUE);
+                const UnicodeString& exp, UBool rt=true);
 
     void expect(NumberFormat& fmt, const Formattable& n,
-                const char *exp, UBool rt=TRUE) {
+                const char *exp, UBool rt=true) {
         expect(fmt, n, UnicodeString(exp, ""), rt);
     }
 
@@ -361,12 +361,12 @@ class NumberFormatTest: public CalendarTimeZoneTest {
 
     void expect(NumberFormat* fmt, const Formattable& n,
                 const UnicodeString& exp, UErrorCode errorCode) {
-        expect(fmt, n, exp, TRUE, errorCode);
+        expect(fmt, n, exp, true, errorCode);
     }
 
     void expect(NumberFormat* fmt, const Formattable& n,
                 const char *exp, UErrorCode errorCode) {
-        expect(fmt, n, UnicodeString(exp, ""), TRUE, errorCode);
+        expect(fmt, n, UnicodeString(exp, ""), true, errorCode);
     }
 
     void expectCurrency(NumberFormat& nf, const Locale& locale,
@@ -405,7 +405,7 @@ class NumberFormatTest: public CalendarTimeZoneTest {
     void expect_rbnf(NumberFormat& fmt, const UnicodeString& str, const Formattable& n);
 
     void expect_rbnf(NumberFormat& fmt, const Formattable& n,
-                const UnicodeString& exp, UBool rt=TRUE);
+                const UnicodeString& exp, UBool rt=true);
 
     // internal utility routine
     static UnicodeString& escape(UnicodeString& s);
diff --git a/icu4c/source/test/intltest/numrgts.cpp b/icu4c/source/test/intltest/numrgts.cpp
index b7b89158fac..16ef75ed228 100644
--- a/icu4c/source/test/intltest/numrgts.cpp
+++ b/icu4c/source/test/intltest/numrgts.cpp
@@ -195,10 +195,10 @@ NumberFormatRegressionTest::failure(UErrorCode status, const UnicodeString& msg,
             errcheckln(status, UnicodeString("FAIL: ", "") + msg
                   + UnicodeString(" failed, error ", "") + UnicodeString(u_errorName(status), "") + UnicodeString(l.getName(),""));
         }
-        return TRUE;
+        return true;
     }
 
-    return FALSE;
+    return false;
 }
 
 UBool 
@@ -212,10 +212,10 @@ NumberFormatRegressionTest::failure(UErrorCode status, const UnicodeString& msg,
             errcheckln(status, UnicodeString("FAIL: ", "") + msg
                   + UnicodeString(" failed, error ", "") + UnicodeString(u_errorName(status), "") + UnicodeString(l, ""));
         }
-        return TRUE;
+        return true;
     }
 
-    return FALSE;
+    return false;
 }
 
 UBool 
@@ -229,10 +229,10 @@ NumberFormatRegressionTest::failure(UErrorCode status, const UnicodeString& msg,
             errcheckln(status, UnicodeString("FAIL: ", "") + msg
                   + UnicodeString(" failed, error ", "") + UnicodeString(u_errorName(status), ""));
         }
-        return TRUE;
+        return true;
     }
 
-    return FALSE;
+    return false;
 }
 
 /**
@@ -270,8 +270,8 @@ void NumberFormatRegressionTest::Test4074620(void)
     MyNumberFormatTest *nf1 = new MyNumberFormatTest();
     MyNumberFormatTest *nf2 = new MyNumberFormatTest();
 
-    nf1->setGroupingUsed(FALSE);
-    nf2->setGroupingUsed(TRUE);
+    nf1->setGroupingUsed(false);
+    nf2->setGroupingUsed(true);
 
     if(nf1 == nf2) 
         errln("Test for bug 4074620 failed");
@@ -413,11 +413,11 @@ NumberFormatRegressionTest::assignFloatValue(float returnfloat)
     logln(UnicodeString(" VALUE ") + returnfloat);
     UErrorCode status = U_ZERO_ERROR;
     NumberFormat *nfcommon =  NumberFormat::createCurrencyInstance(Locale::getUS(), status);
-    if (failure(status, "NumberFormat::createCurrencyInstance", Locale::getUS(), TRUE)){
+    if (failure(status, "NumberFormat::createCurrencyInstance", Locale::getUS(), true)){
         delete nfcommon;
         return returnfloat;
     }
-    nfcommon->setGroupingUsed(FALSE);
+    nfcommon->setGroupingUsed(false);
 
     UnicodeString stringValue;
     stringValue = nfcommon->format(returnfloat, stringValue);
@@ -487,7 +487,7 @@ void NumberFormatRegressionTest::Test4071492 (void)
     double x = 0.00159999;
     UErrorCode status = U_ZERO_ERROR;
     NumberFormat *nf = NumberFormat::createInstance(status);
-    if (failure(status, "NumberFormat::createInstance", Locale::getUS(), TRUE)) {
+    if (failure(status, "NumberFormat::createInstance", Locale::getUS(), true)) {
         delete nf;
         return;
     }
@@ -692,7 +692,7 @@ void NumberFormatRegressionTest::Test4090489 (void)
     failure(status, "new DecimalFormat");
     df->setMinimumFractionDigits(10);
     df->setMaximumFractionDigits(999);
-    df->setGroupingUsed(FALSE);
+    df->setGroupingUsed(false);
     double d = 1.000000000000001E7;
     //BigDecimal bd = new BigDecimal(d);
     UnicodeString sb;
@@ -993,7 +993,7 @@ void NumberFormatRegressionTest::Test4071005 (void)
 
     UErrorCode status = U_ZERO_ERROR;
     formatter = NumberFormat::createInstance(Locale::getCanadaFrench(), status);
-    if (failure(status, "NumberFormat::createInstance", Locale::getCanadaFrench(), TRUE)){
+    if (failure(status, "NumberFormat::createInstance", Locale::getCanadaFrench(), true)){
         delete formatter;
         return;
     }
@@ -1061,7 +1061,7 @@ void NumberFormatRegressionTest::Test4071014 (void)
     char loc[256]={0};
     uloc_canonicalize("de_DE@currency=DEM", loc, 256, &status);
     formatter = NumberFormat::createInstance(Locale(loc), status);
-    if (failure(status, "NumberFormat::createInstance", loc, TRUE)){
+    if (failure(status, "NumberFormat::createInstance", loc, true)){
         delete formatter;
         return;
     }
@@ -1127,7 +1127,7 @@ void NumberFormatRegressionTest::Test4071859 (void)
     char loc[256]={0};
     uloc_canonicalize("it_IT@currency=ITL", loc, 256, &status);
     formatter = NumberFormat::createInstance(Locale(loc), status);
-    if (failure(status, "NumberFormat::createNumberInstance", TRUE)){
+    if (failure(status, "NumberFormat::createNumberInstance", true)){
         delete formatter;
         return;
     }
@@ -1568,7 +1568,7 @@ void NumberFormatRegressionTest::Test4106664(void)
     //bigN = bigN.multiply(BigInteger.valueOf(m));
     double bigN = n * m;
     df->setMultiplier(m);
-    df->setGroupingUsed(FALSE);
+    df->setGroupingUsed(false);
     UnicodeString temp;
     FieldPosition pos(FieldPosition::DONT_CARE);
     logln("formatted: " +
@@ -1693,8 +1693,8 @@ void NumberFormatRegressionTest::Test4122840(void)
 
         // Disable currency spacing for the purposes of this test.
         // To do this, set the spacing insert to the empty string both before and after the symbol.
-        symbols->setPatternForCurrencySpacing(UNUM_CURRENCY_INSERT, FALSE, u"");
-        symbols->setPatternForCurrencySpacing(UNUM_CURRENCY_INSERT, TRUE, u"");
+        symbols->setPatternForCurrencySpacing(UNUM_CURRENCY_INSERT, false, u"");
+        symbols->setPatternForCurrencySpacing(UNUM_CURRENCY_INSERT, true, u"");
 
         DecimalFormat *fmt1 = new DecimalFormat(pattern, *symbols, status);
         failure(status, "new DecimalFormat");
@@ -1937,7 +1937,7 @@ void NumberFormatRegressionTest::Test4145457() {
     //try {
     UErrorCode status = U_ZERO_ERROR;
     NumberFormat *nff = NumberFormat::createInstance(status);
-    if (failure(status, "NumberFormat::createInstance", TRUE)){
+    if (failure(status, "NumberFormat::createInstance", true)){
         delete nff;
         return;
     }
@@ -2180,7 +2180,7 @@ static double _u_abs(double a) { return a<0?-a:a; }
 void NumberFormatRegressionTest::Test4167494(void) {
     UErrorCode status = U_ZERO_ERROR;
     NumberFormat *fmt = NumberFormat::createInstance(Locale::getUS(), status);
-    if (failure(status, "NumberFormat::createInstance", TRUE)){
+    if (failure(status, "NumberFormat::createInstance", true)){
         delete fmt;
         return;
     }
@@ -2229,7 +2229,7 @@ void NumberFormatRegressionTest::Test4170798(void) {
             errln(UnicodeString("FAIL: default parse(\"-0.0\") returns ") + toString(n));
         }
     }
-    df->setParseIntegerOnly(TRUE);
+    df->setParseIntegerOnly(true);
     {
         Formattable n;
         ParsePosition pos(0);
@@ -2510,7 +2510,7 @@ void NumberFormatRegressionTest::Test4212072(void) {
 void NumberFormatRegressionTest::Test4216742(void) {
     UErrorCode status = U_ZERO_ERROR;
     DecimalFormat *fmt = (DecimalFormat*) NumberFormat::createInstance(Locale::getUS(), status);
-    if (failure(status, "createInstance", Locale::getUS(), TRUE)){
+    if (failure(status, "createInstance", Locale::getUS(), true)){
         delete fmt;
         return;
     }
@@ -2552,7 +2552,7 @@ void NumberFormatRegressionTest::Test4217661(void) {
     int D_length = UPRV_LENGTHOF(D);
     UErrorCode status = U_ZERO_ERROR;
     NumberFormat *fmt = NumberFormat::createInstance(Locale::getUS(), status);
-    if (failure(status, "createInstance", Locale::getUS(), TRUE)){
+    if (failure(status, "createInstance", Locale::getUS(), true)){
         delete fmt;
         return;
     }
@@ -2573,7 +2573,7 @@ void NumberFormatRegressionTest::Test4217661(void) {
 void NumberFormatRegressionTest::Test4161100(void) {
     UErrorCode status = U_ZERO_ERROR;
     NumberFormat *nf = NumberFormat::createInstance(Locale::getUS(), status);
-    if (failure(status, "createInstance", Locale::getUS(), TRUE)){
+    if (failure(status, "createInstance", Locale::getUS(), true)){
         delete nf;
         return;
     }
@@ -2671,7 +2671,7 @@ void NumberFormatRegressionTest::Test4243108(void) {
 
 
 /**
- * DateFormat should call setIntegerParseOnly(TRUE) on adopted
+ * DateFormat should call setIntegerParseOnly(true) on adopted
  * NumberFormat objects.
  */
 void NumberFormatRegressionTest::TestJ691(void) {
@@ -2697,9 +2697,9 @@ void NumberFormatRegressionTest::TestJ691(void) {
     }
 
     // *** Here's the key: We don't want to have to do THIS:
-    // nf->setParseIntegerOnly(TRUE);
+    // nf->setParseIntegerOnly(true);
     // or this (with changes to fr_CH per cldrbug:9370):
-    // nf->setGroupingUsed(FALSE);
+    // nf->setGroupingUsed(false);
     // so they are done in DateFormat::adoptNumberFormat
 
     // create the DateFormat
@@ -2713,7 +2713,7 @@ void NumberFormatRegressionTest::TestJ691(void) {
     df->adoptNumberFormat(nf.orphan());
 
     // set parsing to lenient & parse
-    df->setLenient(TRUE);
+    df->setLenient(true);
     UDate ulocdat = df->parse(udt, status);
 
     // format back to a string
@@ -2741,7 +2741,7 @@ void NumberFormatRegressionTest::TestJ691(void) {
 } UPRV_BLOCK_MACRO_END
 
 #define TEST_ASSERT(expr) UPRV_BLOCK_MACRO_BEGIN { \
-    if ((expr)==FALSE) {\
+    if ((expr)==false) {\
         errln("File %s, line %d: Assertion Failed: " #expr "\n", __FILE__, __LINE__);\
     } \
 } UPRV_BLOCK_MACRO_END
@@ -2886,7 +2886,7 @@ void NumberFormatRegressionTest::Test9109(void) {
         return;
     }
 
-    fmt.setLenient(TRUE);
+    fmt.setLenient(true);
     UnicodeString text("123");
     int32_t expected = 123;
     int32_t expos = 3;
@@ -2905,7 +2905,7 @@ void NumberFormatRegressionTest::Test9109(void) {
 void NumberFormatRegressionTest::Test9780(void) {
     UErrorCode status = U_ZERO_ERROR;
     NumberFormat *nf = NumberFormat::createInstance(Locale::getUS(), status);
-    if (failure(status, "NumberFormat::createInstance", TRUE)){
+    if (failure(status, "NumberFormat::createInstance", true)){
         delete nf;
         return;
     }
@@ -2914,7 +2914,7 @@ void NumberFormatRegressionTest::Test9780(void) {
         errln("DecimalFormat needed to continue");
         return;
     }
-    df->setParseIntegerOnly(TRUE);
+    df->setParseIntegerOnly(true);
 
     {
       Formattable n;
@@ -2927,7 +2927,7 @@ void NumberFormatRegressionTest::Test9780(void) {
       }
     }
     // should still work in lenient mode, just won't get fastpath
-    df->setLenient(TRUE);
+    df->setLenient(true);
     {
       Formattable n;
       ParsePosition pos(0);
@@ -2957,7 +2957,7 @@ void NumberFormatRegressionTest::Test9677(void) {
   }
 
   if (U_SUCCESS(status)) {
-    unum_applyPattern(f.getAlias(), FALSE, pattern, -1, NULL, &status);
+    unum_applyPattern(f.getAlias(), false, pattern, -1, NULL, &status);
     unum_setTextAttribute(f.getAlias(), UNUM_POSITIVE_PREFIX, positivePrefix, -1, &status);
     assertSuccess("setting attributes", status);
   }
diff --git a/icu4c/source/test/intltest/numrgts.h b/icu4c/source/test/intltest/numrgts.h
index 38cdf8c5350..0c5b574d052 100644
--- a/icu4c/source/test/intltest/numrgts.h
+++ b/icu4c/source/test/intltest/numrgts.h
@@ -98,9 +98,9 @@ public:
     void Test9677(void);
     void Test10361(void);
 protected:
-    UBool failure(UErrorCode status, const UnicodeString& msg, UBool possibleDataError=FALSE);
-    UBool failure(UErrorCode status, const UnicodeString& msg, const char *l, UBool possibleDataError=FALSE);
-    UBool failure(UErrorCode status, const UnicodeString& msg, const Locale& l, UBool possibleDataError=FALSE);
+    UBool failure(UErrorCode status, const UnicodeString& msg, UBool possibleDataError=false);
+    UBool failure(UErrorCode status, const UnicodeString& msg, const char *l, UBool possibleDataError=false);
+    UBool failure(UErrorCode status, const UnicodeString& msg, const Locale& l, UBool possibleDataError=false);
 };
 
 #endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/icu4c/source/test/intltest/plurfmts.cpp b/icu4c/source/test/intltest/plurfmts.cpp
index ca37525bb1e..6124c2f4c5e 100644
--- a/icu4c/source/test/intltest/plurfmts.cpp
+++ b/icu4c/source/test/intltest/plurfmts.cpp
@@ -82,8 +82,8 @@ void PluralFormatTest::pluralFormatBasicTest(/*char *par*/)
     
     for (int32_t i=0; i< 8; ++i) {
         if (U_SUCCESS(status[i])) {
-            numberFormatTest(plFmt[i], numFmt, 1, 12, NULL, NULL, FALSE, &message);
-            numberFormatTest(plFmt[i], numFmt, 100, 112, NULL, NULL, FALSE, &message);
+            numberFormatTest(plFmt[i], numFmt, 1, 12, NULL, NULL, false, &message);
+            numberFormatTest(plFmt[i], numFmt, 100, 112, NULL, NULL, false, &message);
         }
         else {
             dataerrln("ERROR: PluralFormat constructor failed!");
@@ -221,7 +221,7 @@ void PluralFormatTest::pluralFormatUnitTest(/*char *par*/)
     // ======= Test applying various pattern
     logln("Testing various patterns");
     status = U_ZERO_ERROR;
-    UBool overwrite[PLURAL_PATTERN_DATA] = {FALSE, FALSE, TRUE, TRUE};
+    UBool overwrite[PLURAL_PATTERN_DATA] = {false, false, true, true};
     
     LocalPointer numFmt(NumberFormat::createInstance(status));
     UnicodeString message=UnicodeString("ERROR: PluralFormat tests various pattern ...");
@@ -266,7 +266,7 @@ void PluralFormatTest::pluralFormatUnitTest(/*char *par*/)
     if (U_FAILURE(status)) {
         dataerrln("ERROR: Could not create NumberFormat instance with English locale ");
     }
-    numberFormatTest(&pluralFmt, numFmt.getAlias(), 5, 5, NULL, NULL, FALSE, &message);
+    numberFormatTest(&pluralFmt, numFmt.getAlias(), 5, 5, NULL, NULL, false, &message);
     pluralFmt.applyPattern(UNICODE_STRING_SIMPLE("odd__{odd} other{even}"), status);
     if (pluralFmt.format((int32_t)1, status) != UNICODE_STRING_SIMPLE("even")) {
         errln("SetLocale should reset rules but did not.");
@@ -666,15 +666,15 @@ PluralFormatTest::TestDecimals() {
     IcuTestErrorCode errorCode(*this, "TestDecimals");
     // Simple number replacement.
     PluralFormat pf(Locale::getEnglish(), "one{one meter}other{# meters}", errorCode);
-    assertEquals("simple format(1)", "one meter", pf.format((int32_t)1, errorCode), TRUE);
-    assertEquals("simple format(1.5)", "1.5 meters", pf.format(1.5, errorCode), TRUE);
+    assertEquals("simple format(1)", "one meter", pf.format((int32_t)1, errorCode), true);
+    assertEquals("simple format(1.5)", "1.5 meters", pf.format(1.5, errorCode), true);
     PluralFormat pf2(Locale::getEnglish(),
             "offset:1 one{another meter}other{another # meters}", errorCode);
     DecimalFormat df("0.0", new DecimalFormatSymbols(Locale::getEnglish(), errorCode), errorCode);
     pf2.setNumberFormat(&df, errorCode);
-    assertEquals("offset-decimals format(1)", "another 0.0 meters", pf2.format((int32_t)1, errorCode), TRUE);
-    assertEquals("offset-decimals format(2)", "another 1.0 meters", pf2.format((int32_t)2, errorCode), TRUE);
-    assertEquals("offset-decimals format(2.5)", "another 1.5 meters", pf2.format(2.5, errorCode), TRUE);
+    assertEquals("offset-decimals format(1)", "another 0.0 meters", pf2.format((int32_t)1, errorCode), true);
+    assertEquals("offset-decimals format(2)", "another 1.0 meters", pf2.format((int32_t)2, errorCode), true);
+    assertEquals("offset-decimals format(2.5)", "another 1.5 meters", pf2.format(2.5, errorCode), true);
     errorCode.reset();
 }
 
diff --git a/icu4c/source/test/intltest/plurults.cpp b/icu4c/source/test/intltest/plurults.cpp
index afc8918398f..bc566e484dc 100644
--- a/icu4c/source/test/intltest/plurults.cpp
+++ b/icu4c/source/test/intltest/plurults.cpp
@@ -246,7 +246,7 @@ void PluralRulesTest::testAPI(/*char *par*/)
     for (int32_t i=0; iselect(fData[i])== KEYWORD_A) != isKeywordA[i]) {
              errln("File %s, Line %d, ERROR: plural rules for decimal fractions test failed!\n"
-                   "  number = %g, expected %s", __FILE__, __LINE__, fData[i], isKeywordA[i]?"TRUE":"FALSE");
+                   "  number = %g, expected %s", __FILE__, __LINE__, fData[i], isKeywordA[i]?"true":"false");
         }
     }
 
@@ -300,11 +300,11 @@ void setupResult(const int32_t testSource[], char result[], int32_t* max) {
 
 UBool checkEqual(const PluralRules &test, char *result, int32_t max) {
     UnicodeString key;
-    UBool isEqual = TRUE;
+    UBool isEqual = true;
     for (int32_t i=0; isetDecimalSeparatorAlwaysShown(TRUE);
+    fmt->setDecimalSeparatorAlwaysShown(true);
 
     const int tempLen = 20;
     UnicodeString temp;
diff --git a/icu4c/source/test/intltest/pptest.h b/icu4c/source/test/intltest/pptest.h
index 2830eafb673..6785c2d89ae 100644
--- a/icu4c/source/test/intltest/pptest.h
+++ b/icu4c/source/test/intltest/pptest.h
@@ -30,7 +30,7 @@ public:
     void Test4109023(void);
 
 protected:
-    UBool failure(UErrorCode status, const char* msg, UBool possibleDataError=FALSE);
+    UBool failure(UErrorCode status, const char* msg, UBool possibleDataError=false);
 };
 
 #endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/icu4c/source/test/intltest/quantityformattertest.cpp b/icu4c/source/test/intltest/quantityformattertest.cpp
index dd6d043feff..75e18b94bd6 100644
--- a/icu4c/source/test/intltest/quantityformattertest.cpp
+++ b/icu4c/source/test/intltest/quantityformattertest.cpp
@@ -135,7 +135,7 @@ void QuantityFormatterTest::TestBasic() {
                         *plurrule,
                         appendTo,
                         pos,
-                        status), TRUE);
+                        status), true);
         appendTo.remove();
         assertEquals(
                 "format plural",
@@ -146,7 +146,7 @@ void QuantityFormatterTest::TestBasic() {
                         *plurrule,
                         appendTo,
                         pos,
-                        status), TRUE);
+                        status), true);
     }
     fmt.reset();
     assertFalse("isValid after reset", fmt.isValid());
diff --git a/icu4c/source/test/intltest/rbbiapts.cpp b/icu4c/source/test/intltest/rbbiapts.cpp
index dbe4c97ce43..0c28e80d47b 100644
--- a/icu4c/source/test/intltest/rbbiapts.cpp
+++ b/icu4c/source/test/intltest/rbbiapts.cpp
@@ -41,7 +41,7 @@
 } UPRV_BLOCK_MACRO_END
 
 #define TEST_ASSERT(expr) UPRV_BLOCK_MACRO_BEGIN { \
-    if ((expr) == FALSE) { \
+    if ((expr) == false) { \
         errln("Test Failure at file %s, line %d: \"%s\" is false.\n", __FILE__, __LINE__, #expr); \
     } \
 } UPRV_BLOCK_MACRO_END
@@ -550,8 +550,8 @@ void RBBIAPITest::TestIteration()
     // isBoundary()
     //
     bi->first();
-    if (bi->isBoundary(3) != TRUE) {
-        errln("%s:%d Incorrect value from bi->isBoundary().  Expected TRUE, got FALSE", __FILE__, __LINE__, i);
+    if (bi->isBoundary(3) != true) {
+        errln("%s:%d Incorrect value from bi->isBoundary().  Expected true, got false", __FILE__, __LINE__, i);
     }
     i = bi->current();
     if (i != 3) {
@@ -559,8 +559,8 @@ void RBBIAPITest::TestIteration()
     }
 
 
-    if (bi->isBoundary(11) != FALSE) {
-        errln("%s:%d Incorrect value from bi->isBoundary().  Expected FALSE, got TRUE", __FILE__, __LINE__, i);
+    if (bi->isBoundary(11) != false) {
+        errln("%s:%d Incorrect value from bi->isBoundary().  Expected false, got true", __FILE__, __LINE__, i);
     }
     i = bi->current();
     if (i != 10) {
@@ -727,9 +727,9 @@ void RBBIAPITest::TestRuleStatus() {
              case 2:
                  success = pos==12 && tag==UBRK_LINE_HARD; break;
              default:
-                 success = FALSE; break;
+                 success = false; break;
              }
-             if (success == FALSE) {
+             if (success == false) {
                  errln("%s:%d: incorrect line break status or position.  i=%d, pos=%d, tag=%d",
                      __FILE__, __LINE__, i, pos, tag);
                  break;
@@ -913,7 +913,7 @@ void RBBIAPITest::TestRegistration() {
 
     {
         BreakIterator* result = BreakIterator::createWordInstance("xx_XX", status);
-        UBool fail = TRUE;
+        UBool fail = true;
         if(result){
             fail = *result != *ja_word;
         }
@@ -925,7 +925,7 @@ void RBBIAPITest::TestRegistration() {
 
     {
         BreakIterator* result = BreakIterator::createCharacterInstance("ja_JP", status);
-        UBool fail = TRUE;
+        UBool fail = true;
         if(result){
             fail = *result != *ja_char;
         }
@@ -937,7 +937,7 @@ void RBBIAPITest::TestRegistration() {
 
     {
         BreakIterator* result = BreakIterator::createCharacterInstance("xx_XX", status);
-        UBool fail = TRUE;
+        UBool fail = true;
         if(result){
             fail = *result != *root_char;
         }
@@ -949,11 +949,11 @@ void RBBIAPITest::TestRegistration() {
 
     {
         StringEnumeration* avail = BreakIterator::getAvailableLocales();
-        UBool found = FALSE;
+        UBool found = false;
         const UnicodeString* p;
         while ((p = avail->snext(status))) {
             if (p->compare("xx") == 0) {
-                found = TRUE;
+                found = true;
                 break;
             }
         }
@@ -973,7 +973,7 @@ void RBBIAPITest::TestRegistration() {
     {
         BreakIterator* result = BreakIterator::createWordInstance("en_US", status);
         BreakIterator* root = BreakIterator::createWordInstance("", status);
-        UBool fail = TRUE;
+        UBool fail = true;
         if(root){
           fail = *root != *result;
         }
@@ -986,11 +986,11 @@ void RBBIAPITest::TestRegistration() {
 
     {
         StringEnumeration* avail = BreakIterator::getAvailableLocales();
-        UBool found = FALSE;
+        UBool found = false;
         const UnicodeString* p;
         while ((p = avail->snext(status))) {
             if (p->compare("xx") == 0) {
-                found = TRUE;
+                found = true;
                 break;
             }
         }
@@ -1002,15 +1002,15 @@ void RBBIAPITest::TestRegistration() {
 
     {
         int32_t count;
-        UBool   foundLocale = FALSE;
+        UBool   foundLocale = false;
         const Locale *avail = BreakIterator::getAvailableLocales(count);
         for (int i=0; isuppressBreakAfter(ABBR_MR, status));
-        TEST_ASSERT(FALSE == builder->suppressBreakAfter(ABBR_MR, status)); // already have it
-        TEST_ASSERT(TRUE == builder->unsuppressBreakAfter(ABBR_MR, status));
-        TEST_ASSERT(FALSE == builder->unsuppressBreakAfter(ABBR_MR, status)); // already removed it
-        TEST_ASSERT(TRUE == builder->suppressBreakAfter(ABBR_MR, status));
+        TEST_ASSERT(true == builder->suppressBreakAfter(ABBR_MR, status));
+        TEST_ASSERT(false == builder->suppressBreakAfter(ABBR_MR, status)); // already have it
+        TEST_ASSERT(true == builder->unsuppressBreakAfter(ABBR_MR, status));
+        TEST_ASSERT(false == builder->unsuppressBreakAfter(ABBR_MR, status)); // already removed it
+        TEST_ASSERT(true == builder->suppressBreakAfter(ABBR_MR, status));
         TEST_ASSERT_SUCCESS(status);
 
         logln("Constructing base BI\n");
@@ -1285,8 +1285,8 @@ void RBBIAPITest::TestFilteredBreakIteratorBuilder() {
 
     if (U_SUCCESS(status)) {
         logln("Adding Mr. and Capt as an exception\n");
-        TEST_ASSERT(TRUE == builder->suppressBreakAfter(ABBR_MR, status));
-        TEST_ASSERT(TRUE == builder->suppressBreakAfter(ABBR_CAPT, status));
+        TEST_ASSERT(true == builder->suppressBreakAfter(ABBR_MR, status));
+        TEST_ASSERT(true == builder->suppressBreakAfter(ABBR_CAPT, status));
         TEST_ASSERT_SUCCESS(status);
 
         logln("Constructing base BI\n");
@@ -1318,7 +1318,7 @@ void RBBIAPITest::TestFilteredBreakIteratorBuilder() {
 
     if (U_SUCCESS(status)) {
         logln("unsuppressing 'Capt'");
-        TEST_ASSERT(TRUE == builder->unsuppressBreakAfter(ABBR_CAPT, status));
+        TEST_ASSERT(true == builder->unsuppressBreakAfter(ABBR_CAPT, status));
 
         logln("Building new BI\n");
         filteredBI.adoptInstead(builder->build(baseBI.orphan(), status));
diff --git a/icu4c/source/test/intltest/rbbimonkeytest.cpp b/icu4c/source/test/intltest/rbbimonkeytest.cpp
index 482e5c2e54c..c5648442977 100644
--- a/icu4c/source/test/intltest/rbbimonkeytest.cpp
+++ b/icu4c/source/test/intltest/rbbimonkeytest.cpp
@@ -454,7 +454,7 @@ void MonkeyTestData::set(BreakRules *rules, IntlTest::icu_rand &rand, UErrorCode
                                              // for control over rule chaining.
     while (strIdx < fString.length()) {
         BreakRule *matchingRule = NULL;
-        UBool      hasBreak = FALSE;
+        UBool      hasBreak = false;
         int32_t ruleNum = 0;
         int32_t matchStart = 0;
         int32_t matchEnd = 0;
@@ -610,7 +610,7 @@ void MonkeyTestData::dump(int32_t around) const {
 //
 //---------------------------------------------------------------------------------------
 
-RBBIMonkeyImpl::RBBIMonkeyImpl(UErrorCode &status) : fDumpExpansions(FALSE), fThread(this) {
+RBBIMonkeyImpl::RBBIMonkeyImpl(UErrorCode &status) : fDumpExpansions(false), fThread(this) {
     (void)status;    // suppress unused parameter compiler warning.
 }
 
@@ -647,7 +647,7 @@ void RBBIMonkeyImpl::openBreakRules(const char *fileName, UErrorCode &status) {
     path.append("break_rules" U_FILE_SEP_STRING, status);
     path.appendPathPart(fileName, status);
     const char *codePage = "UTF-8";
-    fRuleCharBuffer.adoptInstead(ucbuf_open(path.data(), &codePage, TRUE, FALSE, &status));
+    fRuleCharBuffer.adoptInstead(ucbuf_open(path.data(), &codePage, true, false, &status));
 }
 
 
@@ -918,10 +918,10 @@ void RBBIMonkeyTest::testMonkey() {
     int64_t loopCount = quick? 100 : 5000;
     getIntParam("loop", params, loopCount, status);
 
-    UBool dumpExpansions = FALSE;
+    UBool dumpExpansions = false;
     getBoolParam("expansions", params, dumpExpansions, status);
 
-    UBool verbose = FALSE;
+    UBool verbose = false;
     getBoolParam("verbose", params, verbose, status);
 
     int64_t seed = 0;
@@ -989,9 +989,9 @@ UBool  RBBIMonkeyTest::getIntParam(UnicodeString name, UnicodeString ¶ms, in
         // Delete this parameter from the params string.
         m.reset();
         params = m.replaceFirst(UnicodeString(), status);
-        return TRUE;
+        return true;
     }
-    return FALSE;
+    return false;
 }
 
 UBool RBBIMonkeyTest::getStringParam(UnicodeString name, UnicodeString ¶ms, CharString &dest, UErrorCode &status) {
@@ -1004,9 +1004,9 @@ UBool RBBIMonkeyTest::getStringParam(UnicodeString name, UnicodeString ¶ms,
         // Delete this parameter from the params string.
         m.reset();
         params = m.replaceFirst(UnicodeString(), status);
-        return TRUE;
+        return true;
     }
-    return FALSE;
+    return false;
 }
 
 UBool RBBIMonkeyTest::getBoolParam(UnicodeString name, UnicodeString ¶ms, UBool &dest, UErrorCode &status) {
@@ -1018,15 +1018,15 @@ UBool RBBIMonkeyTest::getBoolParam(UnicodeString name, UnicodeString ¶ms, UB
             dest = m.group(1, status).caseCompare(UnicodeString("true"), U_FOLD_CASE_DEFAULT) == 0;
         } else {
             // No explicit user value, implies true.
-            dest = TRUE;
+            dest = true;
         }
 
         // Delete this parameter from the params string.
         m.reset();
         params = m.replaceFirst(UnicodeString(), status);
-        return TRUE;
+        return true;
     }
-    return FALSE;
+    return false;
 }
 
 #endif /* !UCONFIG_NO_BREAK_ITERATION && !UCONFIG_NO_REGULAR_EXPRESSIONS && !UCONFIG_NO_FORMATTING */
diff --git a/icu4c/source/test/intltest/rbbitst.cpp b/icu4c/source/test/intltest/rbbitst.cpp
index e3af10926a1..8272dfd4222 100644
--- a/icu4c/source/test/intltest/rbbitst.cpp
+++ b/icu4c/source/test/intltest/rbbitst.cpp
@@ -762,7 +762,7 @@ void RBBITest::TestExtended() {
     //
     //  Put the test data into a UnicodeString
     //
-    UnicodeString testString(FALSE, testFile, len);
+    UnicodeString testString(false, testFile, len);
 
     enum EParseState{
         PARSE_COMMENT,
@@ -1278,7 +1278,7 @@ UBool RBBITest::testCaseIsKnownIssue(const UnicodeString &testCase, const char *
             return logKnownIssue(badCase.fTicketNum);
         }
     }
-    return FALSE;
+    return false;
 }
 
 
@@ -1314,7 +1314,7 @@ void RBBITest::runUnicodeTestData(const char *fileName, RuleBasedBreakIterator *
     if (U_FAILURE(status) || testFile == NULL) {
         return; /* something went wrong, error already output */
     }
-    UnicodeString testFileAsString(TRUE, testFile, len);
+    UnicodeString testFileAsString(true, testFile, len);
 
     //
     //  Parse the test data file using a regular expression.
@@ -1547,7 +1547,7 @@ std::string RBBIMonkeyKind::classNameFromCodepoint(const UChar32 c) {
             return classNames[aClassNum];
         }
     }
-    U_ASSERT(FALSE);  // This should not happen.
+    U_ASSERT(false);  // This should not happen.
     return "bad class name";
 }
 
@@ -3721,7 +3721,7 @@ void RBBITest::TestLineBreaks(void)
         // printf("looping %d\n", loop);
         int32_t t = u_unescape(strlist[loop], str, STRSIZE);
         if (t >= STRSIZE) {
-            TEST_ASSERT(FALSE);
+            TEST_ASSERT(false);
             continue;
         }
 
@@ -3826,9 +3826,9 @@ void RBBITest::TestMonkey() {
     int32_t        seed      = 1;
     UnicodeString  breakType = "all";
     Locale         locale("en");
-    UBool          useUText  = FALSE;
+    UBool          useUText  = false;
 
-    if (quick == FALSE) {
+    if (quick == false) {
         loopCount = 10000;
     }
 
@@ -3846,7 +3846,7 @@ void RBBITest::TestMonkey() {
 
         RegexMatcher u(" *utext", p, 0, status);
         if (u.find()) {
-            useUText = TRUE;
+            useUText = true;
             u.reset();
             p = u.replaceFirst("", status);
         }
@@ -3870,9 +3870,9 @@ void RBBITest::TestMonkey() {
         BreakIterator  *bi = BreakIterator::createCharacterInstance(locale, status);
         if (U_SUCCESS(status)) {
             RunMonkey(bi, m, "char", seed, loopCount, useUText);
-            if (breakType == "all" && useUText==FALSE) {
+            if (breakType == "all" && useUText==false) {
                 // Also run a quick test with UText when "all" is specified
-                RunMonkey(bi, m, "char", seed, loopCount, TRUE);
+                RunMonkey(bi, m, "char", seed, loopCount, true);
             }
         }
         else {
@@ -5341,7 +5341,7 @@ void RBBITest::runLSTMTestFromFile(const char* filename, UScriptCode script) {
     }
 
     //  Put the test data into a UnicodeString
-    UnicodeString testString(FALSE, testFile, len);
+    UnicodeString testString(false, testFile, len);
 
     int32_t start = 0;
 
diff --git a/icu4c/source/test/intltest/rbbitst.h b/icu4c/source/test/intltest/rbbitst.h
index 9d49b213efc..436fd8325b6 100644
--- a/icu4c/source/test/intltest/rbbitst.h
+++ b/icu4c/source/test/intltest/rbbitst.h
@@ -143,7 +143,7 @@ private:
      *  Unicode boundary specifications.
      *  @param testCase the test data string.
      *  @param fileName the Unicode test data file name.
-     *  @return FALSE if the test case should be run, TRUE if it should be skipped.
+     *  @return false if the test case should be run, true if it should be skipped.
      */
     UBool testCaseIsKnownIssue(const UnicodeString &testCase, const char *fileName);
 
diff --git a/icu4c/source/test/intltest/regcoll.cpp b/icu4c/source/test/intltest/regcoll.cpp
index f103915f7c3..9bd47d229f3 100644
--- a/icu4c/source/test/intltest/regcoll.cpp
+++ b/icu4c/source/test/intltest/regcoll.cpp
@@ -519,7 +519,7 @@ void CollationRegressionTest::Test4079231(/* char* par */)
     //
     // if (en_us->operator==(NULL))
     // {
-    //     errln("en_us->operator==(NULL) returned TRUE");
+    //     errln("en_us->operator==(NULL) returned true");
     // }
 
  /*
@@ -1094,7 +1094,7 @@ static int32_t calcKeyIncremental(UCollator *coll, const UChar* text, int32_t le
 
     uiter_setString(&uiter, text, len);
     keyLen = 0;
-    while (TRUE) {
+    while (true) {
         int32_t keyPartLen = ucol_nextSortKeyPart(coll, &uiter, state, &keyBuf[keyLen], count, &status);
         if (U_FAILURE(status)) {
             return -1;
@@ -1131,7 +1131,7 @@ void CollationRegressionTest::TestT7189() {
     };
 
     // Open the collator
-    coll = ucol_openFromShortString("EO_S1", FALSE, NULL, &status);
+    coll = ucol_openFromShortString("EO_S1", false, NULL, &status);
     if (U_FAILURE(status)) {
         errln("Failed to create a collator for short string EO_S1");
         return;
diff --git a/icu4c/source/test/intltest/regextst.cpp b/icu4c/source/test/intltest/regextst.cpp
index d55d9917d31..cb8565d9339 100644
--- a/icu4c/source/test/intltest/regextst.cpp
+++ b/icu4c/source/test/intltest/regextst.cpp
@@ -194,7 +194,7 @@ const char* RegexTest::extractToAssertBuf(const UnicodeString& message) {
 } UPRV_BLOCK_MACRO_END
 
 #define REGEX_ASSERT(expr) UPRV_BLOCK_MACRO_BEGIN { \
-    if ((expr)==FALSE) { \
+    if ((expr)==false) { \
         errln("%s:%d: RegexTest failure: REGEX_ASSERT(%s) failed \n", __FILE__, __LINE__, #expr); \
     } \
 } UPRV_BLOCK_MACRO_END
@@ -215,7 +215,7 @@ const char* RegexTest::extractToAssertBuf(const UnicodeString& message) {
 } UPRV_BLOCK_MACRO_END
 
 #define REGEX_ASSERT_L(expr, line) UPRV_BLOCK_MACRO_BEGIN { \
-    if ((expr)==FALSE) { \
+    if ((expr)==false) { \
         errln("RegexTest failure at line %d, from %d.", __LINE__, (line)); \
         return; \
     } \
@@ -352,7 +352,7 @@ static UText* regextst_openUTF8FromInvariant(UText *ut, const char *inv, int64_t
 //       usage:
 //          REGEX_TESTLM("pattern",  "input text",  lookingAt expected, matches expected);
 //
-//          The expected results are UBool - TRUE or FALSE.
+//          The expected results are UBool - true or false.
 //          The input text is unescaped.  The pattern is not.
 //
 //
@@ -370,14 +370,14 @@ UBool RegexTest::doRegexLMTest(const char *pat, const char *text, UBool looking,
     UParseError         pe;
     RegexPattern        *REPattern = NULL;
     RegexMatcher        *REMatcher = NULL;
-    UBool               retVal     = TRUE;
+    UBool               retVal     = true;
 
     UnicodeString patString(pat, -1, US_INV);
     REPattern = RegexPattern::compile(patString, 0, pe, status);
     if (U_FAILURE(status)) {
         dataerrln("RegexTest failure in RegexPattern::compile() at line %d.  Status = %s",
             line, u_errorName(status));
-        return FALSE;
+        return false;
     }
     if (line==376) { REPattern->dumpPattern();}
 
@@ -387,7 +387,7 @@ UBool RegexTest::doRegexLMTest(const char *pat, const char *text, UBool looking,
     if (U_FAILURE(status)) {
         errln("RegexTest failure in REPattern::matcher() at line %d.  Status = %s\n",
             line, u_errorName(status));
-        return FALSE;
+        return false;
     }
 
     UBool actualmatch;
@@ -395,11 +395,11 @@ UBool RegexTest::doRegexLMTest(const char *pat, const char *text, UBool looking,
     if (U_FAILURE(status)) {
         errln("RegexTest failure in lookingAt() at line %d.  Status = %s\n",
             line, u_errorName(status));
-        retVal =  FALSE;
+        retVal =  false;
     }
     if (actualmatch != looking) {
         errln("RegexTest: wrong return from lookingAt() at line %d.\n", line);
-        retVal = FALSE;
+        retVal = false;
     }
 
     status = U_ZERO_ERROR;
@@ -407,14 +407,14 @@ UBool RegexTest::doRegexLMTest(const char *pat, const char *text, UBool looking,
     if (U_FAILURE(status)) {
         errln("RegexTest failure in matches() at line %d.  Status = %s\n",
             line, u_errorName(status));
-        retVal = FALSE;
+        retVal = false;
     }
     if (actualmatch != match) {
         errln("RegexTest: wrong return from matches() at line %d.\n", line);
-        retVal = FALSE;
+        retVal = false;
     }
 
-    if (retVal == FALSE) {
+    if (retVal == false) {
         REPattern->dumpPattern();
     }
 
@@ -433,14 +433,14 @@ UBool RegexTest::doRegexLMTestUTF8(const char *pat, const char *text, UBool look
     UParseError         pe;
     RegexPattern        *REPattern = NULL;
     RegexMatcher        *REMatcher = NULL;
-    UBool               retVal     = TRUE;
+    UBool               retVal     = true;
 
     regextst_openUTF8FromInvariant(&pattern, pat, -1, &status);
     REPattern = RegexPattern::compile(&pattern, 0, pe, status);
     if (U_FAILURE(status)) {
         dataerrln("RegexTest failure in RegexPattern::compile() at line %d (UTF8).  Status = %s\n",
             line, u_errorName(status));
-        return FALSE;
+        return false;
     }
 
     UnicodeString inputString(text, -1, US_INV);
@@ -452,7 +452,7 @@ UBool RegexTest::doRegexLMTestUTF8(const char *pat, const char *text, UBool look
     if (U_FAILURE(status) && status != U_BUFFER_OVERFLOW_ERROR) {
         // UTF-8 does not allow unpaired surrogates, so this could actually happen
         logln("RegexTest unable to convert input to UTF8 at line %d.  Status = %s\n", line, u_errorName(status));
-        return TRUE; // not a failure of the Regex engine
+        return true; // not a failure of the Regex engine
     }
     status = U_ZERO_ERROR; // buffer overflow
     textChars = new char[inputUTF8Length+1];
@@ -463,7 +463,7 @@ UBool RegexTest::doRegexLMTestUTF8(const char *pat, const char *text, UBool look
     if (U_FAILURE(status)) {
         errln("RegexTest failure in REPattern::matcher() at line %d (UTF8).  Status = %s\n",
             line, u_errorName(status));
-        return FALSE;
+        return false;
     }
 
     UBool actualmatch;
@@ -471,11 +471,11 @@ UBool RegexTest::doRegexLMTestUTF8(const char *pat, const char *text, UBool look
     if (U_FAILURE(status)) {
         errln("RegexTest failure in lookingAt() at line %d (UTF8).  Status = %s\n",
             line, u_errorName(status));
-        retVal =  FALSE;
+        retVal =  false;
     }
     if (actualmatch != looking) {
         errln("RegexTest: wrong return from lookingAt() at line %d (UTF8).\n", line);
-        retVal = FALSE;
+        retVal = false;
     }
 
     status = U_ZERO_ERROR;
@@ -483,14 +483,14 @@ UBool RegexTest::doRegexLMTestUTF8(const char *pat, const char *text, UBool look
     if (U_FAILURE(status)) {
         errln("RegexTest failure in matches() at line %d (UTF8).  Status = %s\n",
             line, u_errorName(status));
-        retVal = FALSE;
+        retVal = false;
     }
     if (actualmatch != match) {
         errln("RegexTest: wrong return from matches() at line %d (UTF8).\n", line);
-        retVal = FALSE;
+        retVal = false;
     }
 
-    if (retVal == FALSE) {
+    if (retVal == false) {
         REPattern->dumpPattern();
     }
 
@@ -579,7 +579,7 @@ void RegexTest::Basic() {
 //
 #if 0
     {
-        // REGEX_TESTLM("a\N{LATIN SMALL LETTER B}c", "abc", FALSE, FALSE);
+        // REGEX_TESTLM("a\N{LATIN SMALL LETTER B}c", "abc", false, false);
         UParseError pe;
         UErrorCode  status = U_ZERO_ERROR;
         RegexPattern *pattern;
@@ -598,124 +598,124 @@ void RegexTest::Basic() {
     //
     // Pattern with parentheses
     //
-    REGEX_TESTLM("st(abc)ring", "stabcring thing", TRUE,  FALSE);
-    REGEX_TESTLM("st(abc)ring", "stabcring",       TRUE,  TRUE);
-    REGEX_TESTLM("st(abc)ring", "stabcrung",       FALSE, FALSE);
+    REGEX_TESTLM("st(abc)ring", "stabcring thing", true,  false);
+    REGEX_TESTLM("st(abc)ring", "stabcring",       true,  true);
+    REGEX_TESTLM("st(abc)ring", "stabcrung",       false, false);
 
     //
     // Patterns with *
     //
-    REGEX_TESTLM("st(abc)*ring", "string", TRUE, TRUE);
-    REGEX_TESTLM("st(abc)*ring", "stabcring", TRUE, TRUE);
-    REGEX_TESTLM("st(abc)*ring", "stabcabcring", TRUE, TRUE);
-    REGEX_TESTLM("st(abc)*ring", "stabcabcdring", FALSE, FALSE);
-    REGEX_TESTLM("st(abc)*ring", "stabcabcabcring etc.", TRUE, FALSE);
+    REGEX_TESTLM("st(abc)*ring", "string", true, true);
+    REGEX_TESTLM("st(abc)*ring", "stabcring", true, true);
+    REGEX_TESTLM("st(abc)*ring", "stabcabcring", true, true);
+    REGEX_TESTLM("st(abc)*ring", "stabcabcdring", false, false);
+    REGEX_TESTLM("st(abc)*ring", "stabcabcabcring etc.", true, false);
 
-    REGEX_TESTLM("a*", "",  TRUE, TRUE);
-    REGEX_TESTLM("a*", "b", TRUE, FALSE);
+    REGEX_TESTLM("a*", "",  true, true);
+    REGEX_TESTLM("a*", "b", true, false);
 
 
     //
     //  Patterns with "."
     //
-    REGEX_TESTLM(".", "abc", TRUE, FALSE);
-    REGEX_TESTLM("...", "abc", TRUE, TRUE);
-    REGEX_TESTLM("....", "abc", FALSE, FALSE);
-    REGEX_TESTLM(".*", "abcxyz123", TRUE, TRUE);
-    REGEX_TESTLM("ab.*xyz", "abcdefghij", FALSE, FALSE);
-    REGEX_TESTLM("ab.*xyz", "abcdefg...wxyz", TRUE, TRUE);
-    REGEX_TESTLM("ab.*xyz", "abcde...wxyz...abc..xyz", TRUE, TRUE);
-    REGEX_TESTLM("ab.*xyz", "abcde...wxyz...abc..xyz...", TRUE, FALSE);
+    REGEX_TESTLM(".", "abc", true, false);
+    REGEX_TESTLM("...", "abc", true, true);
+    REGEX_TESTLM("....", "abc", false, false);
+    REGEX_TESTLM(".*", "abcxyz123", true, true);
+    REGEX_TESTLM("ab.*xyz", "abcdefghij", false, false);
+    REGEX_TESTLM("ab.*xyz", "abcdefg...wxyz", true, true);
+    REGEX_TESTLM("ab.*xyz", "abcde...wxyz...abc..xyz", true, true);
+    REGEX_TESTLM("ab.*xyz", "abcde...wxyz...abc..xyz...", true, false);
 
     //
     //  Patterns with * applied to chars at end of literal string
     //
-    REGEX_TESTLM("abc*", "ab", TRUE, TRUE);
-    REGEX_TESTLM("abc*", "abccccc", TRUE, TRUE);
+    REGEX_TESTLM("abc*", "ab", true, true);
+    REGEX_TESTLM("abc*", "abccccc", true, true);
 
     //
     //  Supplemental chars match as single chars, not a pair of surrogates.
     //
-    REGEX_TESTLM(".", "\\U00011000", TRUE, TRUE);
-    REGEX_TESTLM("...", "\\U00011000x\\U00012002", TRUE, TRUE);
-    REGEX_TESTLM("...", "\\U00011000x\\U00012002y", TRUE, FALSE);
+    REGEX_TESTLM(".", "\\U00011000", true, true);
+    REGEX_TESTLM("...", "\\U00011000x\\U00012002", true, true);
+    REGEX_TESTLM("...", "\\U00011000x\\U00012002y", true, false);
 
 
     //
     //  UnicodeSets in the pattern
     //
-    REGEX_TESTLM("[1-6]", "1", TRUE, TRUE);
-    REGEX_TESTLM("[1-6]", "3", TRUE, TRUE);
-    REGEX_TESTLM("[1-6]", "7", FALSE, FALSE);
-    REGEX_TESTLM("a[1-6]", "a3", TRUE, TRUE);
-    REGEX_TESTLM("a[1-6]", "a3", TRUE, TRUE);
-    REGEX_TESTLM("a[1-6]b", "a3b", TRUE, TRUE);
+    REGEX_TESTLM("[1-6]", "1", true, true);
+    REGEX_TESTLM("[1-6]", "3", true, true);
+    REGEX_TESTLM("[1-6]", "7", false, false);
+    REGEX_TESTLM("a[1-6]", "a3", true, true);
+    REGEX_TESTLM("a[1-6]", "a3", true, true);
+    REGEX_TESTLM("a[1-6]b", "a3b", true, true);
 
-    REGEX_TESTLM("a[0-9]*b", "a123b", TRUE, TRUE);
-    REGEX_TESTLM("a[0-9]*b", "abc", TRUE, FALSE);
-    REGEX_TESTLM("[\\p{Nd}]*", "123456", TRUE, TRUE);
-    REGEX_TESTLM("[\\p{Nd}]*", "a123456", TRUE, FALSE);   // note that * matches 0 occurrences.
-    REGEX_TESTLM("[a][b][[:Zs:]]*", "ab   ", TRUE, TRUE);
+    REGEX_TESTLM("a[0-9]*b", "a123b", true, true);
+    REGEX_TESTLM("a[0-9]*b", "abc", true, false);
+    REGEX_TESTLM("[\\p{Nd}]*", "123456", true, true);
+    REGEX_TESTLM("[\\p{Nd}]*", "a123456", true, false);   // note that * matches 0 occurrences.
+    REGEX_TESTLM("[a][b][[:Zs:]]*", "ab   ", true, true);
 
     //
     //   OR operator in patterns
     //
-    REGEX_TESTLM("(a|b)", "a", TRUE, TRUE);
-    REGEX_TESTLM("(a|b)", "b", TRUE, TRUE);
-    REGEX_TESTLM("(a|b)", "c", FALSE, FALSE);
-    REGEX_TESTLM("a|b", "b", TRUE, TRUE);
+    REGEX_TESTLM("(a|b)", "a", true, true);
+    REGEX_TESTLM("(a|b)", "b", true, true);
+    REGEX_TESTLM("(a|b)", "c", false, false);
+    REGEX_TESTLM("a|b", "b", true, true);
 
-    REGEX_TESTLM("(a|b|c)*", "aabcaaccbcabc", TRUE, TRUE);
-    REGEX_TESTLM("(a|b|c)*", "aabcaaccbcabdc", TRUE, FALSE);
-    REGEX_TESTLM("(a(b|c|d)(x|y|z)*|123)", "ac", TRUE, TRUE);
-    REGEX_TESTLM("(a(b|c|d)(x|y|z)*|123)", "123", TRUE, TRUE);
-    REGEX_TESTLM("(a|(1|2)*)(b|c|d)(x|y|z)*|123", "123", TRUE, TRUE);
-    REGEX_TESTLM("(a|(1|2)*)(b|c|d)(x|y|z)*|123", "222211111czzzzw", TRUE, FALSE);
+    REGEX_TESTLM("(a|b|c)*", "aabcaaccbcabc", true, true);
+    REGEX_TESTLM("(a|b|c)*", "aabcaaccbcabdc", true, false);
+    REGEX_TESTLM("(a(b|c|d)(x|y|z)*|123)", "ac", true, true);
+    REGEX_TESTLM("(a(b|c|d)(x|y|z)*|123)", "123", true, true);
+    REGEX_TESTLM("(a|(1|2)*)(b|c|d)(x|y|z)*|123", "123", true, true);
+    REGEX_TESTLM("(a|(1|2)*)(b|c|d)(x|y|z)*|123", "222211111czzzzw", true, false);
 
     //
     //  +
     //
-    REGEX_TESTLM("ab+", "abbc", TRUE, FALSE);
-    REGEX_TESTLM("ab+c", "ac", FALSE, FALSE);
-    REGEX_TESTLM("b+", "", FALSE, FALSE);
-    REGEX_TESTLM("(abc|def)+", "defabc", TRUE, TRUE);
-    REGEX_TESTLM(".+y", "zippity dooy dah ", TRUE, FALSE);
-    REGEX_TESTLM(".+y", "zippity dooy", TRUE, TRUE);
+    REGEX_TESTLM("ab+", "abbc", true, false);
+    REGEX_TESTLM("ab+c", "ac", false, false);
+    REGEX_TESTLM("b+", "", false, false);
+    REGEX_TESTLM("(abc|def)+", "defabc", true, true);
+    REGEX_TESTLM(".+y", "zippity dooy dah ", true, false);
+    REGEX_TESTLM(".+y", "zippity dooy", true, true);
 
     //
     //   ?
     //
-    REGEX_TESTLM("ab?", "ab", TRUE, TRUE);
-    REGEX_TESTLM("ab?", "a", TRUE, TRUE);
-    REGEX_TESTLM("ab?", "ac", TRUE, FALSE);
-    REGEX_TESTLM("ab?", "abb", TRUE, FALSE);
-    REGEX_TESTLM("a(b|c)?d", "abd", TRUE, TRUE);
-    REGEX_TESTLM("a(b|c)?d", "acd", TRUE, TRUE);
-    REGEX_TESTLM("a(b|c)?d", "ad", TRUE, TRUE);
-    REGEX_TESTLM("a(b|c)?d", "abcd", FALSE, FALSE);
-    REGEX_TESTLM("a(b|c)?d", "ab", FALSE, FALSE);
+    REGEX_TESTLM("ab?", "ab", true, true);
+    REGEX_TESTLM("ab?", "a", true, true);
+    REGEX_TESTLM("ab?", "ac", true, false);
+    REGEX_TESTLM("ab?", "abb", true, false);
+    REGEX_TESTLM("a(b|c)?d", "abd", true, true);
+    REGEX_TESTLM("a(b|c)?d", "acd", true, true);
+    REGEX_TESTLM("a(b|c)?d", "ad", true, true);
+    REGEX_TESTLM("a(b|c)?d", "abcd", false, false);
+    REGEX_TESTLM("a(b|c)?d", "ab", false, false);
 
     //
     //  Escape sequences that become single literal chars, handled internally
     //   by ICU's Unescape.
     //
 
-    // REGEX_TESTLM("\101\142", "Ab", TRUE, TRUE);      // Octal     TODO: not implemented yet.
-    REGEX_TESTLM("\\a", "\\u0007", TRUE, TRUE);        // BEL
-    REGEX_TESTLM("\\cL", "\\u000c", TRUE, TRUE);       // Control-L
-    REGEX_TESTLM("\\e", "\\u001b", TRUE, TRUE);        // Escape
-    REGEX_TESTLM("\\f", "\\u000c", TRUE, TRUE);        // Form Feed
-    REGEX_TESTLM("\\n", "\\u000a", TRUE, TRUE);        // new line
-    REGEX_TESTLM("\\r", "\\u000d", TRUE, TRUE);        //  CR
-    REGEX_TESTLM("\\t", "\\u0009", TRUE, TRUE);        // Tab
-    REGEX_TESTLM("\\u1234", "\\u1234", TRUE, TRUE);
-    REGEX_TESTLM("\\U00001234", "\\u1234", TRUE, TRUE);
+    // REGEX_TESTLM("\101\142", "Ab", true, true);      // Octal     TODO: not implemented yet.
+    REGEX_TESTLM("\\a", "\\u0007", true, true);        // BEL
+    REGEX_TESTLM("\\cL", "\\u000c", true, true);       // Control-L
+    REGEX_TESTLM("\\e", "\\u001b", true, true);        // Escape
+    REGEX_TESTLM("\\f", "\\u000c", true, true);        // Form Feed
+    REGEX_TESTLM("\\n", "\\u000a", true, true);        // new line
+    REGEX_TESTLM("\\r", "\\u000d", true, true);        //  CR
+    REGEX_TESTLM("\\t", "\\u0009", true, true);        // Tab
+    REGEX_TESTLM("\\u1234", "\\u1234", true, true);
+    REGEX_TESTLM("\\U00001234", "\\u1234", true, true);
 
-    REGEX_TESTLM(".*\\Ax", "xyz", TRUE, FALSE);  //  \A matches only at the beginning of input
-    REGEX_TESTLM(".*\\Ax", " xyz", FALSE, FALSE);  //  \A matches only at the beginning of input
+    REGEX_TESTLM(".*\\Ax", "xyz", true, false);  //  \A matches only at the beginning of input
+    REGEX_TESTLM(".*\\Ax", " xyz", false, false);  //  \A matches only at the beginning of input
 
     // Escape of special chars in patterns
-    REGEX_TESTLM("\\\\\\|\\(\\)\\[\\{\\~\\$\\*\\+\\?\\.", "\\\\|()[{~$*+?.", TRUE, TRUE);
+    REGEX_TESTLM("\\\\\\|\\(\\)\\[\\{\\~\\$\\*\\+\\?\\.", "\\\\|()[{~$*+?.", true, true);
 }
 
 
@@ -789,16 +789,16 @@ void RegexTest::API_Match() {
         //
         RegexMatcher *m1 = pat2->matcher(inStr1, status);
         REGEX_CHECK_STATUS;
-        REGEX_ASSERT(m1->lookingAt(status) == TRUE);
+        REGEX_ASSERT(m1->lookingAt(status) == true);
         REGEX_ASSERT(m1->input() == inStr1);
         m1->reset(instr2);
-        REGEX_ASSERT(m1->lookingAt(status) == FALSE);
+        REGEX_ASSERT(m1->lookingAt(status) == false);
         REGEX_ASSERT(m1->input() == instr2);
         m1->reset(inStr1);
         REGEX_ASSERT(m1->input() == inStr1);
-        REGEX_ASSERT(m1->lookingAt(status) == TRUE);
+        REGEX_ASSERT(m1->lookingAt(status) == true);
         m1->reset(empty);
-        REGEX_ASSERT(m1->lookingAt(status) == FALSE);
+        REGEX_ASSERT(m1->lookingAt(status) == false);
         REGEX_ASSERT(m1->input() == empty);
         REGEX_ASSERT(&m1->pattern() == pat2);
 
@@ -809,7 +809,7 @@ void RegexTest::API_Match() {
         m1->reset(4, status);
         REGEX_CHECK_STATUS;
         REGEX_ASSERT(m1->input() == inStr1);
-        REGEX_ASSERT(m1->lookingAt(status) == TRUE);
+        REGEX_ASSERT(m1->lookingAt(status) == true);
 
         m1->reset(-1, status);
         REGEX_ASSERT(status == U_INDEX_OUTOFBOUNDS_ERROR);
@@ -836,25 +836,25 @@ void RegexTest::API_Match() {
         // match(pos, status)
         //
         m1->reset(instr2);
-        REGEX_ASSERT(m1->matches(4, status) == TRUE);
+        REGEX_ASSERT(m1->matches(4, status) == true);
         m1->reset();
-        REGEX_ASSERT(m1->matches(3, status) == FALSE);
+        REGEX_ASSERT(m1->matches(3, status) == false);
         m1->reset();
-        REGEX_ASSERT(m1->matches(5, status) == FALSE);
-        REGEX_ASSERT(m1->matches(4, status) == TRUE);
-        REGEX_ASSERT(m1->matches(-1, status) == FALSE);
+        REGEX_ASSERT(m1->matches(5, status) == false);
+        REGEX_ASSERT(m1->matches(4, status) == true);
+        REGEX_ASSERT(m1->matches(-1, status) == false);
         REGEX_ASSERT(status == U_INDEX_OUTOFBOUNDS_ERROR);
 
         // Match() at end of string should fail, but should not
         //  be an error.
         status = U_ZERO_ERROR;
         len = m1->input().length();
-        REGEX_ASSERT(m1->matches(len, status) == FALSE);
+        REGEX_ASSERT(m1->matches(len, status) == false);
         REGEX_CHECK_STATUS;
 
         // Match beyond end of string should fail with an error.
         status = U_ZERO_ERROR;
-        REGEX_ASSERT(m1->matches(len+1, status) == FALSE);
+        REGEX_ASSERT(m1->matches(len+1, status) == false);
         REGEX_ASSERT(status == U_INDEX_OUTOFBOUNDS_ERROR);
 
         // Successful match at end of string.
@@ -864,10 +864,10 @@ void RegexTest::API_Match() {
             REGEX_CHECK_STATUS;
             m.reset(inStr1);
             len = inStr1.length();
-            REGEX_ASSERT(m.matches(len, status) == TRUE);
+            REGEX_ASSERT(m.matches(len, status) == true);
             REGEX_CHECK_STATUS;
             m.reset(empty);
-            REGEX_ASSERT(m.matches(0, status) == TRUE);
+            REGEX_ASSERT(m.matches(0, status) == true);
             REGEX_CHECK_STATUS;
         }
 
@@ -877,17 +877,17 @@ void RegexTest::API_Match() {
         //
         status = U_ZERO_ERROR;
         m1->reset(instr2);  // "not abc"
-        REGEX_ASSERT(m1->lookingAt(4, status) == TRUE);
-        REGEX_ASSERT(m1->lookingAt(5, status) == FALSE);
-        REGEX_ASSERT(m1->lookingAt(3, status) == FALSE);
-        REGEX_ASSERT(m1->lookingAt(4, status) == TRUE);
-        REGEX_ASSERT(m1->lookingAt(-1, status) == FALSE);
+        REGEX_ASSERT(m1->lookingAt(4, status) == true);
+        REGEX_ASSERT(m1->lookingAt(5, status) == false);
+        REGEX_ASSERT(m1->lookingAt(3, status) == false);
+        REGEX_ASSERT(m1->lookingAt(4, status) == true);
+        REGEX_ASSERT(m1->lookingAt(-1, status) == false);
         REGEX_ASSERT(status == U_INDEX_OUTOFBOUNDS_ERROR);
         status = U_ZERO_ERROR;
         len = m1->input().length();
-        REGEX_ASSERT(m1->lookingAt(len, status) == FALSE);
+        REGEX_ASSERT(m1->lookingAt(len, status) == false);
         REGEX_CHECK_STATUS;
-        REGEX_ASSERT(m1->lookingAt(len+1, status) == FALSE);
+        REGEX_ASSERT(m1->lookingAt(len+1, status) == false);
         REGEX_ASSERT(status == U_INDEX_OUTOFBOUNDS_ERROR);
 
         delete m1;
@@ -913,7 +913,7 @@ void RegexTest::API_Match() {
 
         RegexMatcher *matcher = pat->matcher(data, status);
         REGEX_CHECK_STATUS;
-        REGEX_ASSERT(matcher->lookingAt(status) == TRUE);
+        REGEX_ASSERT(matcher->lookingAt(status) == true);
         static const int32_t matchStarts[] = {0,  2, 4, 8};
         static const int32_t matchEnds[]   = {10, 8, 6, 10};
         int32_t i;
@@ -979,8 +979,8 @@ void RegexTest::API_Match() {
         REGEX_ASSERT(matcher->start(status) == 6);
         REGEX_ASSERT(matcher->find());
         REGEX_ASSERT(matcher->start(status) == 12);
-        REGEX_ASSERT(matcher->find() == FALSE);
-        REGEX_ASSERT(matcher->find() == FALSE);
+        REGEX_ASSERT(matcher->find() == false);
+        REGEX_ASSERT(matcher->find() == false);
 
         matcher->reset();
         REGEX_ASSERT(matcher->find());
@@ -994,9 +994,9 @@ void RegexTest::API_Match() {
         REGEX_ASSERT(matcher->start(status) == 6);
         REGEX_ASSERT(matcher->find(12, status));
         REGEX_ASSERT(matcher->start(status) == 12);
-        REGEX_ASSERT(matcher->find(13, status) == FALSE);
-        REGEX_ASSERT(matcher->find(16, status) == FALSE);
-        REGEX_ASSERT(matcher->find(17, status) == FALSE);
+        REGEX_ASSERT(matcher->find(13, status) == false);
+        REGEX_ASSERT(matcher->find(16, status) == false);
+        REGEX_ASSERT(matcher->find(17, status) == false);
         REGEX_ASSERT_FAIL(matcher->start(status), U_REGEX_INVALID_STATE);
 
         status = U_ZERO_ERROR;
@@ -1055,7 +1055,7 @@ void RegexTest::API_Match() {
         UnicodeString s("    ");
         m.reset(s);
         for (i=0; ; i++) {
-            if (m.find() == FALSE) {
+            if (m.find() == false) {
                 break;
             }
             REGEX_ASSERT(m.start(status) == i);
@@ -1068,7 +1068,7 @@ void RegexTest::API_Match() {
         s = s.unescape();
         m.reset(s);
         for (i=0; ; i+=2) {
-            if (m.find() == FALSE) {
+            if (m.find() == false) {
                 break;
             }
             REGEX_ASSERT(m.start(status) == i);
@@ -1087,7 +1087,7 @@ void RegexTest::API_Match() {
         UnicodeString s("    ");
         m.reset(s);
         for (i=0; ; i++) {
-            if (m.find() == FALSE) {
+            if (m.find() == false) {
                 break;
             }
             REGEX_ASSERT(m.start(status) == i);
@@ -1115,7 +1115,7 @@ void RegexTest::API_Match() {
         RegexMatcher  *m = p->matcher(status);
         REGEX_CHECK_STATUS;
 
-        REGEX_ASSERT(m->find() == FALSE);
+        REGEX_ASSERT(m->find() == false);
         REGEX_ASSERT(m->input() == "");
         delete m;
         delete p;
@@ -1131,8 +1131,8 @@ void RegexTest::API_Match() {
         REGEX_CHECK_STATUS;
         REGEX_ASSERT(m.regionStart() == 0);
         REGEX_ASSERT(m.regionEnd() == testString.length());
-        REGEX_ASSERT(m.hasTransparentBounds() == FALSE);
-        REGEX_ASSERT(m.hasAnchoringBounds() == TRUE);
+        REGEX_ASSERT(m.hasTransparentBounds() == false);
+        REGEX_ASSERT(m.hasAnchoringBounds() == true);
 
         m.region(2,4, status);
         REGEX_CHECK_STATUS;
@@ -1150,27 +1150,27 @@ void RegexTest::API_Match() {
         REGEX_ASSERT(m.regionStart() == 0);
         REGEX_ASSERT(m.regionEnd() == shorterString.length());
 
-        REGEX_ASSERT(m.hasAnchoringBounds() == TRUE);
-        REGEX_ASSERT(&m == &m.useAnchoringBounds(FALSE));
-        REGEX_ASSERT(m.hasAnchoringBounds() == FALSE);
+        REGEX_ASSERT(m.hasAnchoringBounds() == true);
+        REGEX_ASSERT(&m == &m.useAnchoringBounds(false));
+        REGEX_ASSERT(m.hasAnchoringBounds() == false);
         REGEX_ASSERT(&m == &m.reset());
-        REGEX_ASSERT(m.hasAnchoringBounds() == FALSE);
+        REGEX_ASSERT(m.hasAnchoringBounds() == false);
 
-        REGEX_ASSERT(&m == &m.useAnchoringBounds(TRUE));
-        REGEX_ASSERT(m.hasAnchoringBounds() == TRUE);
+        REGEX_ASSERT(&m == &m.useAnchoringBounds(true));
+        REGEX_ASSERT(m.hasAnchoringBounds() == true);
         REGEX_ASSERT(&m == &m.reset());
-        REGEX_ASSERT(m.hasAnchoringBounds() == TRUE);
+        REGEX_ASSERT(m.hasAnchoringBounds() == true);
 
-        REGEX_ASSERT(m.hasTransparentBounds() == FALSE);
-        REGEX_ASSERT(&m == &m.useTransparentBounds(TRUE));
-        REGEX_ASSERT(m.hasTransparentBounds() == TRUE);
+        REGEX_ASSERT(m.hasTransparentBounds() == false);
+        REGEX_ASSERT(&m == &m.useTransparentBounds(true));
+        REGEX_ASSERT(m.hasTransparentBounds() == true);
         REGEX_ASSERT(&m == &m.reset());
-        REGEX_ASSERT(m.hasTransparentBounds() == TRUE);
+        REGEX_ASSERT(m.hasTransparentBounds() == true);
 
-        REGEX_ASSERT(&m == &m.useTransparentBounds(FALSE));
-        REGEX_ASSERT(m.hasTransparentBounds() == FALSE);
+        REGEX_ASSERT(&m == &m.useTransparentBounds(false));
+        REGEX_ASSERT(m.hasTransparentBounds() == false);
         REGEX_ASSERT(&m == &m.reset());
-        REGEX_ASSERT(m.hasTransparentBounds() == FALSE);
+        REGEX_ASSERT(m.hasTransparentBounds() == false);
 
     }
 
@@ -1181,23 +1181,23 @@ void RegexTest::API_Match() {
         UErrorCode status = U_ZERO_ERROR;
         UnicodeString testString("aabb");
         RegexMatcher m1(".*", testString,  0, status);
-        REGEX_ASSERT(m1.lookingAt(status) == TRUE);
-        REGEX_ASSERT(m1.hitEnd() == TRUE);
-        REGEX_ASSERT(m1.requireEnd() == FALSE);
+        REGEX_ASSERT(m1.lookingAt(status) == true);
+        REGEX_ASSERT(m1.hitEnd() == true);
+        REGEX_ASSERT(m1.requireEnd() == false);
         REGEX_CHECK_STATUS;
 
         status = U_ZERO_ERROR;
         RegexMatcher m2("a*", testString, 0, status);
-        REGEX_ASSERT(m2.lookingAt(status) == TRUE);
-        REGEX_ASSERT(m2.hitEnd() == FALSE);
-        REGEX_ASSERT(m2.requireEnd() == FALSE);
+        REGEX_ASSERT(m2.lookingAt(status) == true);
+        REGEX_ASSERT(m2.hitEnd() == false);
+        REGEX_ASSERT(m2.requireEnd() == false);
         REGEX_CHECK_STATUS;
 
         status = U_ZERO_ERROR;
         RegexMatcher m3(".*$", testString, 0, status);
-        REGEX_ASSERT(m3.lookingAt(status) == TRUE);
-        REGEX_ASSERT(m3.hitEnd() == TRUE);
-        REGEX_ASSERT(m3.requireEnd() == TRUE);
+        REGEX_ASSERT(m3.lookingAt(status) == true);
+        REGEX_ASSERT(m3.hitEnd() == true);
+        REGEX_ASSERT(m3.requireEnd() == true);
         REGEX_CHECK_STATUS;
     }
 
@@ -1238,7 +1238,7 @@ void RegexTest::API_Match() {
         REGEX_ASSERT(matcher.getTimeLimit() == 0);
         matcher.setTimeLimit(100, status);
         REGEX_ASSERT(matcher.getTimeLimit() == 100);
-        REGEX_ASSERT(matcher.lookingAt(status) == FALSE);
+        REGEX_ASSERT(matcher.lookingAt(status) == false);
         REGEX_ASSERT(status == U_REGEX_TIME_OUT);
     }
     {
@@ -1248,7 +1248,7 @@ void RegexTest::API_Match() {
         RegexMatcher matcher("(a+)+b", testString, 0, status);
         REGEX_CHECK_STATUS;
         matcher.setTimeLimit(100, status);
-        REGEX_ASSERT(matcher.lookingAt(status) == FALSE);
+        REGEX_ASSERT(matcher.lookingAt(status) == false);
         REGEX_CHECK_STATUS;
     }
 
@@ -1264,21 +1264,21 @@ void RegexTest::API_Match() {
         RegexMatcher matcher("(A)+A$", testString, 0, status);
 
         // With the default stack, this match should fail to run
-        REGEX_ASSERT(matcher.lookingAt(status) == FALSE);
+        REGEX_ASSERT(matcher.lookingAt(status) == false);
         REGEX_ASSERT(status == U_REGEX_STACK_OVERFLOW);
 
         // With unlimited stack, it should run
         status = U_ZERO_ERROR;
         matcher.setStackLimit(0, status);
         REGEX_CHECK_STATUS;
-        REGEX_ASSERT(matcher.lookingAt(status) == TRUE);
+        REGEX_ASSERT(matcher.lookingAt(status) == true);
         REGEX_CHECK_STATUS;
         REGEX_ASSERT(matcher.getStackLimit() == 0);
 
         // With a limited stack, it the match should fail
         status = U_ZERO_ERROR;
         matcher.setStackLimit(10000, status);
-        REGEX_ASSERT(matcher.lookingAt(status) == FALSE);
+        REGEX_ASSERT(matcher.lookingAt(status) == false);
         REGEX_ASSERT(status == U_REGEX_STACK_OVERFLOW);
         REGEX_ASSERT(matcher.getStackLimit() == 10000);
     }
@@ -1292,7 +1292,7 @@ void RegexTest::API_Match() {
         REGEX_CHECK_STATUS;
         matcher.setStackLimit(30, status);
         REGEX_CHECK_STATUS;
-        REGEX_ASSERT(matcher.matches(status) == TRUE);
+        REGEX_ASSERT(matcher.matches(status) == true);
         REGEX_CHECK_STATUS;
         REGEX_ASSERT(matcher.getStackLimit() == 30);
 
@@ -1576,11 +1576,11 @@ void RegexTest::API_Pattern() {
         REGEX_CHECK_STATUS;
         UnicodeString s = "Hello World";
         mFromClone->reset(s);
-        REGEX_ASSERT(mFromClone->find() == TRUE);
+        REGEX_ASSERT(mFromClone->find() == true);
         REGEX_ASSERT(mFromClone->group(status) == "Hello");
-        REGEX_ASSERT(mFromClone->find() == TRUE);
+        REGEX_ASSERT(mFromClone->find() == true);
         REGEX_ASSERT(mFromClone->group(status) == "World");
-        REGEX_ASSERT(mFromClone->find() == FALSE);
+        REGEX_ASSERT(mFromClone->find() == false);
         delete mFromClone;
         delete pClone;
     }
@@ -1588,18 +1588,18 @@ void RegexTest::API_Pattern() {
     //
     //   matches convenience API
     //
-    REGEX_ASSERT(RegexPattern::matches(".*", "random input", pe, status) == TRUE);
+    REGEX_ASSERT(RegexPattern::matches(".*", "random input", pe, status) == true);
     REGEX_CHECK_STATUS;
-    REGEX_ASSERT(RegexPattern::matches("abc", "random input", pe, status) == FALSE);
+    REGEX_ASSERT(RegexPattern::matches("abc", "random input", pe, status) == false);
     REGEX_CHECK_STATUS;
-    REGEX_ASSERT(RegexPattern::matches(".*nput", "random input", pe, status) == TRUE);
+    REGEX_ASSERT(RegexPattern::matches(".*nput", "random input", pe, status) == true);
     REGEX_CHECK_STATUS;
-    REGEX_ASSERT(RegexPattern::matches("random input", "random input", pe, status) == TRUE);
+    REGEX_ASSERT(RegexPattern::matches("random input", "random input", pe, status) == true);
     REGEX_CHECK_STATUS;
-    REGEX_ASSERT(RegexPattern::matches(".*u", "random input", pe, status) == FALSE);
+    REGEX_ASSERT(RegexPattern::matches(".*u", "random input", pe, status) == false);
     REGEX_CHECK_STATUS;
     status = U_INDEX_OUTOFBOUNDS_ERROR;
-    REGEX_ASSERT(RegexPattern::matches("abc", "abc", pe, status) == FALSE);
+    REGEX_ASSERT(RegexPattern::matches("abc", "abc", pe, status) == false);
     REGEX_ASSERT(status == U_INDEX_OUTOFBOUNDS_ERROR);
 
 
@@ -1863,18 +1863,18 @@ void RegexTest::API_Match_UTF8() {
         //
         RegexMatcher *m1 = &pat2->matcher(status)->reset(&input1);
         REGEX_CHECK_STATUS;
-        REGEX_ASSERT(m1->lookingAt(status) == TRUE);
+        REGEX_ASSERT(m1->lookingAt(status) == true);
         const char str_abcdefthisisatest[] = { 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x74, 0x65, 0x73, 0x74, 0x00 }; /* abcdef this is a test */
         REGEX_ASSERT_UTEXT_UTF8(str_abcdefthisisatest, m1->inputText());
         m1->reset(&input2);
-        REGEX_ASSERT(m1->lookingAt(status) == FALSE);
+        REGEX_ASSERT(m1->lookingAt(status) == false);
         const char str_notabc[] = { 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x62, 0x63, 0x00 }; /* not abc */
         REGEX_ASSERT_UTEXT_UTF8(str_notabc, m1->inputText());
         m1->reset(&input1);
         REGEX_ASSERT_UTEXT_UTF8(str_abcdefthisisatest, m1->inputText());
-        REGEX_ASSERT(m1->lookingAt(status) == TRUE);
+        REGEX_ASSERT(m1->lookingAt(status) == true);
         m1->reset(&empty);
-        REGEX_ASSERT(m1->lookingAt(status) == FALSE);
+        REGEX_ASSERT(m1->lookingAt(status) == false);
         REGEX_ASSERT(utext_nativeLength(&empty) == 0);
 
         //
@@ -1884,7 +1884,7 @@ void RegexTest::API_Match_UTF8() {
         m1->reset(4, status);
         REGEX_CHECK_STATUS;
         REGEX_ASSERT_UTEXT_UTF8(str_abcdefthisisatest, m1->inputText());
-        REGEX_ASSERT(m1->lookingAt(status) == TRUE);
+        REGEX_ASSERT(m1->lookingAt(status) == true);
 
         m1->reset(-1, status);
         REGEX_ASSERT(status == U_INDEX_OUTOFBOUNDS_ERROR);
@@ -1910,24 +1910,24 @@ void RegexTest::API_Match_UTF8() {
         // match(pos, status)
         //
         m1->reset(&input2);
-        REGEX_ASSERT(m1->matches(4, status) == TRUE);
+        REGEX_ASSERT(m1->matches(4, status) == true);
         m1->reset();
-        REGEX_ASSERT(m1->matches(3, status) == FALSE);
+        REGEX_ASSERT(m1->matches(3, status) == false);
         m1->reset();
-        REGEX_ASSERT(m1->matches(5, status) == FALSE);
-        REGEX_ASSERT(m1->matches(4, status) == TRUE);
-        REGEX_ASSERT(m1->matches(-1, status) == FALSE);
+        REGEX_ASSERT(m1->matches(5, status) == false);
+        REGEX_ASSERT(m1->matches(4, status) == true);
+        REGEX_ASSERT(m1->matches(-1, status) == false);
         REGEX_ASSERT(status == U_INDEX_OUTOFBOUNDS_ERROR);
 
         // Match() at end of string should fail, but should not
         //  be an error.
         status = U_ZERO_ERROR;
-        REGEX_ASSERT(m1->matches(input2Len, status) == FALSE);
+        REGEX_ASSERT(m1->matches(input2Len, status) == false);
         REGEX_CHECK_STATUS;
 
         // Match beyond end of string should fail with an error.
         status = U_ZERO_ERROR;
-        REGEX_ASSERT(m1->matches(input2Len+1, status) == FALSE);
+        REGEX_ASSERT(m1->matches(input2Len+1, status) == false);
         REGEX_ASSERT(status == U_INDEX_OUTOFBOUNDS_ERROR);
 
         // Successful match at end of string.
@@ -1936,10 +1936,10 @@ void RegexTest::API_Match_UTF8() {
             RegexMatcher m("A?", 0, status);  // will match zero length string.
             REGEX_CHECK_STATUS;
             m.reset(&input1);
-            REGEX_ASSERT(m.matches(input1Len, status) == TRUE);
+            REGEX_ASSERT(m.matches(input1Len, status) == true);
             REGEX_CHECK_STATUS;
             m.reset(&empty);
-            REGEX_ASSERT(m.matches(0, status) == TRUE);
+            REGEX_ASSERT(m.matches(0, status) == true);
             REGEX_CHECK_STATUS;
         }
 
@@ -1949,16 +1949,16 @@ void RegexTest::API_Match_UTF8() {
         //
         status = U_ZERO_ERROR;
         m1->reset(&input2);  // "not abc"
-        REGEX_ASSERT(m1->lookingAt(4, status) == TRUE);
-        REGEX_ASSERT(m1->lookingAt(5, status) == FALSE);
-        REGEX_ASSERT(m1->lookingAt(3, status) == FALSE);
-        REGEX_ASSERT(m1->lookingAt(4, status) == TRUE);
-        REGEX_ASSERT(m1->lookingAt(-1, status) == FALSE);
+        REGEX_ASSERT(m1->lookingAt(4, status) == true);
+        REGEX_ASSERT(m1->lookingAt(5, status) == false);
+        REGEX_ASSERT(m1->lookingAt(3, status) == false);
+        REGEX_ASSERT(m1->lookingAt(4, status) == true);
+        REGEX_ASSERT(m1->lookingAt(-1, status) == false);
         REGEX_ASSERT(status == U_INDEX_OUTOFBOUNDS_ERROR);
         status = U_ZERO_ERROR;
-        REGEX_ASSERT(m1->lookingAt(input2Len, status) == FALSE);
+        REGEX_ASSERT(m1->lookingAt(input2Len, status) == false);
         REGEX_CHECK_STATUS;
-        REGEX_ASSERT(m1->lookingAt(input2Len+1, status) == FALSE);
+        REGEX_ASSERT(m1->lookingAt(input2Len+1, status) == false);
         REGEX_ASSERT(status == U_INDEX_OUTOFBOUNDS_ERROR);
 
         delete m1;
@@ -1994,7 +1994,7 @@ void RegexTest::API_Match_UTF8() {
 
         RegexMatcher *matcher = &pat->matcher(status)->reset(&input);
         REGEX_CHECK_STATUS;
-        REGEX_ASSERT(matcher->lookingAt(status) == TRUE);
+        REGEX_ASSERT(matcher->lookingAt(status) == true);
         static const int32_t matchStarts[] = {0,  2, 4, 8};
         static const int32_t matchEnds[]   = {10, 8, 6, 10};
         int32_t i;
@@ -2145,8 +2145,8 @@ void RegexTest::API_Match_UTF8() {
         REGEX_ASSERT(matcher->start(status) == 6);
         REGEX_ASSERT(matcher->find());
         REGEX_ASSERT(matcher->start(status) == 12);
-        REGEX_ASSERT(matcher->find() == FALSE);
-        REGEX_ASSERT(matcher->find() == FALSE);
+        REGEX_ASSERT(matcher->find() == false);
+        REGEX_ASSERT(matcher->find() == false);
 
         matcher->reset();
         REGEX_ASSERT(matcher->find());
@@ -2160,9 +2160,9 @@ void RegexTest::API_Match_UTF8() {
         REGEX_ASSERT(matcher->start(status) == 6);
         REGEX_ASSERT(matcher->find(12, status));
         REGEX_ASSERT(matcher->start(status) == 12);
-        REGEX_ASSERT(matcher->find(13, status) == FALSE);
-        REGEX_ASSERT(matcher->find(16, status) == FALSE);
-        REGEX_ASSERT(matcher->find(17, status) == FALSE);
+        REGEX_ASSERT(matcher->find(13, status) == false);
+        REGEX_ASSERT(matcher->find(16, status) == false);
+        REGEX_ASSERT(matcher->find(17, status) == false);
         REGEX_ASSERT_FAIL(matcher->start(status), U_REGEX_INVALID_STATE);
 
         status = U_ZERO_ERROR;
@@ -2233,7 +2233,7 @@ void RegexTest::API_Match_UTF8() {
         utext_openUTF8(&s, "    ", -1, &status);
         m.reset(&s);
         for (i=0; ; i++) {
-            if (m.find() == FALSE) {
+            if (m.find() == false) {
                 break;
             }
             REGEX_ASSERT(m.start(status) == i);
@@ -2247,7 +2247,7 @@ void RegexTest::API_Match_UTF8() {
         utext_openUTF8(&s, (char *)aboveBMP, -1, &status);
         m.reset(&s);
         for (i=0; ; i+=4) {
-            if (m.find() == FALSE) {
+            if (m.find() == false) {
                 break;
             }
             REGEX_ASSERT(m.start(status) == i);
@@ -2269,7 +2269,7 @@ void RegexTest::API_Match_UTF8() {
         utext_openUTF8(&s, "    ", -1, &status);
         m.reset(&s);
         for (i=0; ; i++) {
-            if (m.find() == FALSE) {
+            if (m.find() == false) {
                 break;
             }
             REGEX_ASSERT(m.start(status) == i);
@@ -2299,7 +2299,7 @@ void RegexTest::API_Match_UTF8() {
         RegexMatcher  *m = p->matcher(status);
         REGEX_CHECK_STATUS;
 
-        REGEX_ASSERT(m->find() == FALSE);
+        REGEX_ASSERT(m->find() == false);
         REGEX_ASSERT(utext_nativeLength(m->inputText()) == 0);
         delete m;
         delete p;
@@ -2321,8 +2321,8 @@ void RegexTest::API_Match_UTF8() {
         REGEX_CHECK_STATUS;
         REGEX_ASSERT(m.regionStart() == 0);
         REGEX_ASSERT(m.regionEnd() == (int32_t)strlen("This is test data"));
-        REGEX_ASSERT(m.hasTransparentBounds() == FALSE);
-        REGEX_ASSERT(m.hasAnchoringBounds() == TRUE);
+        REGEX_ASSERT(m.hasTransparentBounds() == false);
+        REGEX_ASSERT(m.hasAnchoringBounds() == true);
 
         m.region(2,4, status);
         REGEX_CHECK_STATUS;
@@ -2341,27 +2341,27 @@ void RegexTest::API_Match_UTF8() {
         REGEX_ASSERT(m.regionStart() == 0);
         REGEX_ASSERT(m.regionEnd() == (int32_t)strlen("short"));
 
-        REGEX_ASSERT(m.hasAnchoringBounds() == TRUE);
-        REGEX_ASSERT(&m == &m.useAnchoringBounds(FALSE));
-        REGEX_ASSERT(m.hasAnchoringBounds() == FALSE);
+        REGEX_ASSERT(m.hasAnchoringBounds() == true);
+        REGEX_ASSERT(&m == &m.useAnchoringBounds(false));
+        REGEX_ASSERT(m.hasAnchoringBounds() == false);
         REGEX_ASSERT(&m == &m.reset());
-        REGEX_ASSERT(m.hasAnchoringBounds() == FALSE);
+        REGEX_ASSERT(m.hasAnchoringBounds() == false);
 
-        REGEX_ASSERT(&m == &m.useAnchoringBounds(TRUE));
-        REGEX_ASSERT(m.hasAnchoringBounds() == TRUE);
+        REGEX_ASSERT(&m == &m.useAnchoringBounds(true));
+        REGEX_ASSERT(m.hasAnchoringBounds() == true);
         REGEX_ASSERT(&m == &m.reset());
-        REGEX_ASSERT(m.hasAnchoringBounds() == TRUE);
+        REGEX_ASSERT(m.hasAnchoringBounds() == true);
 
-        REGEX_ASSERT(m.hasTransparentBounds() == FALSE);
-        REGEX_ASSERT(&m == &m.useTransparentBounds(TRUE));
-        REGEX_ASSERT(m.hasTransparentBounds() == TRUE);
+        REGEX_ASSERT(m.hasTransparentBounds() == false);
+        REGEX_ASSERT(&m == &m.useTransparentBounds(true));
+        REGEX_ASSERT(m.hasTransparentBounds() == true);
         REGEX_ASSERT(&m == &m.reset());
-        REGEX_ASSERT(m.hasTransparentBounds() == TRUE);
+        REGEX_ASSERT(m.hasTransparentBounds() == true);
 
-        REGEX_ASSERT(&m == &m.useTransparentBounds(FALSE));
-        REGEX_ASSERT(m.hasTransparentBounds() == FALSE);
+        REGEX_ASSERT(&m == &m.useTransparentBounds(false));
+        REGEX_ASSERT(m.hasTransparentBounds() == false);
         REGEX_ASSERT(&m == &m.reset());
-        REGEX_ASSERT(m.hasTransparentBounds() == FALSE);
+        REGEX_ASSERT(m.hasTransparentBounds() == false);
 
         utext_close(&testText);
         utext_close(&testPattern);
@@ -2380,27 +2380,27 @@ void RegexTest::API_Match_UTF8() {
         utext_openUTF8(&testText, str_aabb, -1, &status);
 
         RegexMatcher m1(&testPattern, &testText,  0, status);
-        REGEX_ASSERT(m1.lookingAt(status) == TRUE);
-        REGEX_ASSERT(m1.hitEnd() == TRUE);
-        REGEX_ASSERT(m1.requireEnd() == FALSE);
+        REGEX_ASSERT(m1.lookingAt(status) == true);
+        REGEX_ASSERT(m1.hitEnd() == true);
+        REGEX_ASSERT(m1.requireEnd() == false);
         REGEX_CHECK_STATUS;
 
         status = U_ZERO_ERROR;
         const char str_a[] = { 0x61, 0x2a, 0x00 }; /* a* */
         utext_openUTF8(&testPattern, str_a, -1, &status);
         RegexMatcher m2(&testPattern, &testText, 0, status);
-        REGEX_ASSERT(m2.lookingAt(status) == TRUE);
-        REGEX_ASSERT(m2.hitEnd() == FALSE);
-        REGEX_ASSERT(m2.requireEnd() == FALSE);
+        REGEX_ASSERT(m2.lookingAt(status) == true);
+        REGEX_ASSERT(m2.hitEnd() == false);
+        REGEX_ASSERT(m2.requireEnd() == false);
         REGEX_CHECK_STATUS;
 
         status = U_ZERO_ERROR;
         const char str_dotstardollar[] = { 0x2e, 0x2a, 0x24, 0x00 }; /* .*$ */
         utext_openUTF8(&testPattern, str_dotstardollar, -1, &status);
         RegexMatcher m3(&testPattern, &testText, 0, status);
-        REGEX_ASSERT(m3.lookingAt(status) == TRUE);
-        REGEX_ASSERT(m3.hitEnd() == TRUE);
-        REGEX_ASSERT(m3.requireEnd() == TRUE);
+        REGEX_ASSERT(m3.lookingAt(status) == true);
+        REGEX_ASSERT(m3.hitEnd() == true);
+        REGEX_ASSERT(m3.requireEnd() == true);
         REGEX_CHECK_STATUS;
 
         utext_close(&testText);
@@ -2871,11 +2871,11 @@ void RegexTest::API_Pattern_UTF8() {
         const char str_HelloWorld[] = { 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0x20, 0x57, 0x6f, 0x72, 0x6c, 0x64, 0x00 }; /* Hello World */
         utext_openUTF8(&input, str_HelloWorld, -1, &status);
         mFromClone->reset(&input);
-        REGEX_ASSERT(mFromClone->find() == TRUE);
+        REGEX_ASSERT(mFromClone->find() == true);
         REGEX_ASSERT(mFromClone->group(status) == "Hello");
-        REGEX_ASSERT(mFromClone->find() == TRUE);
+        REGEX_ASSERT(mFromClone->find() == true);
         REGEX_ASSERT(mFromClone->group(status) == "World");
-        REGEX_ASSERT(mFromClone->find() == FALSE);
+        REGEX_ASSERT(mFromClone->find() == false);
         delete mFromClone;
         delete pClone;
 
@@ -2896,32 +2896,32 @@ void RegexTest::API_Pattern_UTF8() {
 
         const char str_dotstar[] = { 0x2e, 0x2a, 0x00 }; /* .* */
         utext_openUTF8(&pattern, str_dotstar, -1, &status);
-        REGEX_ASSERT(RegexPattern::matches(&pattern, &input, pe, status) == TRUE);
+        REGEX_ASSERT(RegexPattern::matches(&pattern, &input, pe, status) == true);
         REGEX_CHECK_STATUS;
 
         const char str_abc[] = { 0x61, 0x62, 0x63, 0x00 }; /* abc */
         utext_openUTF8(&pattern, str_abc, -1, &status);
-        REGEX_ASSERT(RegexPattern::matches("abc", "random input", pe, status) == FALSE);
+        REGEX_ASSERT(RegexPattern::matches("abc", "random input", pe, status) == false);
         REGEX_CHECK_STATUS;
 
         const char str_nput[] = { 0x2e, 0x2a, 0x6e, 0x70, 0x75, 0x74, 0x00 }; /* .*nput */
         utext_openUTF8(&pattern, str_nput, -1, &status);
-        REGEX_ASSERT(RegexPattern::matches(".*nput", "random input", pe, status) == TRUE);
+        REGEX_ASSERT(RegexPattern::matches(".*nput", "random input", pe, status) == true);
         REGEX_CHECK_STATUS;
 
         utext_openUTF8(&pattern, str_randominput, -1, &status);
-        REGEX_ASSERT(RegexPattern::matches("random input", "random input", pe, status) == TRUE);
+        REGEX_ASSERT(RegexPattern::matches("random input", "random input", pe, status) == true);
         REGEX_CHECK_STATUS;
 
         const char str_u[] = { 0x2e, 0x2a, 0x75, 0x00 }; /* .*u */
         utext_openUTF8(&pattern, str_u, -1, &status);
-        REGEX_ASSERT(RegexPattern::matches(".*u", "random input", pe, status) == FALSE);
+        REGEX_ASSERT(RegexPattern::matches(".*u", "random input", pe, status) == false);
         REGEX_CHECK_STATUS;
 
         utext_openUTF8(&input, str_abc, -1, &status);
         utext_openUTF8(&pattern, str_abc, -1, &status);
         status = U_INDEX_OUTOFBOUNDS_ERROR;
-        REGEX_ASSERT(RegexPattern::matches("abc", "abc", pe, status) == FALSE);
+        REGEX_ASSERT(RegexPattern::matches("abc", "abc", pe, status) == false);
         REGEX_ASSERT(status == U_INDEX_OUTOFBOUNDS_ERROR);
 
         utext_close(&input);
@@ -3183,7 +3183,7 @@ void RegexTest::Extended() {
     //
     //  Put the test data into a UnicodeString
     //
-    UnicodeString testString(FALSE, testData, len);
+    UnicodeString testString(false, testData, len);
 
     RegexMatcher    quotedStuffMat(UNICODE_STRING_SIMPLE("\\s*([\\'\\\"/])(.*?)\\1"), 0, status);
     RegexMatcher    commentMat    (UNICODE_STRING_SIMPLE("\\s*(#.*)?$"), 0, status);
@@ -3269,7 +3269,7 @@ void RegexTest::Extended() {
         //  The only thing left from the input line should be an optional trailing comment.
         //
         commentMat.reset(testLine);
-        if (commentMat.lookingAt(status) == FALSE) {
+        if (commentMat.lookingAt(status) == false) {
             errln("Line %d: unexpected characters at end of test line.", lineNum);
             continue;
         }
@@ -3321,7 +3321,7 @@ static void setInt(UVector &vec, int32_t val, int32_t idx) {
 
 static UBool utextOffsetToNative(UText *utext, int32_t unistrOffset, int32_t& nativeIndex)
 {
-    UBool couldFind = TRUE;
+    UBool couldFind = true;
     UTEXT_SETNATIVEINDEX(utext, 0);
     int32_t i = 0;
     while (i < unistrOffset) {
@@ -3329,7 +3329,7 @@ static UBool utextOffsetToNative(UText *utext, int32_t unistrOffset, int32_t& na
         if (c != U_SENTINEL) {
             i += U16_LENGTH(c);
         } else {
-            couldFind = FALSE;
+            couldFind = false;
             break;
         }
     }
@@ -3362,12 +3362,12 @@ void RegexTest::regex_find(const UnicodeString &pattern,
     UVector             groupEnds(status);
     UVector             groupStartsUTF8(status);
     UVector             groupEndsUTF8(status);
-    UBool               isMatch        = FALSE, isUTF8Match = FALSE;
-    UBool               failed         = FALSE;
+    UBool               isMatch        = false, isUTF8Match = false;
+    UBool               failed         = false;
     int32_t             numFinds;
     int32_t             i;
-    UBool               useMatchesFunc   = FALSE;
-    UBool               useLookingAtFunc = FALSE;
+    UBool               useMatchesFunc   = false;
+    UBool               useLookingAtFunc = false;
     int32_t             regionStart      = -1;
     int32_t             regionEnd        = -1;
     int32_t             regionStartUTF8  = -1;
@@ -3490,10 +3490,10 @@ void RegexTest::regex_find(const UnicodeString &pattern,
 
     // 'M' flag.  Use matches() instead of find()
     if (flags.indexOf((UChar)0x4d) >= 0) {
-        useMatchesFunc = TRUE;
+        useMatchesFunc = true;
     }
     if (flags.indexOf((UChar)0x4c) >= 0) {
-        useLookingAtFunc = TRUE;
+        useLookingAtFunc = true;
     }
 
     //
@@ -3539,7 +3539,7 @@ void RegexTest::regex_find(const UnicodeString &pattern,
     }
     if ((regionStart>=0 || regionEnd>=0) && (regionStart<0 || regionStart>regionEnd)) {
         errln("mismatched  tags");
-        failed = TRUE;
+        failed = true;
         goto cleanupAndReturn;
     }
 
@@ -3549,7 +3549,7 @@ void RegexTest::regex_find(const UnicodeString &pattern,
     matcher = callerPattern->matcher(deTaggedInput, status);
     REGEX_CHECK_STATUS_L(line);
     if (flags.indexOf((UChar)0x74) >= 0) {   //  't' trace flag
-        matcher->setTrace(TRUE);
+        matcher->setTrace(true);
     }
 
     if (UTF8Pattern != NULL) {
@@ -3576,7 +3576,7 @@ void RegexTest::regex_find(const UnicodeString &pattern,
     //
     if (UTF8Matcher != NULL) {
         if (flags.indexOf((UChar)0x74) >= 0) {   //  't' trace flag
-            UTF8Matcher->setTrace(TRUE);
+            UTF8Matcher->setTrace(true);
         }
         if (regionStart>=0)    (void) utextOffsetToNative(&inputText, regionStart, regionStartUTF8);
         if (regionEnd>=0)      (void) utextOffsetToNative(&inputText, regionEnd, regionEndUTF8);
@@ -3590,7 +3590,7 @@ void RegexTest::regex_find(const UnicodeString &pattern,
                 int32_t  startUTF8;
                 if (!utextOffsetToNative(&inputText, start, startUTF8)) {
                     errln("Error at line %d: could not find native index for group start %d.  UTF16 index %d", line, i, start);
-                    failed = TRUE;
+                    failed = true;
                     goto cleanupAndReturn;  // Good chance of subsequent bogus errors.  Stop now.
                 }
                 setInt(groupStartsUTF8, startUTF8, i);
@@ -3602,7 +3602,7 @@ void RegexTest::regex_find(const UnicodeString &pattern,
                 int32_t  endUTF8;
                 if (!utextOffsetToNative(&inputText, end, endUTF8)) {
                     errln("Error at line %d: could not find native index for group end %d.  UTF16 index %d", line, i, end);
-                    failed = TRUE;
+                    failed = true;
                     goto cleanupAndReturn;  // Good chance of subsequent bogus errors.  Stop now.
                 }
                 setInt(groupEndsUTF8, endUTF8, i);
@@ -3619,15 +3619,15 @@ void RegexTest::regex_find(const UnicodeString &pattern,
        }
     }
     if (flags.indexOf((UChar)0x61) >= 0) {   //  'a' anchoring bounds flag
-        matcher->useAnchoringBounds(FALSE);
+        matcher->useAnchoringBounds(false);
         if (UTF8Matcher != NULL) {
-            UTF8Matcher->useAnchoringBounds(FALSE);
+            UTF8Matcher->useAnchoringBounds(false);
         }
     }
     if (flags.indexOf((UChar)0x62) >= 0) {   //  'b' transparent bounds flag
-        matcher->useTransparentBounds(TRUE);
+        matcher->useTransparentBounds(true);
         if (UTF8Matcher != NULL) {
-            UTF8Matcher->useTransparentBounds(TRUE);
+            UTF8Matcher->useTransparentBounds(true);
         }
     }
 
@@ -3656,9 +3656,9 @@ void RegexTest::regex_find(const UnicodeString &pattern,
             }
         }
     }
-    matcher->setTrace(FALSE);
+    matcher->setTrace(false);
     if (UTF8Matcher) {
-        UTF8Matcher->setTrace(FALSE);
+        UTF8Matcher->setTrace(false);
     }
     if (U_FAILURE(status)) {
         errln("Error at line %d. ICU ErrorCode is %s", u_errorName(status));
@@ -3672,22 +3672,22 @@ void RegexTest::regex_find(const UnicodeString &pattern,
     // matcher->groupCount does not include group 0, the entire match, hence the +1.
     //   G option in test means that capture group data is not available in the
     //     expected results, so the check needs to be suppressed.
-    if (isMatch == FALSE && groupStarts.size() != 0) {
+    if (isMatch == false && groupStarts.size() != 0) {
         dataerrln("Error at line %d:  Match expected, but none found.", line);
-        failed = TRUE;
+        failed = true;
         goto cleanupAndReturn;
-    } else if (UTF8Matcher != NULL && isUTF8Match == FALSE && groupStarts.size() != 0) {
+    } else if (UTF8Matcher != NULL && isUTF8Match == false && groupStarts.size() != 0) {
         errln("Error at line %d:  Match expected, but none found. (UTF8)", line);
-        failed = TRUE;
+        failed = true;
         goto cleanupAndReturn;
     }
     if (isMatch && groupStarts.size() == 0) {
         errln("Error at line %d: No match expected, but one found at position %d.", line, matcher->start(status));
-        failed = TRUE;
+        failed = true;
     }
     if (UTF8Matcher && isUTF8Match && groupStarts.size() == 0) {
         errln("Error at line %d: No match expected, but one found at position %d (UTF-8).", line, UTF8Matcher->start(status));
-        failed = TRUE;
+        failed = true;
     }
 
     if (flags.indexOf((UChar)0x47 /*G*/) >= 0) {
@@ -3702,12 +3702,12 @@ void RegexTest::regex_find(const UnicodeString &pattern,
         if (matcher->start(i, status) != expectedStart) {
             errln("Error at line %d: incorrect start position for group %d.  Expected %d, got %d",
                 line, i, expectedStart, matcher->start(i, status));
-            failed = TRUE;
+            failed = true;
             goto cleanupAndReturn;  // Good chance of subsequent bogus errors.  Stop now.
         } else if (UTF8Matcher != NULL && UTF8Matcher->start(i, status) != expectedStartUTF8) {
             errln("Error at line %d: incorrect start position for group %d.  Expected %d, got %d (UTF8)",
                   line, i, expectedStartUTF8, UTF8Matcher->start(i, status));
-            failed = TRUE;
+            failed = true;
             goto cleanupAndReturn;  // Good chance of subsequent bogus errors.  Stop now.
         }
 
@@ -3716,13 +3716,13 @@ void RegexTest::regex_find(const UnicodeString &pattern,
         if (matcher->end(i, status) != expectedEnd) {
             errln("Error at line %d: incorrect end position for group %d.  Expected %d, got %d",
                 line, i, expectedEnd, matcher->end(i, status));
-            failed = TRUE;
+            failed = true;
             // Error on end position;  keep going; real error is probably yet to come as group
             //   end positions work from end of the input data towards the front.
         } else if (UTF8Matcher != NULL && UTF8Matcher->end(i, status) != expectedEndUTF8) {
             errln("Error at line %d: incorrect end position for group %d.  Expected %d, got %d (UTF8)",
                   line, i, expectedEndUTF8, UTF8Matcher->end(i, status));
-            failed = TRUE;
+            failed = true;
             // Error on end position;  keep going; real error is probably yet to come as group
             //   end positions work from end of the input data towards the front.
         }
@@ -3730,52 +3730,52 @@ void RegexTest::regex_find(const UnicodeString &pattern,
     if ( matcher->groupCount()+1 < groupStarts.size()) {
         errln("Error at line %d: Expected %d capture groups, found %d.",
             line, groupStarts.size()-1, matcher->groupCount());
-        failed = TRUE;
+        failed = true;
         }
     else if (UTF8Matcher != NULL && UTF8Matcher->groupCount()+1 < groupStarts.size()) {
         errln("Error at line %d: Expected %d capture groups, found %d. (UTF8)",
               line, groupStarts.size()-1, UTF8Matcher->groupCount());
-        failed = TRUE;
+        failed = true;
     }
 
     if ((flags.indexOf((UChar)0x59) >= 0) &&   //  'Y' flag:  RequireEnd() == false
-        matcher->requireEnd() == TRUE) {
-        errln("Error at line %d: requireEnd() returned TRUE.  Expected FALSE", line);
-        failed = TRUE;
+        matcher->requireEnd() == true) {
+        errln("Error at line %d: requireEnd() returned true.  Expected false", line);
+        failed = true;
     } else if (UTF8Matcher != NULL && (flags.indexOf((UChar)0x59) >= 0) &&   //  'Y' flag:  RequireEnd() == false
-        UTF8Matcher->requireEnd() == TRUE) {
-        errln("Error at line %d: requireEnd() returned TRUE.  Expected FALSE (UTF8)", line);
-        failed = TRUE;
+        UTF8Matcher->requireEnd() == true) {
+        errln("Error at line %d: requireEnd() returned true.  Expected false (UTF8)", line);
+        failed = true;
     }
 
     if ((flags.indexOf((UChar)0x79) >= 0) &&   //  'y' flag:  RequireEnd() == true
-        matcher->requireEnd() == FALSE) {
-        errln("Error at line %d: requireEnd() returned FALSE.  Expected TRUE", line);
-        failed = TRUE;
+        matcher->requireEnd() == false) {
+        errln("Error at line %d: requireEnd() returned false.  Expected true", line);
+        failed = true;
     } else if (UTF8Matcher != NULL && (flags.indexOf((UChar)0x79) >= 0) &&   //  'Y' flag:  RequireEnd() == false
-        UTF8Matcher->requireEnd() == FALSE) {
-        errln("Error at line %d: requireEnd() returned FALSE.  Expected TRUE (UTF8)", line);
-        failed = TRUE;
+        UTF8Matcher->requireEnd() == false) {
+        errln("Error at line %d: requireEnd() returned false.  Expected true (UTF8)", line);
+        failed = true;
     }
 
     if ((flags.indexOf((UChar)0x5A) >= 0) &&   //  'Z' flag:  hitEnd() == false
-        matcher->hitEnd() == TRUE) {
-        errln("Error at line %d: hitEnd() returned TRUE.  Expected FALSE", line);
-        failed = TRUE;
+        matcher->hitEnd() == true) {
+        errln("Error at line %d: hitEnd() returned true.  Expected false", line);
+        failed = true;
     } else if (UTF8Matcher != NULL && (flags.indexOf((UChar)0x5A) >= 0) &&   //  'Z' flag:  hitEnd() == false
-               UTF8Matcher->hitEnd() == TRUE) {
-        errln("Error at line %d: hitEnd() returned TRUE.  Expected FALSE (UTF8)", line);
-        failed = TRUE;
+               UTF8Matcher->hitEnd() == true) {
+        errln("Error at line %d: hitEnd() returned true.  Expected false (UTF8)", line);
+        failed = true;
     }
 
     if ((flags.indexOf((UChar)0x7A) >= 0) &&   //  'z' flag:  hitEnd() == true
-        matcher->hitEnd() == FALSE) {
-        errln("Error at line %d: hitEnd() returned FALSE.  Expected TRUE", line);
-        failed = TRUE;
+        matcher->hitEnd() == false) {
+        errln("Error at line %d: hitEnd() returned false.  Expected true", line);
+        failed = true;
     } else if (UTF8Matcher != NULL && (flags.indexOf((UChar)0x7A) >= 0) &&   //  'z' flag:  hitEnd() == true
-               UTF8Matcher->hitEnd() == FALSE) {
-        errln("Error at line %d: hitEnd() returned FALSE.  Expected TRUE (UTF8)", line);
-        failed = TRUE;
+               UTF8Matcher->hitEnd() == false) {
+        errln("Error at line %d: hitEnd() returned false.  Expected true (UTF8)", line);
+        failed = true;
     }
 
 
@@ -3932,7 +3932,7 @@ void RegexTest::PerlTests() {
     //
     //  Put the test data into a UnicodeString
     //
-    UnicodeString testDataString(FALSE, testData, len);
+    UnicodeString testDataString(false, testData, len);
 
     //
     //  Regex to break the input file into lines, and strip the new lines.
@@ -4092,9 +4092,9 @@ void RegexTest::PerlTests() {
         //
         RegexMatcher *testMat = testPat->matcher(matchString, status);
         UBool found = testMat->find();
-        UBool expected = FALSE;
+        UBool expected = false;
         if (fields[2].indexOf(UChar_y) >=0) {
-            expected = TRUE;
+            expected = true;
         }
         if (expected != found) {
             errln("line %d: Expected %smatch, got %smatch",
@@ -4303,7 +4303,7 @@ void RegexTest::PerlTestsUTF8() {
     //
     //  Put the test data into a UnicodeString
     //
-    UnicodeString testDataString(FALSE, testData, len);
+    UnicodeString testDataString(false, testData, len);
 
     //
     //  Regex to break the input file into lines, and strip the new lines.
@@ -4489,9 +4489,9 @@ void RegexTest::PerlTestsUTF8() {
         //
         RegexMatcher *testMat = &testPat->matcher(status)->reset(&inputText);
         UBool found = testMat->find();
-        UBool expected = FALSE;
+        UBool expected = false;
         if (fields[2].indexOf(UChar_y) >=0) {
-            expected = TRUE;
+            expected = true;
         }
         if (expected != found) {
             errln("line %d: Expected %smatch, got %smatch",
@@ -4675,7 +4675,7 @@ void RegexTest::Bug6149() {
     RegexMatcher  matcher(pattern, s, flags, status);
     UBool result = false;
     REGEX_ASSERT_FAIL(result=matcher.matches(status), U_REGEX_STACK_OVERFLOW);
-    REGEX_ASSERT(result == FALSE);
+    REGEX_ASSERT(result == false);
  }
 
 
@@ -4755,7 +4755,7 @@ void RegexTest::Callbacks() {
         cbInfo.reset(4);
         s = "aaaaaaaaaaaaaaaaaaab";
         matcher.reset(s);
-        REGEX_ASSERT(matcher.matches(status)==FALSE);
+        REGEX_ASSERT(matcher.matches(status)==false);
         REGEX_CHECK_STATUS;
         REGEX_ASSERT(cbInfo.numCalls > 0);
 
@@ -4764,7 +4764,7 @@ void RegexTest::Callbacks() {
         cbInfo.reset(4);
         s = "aaaaaaaaaaaaaaaaaaaaaaab";
         matcher.reset(s);
-        REGEX_ASSERT(matcher.matches(status)==FALSE);
+        REGEX_ASSERT(matcher.matches(status)==false);
         REGEX_ASSERT(status == U_REGEX_STOPPED_BY_CALLER);
         REGEX_ASSERT(cbInfo.numCalls == 4);
 
@@ -4773,7 +4773,7 @@ void RegexTest::Callbacks() {
         cbInfo.reset(4);
         s = "aaaaaaaaaaaaaaaaaaaaaaab";
         matcher.reset(s);
-        REGEX_ASSERT(matcher.find(status)==FALSE);
+        REGEX_ASSERT(matcher.find(status)==false);
         REGEX_ASSERT(status == U_REGEX_STOPPED_BY_CALLER);
         REGEX_ASSERT(cbInfo.numCalls == 4);
     }
@@ -4798,8 +4798,8 @@ struct progressCallBackContext {
 };
 
 // call-back function for find().
-// Return TRUE to continue the find().
-// Return FALSE to stop the find().
+// Return true to continue the find().
+// Return false to stop the find().
 U_CDECL_BEGIN
 static UBool U_CALLCONV
 testProgressCallBackFn(const void *context, int64_t matchIndex) {
@@ -4850,7 +4850,7 @@ void RegexTest::FindProgressCallbacks() {
         UnicodeString s = "aaxxx";
         matcher.reset(s);
 #if 0
-        matcher.setTrace(TRUE);
+        matcher.setTrace(true);
 #endif
         REGEX_ASSERT(matcher.find(0, status));
         REGEX_CHECK_STATUS;
@@ -4862,7 +4862,7 @@ void RegexTest::FindProgressCallbacks() {
         s = "aaaaaaaaaaaaaaaaaaab";
         cbInfo.reset(s.length()); //  Some upper limit for number of calls that is greater than size of our input string
         matcher.reset(s);
-        REGEX_ASSERT(matcher.find(0, status)==FALSE);
+        REGEX_ASSERT(matcher.find(0, status)==false);
         REGEX_CHECK_STATUS;
         REGEX_ASSERT(cbInfo.numCalls > 0 && cbInfo.numCalls < 25);
 
@@ -4871,7 +4871,7 @@ void RegexTest::FindProgressCallbacks() {
         UnicodeString s1 = "aaaaaaaaaaaaaaaaaaaaaaab";
         cbInfo.reset(s1.length() - 5); //  Bail early somewhere near the end of input string
         matcher.reset(s1);
-        REGEX_ASSERT(matcher.find(0, status)==FALSE);
+        REGEX_ASSERT(matcher.find(0, status)==false);
         REGEX_ASSERT(status == U_REGEX_STOPPED_BY_CALLER);
         REGEX_ASSERT(cbInfo.numCalls == s1.length() - 5);
 
@@ -4880,7 +4880,7 @@ void RegexTest::FindProgressCallbacks() {
         UnicodeString s2 = "aaaaaaaaaaaaaa aaaaaaaaab xxx";
         cbInfo.reset(s2.length() - 10); //  Bail early somewhere near the end of input string
         matcher.reset(s2);
-        REGEX_ASSERT(matcher.find(0, status)==FALSE);
+        REGEX_ASSERT(matcher.find(0, status)==false);
         REGEX_ASSERT(status == U_REGEX_STOPPED_BY_CALLER);
         // Now retry the match from where left off
         cbInfo.maxCalls = 100; //  No callback limit
@@ -4977,7 +4977,7 @@ void RegexTest::PreAllocatedUTextCAPI () {
 
         uregex_setText(re, text1, -1, &status);
         result = uregex_find(re, 0, &status);
-        REGEX_ASSERT(result==TRUE);
+        REGEX_ASSERT(result==true);
 
         /*  Capture Group 0, the full match.  Should succeed. "abc interior def" */
         status = U_ZERO_ERROR;
@@ -5569,14 +5569,14 @@ void RegexTest::TestBug11049() {
     // To see the problem, the text must exactly fill an allocated buffer, so that valgrind will
     // detect the bad read.
 
-    TestCase11049("A|B|C", "a string \\ud800\\udc00", FALSE, __LINE__);
-    TestCase11049("A|B|C", "string matches at end C", TRUE, __LINE__);
+    TestCase11049("A|B|C", "a string \\ud800\\udc00", false, __LINE__);
+    TestCase11049("A|B|C", "string matches at end C", true, __LINE__);
 
     // Test again with a pattern starting with a single character,
     // which takes a different code path than starting with an OR expression,
     // but with similar logic.
-    TestCase11049("C", "a string \\ud800\\udc00", FALSE, __LINE__);
-    TestCase11049("C", "string matches at end C", TRUE, __LINE__);
+    TestCase11049("C", "a string \\ud800\\udc00", false, __LINE__);
+    TestCase11049("C", "string matches at end C", true, __LINE__);
 }
 
 // Run a single test case from TestBug11049(). Internal function.
diff --git a/icu4c/source/test/intltest/regiontst.cpp b/icu4c/source/test/intltest/regiontst.cpp
index c35759f08fa..bfb5810e7e3 100644
--- a/icu4c/source/test/intltest/regiontst.cpp
+++ b/icu4c/source/test/intltest/regiontst.cpp
@@ -625,11 +625,11 @@ void RegionTest::TestGetPreferredValues() {
               continue;
             }
             for ( int i = 1 ; data[i] ; i++ ) {
-                UBool found = FALSE;
+                UBool found = false;
                 preferredValues->reset(status);
                 while ( const char *check = preferredValues->next(NULL,status) ) {
                     if ( !uprv_strcmp(check,data[i]) ) {
-                        found = TRUE;
+                        found = true;
                         break;
                     }
                 }
diff --git a/icu4c/source/test/intltest/regiontst.h b/icu4c/source/test/intltest/regiontst.h
index 47649b26cce..a517fc99726 100644
--- a/icu4c/source/test/intltest/regiontst.h
+++ b/icu4c/source/test/intltest/regiontst.h
@@ -42,7 +42,7 @@ public:
 
 private:
 
-    UBool optionv; // TRUE if @v option is given on command line
+    UBool optionv; // true if @v option is given on command line
 };
 
 #endif /* #if !UCONFIG_NO_FORMATTING */
diff --git a/icu4c/source/test/intltest/reldatefmttest.cpp b/icu4c/source/test/intltest/reldatefmttest.cpp
index 7ae77e17986..c7c079cbc90 100644
--- a/icu4c/source/test/intltest/reldatefmttest.cpp
+++ b/icu4c/source/test/intltest/reldatefmttest.cpp
@@ -1006,7 +1006,7 @@ void RelativeDateTimeFormatterTest::TestEnglishNoQuantityCaps() {
             UDAT_STYLE_LONG,
             UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE,
             status);
-    if (assertSuccess("RelativeDateTimeFormatter", status, TRUE) == FALSE) {
+    if (assertSuccess("RelativeDateTimeFormatter", status, true) == false) {
         return;
     }
     RunTest(
diff --git a/icu4c/source/test/intltest/reptest.cpp b/icu4c/source/test/intltest/reptest.cpp
index 51afca26db6..4b3ab481aac 100644
--- a/icu4c/source/test/intltest/reptest.cpp
+++ b/icu4c/source/test/intltest/reptest.cpp
@@ -250,7 +250,7 @@ void ReplaceableTest::TestReplaceableClass(void) {
     }
 
     if(!noop.hasMetaData()) {
-        errln("Replaceable::hasMetaData() does not return TRUE");
+        errln("Replaceable::hasMetaData() does not return true");
     }
 
     // try to call the compiler-provided
diff --git a/icu4c/source/test/intltest/restest.cpp b/icu4c/source/test/intltest/restest.cpp
index 839c5607f21..f11015b71c8 100644
--- a/icu4c/source/test/intltest/restest.cpp
+++ b/icu4c/source/test/intltest/restest.cpp
@@ -126,12 +126,12 @@ param[] =
     // "IN" means inherits
     // "NE" or "ne" means "does not exist"
 
-    { "root",       NULL,   U_ZERO_ERROR,             e_Root,      { TRUE, FALSE, FALSE }, { TRUE, FALSE, FALSE } },
-    { "te",         NULL,   U_ZERO_ERROR,             e_te,        { FALSE, TRUE, FALSE }, { TRUE, TRUE, FALSE } },
-    { "te_IN",      NULL,   U_ZERO_ERROR,             e_te_IN,     { FALSE, FALSE, TRUE }, { TRUE, TRUE, TRUE } },
-    { "te_NE",      NULL,   U_USING_FALLBACK_WARNING, e_te,        { FALSE, TRUE, FALSE }, { TRUE, TRUE, FALSE } },
-    { "te_IN_NE",   NULL,   U_USING_FALLBACK_WARNING, e_te_IN,     { FALSE, FALSE, TRUE }, { TRUE, TRUE, TRUE } },
-    { "ne",         NULL,   U_USING_DEFAULT_WARNING,  e_Root,      { TRUE, FALSE, FALSE }, { TRUE, FALSE, FALSE } }
+    { "root",       NULL,   U_ZERO_ERROR,             e_Root,      { true, false, false }, { true, false, false } },
+    { "te",         NULL,   U_ZERO_ERROR,             e_te,        { false, true, false }, { true, true, false } },
+    { "te_IN",      NULL,   U_ZERO_ERROR,             e_te_IN,     { false, false, true }, { true, true, true } },
+    { "te_NE",      NULL,   U_USING_FALLBACK_WARNING, e_te,        { false, true, false }, { true, true, false } },
+    { "te_IN_NE",   NULL,   U_USING_FALLBACK_WARNING, e_te_IN,     { false, false, true }, { true, true, true } },
+    { "ne",         NULL,   U_USING_DEFAULT_WARNING,  e_Root,      { true, false, false }, { true, false, false } }
 };
 
 static const int32_t bundles_count = UPRV_LENGTHOF(param);
@@ -145,11 +145,11 @@ static const int32_t bundles_count = UPRV_LENGTHOF(param);
 uint32_t
 randul()
 {
-    static UBool initialized = FALSE;
+    static UBool initialized = false;
     if (!initialized)
     {
         srand((unsigned)time(NULL));
-        initialized = TRUE;
+        initialized = true;
     }
     // Assume rand has at least 12 bits of precision
     uint32_t l = 0;
@@ -243,14 +243,14 @@ ResourceBundleTest::TestResourceBundles()
         Locale::setDefault(Locale("en_US"), status);
     }
 
-    testTag("only_in_Root", TRUE, FALSE, FALSE);
-    testTag("only_in_te", FALSE, TRUE, FALSE);
-    testTag("only_in_te_IN", FALSE, FALSE, TRUE);
-    testTag("in_Root_te", TRUE, TRUE, FALSE);
-    testTag("in_Root_te_te_IN", TRUE, TRUE, TRUE);
-    testTag("in_Root_te_IN", TRUE, FALSE, TRUE);
-    testTag("in_te_te_IN", FALSE, TRUE, TRUE);
-    testTag("nonexistent", FALSE, FALSE, FALSE);
+    testTag("only_in_Root", true, false, false);
+    testTag("only_in_te", false, true, false);
+    testTag("only_in_te_IN", false, false, true);
+    testTag("in_Root_te", true, true, false);
+    testTag("in_Root_te_te_IN", true, true, true);
+    testTag("in_Root_te_IN", true, false, true);
+    testTag("in_te_te_IN", false, true, true);
+    testTag("nonexistent", false, false, false);
     logln("Passed: %d\nFailed: %d", pass, fail);
 
     /* Restore the default locale for the other tests. */
@@ -351,7 +351,7 @@ ResourceBundleTest::testTag(const char* frag,
     if(U_FAILURE(status))
     {
         dataerrln("Could not load testdata.dat %s " + UnicodeString(u_errorName(status)));
-        return FALSE;
+        return false;
     }
 
     for (i=0; i decfmt((DecimalFormat *) NumberFormat::createInstance("en", status));
-    if (assertSuccess("NumberFormat::createInstance", status, TRUE) == FALSE) {
+    if (assertSuccess("NumberFormat::createInstance", status, true) == false) {
         return;
     }
     LocalPointer fmt(
@@ -194,7 +194,7 @@ void ScientificNumberFormatterTest::TestFixedDecimalMarkup() {
 void ScientificNumberFormatterTest::TestFixedDecimalSuperscript() {
     UErrorCode status = U_ZERO_ERROR;
     LocalPointer decfmt((DecimalFormat *) NumberFormat::createInstance("en", status));
-    if (assertSuccess("NumberFormat::createInstance", status, TRUE) == FALSE) {
+    if (assertSuccess("NumberFormat::createInstance", status, true) == false) {
         return;
     }
     LocalPointer fmt(
diff --git a/icu4c/source/test/intltest/sfwdchit.cpp b/icu4c/source/test/intltest/sfwdchit.cpp
index 4d7c3750ab4..22975b4826c 100644
--- a/icu4c/source/test/intltest/sfwdchit.cpp
+++ b/icu4c/source/test/intltest/sfwdchit.cpp
@@ -30,11 +30,11 @@ SimpleFwdCharIterator::SimpleFwdCharIterator(const UnicodeString& s) {
     fLen = s.length();
     fStart = new UChar[fLen];
     if(fStart == NULL) {
-        fBogus = TRUE;
+        fBogus = true;
     } else {
         fEnd = fStart+fLen;
         fCurrent = fStart;
-        fBogus = FALSE;
+        fBogus = false;
         s.extract(0, fLen, fStart);          
     }
     
@@ -47,20 +47,20 @@ SimpleFwdCharIterator::SimpleFwdCharIterator(UChar *s, int32_t len, UBool adopt)
 
     fLen = len==-1 ? u_strlen(s) : len;
 
-    if(adopt == FALSE) {
+    if(adopt == false) {
         fStart = new UChar[fLen];
         if(fStart == NULL) {
-            fBogus = TRUE;
+            fBogus = true;
         } else {
             uprv_memcpy(fStart, s, fLen);
             fEnd = fStart+fLen;
             fCurrent = fStart;
-            fBogus = FALSE;
+            fBogus = false;
         }
-    } else { // adopt = TRUE
+    } else { // adopt = true
         fCurrent = fStart = s;
         fEnd = fStart + fLen;
-        fBogus = FALSE;
+        fBogus = false;
     }
 
 }
diff --git a/icu4c/source/test/intltest/sfwdchit.h b/icu4c/source/test/intltest/sfwdchit.h
index c11e31fcfa2..9d9831e2592 100644
--- a/icu4c/source/test/intltest/sfwdchit.h
+++ b/icu4c/source/test/intltest/sfwdchit.h
@@ -15,7 +15,7 @@
 class SimpleFwdCharIterator : public ForwardCharacterIterator {
 public:
     // not used -- SimpleFwdCharIterator(const UnicodeString& s);
-    SimpleFwdCharIterator(UChar *s, int32_t len, UBool adopt = FALSE);
+    SimpleFwdCharIterator(UChar *s, int32_t len, UBool adopt = false);
 
     virtual ~SimpleFwdCharIterator();
 
@@ -54,7 +54,7 @@ public:
   virtual UChar32       next32PostInc(void) override;
         
   /**
-   * Returns FALSE if there are no more code units or code points
+   * Returns false if there are no more code units or code points
    * at or after the current position in the iteration range.
    * This is used with nextPostInc() or next32PostInc() in forward
    * iteration.
diff --git a/icu4c/source/test/intltest/srchtest.cpp b/icu4c/source/test/intltest/srchtest.cpp
index d0b7bfae18c..a5e6f4898c4 100644
--- a/icu4c/source/test/intltest/srchtest.cpp
+++ b/icu4c/source/test/intltest/srchtest.cpp
@@ -111,11 +111,11 @@ void StringSearchTest::runIndexedTest(int32_t index, UBool exec,
                                       const char* &name, char* ) 
 {
 #if !UCONFIG_NO_BREAK_ITERATION
-    UBool areBroken = FALSE;
+    UBool areBroken = false;
     if (m_en_us_ == NULL && m_fr_fr_ == NULL && m_de_ == NULL &&
         m_es_ == NULL && m_en_wordbreaker_ == NULL &&
         m_en_characterbreaker_ == NULL && exec) {
-        areBroken = TRUE;
+        areBroken = true;
     }
 
     switch (index) {
@@ -266,7 +266,7 @@ UBool StringSearchTest::assertEqualWithStringSearch(StringSearch *strsrch,
     strsrch->setAttribute(USEARCH_ELEMENT_COMPARISON, search->elemCompare, status);
     if (U_FAILURE(status)) {
         errln("Error setting USEARCH_ELEMENT_COMPARISON attribute %s", u_errorName(status));
-        return FALSE;
+        return false;
     }   
 
     if (strsrch->getMatchedStart() != USEARCH_DONE ||
@@ -287,7 +287,7 @@ UBool StringSearchTest::assertEqualWithStringSearch(StringSearch *strsrch,
             errln("Error next match found at %d (len:%d); expected %d (len:%d)", 
                     strsrch->getMatchedStart(), strsrch->getMatchedLength(),
                     matchindex, matchlength);
-            return FALSE;
+            return false;
         }
         count ++;
         
@@ -312,7 +312,7 @@ UBool StringSearchTest::assertEqualWithStringSearch(StringSearch *strsrch,
             errln("Pattern: %s", str);
             errln("Error next match found at %d (len:%d); expected ", 
                     strsrch->getMatchedStart(), strsrch->getMatchedLength());
-            return FALSE;
+            return false;
     }
 
     // start of previous matches
@@ -330,7 +330,7 @@ UBool StringSearchTest::assertEqualWithStringSearch(StringSearch *strsrch,
             errln("Error previous match found at %d (len:%d); expected %d (len:%d)",
                     strsrch->getMatchedStart(), strsrch->getMatchedLength(),
                     matchindex, matchlength);
-            return FALSE;
+            return false;
         }
         
         strsrch->getMatchedText(matchtext);
@@ -355,7 +355,7 @@ UBool StringSearchTest::assertEqualWithStringSearch(StringSearch *strsrch,
         errln("Pattern: %s", str);
         errln("Error previous match found at %d (len:%d); expected ", 
                 strsrch->getMatchedStart(), strsrch->getMatchedLength());
-        return FALSE;
+        return false;
     }
 
     int32_t nextStart;
@@ -366,7 +366,7 @@ UBool StringSearchTest::assertEqualWithStringSearch(StringSearch *strsrch,
     matchindex = search->offset[count];
     nextStart = 0;
 
-    while (TRUE) {
+    while (true) {
         strsrch->following(nextStart, status);
 
         if (matchindex < 0) {
@@ -379,7 +379,7 @@ UBool StringSearchTest::assertEqualWithStringSearch(StringSearch *strsrch,
                 errln("Error following match starting at %d (overlap:%d) found at %d (len:%d); expected ",
                         nextStart, isOverlap,
                         strsrch->getMatchedStart(), strsrch->getMatchedLength());
-                return FALSE;
+                return false;
             }
             // no more matches
             break;
@@ -397,7 +397,7 @@ UBool StringSearchTest::assertEqualWithStringSearch(StringSearch *strsrch,
                         nextStart, isOverlap,
                         strsrch->getMatchedStart(), strsrch->getMatchedLength(),
                         matchindex, matchlength);
-            return FALSE;
+            return false;
         }
 
         if (isOverlap || strsrch->getMatchedLength() == 0) {
@@ -417,7 +417,7 @@ UBool StringSearchTest::assertEqualWithStringSearch(StringSearch *strsrch,
     }
     nextStart = strsrch->getText().length();
 
-    while (TRUE) {
+    while (true) {
         strsrch->preceding(nextStart, status);
 
         if (count < 0) {
@@ -430,7 +430,7 @@ UBool StringSearchTest::assertEqualWithStringSearch(StringSearch *strsrch,
                             nextStart, isOverlap,
                             strsrch->getMatchedStart(), 
                             strsrch->getMatchedLength());
-                return FALSE;
+                return false;
             }
             // no more matches
             break;
@@ -449,7 +449,7 @@ UBool StringSearchTest::assertEqualWithStringSearch(StringSearch *strsrch,
                         nextStart, isOverlap,
                         strsrch->getMatchedStart(), strsrch->getMatchedLength(),
                         matchindex, matchlength);
-            return FALSE;
+            return false;
         }
 
         nextStart = matchindex;
@@ -457,7 +457,7 @@ UBool StringSearchTest::assertEqualWithStringSearch(StringSearch *strsrch,
     }
 
     strsrch->setAttribute(USEARCH_ELEMENT_COMPARISON, USEARCH_STANDARD_ELEMENT_COMPARISON, status);
-    return TRUE;
+    return true;
 }
     
 UBool StringSearchTest::assertEqual(const SearchData *search)
@@ -471,7 +471,7 @@ UBool StringSearchTest::assertEqual(const SearchData *search)
     
 #if UCONFIG_NO_BREAK_ITERATION
     if(search->breaker) {
-      return TRUE; /* skip test */
+      return true; /* skip test */
     }
 #endif
     u_unescape(search->text, temp, 128);
@@ -491,13 +491,13 @@ UBool StringSearchTest::assertEqual(const SearchData *search)
                                breaker, status);
     if (U_FAILURE(status)) {
         errln("Error opening string search %s", u_errorName(status));
-        return FALSE;
+        return false;
     }   
     
     if (!assertEqualWithStringSearch(strsrch, search)) {
         collator->setStrength(getECollationStrength(UCOL_TERTIARY));
         delete strsrch;
-        return FALSE;
+        return false;
     }
 
 
@@ -509,13 +509,13 @@ UBool StringSearchTest::assertEqual(const SearchData *search)
         collator->setStrength(getECollationStrength(UCOL_TERTIARY));
         delete strsrch;
         delete strsrch2;
-        return FALSE;
+        return false;
     }
     delete strsrch2;
 
     collator->setStrength(getECollationStrength(UCOL_TERTIARY));
     delete strsrch;
-    return TRUE;
+    return true;
 }
  
 UBool StringSearchTest::assertCanonicalEqual(const SearchData *search)
@@ -525,11 +525,11 @@ UBool StringSearchTest::assertCanonicalEqual(const SearchData *search)
     BreakIterator *breaker  = getBreakIterator(search->breaker);
     StringSearch  *strsrch; 
     UChar          temp[128];
-    UBool          result = TRUE;
+    UBool          result = true;
     
 #if UCONFIG_NO_BREAK_ITERATION
     if(search->breaker) {
-      return TRUE; /* skip test */
+      return true; /* skip test */
     }
 #endif
 
@@ -552,12 +552,12 @@ UBool StringSearchTest::assertCanonicalEqual(const SearchData *search)
     strsrch->setAttribute(USEARCH_CANONICAL_MATCH, USEARCH_ON, status);
     if (U_FAILURE(status)) {
         errln("Error opening string search %s", u_errorName(status));
-        result = FALSE;
+        result = false;
         goto bail;
     }   
     
     if (!assertEqualWithStringSearch(strsrch, search)) {
-        result = FALSE;
+        result = false;
         goto bail;
     }
 
@@ -582,7 +582,7 @@ UBool StringSearchTest::assertEqualWithAttribute(const SearchData *search,
 
 #if UCONFIG_NO_BREAK_ITERATION
     if(search->breaker) {
-      return TRUE; /* skip test */
+      return true; /* skip test */
     }
 #endif
 
@@ -606,17 +606,17 @@ UBool StringSearchTest::assertEqualWithAttribute(const SearchData *search,
     
     if (U_FAILURE(status)) {
         errln("Error opening string search %s", u_errorName(status));
-        return FALSE;
+        return false;
     }   
     
     if (!assertEqualWithStringSearch(strsrch, search)) {
         collator->setStrength(getECollationStrength(UCOL_TERTIARY));
         delete strsrch;
-        return FALSE;
+        return false;
     }
     collator->setStrength(getECollationStrength(UCOL_TERTIARY));
     delete strsrch;
-    return TRUE;
+    return true;
 }
 
 void StringSearchTest::TestOpenClose()
diff --git a/icu4c/source/test/intltest/ssearch.cpp b/icu4c/source/test/intltest/ssearch.cpp
index f81a0069dff..4fba808f2ec 100644
--- a/icu4c/source/test/intltest/ssearch.cpp
+++ b/icu4c/source/test/intltest/ssearch.cpp
@@ -228,14 +228,14 @@ void SSearchTest::searchTest()
         if (n==NULL) {
             continue;
         }
-        text = n->getText(FALSE);
+        text = n->getText(false);
         text = text.unescape();
         pattern.append(text);
         nodeCount++;
 
         n = testCase->getChildElement("pre");
         if (n!=NULL) {
-            text = n->getText(FALSE);
+            text = n->getText(false);
             text = text.unescape();
             target.append(text);
             nodeCount++;
@@ -244,7 +244,7 @@ void SSearchTest::searchTest()
         n = testCase->getChildElement("m");
         if (n!=NULL) {
             expectedMatchStart = target.length();
-            text = n->getText(FALSE);
+            text = n->getText(false);
             text = text.unescape();
             target.append(text);
             expectedMatchLimit = target.length();
@@ -253,7 +253,7 @@ void SSearchTest::searchTest()
 
         n = testCase->getChildElement("post");
         if (n!=NULL) {
-            text = n->getText(FALSE);
+            text = n->getText(false);
             text = text.unescape();
             target.append(text);
             nodeCount++;
@@ -293,7 +293,7 @@ void SSearchTest::searchTest()
         if ((foundMatch && expectedMatchStart<0) ||
             (foundStart != expectedMatchStart)   ||
             (foundLimit != expectedMatchLimit)) {
-                TEST_ASSERT(FALSE);   //  output generic error position
+                TEST_ASSERT(false);   //  output generic error position
                 infoln("Found, expected match start = %d, %d \n"
                        "Found, expected match limit = %d, %d",
                 foundStart, expectedMatchStart, foundLimit, expectedMatchLimit);
@@ -322,7 +322,7 @@ void SSearchTest::searchTest()
         if ((foundMatch && expectedMatchStart<0) ||
             (foundStart != expectedMatchStart)   ||
             (foundLimit != expectedMatchLimit)) {
-                TEST_ASSERT(FALSE);   //  output generic error position
+                TEST_ASSERT(false);   //  output generic error position
                 infoln("Found, expected backwards match start = %d, %d \n"
                        "Found, expected backwards match limit = %d, %d",
                 foundStart, expectedMatchStart, foundLimit, expectedMatchLimit);
@@ -492,18 +492,18 @@ void OrderList::reverse()
 UBool OrderList::compare(const OrderList &other) const
 {
     if (listSize != other.listSize) {
-        return FALSE;
+        return false;
     }
 
     for(int32_t i = 0; i < listSize; i += 1) {
         if (list[i].order  != other.list[i].order ||
             list[i].lowOffset != other.list[i].lowOffset ||
             list[i].highOffset != other.list[i].highOffset) {
-                return FALSE;
+                return false;
         }
     }
 
-    return TRUE;
+    return true;
 }
 
 UBool OrderList::matchesAt(int32_t offset, const OrderList &other) const
@@ -512,16 +512,16 @@ UBool OrderList::matchesAt(int32_t offset, const OrderList &other) const
     int32_t otherSize = other.size() - 1;
 
     if (listSize - 1 - offset < otherSize) {
-        return FALSE;
+        return false;
     }
 
     for (int32_t i = offset, j = 0; j < otherSize; i += 1, j += 1) {
         if (getOrder(i) != other.getOrder(j)) {
-            return FALSE;
+            return false;
         }
     }
 
-    return TRUE;
+    return true;
 }
 
 static char *printOffsets(char *buffer, OrderList &list)
@@ -667,7 +667,7 @@ void SSearchTest::offsetTest()
             }
 
             backwardList.add(order, low, high);
-        } while (TRUE);
+        } while (true);
 
         backwardList.reverse();
 
@@ -739,7 +739,7 @@ void SSearchTest::sharpSTest()
                                 "fuss", "ffuss", "fufuss", "fusfuss", "1fuss", "12fuss", "123fuss", "1234fuss", "fu\\u00DF", "1fu\\u00DF", "12fu\\u00DF", "123fu\\u00DF", "1234fu\\u00DF"};
     int32_t start = -1, end = -1;
 
-    coll = ucol_openFromShortString("LEN_S1", FALSE, NULL, &status);
+    coll = ucol_openFromShortString("LEN_S1", false, NULL, &status);
     TEST_ASSERT_SUCCESS(status);
 
     UnicodeString lpUnescaped = lp.unescape();
@@ -1127,7 +1127,7 @@ UnicodeString &StringSetMonkey::generateAlternative(const UnicodeString &testCas
         // find random string that generates the same CEList
         const CEList *ceList2 = NULL;
         const UnicodeString *string = NULL;
-              UBool matches = FALSE;
+              UBool matches = false;
 
         do {
             int32_t s = m_rand() % stringCount;
@@ -1198,7 +1198,7 @@ static UBool simpleSearch(UCollator *coll, const UnicodeString &target, int32_t
         // Searching for an empty pattern always fails
         matchStart = matchEnd = -1;
         ubrk_close(charBreakIterator);
-        return FALSE;
+        return false;
     }
 
     matchStart = matchEnd = -1;
@@ -1267,12 +1267,12 @@ static UBool simpleSearch(UCollator *coll, const UnicodeString &target, int32_t
             matchEnd   = mend;
 
             ubrk_close(charBreakIterator);
-            return TRUE;
+            return true;
         }
     }
 
     ubrk_close(charBreakIterator);
-    return FALSE;
+    return false;
 }
 
 #if !UCONFIG_NO_REGULAR_EXPRESSIONS
@@ -1366,7 +1366,7 @@ void SSearchTest::monkeyTest(char *params)
     // ook!
     UErrorCode status = U_ZERO_ERROR;
   //UCollator *coll = ucol_open(NULL, &status);
-    UCollator *coll = ucol_openFromShortString("S1", FALSE, NULL, &status);
+    UCollator *coll = ucol_openFromShortString("S1", false, NULL, &status);
 
     if (U_FAILURE(status)) {
         errcheckln(status, "Failed to create collator in MonkeyTest! - %s", u_errorName(status));
@@ -1378,7 +1378,7 @@ void SSearchTest::monkeyTest(char *params)
     USet *expansions   = uset_openEmpty();
     USet *contractions = uset_openEmpty();
 
-    ucol_getContractionsAndExpansions(coll, contractions, expansions, FALSE, &status);
+    ucol_getContractionsAndExpansions(coll, contractions, expansions, false, &status);
 
     U_STRING_DECL(letter_pattern, "[[:letter:]-[:ideographic:]-[:hangul:]]", 39);
     U_STRING_INIT(letter_pattern, "[[:letter:]-[:ideographic:]-[:hangul:]]", 39);
diff --git a/icu4c/source/test/intltest/static_unisets_test.cpp b/icu4c/source/test/intltest/static_unisets_test.cpp
index 2cd6546df58..94021e3fbdf 100644
--- a/icu4c/source/test/intltest/static_unisets_test.cpp
+++ b/icu4c/source/test/intltest/static_unisets_test.cpp
@@ -97,7 +97,7 @@ void StaticUnicodeSetsTest::testNonEmpty() {
         }
         const UnicodeSet* uset = get(static_cast(i));
         // Can fail if no data:
-        assertFalse(UnicodeString("Set should not be empty: ") + i, uset->isEmpty(), FALSE, TRUE);
+        assertFalse(UnicodeString("Set should not be empty: ") + i, uset->isEmpty(), false, true);
     }
 }
 
diff --git a/icu4c/source/test/intltest/strcase.cpp b/icu4c/source/test/intltest/strcase.cpp
index b5eff9f0af8..a8f2caf99d7 100644
--- a/icu4c/source/test/intltest/strcase.cpp
+++ b/icu4c/source/test/intltest/strcase.cpp
@@ -216,48 +216,48 @@ StringCaseTest::TestCaseConversion()
         UnicodeString s;
 
         /* lowercase with root locale */
-        s=UnicodeString(FALSE, beforeLower, UPRV_LENGTHOF(beforeLower));
+        s=UnicodeString(false, beforeLower, UPRV_LENGTHOF(beforeLower));
         s.toLower("");
         if( s.length()!=UPRV_LENGTHOF(lowerRoot) ||
-            s!=UnicodeString(FALSE, lowerRoot, s.length())
+            s!=UnicodeString(false, lowerRoot, s.length())
         ) {
-            errln("error in toLower(root locale)=\"" + s + "\" expected \"" + UnicodeString(FALSE, lowerRoot, UPRV_LENGTHOF(lowerRoot)) + "\"");
+            errln("error in toLower(root locale)=\"" + s + "\" expected \"" + UnicodeString(false, lowerRoot, UPRV_LENGTHOF(lowerRoot)) + "\"");
         }
 
         /* lowercase with turkish locale */
-        s=UnicodeString(FALSE, beforeLower, UPRV_LENGTHOF(beforeLower));
+        s=UnicodeString(false, beforeLower, UPRV_LENGTHOF(beforeLower));
         s.setCharAt(0, beforeLower[0]).toLower(Locale("tr"));
         if( s.length()!=UPRV_LENGTHOF(lowerTurkish) ||
-            s!=UnicodeString(FALSE, lowerTurkish, s.length())
+            s!=UnicodeString(false, lowerTurkish, s.length())
         ) {
-            errln("error in toLower(turkish locale)=\"" + s + "\" expected \"" + UnicodeString(FALSE, lowerTurkish, UPRV_LENGTHOF(lowerTurkish)) + "\"");
+            errln("error in toLower(turkish locale)=\"" + s + "\" expected \"" + UnicodeString(false, lowerTurkish, UPRV_LENGTHOF(lowerTurkish)) + "\"");
         }
 
         /* uppercase with root locale */
-        s=UnicodeString(FALSE, beforeUpper, UPRV_LENGTHOF(beforeUpper));
+        s=UnicodeString(false, beforeUpper, UPRV_LENGTHOF(beforeUpper));
         s.setCharAt(0, beforeUpper[0]).toUpper(Locale(""));
         if( s.length()!=UPRV_LENGTHOF(upperRoot) ||
-            s!=UnicodeString(FALSE, upperRoot, s.length())
+            s!=UnicodeString(false, upperRoot, s.length())
         ) {
-            errln("error in toUpper(root locale)=\"" + s + "\" expected \"" + UnicodeString(FALSE, upperRoot, UPRV_LENGTHOF(upperRoot)) + "\"");
+            errln("error in toUpper(root locale)=\"" + s + "\" expected \"" + UnicodeString(false, upperRoot, UPRV_LENGTHOF(upperRoot)) + "\"");
         }
 
         /* uppercase with turkish locale */
-        s=UnicodeString(FALSE, beforeUpper, UPRV_LENGTHOF(beforeUpper));
+        s=UnicodeString(false, beforeUpper, UPRV_LENGTHOF(beforeUpper));
         s.toUpper(Locale("tr"));
         if( s.length()!=UPRV_LENGTHOF(upperTurkish) ||
-            s!=UnicodeString(FALSE, upperTurkish, s.length())
+            s!=UnicodeString(false, upperTurkish, s.length())
         ) {
-            errln("error in toUpper(turkish locale)=\"" + s + "\" expected \"" + UnicodeString(FALSE, upperTurkish, UPRV_LENGTHOF(upperTurkish)) + "\"");
+            errln("error in toUpper(turkish locale)=\"" + s + "\" expected \"" + UnicodeString(false, upperTurkish, UPRV_LENGTHOF(upperTurkish)) + "\"");
         }
 
         /* uppercase a short string with root locale */
-        s=UnicodeString(FALSE, beforeMiniUpper, UPRV_LENGTHOF(beforeMiniUpper));
+        s=UnicodeString(false, beforeMiniUpper, UPRV_LENGTHOF(beforeMiniUpper));
         s.setCharAt(0, beforeMiniUpper[0]).toUpper("");
         if( s.length()!=UPRV_LENGTHOF(miniUpper) ||
-            s!=UnicodeString(FALSE, miniUpper, s.length())
+            s!=UnicodeString(false, miniUpper, s.length())
         ) {
-            errln("error in toUpper(root locale)=\"" + s + "\" expected \"" + UnicodeString(FALSE, miniUpper, UPRV_LENGTHOF(miniUpper)) + "\"");
+            errln("error in toUpper(root locale)=\"" + s + "\" expected \"" + UnicodeString(false, miniUpper, UPRV_LENGTHOF(miniUpper)) + "\"");
         }
     }
 
@@ -1073,32 +1073,32 @@ void StringCaseTest::TestEdits() {
     assertFalse("edits done: copyErrorTo", edits.copyErrorTo(outErrorCode));
 
     static const EditChange coarseExpectedChanges[] = {
-            { FALSE, 10003, 10003 },
-            { TRUE, 103106, 104013 }
+            { false, 10003, 10003 },
+            { true, 103106, 104013 }
     };
     TestUtility::checkEditsIter(*this, u"coarse",
             edits.getCoarseIterator(), edits.getCoarseIterator(),
-            coarseExpectedChanges, UPRV_LENGTHOF(coarseExpectedChanges), TRUE, errorCode);
+            coarseExpectedChanges, UPRV_LENGTHOF(coarseExpectedChanges), true, errorCode);
     TestUtility::checkEditsIter(*this, u"coarse changes",
             edits.getCoarseChangesIterator(), edits.getCoarseChangesIterator(),
-            coarseExpectedChanges, UPRV_LENGTHOF(coarseExpectedChanges), FALSE, errorCode);
+            coarseExpectedChanges, UPRV_LENGTHOF(coarseExpectedChanges), false, errorCode);
 
     static const EditChange fineExpectedChanges[] = {
-            { FALSE, 10003, 10003 },
-            { TRUE, 2, 1 },
-            { TRUE, 2, 1 },
-            { TRUE, 2, 1 },
-            { TRUE, 0, 10 },
-            { TRUE, 100, 0 },
-            { TRUE, 3000, 4000 },
-            { TRUE, 100000, 100000 }
+            { false, 10003, 10003 },
+            { true, 2, 1 },
+            { true, 2, 1 },
+            { true, 2, 1 },
+            { true, 0, 10 },
+            { true, 100, 0 },
+            { true, 3000, 4000 },
+            { true, 100000, 100000 }
     };
     TestUtility::checkEditsIter(*this, u"fine",
             edits.getFineIterator(), edits.getFineIterator(),
-            fineExpectedChanges, UPRV_LENGTHOF(fineExpectedChanges), TRUE, errorCode);
+            fineExpectedChanges, UPRV_LENGTHOF(fineExpectedChanges), true, errorCode);
     TestUtility::checkEditsIter(*this, u"fine changes",
             edits.getFineChangesIterator(), edits.getFineChangesIterator(),
-            fineExpectedChanges, UPRV_LENGTHOF(fineExpectedChanges), FALSE, errorCode);
+            fineExpectedChanges, UPRV_LENGTHOF(fineExpectedChanges), false, errorCode);
 
     edits.reset();
     assertFalse("reset hasChanges", edits.hasChanges());
@@ -1359,34 +1359,34 @@ void StringCaseTest::TestCaseMapWithEdits() {
 
     int32_t length = CaseMap::toLower("tr", U_OMIT_UNCHANGED_TEXT,
                                       u"IstanBul", 8, dest, UPRV_LENGTHOF(dest), &edits, errorCode);
-    assertEquals(u"toLower(IstanBul)", UnicodeString(u"ıb"), UnicodeString(TRUE, dest, length));
+    assertEquals(u"toLower(IstanBul)", UnicodeString(u"ıb"), UnicodeString(true, dest, length));
     static const EditChange lowerExpectedChanges[] = {
-            { TRUE, 1, 1 },
-            { FALSE, 4, 4 },
-            { TRUE, 1, 1 },
-            { FALSE, 2, 2 }
+            { true, 1, 1 },
+            { false, 4, 4 },
+            { true, 1, 1 },
+            { false, 2, 2 }
     };
     TestUtility::checkEditsIter(*this, u"toLower(IstanBul)",
             edits.getFineIterator(), edits.getFineIterator(),
             lowerExpectedChanges, UPRV_LENGTHOF(lowerExpectedChanges),
-            TRUE, errorCode);
+            true, errorCode);
 
     edits.reset();
     length = CaseMap::toUpper("el", U_OMIT_UNCHANGED_TEXT,
                               u"Πατάτα", 6, dest, UPRV_LENGTHOF(dest), &edits, errorCode);
-    assertEquals(u"toUpper(Πατάτα)", UnicodeString(u"ΑΤΑΤΑ"), UnicodeString(TRUE, dest, length));
+    assertEquals(u"toUpper(Πατάτα)", UnicodeString(u"ΑΤΑΤΑ"), UnicodeString(true, dest, length));
     static const EditChange upperExpectedChanges[] = {
-            { FALSE, 1, 1 },
-            { TRUE, 1, 1 },
-            { TRUE, 1, 1 },
-            { TRUE, 1, 1 },
-            { TRUE, 1, 1 },
-            { TRUE, 1, 1 }
+            { false, 1, 1 },
+            { true, 1, 1 },
+            { true, 1, 1 },
+            { true, 1, 1 },
+            { true, 1, 1 },
+            { true, 1, 1 }
     };
     TestUtility::checkEditsIter(*this, u"toUpper(Πατάτα)",
             edits.getFineIterator(), edits.getFineIterator(),
             upperExpectedChanges, UPRV_LENGTHOF(upperExpectedChanges),
-            TRUE, errorCode);
+            true, errorCode);
 
     edits.reset();
 
@@ -1397,40 +1397,40 @@ void StringCaseTest::TestCaseMapWithEdits() {
                               U_TITLECASE_NO_LOWERCASE,
                               nullptr, u"IjssEL IglOo", 12,
                               dest, UPRV_LENGTHOF(dest), &edits, errorCode);
-    assertEquals(u"toTitle(IjssEL IglOo)", UnicodeString(u"J"), UnicodeString(TRUE, dest, length));
+    assertEquals(u"toTitle(IjssEL IglOo)", UnicodeString(u"J"), UnicodeString(true, dest, length));
     static const EditChange titleExpectedChanges[] = {
-            { FALSE, 1, 1 },
-            { TRUE, 1, 1 },
-            { FALSE, 10, 10 }
+            { false, 1, 1 },
+            { true, 1, 1 },
+            { false, 10, 10 }
     };
     TestUtility::checkEditsIter(*this, u"toTitle(IjssEL IglOo)",
             edits.getFineIterator(), edits.getFineIterator(),
             titleExpectedChanges, UPRV_LENGTHOF(titleExpectedChanges),
-            TRUE, errorCode);
+            true, errorCode);
 #endif
 
     // No explicit nor automatic edits.reset(). Edits should be appended.
     length = CaseMap::fold(U_OMIT_UNCHANGED_TEXT | U_EDITS_NO_RESET | U_FOLD_CASE_EXCLUDE_SPECIAL_I,
                            u"IĂźtanBul", 8, dest, UPRV_LENGTHOF(dest), &edits, errorCode);
-    assertEquals(u"foldCase(IßtanBul)", UnicodeString(u"ıssb"), UnicodeString(TRUE, dest, length));
+    assertEquals(u"foldCase(IßtanBul)", UnicodeString(u"ıssb"), UnicodeString(true, dest, length));
     static const EditChange foldExpectedChanges[] = {
 #if !UCONFIG_NO_BREAK_ITERATION
             // From titlecasing.
-            { FALSE, 1, 1 },
-            { TRUE, 1, 1 },
-            { FALSE, 10, 10 },
+            { false, 1, 1 },
+            { true, 1, 1 },
+            { false, 10, 10 },
 #endif
             // From case folding.
-            { TRUE, 1, 1 },
-            { TRUE, 1, 2 },
-            { FALSE, 3, 3 },
-            { TRUE, 1, 1 },
-            { FALSE, 2, 2 }
+            { true, 1, 1 },
+            { true, 1, 2 },
+            { false, 3, 3 },
+            { true, 1, 1 },
+            { false, 2, 2 }
     };
     TestUtility::checkEditsIter(*this, u"foldCase(no Edits reset, IĂźtanBul)",
             edits.getFineIterator(), edits.getFineIterator(),
             foldExpectedChanges, UPRV_LENGTHOF(foldExpectedChanges),
-            TRUE, errorCode);
+            true, errorCode);
 }
 
 void StringCaseTest::TestCaseMapUTF8WithEdits() {
@@ -1444,15 +1444,15 @@ void StringCaseTest::TestCaseMapUTF8WithEdits() {
     assertEquals(u"toLower(IstanBul)", UnicodeString(u"ıb"),
                  UnicodeString::fromUTF8(StringPiece(dest, length)));
     static const EditChange lowerExpectedChanges[] = {
-            { TRUE, 1, 2 },
-            { FALSE, 4, 4 },
-            { TRUE, 1, 1 },
-            { FALSE, 2, 2 }
+            { true, 1, 2 },
+            { false, 4, 4 },
+            { true, 1, 1 },
+            { false, 2, 2 }
     };
     TestUtility::checkEditsIter(*this, u"toLower(IstanBul)",
             edits.getFineIterator(), edits.getFineIterator(),
             lowerExpectedChanges, UPRV_LENGTHOF(lowerExpectedChanges),
-            TRUE, errorCode);
+            true, errorCode);
 
     edits.reset();
     length = CaseMap::utf8ToUpper("el", U_OMIT_UNCHANGED_TEXT,
@@ -1461,17 +1461,17 @@ void StringCaseTest::TestCaseMapUTF8WithEdits() {
     assertEquals(u"toUpper(Πατάτα)", UnicodeString(u"ΑΤΑΤΑ"),
                  UnicodeString::fromUTF8(StringPiece(dest, length)));
     static const EditChange upperExpectedChanges[] = {
-            { FALSE, 2, 2 },
-            { TRUE, 2, 2 },
-            { TRUE, 2, 2 },
-            { TRUE, 2, 2 },
-            { TRUE, 2, 2 },
-            { TRUE, 2, 2 }
+            { false, 2, 2 },
+            { true, 2, 2 },
+            { true, 2, 2 },
+            { true, 2, 2 },
+            { true, 2, 2 },
+            { true, 2, 2 }
     };
     TestUtility::checkEditsIter(*this, u"toUpper(Πατάτα)",
             edits.getFineIterator(), edits.getFineIterator(),
             upperExpectedChanges, UPRV_LENGTHOF(upperExpectedChanges),
-            TRUE, errorCode);
+            true, errorCode);
 
     edits.reset();
 #if !UCONFIG_NO_BREAK_ITERATION
@@ -1484,14 +1484,14 @@ void StringCaseTest::TestCaseMapUTF8WithEdits() {
     assertEquals(u"toTitle(IjssEL IglOo)", UnicodeString(u"J"),
                  UnicodeString::fromUTF8(StringPiece(dest, length)));
     static const EditChange titleExpectedChanges[] = {
-            { FALSE, 1, 1 },
-            { TRUE, 1, 1 },
-            { FALSE, 10, 10 }
+            { false, 1, 1 },
+            { true, 1, 1 },
+            { false, 10, 10 }
     };
     TestUtility::checkEditsIter(*this, u"toTitle(IjssEL IglOo)",
             edits.getFineIterator(), edits.getFineIterator(),
             titleExpectedChanges, UPRV_LENGTHOF(titleExpectedChanges),
-            TRUE, errorCode);
+            true, errorCode);
 #endif
 
     // No explicit nor automatic edits.reset(). Edits should be appended.
@@ -1504,21 +1504,21 @@ void StringCaseTest::TestCaseMapUTF8WithEdits() {
     static const EditChange foldExpectedChanges[] = {
 #if !UCONFIG_NO_BREAK_ITERATION
             // From titlecasing.
-            { FALSE, 1, 1 },
-            { TRUE, 1, 1 },
-            { FALSE, 10, 10 },
+            { false, 1, 1 },
+            { true, 1, 1 },
+            { false, 10, 10 },
 #endif
             // From case folding.
-            { TRUE, 1, 2 },
-            { TRUE, 2, 2 },
-            { FALSE, 3, 3 },
-            { TRUE, 1, 1 },
-            { FALSE, 2, 2 }
+            { true, 1, 2 },
+            { true, 2, 2 },
+            { false, 3, 3 },
+            { true, 1, 1 },
+            { false, 2, 2 }
     };
     TestUtility::checkEditsIter(*this, u"foldCase(IĂźtanBul)",
             edits.getFineIterator(), edits.getFineIterator(),
             foldExpectedChanges, UPRV_LENGTHOF(foldExpectedChanges),
-            TRUE, errorCode);
+            true, errorCode);
 }
 
 void StringCaseTest::TestCaseMapToString() {
@@ -1532,11 +1532,11 @@ void StringCaseTest::TestCaseMapToString() {
     int32_t length = CaseMap::toLower("tr", U_OMIT_UNCHANGED_TEXT,
                                       u"IstanBul", 8, dest, UPRV_LENGTHOF(dest), nullptr, errorCode);
     assertEquals(u"toLower(IstanBul)",
-                 UnicodeString(u"ıb"), UnicodeString(TRUE, dest, length));
+                 UnicodeString(u"ıb"), UnicodeString(true, dest, length));
     length = CaseMap::toUpper("el", U_OMIT_UNCHANGED_TEXT,
                               u"Πατάτα", 6, dest, UPRV_LENGTHOF(dest), nullptr, errorCode);
     assertEquals(u"toUpper(Πατάτα)",
-                 UnicodeString(u"ΑΤΑΤΑ"), UnicodeString(TRUE, dest, length));
+                 UnicodeString(u"ΑΤΑΤΑ"), UnicodeString(true, dest, length));
 #if !UCONFIG_NO_BREAK_ITERATION
     length = CaseMap::toTitle("nl",
                               U_OMIT_UNCHANGED_TEXT |
@@ -1545,22 +1545,22 @@ void StringCaseTest::TestCaseMapToString() {
                               nullptr, u"IjssEL IglOo", 12,
                               dest, UPRV_LENGTHOF(dest), nullptr, errorCode);
     assertEquals(u"toTitle(IjssEL IglOo)",
-                 UnicodeString(u"J"), UnicodeString(TRUE, dest, length));
+                 UnicodeString(u"J"), UnicodeString(true, dest, length));
 #endif
     length = CaseMap::fold(U_OMIT_UNCHANGED_TEXT | U_FOLD_CASE_EXCLUDE_SPECIAL_I,
                            u"IĂźtanBul", 8, dest, UPRV_LENGTHOF(dest), nullptr, errorCode);
     assertEquals(u"foldCase(IĂźtanBul)",
-                 UnicodeString(u"ıssb"), UnicodeString(TRUE, dest, length));
+                 UnicodeString(u"ıssb"), UnicodeString(true, dest, length));
 
     // Return the whole result string.
     length = CaseMap::toLower("tr", 0,
                               u"IstanBul", 8, dest, UPRV_LENGTHOF(dest), nullptr, errorCode);
     assertEquals(u"toLower(IstanBul)",
-                 UnicodeString(u"ıstanbul"), UnicodeString(TRUE, dest, length));
+                 UnicodeString(u"ıstanbul"), UnicodeString(true, dest, length));
     length = CaseMap::toUpper("el", 0,
                               u"Πατάτα", 6, dest, UPRV_LENGTHOF(dest), nullptr, errorCode);
     assertEquals(u"toUpper(Πατάτα)",
-                 UnicodeString(u"ΠΑΤΑΤΑ"), UnicodeString(TRUE, dest, length));
+                 UnicodeString(u"ΠΑΤΑΤΑ"), UnicodeString(true, dest, length));
 #if !UCONFIG_NO_BREAK_ITERATION
     length = CaseMap::toTitle("nl",
                               U_TITLECASE_NO_BREAK_ADJUSTMENT |
@@ -1568,12 +1568,12 @@ void StringCaseTest::TestCaseMapToString() {
                               nullptr, u"IjssEL IglOo", 12,
                               dest, UPRV_LENGTHOF(dest), nullptr, errorCode);
     assertEquals(u"toTitle(IjssEL IglOo)",
-                 UnicodeString(u"IJssEL IglOo"), UnicodeString(TRUE, dest, length));
+                 UnicodeString(u"IJssEL IglOo"), UnicodeString(true, dest, length));
 #endif
     length = CaseMap::fold(U_FOLD_CASE_EXCLUDE_SPECIAL_I,
                            u"IĂźtanBul", 8, dest, UPRV_LENGTHOF(dest), nullptr, errorCode);
     assertEquals(u"foldCase(IĂźtanBul)",
-                 UnicodeString(u"ısstanbul"), UnicodeString(TRUE, dest, length));
+                 UnicodeString(u"ısstanbul"), UnicodeString(true, dest, length));
 }
 
 void StringCaseTest::TestCaseMapUTF8ToString() {
@@ -1627,7 +1627,7 @@ void StringCaseTest::TestCaseMapUTF8ToString() {
 void StringCaseTest::TestLongUnicodeString() {
     // Code coverage for UnicodeString case mapping code handling
     // long strings or many changes in a string.
-    UnicodeString s(TRUE,
+    UnicodeString s(true,
         (const UChar *)
         u"aaaaaaaaaabbbbbbbbbbccccccccccddddddddddeeeeeeeeeeF"
         u"aaaaaaaaaabbbbbbbbbbccccccccccddddddddddeeeeeeeeeeF"
@@ -1635,7 +1635,7 @@ void StringCaseTest::TestLongUnicodeString() {
         u"aaaaaaaaaabbbbbbbbbbccccccccccddddddddddeeeeeeeeeeF"
         u"aaaaaaaaaabbbbbbbbbbccccccccccddddddddddeeeeeeeeeeF"
         u"aaaaaaaaaabbbbbbbbbbccccccccccddddddddddeeeeeeeeeeF", 6 * 51);
-    UnicodeString expected(TRUE,
+    UnicodeString expected(true,
         (const UChar *)
         u"AAAAAAAAAABBBBBBBBBBCCCCCCCCCCDDDDDDDDDDEEEEEEEEEEF"
         u"AAAAAAAAAABBBBBBBBBBCCCCCCCCCCDDDDDDDDDDEEEEEEEEEEF"
@@ -1651,7 +1651,7 @@ void StringCaseTest::TestLongUnicodeString() {
 void StringCaseTest::TestBug13127() {
     // Test case crashed when the bug was present.
     const char16_t *s16 = u"日本語";
-    UnicodeString s(TRUE, s16, -1);
+    UnicodeString s(true, s16, -1);
     s.toTitle(0, Locale::getEnglish());
 }
 
diff --git a/icu4c/source/test/intltest/svccoll.cpp b/icu4c/source/test/intltest/svccoll.cpp
index a8672c232d8..c0e14572273 100644
--- a/icu4c/source/test/intltest/svccoll.cpp
+++ b/icu4c/source/test/intltest/svccoll.cpp
@@ -111,14 +111,14 @@ void CollationServiceTest::TestRegister()
 
         UnicodeString locName = fu_FU.getName();
         StringEnumeration* localeEnum = Collator::getAvailableLocales();
-        UBool found = FALSE;
+        UBool found = false;
         const UnicodeString* locStr, *ls2;
         for (locStr = localeEnum->snext(status);
         !found && locStr != NULL;
         locStr = localeEnum->snext(status)) {
             //
             if (locName == *locStr) {
-                found = TRUE;
+                found = true;
             }
         }
 
@@ -352,7 +352,7 @@ void CollationServiceTest::TestRegisterFactory(void)
 
     UErrorCode status = U_ZERO_ERROR;
 
-    Hashtable* fuFUNames = new Hashtable(FALSE, status);
+    Hashtable* fuFUNames = new Hashtable(false, status);
     if (!fuFUNames) {
         errln("memory allocation error");
         return;
@@ -429,14 +429,14 @@ void CollationServiceTest::TestRegisterFactory(void)
 
         UnicodeString locName = fu_FU.getName();
         StringEnumeration* localeEnum = Collator::getAvailableLocales();
-        UBool found = FALSE;
+        UBool found = false;
         const UnicodeString* locStr;
         for (locStr = localeEnum->snext(status);
             !found && locStr != NULL;
             locStr = localeEnum->snext(status))
         {
             if (locName == *locStr) {
-                found = TRUE;
+                found = true;
             }
         }
         delete localeEnum;
@@ -575,7 +575,7 @@ void CollationServiceTest::TestSeparateTree() {
     delete iter;
 
     iter = Collator::getKeywordValues(KW[0], ec);
-    if (!assertTrue("getKeywordValues != NULL", iter!=NULL, FALSE, TRUE)) return;
+    if (!assertTrue("getKeywordValues != NULL", iter!=NULL, false, true)) return;
     if (!assertSuccess("getKeywordValues", ec)) return;
     checkStringEnumeration("getKeywordValues", *iter, KWVAL, KWVAL_COUNT);
     delete iter;
@@ -586,32 +586,32 @@ void CollationServiceTest::TestSeparateTree() {
                                                      isAvailable, ec);
     assertSuccess("getFunctionalEquivalent", ec);
     assertEquals("getFunctionalEquivalent(de)", "", equiv.getName());
-    assertTrue("getFunctionalEquivalent(de).isAvailable==TRUE",
-               isAvailable == TRUE);
+    assertTrue("getFunctionalEquivalent(de).isAvailable==true",
+               isAvailable == true);
 
     equiv = Collator::getFunctionalEquivalent("collation",
                                               Locale::createFromName("de_DE"),
                                               isAvailable, ec);
     assertSuccess("getFunctionalEquivalent", ec);
     assertEquals("getFunctionalEquivalent(de_DE)", "", equiv.getName());
-    assertTrue("getFunctionalEquivalent(de_DE).isAvailable==FALSE",
-               isAvailable == FALSE);
+    assertTrue("getFunctionalEquivalent(de_DE).isAvailable==false",
+               isAvailable == false);
 
     equiv = Collator::getFunctionalEquivalent("collation",
                                                      Locale::createFromName("sv"),
                                                      isAvailable, ec);
     assertSuccess("getFunctionalEquivalent", ec);
     assertEquals("getFunctionalEquivalent(sv)", "sv", equiv.getName());
-    assertTrue("getFunctionalEquivalent(sv).isAvailable==TRUE",
-               isAvailable == TRUE);
+    assertTrue("getFunctionalEquivalent(sv).isAvailable==true",
+               isAvailable == true);
 
     equiv = Collator::getFunctionalEquivalent("collation",
                                               Locale::createFromName("sv_SE"),
                                               isAvailable, ec);
     assertSuccess("getFunctionalEquivalent", ec);
     assertEquals("getFunctionalEquivalent(sv_SE)", "sv", equiv.getName());
-    assertTrue("getFunctionalEquivalent(sv_SE).isAvailable==FALSE",
-               isAvailable == FALSE);
+    assertTrue("getFunctionalEquivalent(sv_SE).isAvailable==false",
+               isAvailable == false);
 }
 
 #endif
diff --git a/icu4c/source/test/intltest/tchcfmt.cpp b/icu4c/source/test/intltest/tchcfmt.cpp
index 764ff65d763..b0ca3583b22 100644
--- a/icu4c/source/test/intltest/tchcfmt.cpp
+++ b/icu4c/source/test/intltest/tchcfmt.cpp
@@ -461,7 +461,7 @@ void TestChoiceFormat::TestClosures(void) {
     // intervals.  Do this both using arrays and using a pattern.
 
     // 'fmt1' is created using arrays
-    UBool T = TRUE, F = FALSE;
+    UBool T = true, F = false;
     // 0:   ,1)
     // 1: [1,2]
     // 2: (2,3]
@@ -606,7 +606,7 @@ void TestChoiceFormat::_testPattern(const char* pattern,
 void TestChoiceFormat::TestPatterns(void) {
     // Try a pattern that isolates a single value.  Create
     // three ranges: [-Inf,1.0) [1.0,1.0] (1.0,+Inf]
-    _testPattern("0.0#a|1.0#b|1.0
 
-UBool beVerbose=FALSE, haveCopyright=TRUE;
+UBool beVerbose=false, haveCopyright=true;
 
 /* prototypes --------------------------------------------------------------- */
 
@@ -127,7 +127,7 @@ testData(TestIDNA& test) {
     
     /* process unassigned */
     uprv_strcpy(basename,fileNames[0]);
-    parseMappings(filename,TRUE, test,&errorCode);
+    parseMappings(filename,true, test,&errorCode);
     if(U_FAILURE(errorCode)) {
         test.errln( "Could not open file %s for reading \n", filename);
         return errorCode;
@@ -230,29 +230,29 @@ getValues(uint32_t result, int32_t& value, UBool& isIndex){
          * the source codepoint is copied to the destination
          */
         type = USPREP_TYPE_LIMIT;
-        isIndex =FALSE;
+        isIndex =false;
         value = 0;
     }else if(result >= _SPREP_TYPE_THRESHOLD){
         type = (UStringPrepType) (result - _SPREP_TYPE_THRESHOLD);
-        isIndex =FALSE;
+        isIndex =false;
         value = 0;
     }else{
         /* get the state */
         type = USPREP_MAP;
         /* ascertain if the value is index or delta */
         if(result & 0x02){
-            isIndex = TRUE;
+            isIndex = true;
             value = result  >> 2; //mask off the lower 2 bits and shift
 
         }else{
-            isIndex = FALSE;
+            isIndex = false;
             value = (int16_t)result;
             value =  (value >> 2);
 
         }
         if((result>>2) == _SPREP_MAX_INDEX_VALUE){
             type = USPREP_DELETE;
-            isIndex =FALSE;
+            isIndex =false;
             value = 0;
         }
     }
@@ -292,7 +292,7 @@ testAllCodepoints(TestIDNA& test){
 
     UStringPrepType type;
     int32_t value;
-    UBool isIndex = FALSE;
+    UBool isIndex = false;
 
     for(i=0;i<=0x10FFFF;i++){
         uint32_t result = 0;
@@ -407,7 +407,7 @@ compareFlagsForRange(uint32_t start, uint32_t end,
 
     uint32_t result =0 ;
     UStringPrepType retType;
-    UBool isIndex=FALSE;
+    UBool isIndex=false;
     int32_t value=0;
 /*
     // supplementary code point 
diff --git a/icu4c/source/test/intltest/testidna.cpp b/icu4c/source/test/intltest/testidna.cpp
index e1490b1e8eb..882e3e6f159 100644
--- a/icu4c/source/test/intltest/testidna.cpp
+++ b/icu4c/source/test/intltest/testidna.cpp
@@ -259,7 +259,7 @@ static const struct ErrorCases{
         },
         "www.XN--8mb5595fsoa28orucya378bqre2tcwop06c5qbw82a1rffmae0361dea96b.com",
         U_IDNA_PROHIBITED_ERROR,
-        FALSE, FALSE, TRUE
+        false, false, true
     },
 
     {
@@ -273,7 +273,7 @@ static const struct ErrorCases{
         "www.XN--6lA2Bz548Fj1GuA391Bf1Gb1N59Ab29A7iA.com",
 
         U_IDNA_UNASSIGNED_ERROR,
-        FALSE, FALSE, TRUE
+        false, false, true
     },
     {
         { 
@@ -286,7 +286,7 @@ static const struct ErrorCases{
         },
         "www.xn--ghBGI4851OiyA33VqrD6Az86C4qF83CtRv93D5xBk15AzfG0nAgA0578DeA71C.com",
         U_IDNA_CHECK_BIDI_ERROR,
-        FALSE, FALSE, TRUE
+        false, false, true
     },
     {
         { 
@@ -301,7 +301,7 @@ static const struct ErrorCases{
         },
         "www.xn----b95Ew8SqA315Ao5FbuMlnNmhA.com",
         U_IDNA_STD3_ASCII_RULES_ERROR,
-        TRUE, FALSE, FALSE
+        true, false, false
     },
     {
         { 
@@ -318,7 +318,7 @@ static const struct ErrorCases{
         /* wrong ACE-prefix followed by valid ACE-encoded ASCII */ 
         "www.XY-----b91I0V65S96C2A355Cw1E5yCeQr19CsnP1mFfmAE0361DeA96B.com",
         U_IDNA_ACE_PREFIX_ERROR,
-        FALSE, FALSE, FALSE
+        false, false, false
     },
     /* cannot verify U_IDNA_VERIFICATION_ERROR */
 
@@ -333,7 +333,7 @@ static const struct ErrorCases{
       },
       "www.xn--989AoMsVi5E83Db1D2A355Cv1E0vAk1DwRv93D5xBh15A0Dt30A5JpSD879Ccm6FeA98C.com",
       U_IDNA_LABEL_TOO_LONG_ERROR,
-      FALSE, FALSE, TRUE
+      false, false, true
     },  
     
     { 
@@ -345,7 +345,7 @@ static const struct ErrorCases{
       },
       "www.xn--01-tvdmo.com",
       U_IDNA_CHECK_BIDI_ERROR,
-      FALSE, FALSE, TRUE
+      false, false, true
     },  
     
     { 
@@ -357,7 +357,7 @@ static const struct ErrorCases{
       },
       "www.XN--ghbgi278xia.com",
       U_IDNA_PROHIBITED_ERROR,
-      FALSE, FALSE, TRUE
+      false, false, true
     },
     { 
       {
@@ -368,7 +368,7 @@ static const struct ErrorCases{
       },
       "www.-abcde.com",
       U_IDNA_STD3_ASCII_RULES_ERROR,
-      TRUE, FALSE, FALSE
+      true, false, false
     },
     { 
       {
@@ -379,7 +379,7 @@ static const struct ErrorCases{
       },
       "www.abcde-.com",
       U_IDNA_STD3_ASCII_RULES_ERROR,
-      TRUE, FALSE, FALSE
+      true, false, false
     },
     { 
       {
@@ -390,7 +390,7 @@ static const struct ErrorCases{
       },
       "www.abcde@.com",
       U_IDNA_STD3_ASCII_RULES_ERROR,
-      TRUE, FALSE, FALSE
+      true, false, false
     },
     { 
       {
@@ -401,13 +401,13 @@ static const struct ErrorCases{
       },
       "www..com",
       U_IDNA_ZERO_LENGTH_LABEL_ERROR,
-      TRUE, FALSE, FALSE
+      true, false, false
     },
     { 
       {0},
       NULL,
       U_ILLEGAL_ARGUMENT_ERROR,
-      TRUE, TRUE, FALSE
+      true, true, false
     }
 };
 
@@ -460,7 +460,7 @@ void TestIDNA::testAPI(const UChar* src, const UChar* expected, const char* test
     int32_t destLen = 0;
     UChar* dest = NULL;
     int32_t expectedLen = (expected != NULL) ? u_strlen(expected) : 0;
-    int32_t options = (useSTD3ASCIIRules == TRUE) ? UIDNA_USE_STD3_RULES : UIDNA_DEFAULT;
+    int32_t options = (useSTD3ASCIIRules == true) ? UIDNA_USE_STD3_RULES : UIDNA_DEFAULT;
     UParseError parseError;
     int32_t tSrcLen = 0; 
     UChar* tSrc = NULL; 
@@ -483,7 +483,7 @@ void TestIDNA::testAPI(const UChar* src, const UChar* expected, const char* test
             dest = destStack;
             destLen = func(src,-1,dest,destLen+1,options, &parseError, &status);
             // TODO : compare output with expected
-            if(U_SUCCESS(status) && expectedStatus != U_IDNA_STD3_ASCII_RULES_ERROR&& (doCompare==TRUE) && u_strCaseCompare(dest,destLen, expected,expectedLen,0,&status)!=0){
+            if(U_SUCCESS(status) && expectedStatus != U_IDNA_STD3_ASCII_RULES_ERROR&& (doCompare==true) && u_strCaseCompare(dest,destLen, expected,expectedLen,0,&status)!=0){
                 errln("Did not get the expected result for "+UnicodeString(testName) +" null terminated source. Expected : " 
                        + prettify(UnicodeString(expected,expectedLen))
                        + " Got: " + prettify(UnicodeString(dest,destLen))
@@ -513,7 +513,7 @@ void TestIDNA::testAPI(const UChar* src, const UChar* expected, const char* test
                 dest = destStack;
                 destLen = func(src,-1,dest,destLen+1,options | UIDNA_ALLOW_UNASSIGNED, &parseError, &status);
                 // TODO : compare output with expected
-                if(U_SUCCESS(status) && (doCompare==TRUE) && u_strCaseCompare(dest,destLen, expected,expectedLen,0,&status)!=0){
+                if(U_SUCCESS(status) && (doCompare==true) && u_strCaseCompare(dest,destLen, expected,expectedLen,0,&status)!=0){
                     //errln("Did not get the expected result for %s null terminated source with both options set.\n",testName);
                     errln("Did not get the expected result for "+UnicodeString(testName) +
                           " null terminated source "+ prettify(src) + 
@@ -548,7 +548,7 @@ void TestIDNA::testAPI(const UChar* src, const UChar* expected, const char* test
             dest = destStack;
             destLen = func(src,u_strlen(src),dest,destLen+1,options, &parseError, &status);
             // TODO : compare output with expected
-            if(U_SUCCESS(status) && (doCompare==TRUE) && u_strCaseCompare(dest,destLen, expected,expectedLen,0,&status)!=0){
+            if(U_SUCCESS(status) && (doCompare==true) && u_strCaseCompare(dest,destLen, expected,expectedLen,0,&status)!=0){
                 errln("Did not get the expected result for %s with source length.\n",testName);
             }
         }else{
@@ -575,7 +575,7 @@ void TestIDNA::testAPI(const UChar* src, const UChar* expected, const char* test
                 dest = destStack;
                 destLen = func(src,u_strlen(src),dest,destLen+1,options | UIDNA_ALLOW_UNASSIGNED, &parseError, &status);
                 // TODO : compare output with expected
-                if(U_SUCCESS(status) && (doCompare==TRUE) && u_strCaseCompare(dest,destLen, expected,expectedLen,0,&status)!=0){
+                if(U_SUCCESS(status) && (doCompare==true) && u_strCaseCompare(dest,destLen, expected,expectedLen,0,&status)!=0){
                     errln("Did not get the expected result for %s with source length and both options set.\n",testName);
                 }
             }else{
@@ -594,7 +594,7 @@ void TestIDNA::testAPI(const UChar* src, const UChar* expected, const char* test
     }
 
     status = U_ZERO_ERROR;
-    if(testSTD3ASCIIRules==TRUE){
+    if(testSTD3ASCIIRules==true){
         destLen = func(src,-1,NULL,0,options | UIDNA_USE_STD3_RULES, &parseError, &status);
         if(status == U_BUFFER_OVERFLOW_ERROR){
             status = U_ZERO_ERROR; // reset error code
@@ -602,7 +602,7 @@ void TestIDNA::testAPI(const UChar* src, const UChar* expected, const char* test
                 dest = destStack;
                 destLen = func(src,-1,dest,destLen+1,options | UIDNA_USE_STD3_RULES, &parseError, &status);
                 // TODO : compare output with expected
-                if(U_SUCCESS(status) && (doCompare==TRUE) && u_strCaseCompare(dest,destLen, expected,expectedLen,0,&status)!=0){
+                if(U_SUCCESS(status) && (doCompare==true) && u_strCaseCompare(dest,destLen, expected,expectedLen,0,&status)!=0){
                     //errln("Did not get the expected result for %s null terminated source with both options set.\n",testName);
                     errln("Did not get the expected result for "+UnicodeString(testName) +" null terminated source with both options set. Expected: "+ prettify(UnicodeString(expected,expectedLen)));
         
@@ -631,7 +631,7 @@ void TestIDNA::testAPI(const UChar* src, const UChar* expected, const char* test
                 dest = destStack;
                 destLen = func(src,u_strlen(src),dest,destLen+1,options | UIDNA_USE_STD3_RULES, &parseError, &status);
                 // TODO : compare output with expected
-                if(U_SUCCESS(status) && (doCompare==TRUE) && u_strCaseCompare(dest,destLen, expected,expectedLen,0,&status)!=0){
+                if(U_SUCCESS(status) && (doCompare==true) && u_strCaseCompare(dest,destLen, expected,expectedLen,0,&status)!=0){
                     errln("Did not get the expected result for %s with source length and both options set.\n",testName);
                 }
             }else{
@@ -659,7 +659,7 @@ void TestIDNA::testCompare(const UChar* s1, int32_t s1Len,
     UErrorCode status = U_ZERO_ERROR;
     int32_t retVal = func(s1,-1,s2,-1,UIDNA_DEFAULT,&status);
 
-    if(isEqual==TRUE &&  retVal !=0){
+    if(isEqual==true &&  retVal !=0){
         errln("Did not get the expected result for %s with null termniated strings.\n",testName);
     }
     if(U_FAILURE(status)){
@@ -669,7 +669,7 @@ void TestIDNA::testCompare(const UChar* s1, int32_t s1Len,
     status = U_ZERO_ERROR;
     retVal = func(s1,-1,s2,-1,UIDNA_ALLOW_UNASSIGNED,&status);
 
-    if(isEqual==TRUE &&  retVal !=0){
+    if(isEqual==true &&  retVal !=0){
         errln("Did not get the expected result for %s with null termniated strings with options set.\n", testName);
     }
     if(U_FAILURE(status)){
@@ -679,7 +679,7 @@ void TestIDNA::testCompare(const UChar* s1, int32_t s1Len,
     status = U_ZERO_ERROR;
     retVal = func(s1,s1Len,s2,s2Len,UIDNA_DEFAULT,&status);
 
-    if(isEqual==TRUE &&  retVal !=0){
+    if(isEqual==true &&  retVal !=0){
         errln("Did not get the expected result for %s with string length.\n",testName);
     }
     if(U_FAILURE(status)){
@@ -689,7 +689,7 @@ void TestIDNA::testCompare(const UChar* s1, int32_t s1Len,
     status = U_ZERO_ERROR;
     retVal = func(s1,s1Len,s2,s2Len,UIDNA_ALLOW_UNASSIGNED,&status);
 
-    if(isEqual==TRUE &&  retVal !=0){
+    if(isEqual==true &&  retVal !=0){
         errln("Did not get the expected result for %s with string length and options set.\n",testName);
     }
     if(U_FAILURE(status)){
@@ -704,7 +704,7 @@ void TestIDNA::testToASCII(const char* testName, TestFunc func){
 
     for(i=0;i< UPRV_LENGTHOF(unicodeIn); i++){
         u_charsToUChars(asciiIn[i],buf, (int32_t)(strlen(asciiIn[i])+1));
-        testAPI(unicodeIn[i], buf,testName, FALSE,U_ZERO_ERROR, TRUE, TRUE, func);
+        testAPI(unicodeIn[i], buf,testName, false,U_ZERO_ERROR, true, true, func);
         
     }
 }
@@ -716,7 +716,7 @@ void TestIDNA::testToUnicode(const char* testName, TestFunc func){
     
     for(i=0;i< UPRV_LENGTHOF(asciiIn); i++){
         u_charsToUChars(asciiIn[i],buf, (int32_t)(strlen(asciiIn[i])+1));
-        testAPI(buf,unicodeIn[i],testName,FALSE,U_ZERO_ERROR, TRUE, TRUE, func);
+        testAPI(buf,unicodeIn[i],testName,false,U_ZERO_ERROR, true, true, func);
     }
 }
 
@@ -736,9 +736,9 @@ void TestIDNA::testIDNToUnicode(const char* testName, TestFunc func){
             errcheckln(status, "%s failed to convert domainNames[%i].Error: %s",testName, i, u_errorName(status));
             break;
         }
-        testAPI(buf,expected,testName,FALSE,U_ZERO_ERROR, TRUE, TRUE, func);
+        testAPI(buf,expected,testName,false,U_ZERO_ERROR, true, true, func);
          //test toUnicode with all labels in the string
-        testAPI(buf,expected,testName, FALSE,U_ZERO_ERROR, TRUE, TRUE, func);
+        testAPI(buf,expected,testName, false,U_ZERO_ERROR, true, true, func);
         if(U_FAILURE(status)){
             errln( "%s failed to convert domainNames[%i].Error: %s \n",testName,i, u_errorName(status));
             break;
@@ -762,9 +762,9 @@ void TestIDNA::testIDNToASCII(const char* testName, TestFunc func){
             errcheckln(status, "%s failed to convert domainNames[%i].Error: %s",testName,i, u_errorName(status));
             break;
         }
-        testAPI(buf,expected,testName, FALSE,U_ZERO_ERROR, TRUE, TRUE, func);
+        testAPI(buf,expected,testName, false,U_ZERO_ERROR, true, true, func);
         //test toASCII with all labels in the string
-        testAPI(buf,expected,testName, FALSE,U_ZERO_ERROR, FALSE, TRUE, func);
+        testAPI(buf,expected,testName, false,U_ZERO_ERROR, false, true, func);
         if(U_FAILURE(status)){
             errln( "%s failed to convert domainNames[%i].Error: %s \n",testName,i, u_errorName(status));
             break;
@@ -814,22 +814,22 @@ void TestIDNA::testCompare(const char* testName, CompareFunc func){
         const UChar* src = source.getBuffer();
         int32_t srcLen = u_strlen(src); //subtract null
 
-        testCompare(src,srcLen,src,srcLen,testName, func, TRUE);
+        testCompare(src,srcLen,src,srcLen,testName, func, true);
         
         // b) compare it with asciiIn equivalent
-        testCompare(src,srcLen,buf,u_strlen(buf),testName, func,TRUE);
+        testCompare(src,srcLen,buf,u_strlen(buf),testName, func,true);
         
         // c) compare it with unicodeIn not equivalent
         if(i==0){
-            testCompare(src,srcLen,uni1.getBuffer(),uni1.length()-1,testName, func,FALSE);
+            testCompare(src,srcLen,uni1.getBuffer(),uni1.length()-1,testName, func,false);
         }else{
-            testCompare(src,srcLen,uni0.getBuffer(),uni0.length()-1,testName, func,FALSE);
+            testCompare(src,srcLen,uni0.getBuffer(),uni0.length()-1,testName, func,false);
         }
         // d) compare it with asciiIn not equivalent
         if(i==0){
-            testCompare(src,srcLen,ascii1.getBuffer(),ascii1.length()-1,testName, func,FALSE);
+            testCompare(src,srcLen,ascii1.getBuffer(),ascii1.length()-1,testName, func,false);
         }else{
-            testCompare(src,srcLen,ascii0.getBuffer(),ascii0.length()-1,testName, func,FALSE);
+            testCompare(src,srcLen,ascii0.getBuffer(),ascii0.length()-1,testName, func,false);
         }
 
     }
@@ -925,16 +925,16 @@ void TestIDNA::testErrorCases(const char* IDNToASCIIName, TestFunc IDNToASCII,
         // test toASCII
         testAPI(src,buf,
                 IDNToASCIIName, errorCase.useSTD3ASCIIRules,
-                errorCase.expected, TRUE, TRUE, IDNToASCII);
-        if(errorCase.testLabel ==TRUE){
+                errorCase.expected, true, true, IDNToASCII);
+        if(errorCase.testLabel ==true){
             testAPI(src,buf,
                 IDNToASCIIName, errorCase.useSTD3ASCIIRules,
-                errorCase.expected, FALSE,TRUE, IDNToASCII);
+                errorCase.expected, false,true, IDNToASCII);
         }
-        if(errorCase.testToUnicode ==TRUE){
+        if(errorCase.testToUnicode ==true){
             testAPI((src==NULL)? NULL : buf,src,
                     IDNToUnicodeName, errorCase.useSTD3ASCIIRules,
-                    errorCase.expected, TRUE, TRUE, IDNToUnicode);   
+                    errorCase.expected, true, true, IDNToUnicode);   
         }
 
     }
@@ -972,25 +972,25 @@ void TestIDNA::testConformance(const char* toASCIIName, TestFunc toASCII,
         if(conformanceTestCases[i].expectedStatus != U_ZERO_ERROR){
             // test toASCII
             testAPI(src,expected,
-                    IDNToASCIIName, FALSE,
+                    IDNToASCIIName, false,
                     conformanceTestCases[i].expectedStatus, 
-                    TRUE, 
+                    true, 
                     (conformanceTestCases[i].expectedStatus != U_IDNA_UNASSIGNED_ERROR),
                     IDNToASCII);
 
             testAPI(src,expected,
-                    toASCIIName, FALSE,
-                    conformanceTestCases[i].expectedStatus, TRUE, 
+                    toASCIIName, false,
+                    conformanceTestCases[i].expectedStatus, true, 
                     (conformanceTestCases[i].expectedStatus != U_IDNA_UNASSIGNED_ERROR),
                     toASCII);
         }
 
         testAPI(src,src,
-                IDNToUnicodeName, FALSE,
-                conformanceTestCases[i].expectedStatus, TRUE, TRUE, IDNToUnicode);
+                IDNToUnicodeName, false,
+                conformanceTestCases[i].expectedStatus, true, true, IDNToUnicode);
         testAPI(src,src,
-                toUnicodeName, FALSE,
-                conformanceTestCases[i].expectedStatus, TRUE, TRUE, toUnicode);
+                toUnicodeName, false,
+                conformanceTestCases[i].expectedStatus, true, true, toUnicode);
 
     }
     
@@ -1006,7 +1006,7 @@ void TestIDNA::testChaining(const UChar* src,int32_t numIterations,const char* t
     int32_t i=0,evenLen=0,oddLen=0,expectedLen=0;
     UErrorCode status = U_ZERO_ERROR;
     int32_t srcLen = u_strlen(src);
-    int32_t options = (useSTD3ASCIIRules == TRUE) ? UIDNA_USE_STD3_RULES : UIDNA_DEFAULT;
+    int32_t options = (useSTD3ASCIIRules == true) ? UIDNA_USE_STD3_RULES : UIDNA_DEFAULT;
     UParseError parseError;
 
     // test null-terminated source 
@@ -1031,7 +1031,7 @@ void TestIDNA::testChaining(const UChar* src,int32_t numIterations,const char* t
             }
         }
     }
-    if(caseInsensitive ==TRUE){
+    if(caseInsensitive ==true){
         if( u_strCaseCompare(even,evenLen, expected,expectedLen, 0, &status) !=0 ||
             u_strCaseCompare(odd,oddLen, expected,expectedLen, 0, &status) !=0 ){
 
@@ -1068,7 +1068,7 @@ void TestIDNA::testChaining(const UChar* src,int32_t numIterations,const char* t
             }
         }
     }
-    if(caseInsensitive ==TRUE){
+    if(caseInsensitive ==true){
         if( u_strCaseCompare(even,evenLen, expected,expectedLen, 0, &status) !=0 ||
             u_strCaseCompare(odd,oddLen, expected,expectedLen, 0, &status) !=0 ){
 
@@ -1106,7 +1106,7 @@ void TestIDNA::testChaining(const UChar* src,int32_t numIterations,const char* t
             }
         }
     }
-    if(caseInsensitive ==TRUE){
+    if(caseInsensitive ==true){
         if( u_strCaseCompare(even,evenLen, expected,expectedLen, 0, &status) !=0 ||
             u_strCaseCompare(odd,oddLen, expected,expectedLen, 0, &status) !=0 ){
 
@@ -1141,7 +1141,7 @@ void TestIDNA::testChaining(const UChar* src,int32_t numIterations,const char* t
             }
         }
     }
-    if(caseInsensitive ==TRUE){
+    if(caseInsensitive ==true){
         if( u_strCaseCompare(even,evenLen, expected,expectedLen, 0, &status) !=0 ||
             u_strCaseCompare(odd,oddLen, expected,expectedLen, 0, &status) !=0 ){
 
@@ -1162,10 +1162,10 @@ void TestIDNA::testChaining(const char* toASCIIName, TestFunc toASCII,
     
     for(i=0;i< UPRV_LENGTHOF(asciiIn); i++){
         u_charsToUChars(asciiIn[i],buf, (int32_t)(strlen(asciiIn[i])+1));
-        testChaining(buf,5,toUnicodeName, FALSE, FALSE, toUnicode);
+        testChaining(buf,5,toUnicodeName, false, false, toUnicode);
     }
     for(i=0;i< UPRV_LENGTHOF(unicodeIn); i++){
-        testChaining(unicodeIn[i], 5,toASCIIName, FALSE, TRUE, toASCII);
+        testChaining(unicodeIn[i], 5,toASCIIName, false, true, toASCII);
     }
 }
 
@@ -1214,28 +1214,28 @@ void TestIDNA::testRootLabelSeparator(const char* testName, CompareFunc func,
         int32_t srcLen = u_strlen(src); //subtract null
         
         // b) compare it with asciiIn equivalent
-        testCompare(src,srcLen,buf,u_strlen(buf),testName, func,TRUE);
+        testCompare(src,srcLen,buf,u_strlen(buf),testName, func,true);
         
         // a) compare it with itself
-        testCompare(src,srcLen,src,srcLen,testName, func,TRUE);
+        testCompare(src,srcLen,src,srcLen,testName, func,true);
         
         
         // IDNToASCII comparison
-        testAPI(src,buf,IDNToASCIIName,FALSE,U_ZERO_ERROR,TRUE, TRUE, IDNToASCII);
+        testAPI(src,buf,IDNToASCIIName,false,U_ZERO_ERROR,true, true, IDNToASCII);
         // IDNToUnicode comparison
-        testAPI(buf,src,IDNToUnicodeName, FALSE,U_ZERO_ERROR, TRUE, TRUE, IDNToUnicode);
+        testAPI(buf,src,IDNToUnicodeName, false,U_ZERO_ERROR, true, true, IDNToUnicode);
 
         // c) compare it with unicodeIn not equivalent
         if(i==0){
-            testCompare(src,srcLen,uni1.getBuffer(),uni1.length()-1,testName, func,FALSE);
+            testCompare(src,srcLen,uni1.getBuffer(),uni1.length()-1,testName, func,false);
         }else{
-            testCompare(src,srcLen,uni0.getBuffer(),uni0.length()-1,testName, func,FALSE);
+            testCompare(src,srcLen,uni0.getBuffer(),uni0.length()-1,testName, func,false);
         }
         // d) compare it with asciiIn not equivalent
         if(i==0){
-            testCompare(src,srcLen,ascii1.getBuffer(),ascii1.length()-1,testName, func,FALSE);
+            testCompare(src,srcLen,ascii1.getBuffer(),ascii1.length()-1,testName, func,false);
         }else{
-            testCompare(src,srcLen,ascii0.getBuffer(),ascii0.length()-1,testName, func,FALSE);
+            testCompare(src,srcLen,ascii0.getBuffer(),ascii0.length()-1,testName, func,false);
         }
     }
 }   
@@ -1332,11 +1332,11 @@ static const int maxCharCount = 20;
 static uint32_t
 randul()
 {
-    static UBool initialized = FALSE;
+    static UBool initialized = false;
     if (!initialized)
     {
         srand((unsigned)time(NULL));
-        initialized = TRUE;
+        initialized = true;
     }
     // Assume rand has at least 12 bits of precision
     uint32_t l = 0;
@@ -1414,7 +1414,7 @@ UnicodeString TestIDNA::testCompareReferenceImpl(UnicodeString& src,
     // now we know that both implementations yielded same error
     if(U_SUCCESS(expStatus)){
         // compare the outputs if status == U_ZERO_ERROR
-        if(u_strCompare(exp, expLen, got, gotLen, TRUE) != 0){
+        if(u_strCompare(exp, expLen, got, gotLen, true) != 0){
             errln("Did not get the expected output while comparing " + UnicodeString(refIDNAName)
                + " with " + UnicodeString(uIDNAName)
                + " Expected: " + prettify(UnicodeString(exp, expLen))
@@ -1526,9 +1526,9 @@ void TestIDNA::TestIDNAMonkeyTest(){
         expected = expected.unescape();
         UnicodeString ascii("xn--b1abfaaepdrnnbgefbadotcwatmq2g4l");
         ascii.append((UChar)0x0000);
-        testAPI(source.getBuffer(),ascii.getBuffer(), "uidna_toASCII", FALSE, U_ZERO_ERROR, TRUE, TRUE, uidna_toASCII);
+        testAPI(source.getBuffer(),ascii.getBuffer(), "uidna_toASCII", false, U_ZERO_ERROR, true, true, uidna_toASCII);
         
-        testAPI(source.getBuffer(),ascii.getBuffer(), "idnaref_toASCII", FALSE, U_ZERO_ERROR, TRUE, TRUE, idnaref_toASCII);
+        testAPI(source.getBuffer(),ascii.getBuffer(), "idnaref_toASCII", false, U_ZERO_ERROR, true, true, idnaref_toASCII);
 
         testCompareReferenceImpl(source.getBuffer(), source.length()-1);
     }
@@ -1551,7 +1551,7 @@ void TestIDNA::TestCompareReferenceImpl(){
     if (!assertSuccess("", dataStatus, true, __FILE__, __LINE__)) { return; }
 
     for (int32_t i = 0; i <= 0x10FFFF; i++){
-        if (quick == TRUE && i > 0x0FFF){
+        if (quick == true && i > 0x0FFF){
             return;
         }
         if(i == 0x30000){
diff --git a/icu4c/source/test/intltest/testidna.h b/icu4c/source/test/intltest/testidna.h
index 1d72f658f2d..91e7c0bf99c 100644
--- a/icu4c/source/test/intltest/testidna.h
+++ b/icu4c/source/test/intltest/testidna.h
@@ -83,7 +83,7 @@ private:
     // main testing functions
     void testAPI(const UChar *src, const UChar *expected, const char *testName, 
              UBool useSTD3ASCIIRules, UErrorCode expectedStatus,
-             UBool doCompare, UBool testUnassigned, TestFunc func, UBool testSTD3ASCIIRules=TRUE);
+             UBool doCompare, UBool testUnassigned, TestFunc func, UBool testSTD3ASCIIRules=true);
 
     void testCompare(const UChar* s1, int32_t s1Len,
                         const UChar* s2, int32_t s2Len,
diff --git a/icu4c/source/test/intltest/testutil.cpp b/icu4c/source/test/intltest/testutil.cpp
index 31eaf202c36..5c5eeef0fb4 100644
--- a/icu4c/source/test/intltest/testutil.cpp
+++ b/icu4c/source/test/intltest/testutil.cpp
@@ -146,7 +146,7 @@ UBool TestUtility::checkEqualEdits(IntlTest &test, const UnicodeString &name,
                                    const Edits &e1, const Edits &e2, UErrorCode &errorCode) {
     Edits::Iterator ei1 = e1.getFineIterator();
     Edits::Iterator ei2 = e2.getFineIterator();
-    UBool ok = TRUE;
+    UBool ok = true;
     for (int32_t i = 0; ok; ++i) {
         UBool ei1HasNext = ei1.next(errorCode);
         UBool ei2HasNext = ei2.next(errorCode);
diff --git a/icu4c/source/test/intltest/textfile.cpp b/icu4c/source/test/intltest/textfile.cpp
index 292620e19b2..540ce3886ae 100644
--- a/icu4c/source/test/intltest/textfile.cpp
+++ b/icu4c/source/test/intltest/textfile.cpp
@@ -77,7 +77,7 @@ TextFile::~TextFile() {
 
 UBool TextFile::readLine(UnicodeString& line, UErrorCode& ec) {
     if (T_FileStream_eof(file)) {
-        return FALSE;
+        return false;
     }
     // Note: 'buffer' may change after ensureCapacity() is called,
     // so don't use 
@@ -97,9 +97,9 @@ UBool TextFile::readLine(UnicodeString& line, UErrorCode& ec) {
             }
             break;
         }
-        if (!setBuffer(n++, c, ec)) return FALSE;
+        if (!setBuffer(n++, c, ec)) return false;
     }
-    if (!setBuffer(n++, 0, ec)) return FALSE;
+    if (!setBuffer(n++, 0, ec)) return false;
     UnicodeString str(buffer, encoding);
     // Remove BOM in first line, if present
     if (lineNo == 0 && str[0] == 0xFEFF) {
@@ -107,50 +107,50 @@ UBool TextFile::readLine(UnicodeString& line, UErrorCode& ec) {
     }
     ++lineNo;
     line = str.unescape();
-    return TRUE;
+    return true;
 }
 
 UBool TextFile::readLineSkippingComments(UnicodeString& line, UErrorCode& ec,
                                          UBool trim) {
     for (;;) {
-        if (!readLine(line, ec)) return FALSE;
+        if (!readLine(line, ec)) return false;
         // Skip over white space
         int32_t pos = 0;
-        ICU_Utility::skipWhitespace(line, pos, TRUE);
+        ICU_Utility::skipWhitespace(line, pos, true);
         // Ignore blank lines and comment lines
         if (pos == line.length() || line.charAt(pos) == 0x23/*'#'*/) {
             continue;
         }
         // Process line
         if (trim) line.remove(0, pos);
-        return TRUE;
+        return true;
     }
 }
 
 /**
- * Set buffer[index] to c, growing buffer if necessary. Return TRUE if
+ * Set buffer[index] to c, growing buffer if necessary. Return true if
  * successful.
  */
 UBool TextFile::setBuffer(int32_t index, char c, UErrorCode& ec) {
     if (capacity <= index) {
         if (!ensureCapacity(index+1)) {
             ec = U_MEMORY_ALLOCATION_ERROR;
-            return FALSE;
+            return false;
         }
     }
     buffer[index] = c;
-    return TRUE;
+    return true;
 }
 
 /**
  * Make sure that 'buffer' has at least 'mincapacity' bytes.
- * Return TRUE upon success. Upon return, 'buffer' may change
+ * Return true upon success. Upon return, 'buffer' may change
  * value. In any case, previous contents are preserved.
  */
  #define LOWEST_MIN_CAPACITY 64
 UBool TextFile::ensureCapacity(int32_t mincapacity) {
     if (capacity >= mincapacity) {
-        return TRUE;
+        return true;
     }
 
     // Grow by factor of 2 to prevent frequent allocation
@@ -169,7 +169,7 @@ UBool TextFile::ensureCapacity(int32_t mincapacity) {
     // Note: 'buffer' may be 0
     char* newbuffer = (char*) uprv_malloc(mincapacity);
     if (newbuffer == 0) {
-        return FALSE;
+        return false;
     }
     if (buffer != 0) {
         uprv_strncpy(newbuffer, buffer, capacity);
@@ -177,6 +177,6 @@ UBool TextFile::ensureCapacity(int32_t mincapacity) {
     }
     buffer = newbuffer;
     capacity = mincapacity;
-    return TRUE;
+    return true;
 }
 
diff --git a/icu4c/source/test/intltest/textfile.h b/icu4c/source/test/intltest/textfile.h
index c4ef6730cd6..a41dcf3c991 100644
--- a/icu4c/source/test/intltest/textfile.h
+++ b/icu4c/source/test/intltest/textfile.h
@@ -35,7 +35,7 @@ class TextFile {
      * Read a line terminated by ^J or ^M or ^M^J, and convert it from
      * this file's encoding to Unicode. The EOL character(s) are not
      * included in 'line'.
-     * @return TRUE if a line was read, or FALSE if the EOF
+     * @return true if a line was read, or false if the EOF
      * was reached or an error occurred
      */
     UBool readLine(UnicodeString& line, UErrorCode& ec);
@@ -43,12 +43,12 @@ class TextFile {
     /**
      * Read a line, ignoring blank lines and lines that start with
      * '#'.  Trim leading white space.
-     * @param trim if TRUE then remove leading Pattern_White_Space
-     * @return TRUE if a line was read, or FALSE if the EOF
+     * @param trim if true then remove leading Pattern_White_Space
+     * @return true if a line was read, or false if the EOF
      * was reached or an error occurred
      */
     UBool readLineSkippingComments(UnicodeString& line, UErrorCode& ec,
-                                   UBool trim = FALSE);
+                                   UBool trim = false);
 
     /**
      * Return the line number of the last line returned by readLine().
diff --git a/icu4c/source/test/intltest/tfsmalls.cpp b/icu4c/source/test/intltest/tfsmalls.cpp
index d7a00b27d2a..6401d90be78 100644
--- a/icu4c/source/test/intltest/tfsmalls.cpp
+++ b/icu4c/source/test/intltest/tfsmalls.cpp
@@ -92,7 +92,7 @@ void test_FieldPosition_example( void )
         it_dataerrln("NumberFormat::createInstance() error");
         return;
     }
-    fmt->setDecimalSeparatorAlwaysShown(TRUE);
+    fmt->setDecimalSeparatorAlwaysShown(true);
     
     const int32_t tempLen = 20;
     char temp[tempLen];
@@ -130,16 +130,16 @@ void test_FieldPosition( void )
     if ( fph->getField() != 3) it_errln("*** FP getField or heap constr.");
     delete fph;
 
-    UBool err1 = FALSE;
-    UBool err2 = FALSE;
-    UBool err3 = FALSE;
+    UBool err1 = false;
+    UBool err2 = false;
+    UBool err3 = false;
     for (int32_t i = -50; i < 50; i++ ) {
         fp.setField( i+8 );
         fp.setBeginIndex( i+6 );
         fp.setEndIndex( i+7 );
-        if (fp.getField() != i+8)  err1 = TRUE;
-        if (fp.getBeginIndex() != i+6) err2 = TRUE;
-        if (fp.getEndIndex() != i+7) err3 = TRUE;
+        if (fp.getField() != i+8)  err1 = true;
+        if (fp.getBeginIndex() != i+6) err2 = true;
+        if (fp.getEndIndex() != i+7) err3 = true;
     }
     if (!err1) {
         it_logln("FP setField and getField tested.");
@@ -271,10 +271,10 @@ void test_Formattable( void )
     int32_t i, res_cnt;
     const Formattable* res_array = ft_arr.getArray( res_cnt );
     if (res_cnt == ft_cnt) {
-        UBool same  = TRUE;
+        UBool same  = true;
         for (i = 0; i < res_cnt; i++ ) {
             if (res_array[i] != ftarray[i]) {
-                same = FALSE;
+                same = false;
             }
         }
         if (same) {
diff --git a/icu4c/source/test/intltest/thcoll.cpp b/icu4c/source/test/intltest/thcoll.cpp
index 46cc90574e4..dd02e59d20e 100644
--- a/icu4c/source/test/intltest/thcoll.cpp
+++ b/icu4c/source/test/intltest/thcoll.cpp
@@ -98,7 +98,7 @@ void CollationThaiTest::TestNamesList(void) {
     UnicodeString lastWord, word;
     //int32_t failed = 0;
     int32_t wordCount = 0;
-    while (names.readLineSkippingComments(word, ec, FALSE) && U_SUCCESS(ec)) {
+    while (names.readLineSkippingComments(word, ec, false) && U_SUCCESS(ec)) {
 
         // Show the first 8 words being compared, so we can see what's happening
         ++wordCount;
@@ -145,7 +145,7 @@ void CollationThaiTest::TestDictionary(void) {
     UnicodeString lastWord, word;
     int32_t failed = 0;
     int32_t wordCount = 0;
-    while (riwords.readLineSkippingComments(word, ec, FALSE) && U_SUCCESS(ec)) {
+    while (riwords.readLineSkippingComments(word, ec, false) && U_SUCCESS(ec)) {
 
         // Show the first 8 words being compared, so we can see what's happening
         ++wordCount;
diff --git a/icu4c/source/test/intltest/tmsgfmt.cpp b/icu4c/source/test/intltest/tmsgfmt.cpp
index 3d6d6d643ba..6d4e47b54fb 100644
--- a/icu4c/source/test/intltest/tmsgfmt.cpp
+++ b/icu4c/source/test/intltest/tmsgfmt.cpp
@@ -358,12 +358,12 @@ void TestMessageFormat::PatternTest()
         } else if (parseCount != count) {
             errln("MSG count not %d as expected. Got %d", count, parseCount);
         }
-        UBool failed = FALSE;
+        UBool failed = false;
         for (int32_t j = 0; j < parseCount; ++j) {
              if (values == 0 || testArgs[j] != values[j]) {
                 errln(((UnicodeString)"MSG testargs[") + j + "]: " + toString(testArgs[j]));
                 errln(((UnicodeString)"MSG values[") + j + "]  : " + toString(values[j]));
-                failed = TRUE;
+                failed = true;
              }
         }
         if (failed)
@@ -1023,17 +1023,17 @@ void TestMessageFormat::testSetLocale()
     }
 
     msg.setLocale(Locale::getEnglish());
-    UBool getLocale_ok = TRUE;
+    UBool getLocale_ok = true;
     if (msg.getLocale() != Locale::getEnglish()) {
         errln("*** MSG getLocale err.");
-        getLocale_ok = FALSE;
+        getLocale_ok = false;
     }
 
     msg.setLocale(Locale::getGerman());
 
     if (msg.getLocale() != Locale::getGerman()) {
         errln("*** MSG getLocal err.");
-        getLocale_ok = FALSE;
+        getLocale_ok = false;
     }
 
     msg.applyPattern( formatStr, err);
@@ -1249,14 +1249,14 @@ void TestMessageFormat::testAdopt()
     }
 
     UBool diff;
-    diff = TRUE;
+    diff = true;
     for (i = 0; i < count; i++) {
         a = formatsChg[i];
         b = formatsCmp[i];
         if ((a != NULL) && (b != NULL)) {
             if (*a == *b) {
                 logln("formatsChg == formatsCmp at index %d", i);
-                diff = FALSE;
+                diff = false;
             }
         }
     }
@@ -1883,19 +1883,19 @@ void TestMessageFormat::TestSelectOrdinal() {
     FieldPosition ignore(FieldPosition::DONT_CARE);
     UnicodeString result;
     assertEquals("plural-and-ordinal format(21) failed", "21 files, 21st file",
-                 m.format(args, 1, result, ignore, errorCode), TRUE);
+                 m.format(args, 1, result, ignore, errorCode), true);
 
     args[0].setLong(2);
     assertEquals("plural-and-ordinal format(2) failed", "2 files, 2nd file",
-                 m.format(args, 1, result.remove(), ignore, errorCode), TRUE);
+                 m.format(args, 1, result.remove(), ignore, errorCode), true);
 
     args[0].setLong(1);
     assertEquals("plural-and-ordinal format(1) failed", "1 file, 1st file",
-                 m.format(args, 1, result.remove(), ignore, errorCode), TRUE);
+                 m.format(args, 1, result.remove(), ignore, errorCode), true);
 
     args[0].setLong(3);
     assertEquals("plural-and-ordinal format(3) failed", "3 files, 3rd file",
-                 m.format(args, 1, result.remove(), ignore, errorCode), TRUE);
+                 m.format(args, 1, result.remove(), ignore, errorCode), true);
 
     errorCode.errDataIfFailureAndReset("");
 }
@@ -1910,12 +1910,12 @@ void TestMessageFormat::TestDecimals() {
     FieldPosition ignore;
     UnicodeString result;
     assertEquals("simple format(1)", "one meter",
-            m.format(args, 1, result, ignore, errorCode), TRUE);
+            m.format(args, 1, result, ignore, errorCode), true);
 
     args[0] = (double)1.5;
     result.remove();
     assertEquals("simple format(1.5)", "1.5 meters",
-            m.format(args, 1, result, ignore, errorCode), TRUE);
+            m.format(args, 1, result, ignore, errorCode), true);
 
     // Simple but explicit.
     MessageFormat m0(
@@ -1924,12 +1924,12 @@ void TestMessageFormat::TestDecimals() {
     args[0] = (int32_t)1;
     result.remove();
     assertEquals("explicit format(1)", "one meter",
-            m0.format(args, 1, result, ignore, errorCode), TRUE);
+            m0.format(args, 1, result, ignore, errorCode), true);
 
     args[0] = (double)1.5;
     result.remove();
     assertEquals("explicit format(1.5)", "1.5 meters",
-            m0.format(args, 1, result, ignore, errorCode), TRUE);
+            m0.format(args, 1, result, ignore, errorCode), true);
 
     // With offset and specific simple format with optional decimals.
     MessageFormat m1(
@@ -1938,17 +1938,17 @@ void TestMessageFormat::TestDecimals() {
     args[0] = (int32_t)1;
     result.remove();
     assertEquals("offset format(1)", "01 meters",
-            m1.format(args, 1, result, ignore, errorCode), TRUE);
+            m1.format(args, 1, result, ignore, errorCode), true);
 
     args[0] = (int32_t)2;
     result.remove();
     assertEquals("offset format(1)", "another meter",
-            m1.format(args, 1, result, ignore, errorCode), TRUE);
+            m1.format(args, 1, result, ignore, errorCode), true);
 
     args[0] = (double)2.5;
     result.remove();
     assertEquals("offset format(1)", "02.5 meters",
-            m1.format(args, 1, result, ignore, errorCode), TRUE);
+            m1.format(args, 1, result, ignore, errorCode), true);
 
     // With offset and specific simple format with forced decimals.
     MessageFormat m2(
@@ -1957,17 +1957,17 @@ void TestMessageFormat::TestDecimals() {
     args[0] = (int32_t)1;
     result.remove();
     assertEquals("offset-decimals format(1)", "1.0 meters",
-            m2.format(args, 1, result, ignore, errorCode), TRUE);
+            m2.format(args, 1, result, ignore, errorCode), true);
 
     args[0] = (int32_t)2;
     result.remove();
     assertEquals("offset-decimals format(1)", "2.0 meters",
-            m2.format(args, 1, result, ignore, errorCode), TRUE);
+            m2.format(args, 1, result, ignore, errorCode), true);
 
     args[0] = (double)2.5;
     result.remove();
     assertEquals("offset-decimals format(1)", "2.5 meters",
-            m2.format(args, 1, result, ignore, errorCode), TRUE);
+            m2.format(args, 1, result, ignore, errorCode), true);
     errorCode.reset();
 }
 
diff --git a/icu4c/source/test/intltest/tokiter.cpp b/icu4c/source/test/intltest/tokiter.cpp
index 42809736f16..a98b833ef08 100644
--- a/icu4c/source/test/intltest/tokiter.cpp
+++ b/icu4c/source/test/intltest/tokiter.cpp
@@ -18,7 +18,7 @@
 
 TokenIterator::TokenIterator(TextFile* r) {
     reader = r;
-    done = haveLine = FALSE;
+    done = haveLine = false;
     pos = lastpos = -1;
 }
 
@@ -27,25 +27,25 @@ TokenIterator::~TokenIterator() {
 
 UBool TokenIterator::next(UnicodeString& token, UErrorCode& ec) {
     if (done || U_FAILURE(ec)) {
-        return FALSE;
+        return false;
     }
     token.truncate(0);
     for (;;) {
         if (!haveLine) {
             if (!reader->readLineSkippingComments(line, ec)) {
-                done = TRUE;
-                return FALSE;
+                done = true;
+                return false;
             }
-            haveLine = TRUE;
+            haveLine = true;
             pos = 0;
         }
         lastpos = pos;
         if (!nextToken(token, ec)) {
-            haveLine = FALSE;
-            if (U_FAILURE(ec)) return FALSE;
+            haveLine = false;
+            if (U_FAILURE(ec)) return false;
             continue;
         }
-        return TRUE;
+        return true;
     }
 }
 
@@ -61,13 +61,13 @@ int32_t TokenIterator::getLineNumber() const {
  * is ignored, unless it is backslash-escaped or within quotes.
  * @param token the token is appended to this StringBuffer
  * @param ec input-output error code
- * @return TRUE if a valid token is found, or FALSE if the end
+ * @return true if a valid token is found, or false if the end
  * of the line is reached or an error occurs
  */
 UBool TokenIterator::nextToken(UnicodeString& token, UErrorCode& ec) {
-    ICU_Utility::skipWhitespace(line, pos, TRUE);
+    ICU_Utility::skipWhitespace(line, pos, true);
     if (pos == line.length()) {
-        return FALSE;
+        return false;
     }
     UChar c = line.charAt(pos++);
     UChar quote = 0;
@@ -77,7 +77,7 @@ UBool TokenIterator::nextToken(UnicodeString& token, UErrorCode& ec) {
         quote = c;
         break;
     case 35/*'#'*/:
-        return FALSE;
+        return false;
     default:
         token.append(c);
         break;
@@ -88,15 +88,15 @@ UBool TokenIterator::nextToken(UnicodeString& token, UErrorCode& ec) {
             UChar32 c32 = line.unescapeAt(pos);
             if (c32 < 0) {
                 ec = U_MALFORMED_UNICODE_ESCAPE;
-                return FALSE;
+                return false;
             }
             token.append(c32);
         } else if ((quote != 0 && c == quote) ||
                    (quote == 0 && PatternProps::isWhiteSpace(c))) {
             ++pos;
-            return TRUE;
+            return true;
         } else if (quote == 0 && c == '#') {
-            return TRUE; // do NOT increment
+            return true; // do NOT increment
         } else {
             token.append(c);
             ++pos;
@@ -104,7 +104,7 @@ UBool TokenIterator::nextToken(UnicodeString& token, UErrorCode& ec) {
     }
     if (quote != 0) {
         ec = U_UNTERMINATED_QUOTE;
-        return FALSE;
+        return false;
     }
-    return TRUE;
+    return true;
 }
diff --git a/icu4c/source/test/intltest/tokiter.h b/icu4c/source/test/intltest/tokiter.h
index 670ace78823..a6f7005a75b 100644
--- a/icu4c/source/test/intltest/tokiter.h
+++ b/icu4c/source/test/intltest/tokiter.h
@@ -39,7 +39,7 @@ class TokenIterator {
 
     /**
      * Return the next token from this iterator.
-     * @return TRUE if a token was read, or FALSE if no more tokens
+     * @return true if a token was read, or false if no more tokens
      * are available or an error occurred.
      */
     UBool next(UnicodeString& token, UErrorCode& ec);
diff --git a/icu4c/source/test/intltest/transapi.cpp b/icu4c/source/test/intltest/transapi.cpp
index 4420da2414f..828b774b3ec 100644
--- a/icu4c/source/test/intltest/transapi.cpp
+++ b/icu4c/source/test/intltest/transapi.cpp
@@ -720,9 +720,9 @@ class TestFilter1 : public UnicodeFilter {
     }
     virtual UBool contains(UChar32 c) const override {
        if(c==0x63 || c==0x61 || c==0x43 || c==0x41)
-          return FALSE;
+          return false;
        else
-          return TRUE;
+          return true;
     }
     // Stubs
     virtual UnicodeString& toPattern(UnicodeString& result,
@@ -730,7 +730,7 @@ class TestFilter1 : public UnicodeFilter {
         return result;
     }
     virtual UBool matchesIndexValue(uint8_t /*v*/) const override {
-        return FALSE;
+        return false;
     }
     virtual void addMatchSetTo(UnicodeSet& /*toUnionTo*/) const override {}
 };
@@ -741,9 +741,9 @@ class TestFilter2 : public UnicodeFilter {
     }
     virtual UBool contains(UChar32 c) const override {
         if(c==0x65 || c==0x6c)
-           return FALSE;
+           return false;
         else
-           return TRUE;
+           return true;
     }
     // Stubs
     virtual UnicodeString& toPattern(UnicodeString& result,
@@ -751,7 +751,7 @@ class TestFilter2 : public UnicodeFilter {
         return result;
     }
     virtual UBool matchesIndexValue(uint8_t /*v*/) const override {
-        return FALSE;
+        return false;
     }
     virtual void addMatchSetTo(UnicodeSet& /*toUnionTo*/) const override {}
 };
@@ -762,9 +762,9 @@ class TestFilter3 : public UnicodeFilter {
     }
     virtual UBool contains(UChar32 c) const override {
         if(c==0x6f || c==0x77)
-           return FALSE;
+           return false;
         else
-           return TRUE;
+           return true;
     }
     // Stubs
     virtual UnicodeString& toPattern(UnicodeString& result,
@@ -772,7 +772,7 @@ class TestFilter3 : public UnicodeFilter {
         return result;
     }
     virtual UBool matchesIndexValue(uint8_t /*v*/) const override {
-        return FALSE;
+        return false;
     }
     virtual void addMatchSetTo(UnicodeSet& /*toUnionTo*/) const override {}
 };
@@ -949,8 +949,8 @@ void TransliteratorAPITest::callEverything(const Transliterator *tr, int line) {
 
     UnicodeString rules;
     UnicodeString clonedRules;
-    rules = tr->toRules(rules, FALSE);
-    clonedRules = clonedTR->toRules(clonedRules, FALSE);
+    rules = tr->toRules(rules, false);
+    clonedRules = clonedTR->toRules(clonedRules, false);
     CEASSERT(rules == clonedRules);
 
     UnicodeSet sourceSet;
diff --git a/icu4c/source/test/intltest/transrt.cpp b/icu4c/source/test/intltest/transrt.cpp
index 9113a7b3d52..f6e95fe9db1 100644
--- a/icu4c/source/test/intltest/transrt.cpp
+++ b/icu4c/source/test/intltest/transrt.cpp
@@ -50,7 +50,7 @@
                           break
 
 #define EXHAUSTIVE(id,test) case id:                            \
-                              if(quick==FALSE){                 \
+                              if(quick==false){                 \
                                   name = #test;                 \
                                   if (exec){                    \
                                       logln(#test "---");       \
@@ -118,7 +118,7 @@ class Legal {
 public:
     Legal() {}
     virtual ~Legal() {}
-    virtual UBool is(const UnicodeString& /*sourceString*/) const {return TRUE;}
+    virtual UBool is(const UnicodeString& /*sourceString*/) const {return true;}
 };
 
 class LegalJamo : public Legal {
@@ -136,24 +136,24 @@ UBool LegalJamo::is(const UnicodeString& sourceString) const {
     int t;
     UnicodeString decomp;
     UErrorCode ec = U_ZERO_ERROR;
-    Normalizer::decompose(sourceString, FALSE, 0, decomp, ec); 
+    Normalizer::decompose(sourceString, false, 0, decomp, ec); 
     if (U_FAILURE(ec)) {
-        return FALSE;
+        return false;
     }      
     for (int i = 0; i < decomp.length(); ++i) { // don't worry about surrogates             
         switch (getType(decomp.charAt(i))) {
         case 0: t = getType(decomp.charAt(i+1));
-                if (t != 0 && t != 1) { return FALSE; }
+                if (t != 0 && t != 1) { return false; }
                 break;
         case 1: t = getType(decomp.charAt(i-1));
-                if (t != 0 && t != 1) { return FALSE; }
+                if (t != 0 && t != 1) { return false; }
                 break;
         case 2: t = getType(decomp.charAt(i-1));
-                if (t != 1 && t != 2) { return FALSE; }
+                if (t != 1 && t != 2) { return false; }
                 break;
         }
     }              
-    return TRUE;
+    return true;
 }
 
 int LegalJamo::getType(UChar c) const {
@@ -182,32 +182,32 @@ public:
 UBool LegalGreek::is(const UnicodeString& sourceString) const { 
     UnicodeString decomp;
     UErrorCode ec = U_ZERO_ERROR;
-    Normalizer::decompose(sourceString, FALSE, 0, decomp, ec);
+    Normalizer::decompose(sourceString, false, 0, decomp, ec);
                 
     // modern is simpler: don't care about anything but a grave
-    if (full == FALSE) {
+    if (full == false) {
         // A special case which is legal but should be
         // excluded from round trip
         // if (sourceString == UnicodeString("\\u039C\\u03C0", "")) {
-        //    return FALSE;
+        //    return false;
         // }       
         for (int32_t i = 0; i < decomp.length(); ++i) {
             UChar c = decomp.charAt(i);
             // exclude all the accents
             if (c == 0x0313 || c == 0x0314 || c == 0x0300 || c == 0x0302
                 || c == 0x0342 || c == 0x0345
-                ) return FALSE;
+                ) return false;
         }
-        return TRUE;
+        return true;
     }
 
     // Legal greek has breathing marks IFF there is a vowel or RHO at the start
     // IF it has them, it has exactly one.
     // IF it starts with a RHO, then the breathing mark must come before the second letter.
     // Since there are no surrogates in greek, don't worry about them
-    UBool firstIsVowel = FALSE;
-    UBool firstIsRho = FALSE;
-    UBool noLetterYet = TRUE;
+    UBool firstIsVowel = false;
+    UBool firstIsRho = false;
+    UBool noLetterYet = true;
     int32_t breathingCount = 0;
     int32_t letterCount = 0;
     for (int32_t i = 0; i < decomp.length(); ++i) {
@@ -215,12 +215,12 @@ UBool LegalGreek::is(const UnicodeString& sourceString) const {
         if (u_isalpha(c)) {
             ++letterCount;
             if (noLetterYet) {
-                noLetterYet =  FALSE;
+                noLetterYet =  false;
                 firstIsVowel = isVowel(c);
                 firstIsRho = isRho(c);
             }
             if (firstIsRho && letterCount == 2 && breathingCount == 0) {
-                return FALSE;
+                return false;
             }
         }
         if (c == 0x0313 || c == 0x0314) {
@@ -248,18 +248,18 @@ UBool LegalGreek::isVowel(UChar c) {
     case 0x039F:
     case 0x03A5:
     case 0x03A9:
-        return TRUE;
+        return true;
     }
-    return FALSE;
+    return false;
 }
 
 UBool LegalGreek::isRho(UChar c) {
     switch (c) {
     case 0x03C1:
     case 0x03A1:
-        return TRUE;
+        return true;
     }
-    return FALSE;
+    return false;
 }
 
 namespace {
@@ -402,38 +402,38 @@ void RTTest::setPairLimit(int32_t limit) {
 }
 
 UBool RTTest::isSame(const UnicodeString& a, const UnicodeString& b) {
-    if (a == b) return TRUE;
-    if (a.caseCompare(b, U_FOLD_CASE_DEFAULT)==0 && isCamel(a)) return TRUE;
+    if (a == b) return true;
+    if (a.caseCompare(b, U_FOLD_CASE_DEFAULT)==0 && isCamel(a)) return true;
     UnicodeString aa, bb;
     UErrorCode ec = U_ZERO_ERROR;
-    Normalizer::decompose(a, FALSE, 0, aa, ec);
-    Normalizer::decompose(b, FALSE, 0, bb, ec);
-    if (aa == bb) return TRUE;
-    if (aa.caseCompare(bb, U_FOLD_CASE_DEFAULT)==0 && isCamel(aa)) return TRUE;
-    return FALSE;
+    Normalizer::decompose(a, false, 0, aa, ec);
+    Normalizer::decompose(b, false, 0, bb, ec);
+    if (aa == bb) return true;
+    if (aa.caseCompare(bb, U_FOLD_CASE_DEFAULT)==0 && isCamel(aa)) return true;
+    return false;
 }
 
 UBool RTTest::isCamel(const UnicodeString& a) {
     // see if string is of the form aB; e.g. lower, then upper or title
     UChar32 cp;
-    UBool haveLower = FALSE;
+    UBool haveLower = false;
     for (int32_t i = 0; i < a.length(); i += U16_LENGTH(cp)) {
         cp = a.char32At(i);
         int8_t t = u_charType(cp);
         switch (t) {
         case U_UPPERCASE_LETTER:
-            if (haveLower) return TRUE;
+            if (haveLower) return true;
             break;
         case U_TITLECASE_LETTER:
-            if (haveLower) return TRUE;
+            if (haveLower) return true;
             // fall through, since second letter is lower.
             U_FALLTHROUGH;
         case U_LOWERCASE_LETTER:
-            haveLower = TRUE;
+            haveLower = true;
             break;
         }
     }
-    return FALSE;
+    return false;
 }
 
 void RTTest::test(const UnicodeString& sourceRangeVal,
@@ -531,9 +531,9 @@ UBool RTTest::checkIrrelevants(Transliterator *t,
         UnicodeString srcStr(c);
         UnicodeString targ = srcStr;
         t->transliterate(targ);
-        if (srcStr == targ) return TRUE;
+        if (srcStr == targ) return true;
     }
-    return FALSE;
+    return false;
 }
 
 void RTTest::test2(UBool quickRt, int32_t density) {
@@ -568,10 +568,10 @@ void RTTest::test2(UBool quickRt, int32_t density) {
     // string is from NFC_NO in the UCD
     UnicodeString irrelevants = CharsToUnicodeString("\\u2000\\u2001\\u2126\\u212A\\u212B\\u2329"); 
 
-    if (checkIrrelevants(sourceToTarget, irrelevants) == FALSE) {
+    if (checkIrrelevants(sourceToTarget, irrelevants) == false) {
         logFails("Source-Target, irrelevants");
     }
-    if (checkIrrelevants(targetToSource, irrelevants) == FALSE) {
+    if (checkIrrelevants(targetToSource, irrelevants) == false) {
         logFails("Target-Source, irrelevants");
     }
             
@@ -580,7 +580,7 @@ void RTTest::test2(UBool quickRt, int32_t density) {
       UnicodeString rules = "";
        
       UParseError parseError;
-      rules = sourceToTarget->toRules(rules, TRUE);
+      rules = sourceToTarget->toRules(rules, true);
       // parent->logln((UnicodeString)"toRules => " + rules);
       TransliteratorPointer sourceToTarget2(Transliterator::createFromRules(
                                                        "s2t2", rules, 
@@ -591,7 +591,7 @@ void RTTest::test2(UBool quickRt, int32_t density) {
           return;
       }
 
-      rules = targetToSource->toRules(rules, FALSE);
+      rules = targetToSource->toRules(rules, false);
       TransliteratorPointer targetToSource2(Transliterator::createFromRules(
                                                        "t2s2", rules, 
                                                        UTRANS_FORWARD,
@@ -643,16 +643,16 @@ void RTTest::test2(UBool quickRt, int32_t density) {
         UnicodeString srcStr((UChar32)c);
         UnicodeString targ = srcStr;
         sourceToTarget->transliterate(targ);
-        if (toTarget.containsAll(targ) == FALSE
-            || badCharacters.containsSome(targ) == TRUE) {
+        if (toTarget.containsAll(targ) == false
+            || badCharacters.containsSome(targ) == true) {
             UnicodeString targD;
-            Normalizer::decompose(targ, FALSE, 0, targD, status);
+            Normalizer::decompose(targ, false, 0, targD, status);
             if (U_FAILURE(status)) {
                 parent->errln("FAIL: Internal error during decomposition %s\n", u_errorName(status));
                 return;
             }
-            if (toTarget.containsAll(targD) == FALSE || 
-                badCharacters.containsSome(targD) == TRUE) {
+            if (toTarget.containsAll(targD) == false || 
+                badCharacters.containsSome(targD) == true) {
                 logWrongScript("Source-Target", srcStr, targ);
                 failSourceTarg.add(c);
                 continue;
@@ -660,7 +660,7 @@ void RTTest::test2(UBool quickRt, int32_t density) {
         }
 
         UnicodeString cs2;
-        Normalizer::decompose(srcStr, FALSE, 0, cs2, status);
+        Normalizer::decompose(srcStr, false, 0, cs2, status);
         if (U_FAILURE(status)) {
             parent->errln("FAIL: Internal error during decomposition %s\n", u_errorName(status));
             return;
@@ -693,23 +693,23 @@ void RTTest::test2(UBool quickRt, int32_t density) {
             srcStr += (UChar32)d;
             UnicodeString targ = srcStr;
             sourceToTarget->transliterate(targ);
-            if (toTarget.containsAll(targ) == FALSE || 
-                badCharacters.containsSome(targ) == TRUE)
+            if (toTarget.containsAll(targ) == false || 
+                badCharacters.containsSome(targ) == true)
             {
                 UnicodeString targD;
-                Normalizer::decompose(targ, FALSE, 0, targD, status);
+                Normalizer::decompose(targ, false, 0, targD, status);
                 if (U_FAILURE(status)) {
                     parent->errln("FAIL: Internal error during decomposition %s\n", u_errorName(status));
                     return;
                 }
-                if (toTarget.containsAll(targD) == FALSE ||
-                    badCharacters.containsSome(targD) == TRUE) {
+                if (toTarget.containsAll(targD) == false ||
+                    badCharacters.containsSome(targD) == true) {
                     logWrongScript("Source-Target", srcStr, targ);
                     continue;
                 }
             }
             UnicodeString cs2;
-            Normalizer::decompose(srcStr, FALSE, 0, cs2, status);
+            Normalizer::decompose(srcStr, false, 0, cs2, status);
             if (U_FAILURE(status)) {
                 parent->errln("FAIL: Internal error during decomposition %s\n", u_errorName(status));
                 return;
@@ -744,35 +744,35 @@ void RTTest::test2(UBool quickRt, int32_t density) {
         reverse = targ;
         sourceToTarget->transliterate(reverse);
 
-        if (toSource.containsAll(targ) == FALSE ||
-            badCharacters.containsSome(targ) == TRUE) {
+        if (toSource.containsAll(targ) == false ||
+            badCharacters.containsSome(targ) == true) {
             UnicodeString targD;
-            Normalizer::decompose(targ, FALSE, 0, targD, status);
+            Normalizer::decompose(targ, false, 0, targD, status);
             if (U_FAILURE(status)) {
                 parent->errln("FAIL: Internal error during decomposition%s\n", u_errorName(status));
                 return;
             }
-            if (toSource.containsAll(targD) == FALSE) {
+            if (toSource.containsAll(targD) == false) {
                 logWrongScript("Target-Source", srcStr, targ);
                 failTargSource.add(c);
                 continue;
             }
-            if (badCharacters.containsSome(targD) == TRUE) {
+            if (badCharacters.containsSome(targD) == true) {
                 logWrongScript("Target-Source*", srcStr, targ);
                 failTargSource.add(c);
                 continue;
             }
         }
-        if (isSame(srcStr, reverse) == FALSE && 
-            roundtripExclusionsSet.contains(c) == FALSE
-            && roundtripExclusionsSet.contains(srcStr)==FALSE) {
+        if (isSame(srcStr, reverse) == false && 
+            roundtripExclusionsSet.contains(c) == false
+            && roundtripExclusionsSet.contains(srcStr)==false) {
             logRoundTripFailure(srcStr,targetToSource->getID(), targ,sourceToTarget->getID(), reverse);
             failRound.add(c);
             continue;
         } 
         
         UnicodeString targ2;
-        Normalizer::decompose(targ, FALSE, 0, targ2, status);
+        Normalizer::decompose(targ, false, 0, targ2, status);
         if (U_FAILURE(status)) {
             parent->errln("FAIL: Internal error during decomposition%s\n", u_errorName(status));
             return;
@@ -819,34 +819,34 @@ void RTTest::test2(UBool quickRt, int32_t density) {
             reverse = targ;
             sourceToTarget->transliterate(reverse);
 
-            if (toSource.containsAll(targ) == FALSE || 
-                badCharacters.containsSome(targ) == TRUE) 
+            if (toSource.containsAll(targ) == false || 
+                badCharacters.containsSome(targ) == true) 
             {
                 targD.truncate(0);  // empty the variable without construction/destruction
-                Normalizer::decompose(targ, FALSE, 0, targD, status);
+                Normalizer::decompose(targ, false, 0, targD, status);
                 if (U_FAILURE(status)) {
                     parent->errln("FAIL: Internal error during decomposition%s\n", 
                                u_errorName(status));
                     return;
                 }
-                if (toSource.containsAll(targD) == FALSE 
-                    || badCharacters.containsSome(targD) == TRUE)
+                if (toSource.containsAll(targD) == false 
+                    || badCharacters.containsSome(targD) == true)
                 {
                     logWrongScript("Target-Source", srcStr, targ);
                     continue;
                 }
             }
-            if (isSame(srcStr, reverse) == FALSE && 
-                roundtripExclusionsSet.contains(c) == FALSE&&
-                roundtripExclusionsSet.contains(d) == FALSE &&
-                roundtripExclusionsSet.contains(srcStr)== FALSE)
+            if (isSame(srcStr, reverse) == false && 
+                roundtripExclusionsSet.contains(c) == false&&
+                roundtripExclusionsSet.contains(d) == false &&
+                roundtripExclusionsSet.contains(srcStr)== false)
             {
                 logRoundTripFailure(srcStr,targetToSource->getID(), targ, sourceToTarget->getID(),reverse);
                 continue;
             } 
         
             targ2.truncate(0);  // empty the variable without construction/destruction
-            Normalizer::decompose(targ, FALSE, 0, targ2, status);
+            Normalizer::decompose(targ, false, 0, targ2, status);
             if (U_FAILURE(status)) {
                 parent->errln("FAIL: Internal error during decomposition%s\n", u_errorName(status));
                 return;
@@ -914,7 +914,7 @@ void RTTest::logRoundTripFailure(const UnicodeString& from,
                                  const UnicodeString& to,
                                  const UnicodeString& backID,
                                  const UnicodeString& back) {
-    if (legalSource->is(from) == FALSE) return; // skip illegals
+    if (legalSource->is(from) == false) return; // skip illegals
 
     parent->errln((UnicodeString)"FAIL Roundtrip: " +
                from + "(" + TestUtility::hex(from) + ") => " +
@@ -1023,7 +1023,7 @@ static void writeStringInU8(FILE *out, const UnicodeString &s) {
     for (i=0; i1) && 
                     vowelSignSet.contains(sourceString.charAt(1)))){
-        return FALSE;
+        return false;
     }
-    return TRUE;
+    return true;
 }
 LegalIndic::LegalIndic(){
         UErrorCode status = U_ZERO_ERROR;
@@ -1605,7 +1605,7 @@ void TransliteratorRoundTripTest::TestDebug(const char* name,const char fromSet[
 }
 
 void TransliteratorRoundTripTest::TestInterIndic() {
-    //TestDebug("Latin-Gurmukhi", latinForIndic, "[:Gurmukhi:]","[\\u0965\\u0a02\\u0a72\\u0a73\\u0a74]",TRUE);
+    //TestDebug("Latin-Gurmukhi", latinForIndic, "[:Gurmukhi:]","[\\u0965\\u0a02\\u0a72\\u0a73\\u0a74]",true);
     int32_t num = UPRV_LENGTHOF(interIndicArray)/INTER_INDIC_ARRAY_WIDTH;
     if(quick){
         logln("Testing only 5 of %i. Skipping rest (use -e for exhaustive)",num);
diff --git a/icu4c/source/test/intltest/transtst.cpp b/icu4c/source/test/intltest/transtst.cpp
index aaf283f7a4e..4a2f2177f86 100644
--- a/icu4c/source/test/intltest/transtst.cpp
+++ b/icu4c/source/test/intltest/transtst.cpp
@@ -221,7 +221,7 @@ void TransliteratorTest::TestInstantiation() {
     for (int32_t i=0; isnext(ec);
         if (!assertSuccess("snext()", ec) ||
-            !assertTrue("snext()!=NULL", (&id)!=NULL, TRUE)) {
+            !assertTrue("snext()!=NULL", (&id)!=NULL, true)) {
             break;
         }
         UnicodeString id2 = Transliterator::getAvailableID(i);
@@ -251,8 +251,8 @@ void TransliteratorTest::TestInstantiation() {
                       /*", parse error " + parseError.code +*/
                       ", line " + parseError.line +
                       ", offset " + parseError.offset +
-                      ", pre-context " + prettify(parseError.preContext, TRUE) +
-                      ", post-context " +prettify(parseError.postContext,TRUE) +
+                      ", pre-context " + prettify(parseError.preContext, true) +
+                      ", post-context " +prettify(parseError.postContext,true) +
                       ", Error: " + u_errorName(status));
                 // When createInstance fails, it deletes the failing
                 // entry from the available ID list.  We detect this
@@ -267,7 +267,7 @@ void TransliteratorTest::TestInstantiation() {
 
             // Now test toRules
             UnicodeString rules;
-            t->toRules(rules, TRUE);
+            t->toRules(rules, true);
             Transliterator *u = Transliterator::createFromRules("x",
                                     rules, UTRANS_FORWARD, parseError,status);
             if (u == 0) {
@@ -276,8 +276,8 @@ void TransliteratorTest::TestInstantiation() {
                       /*", parse error " + parseError.code +*/
                       ", line " + parseError.line +
                       ", offset " + parseError.offset +
-                      ", context " + prettify(parseError.preContext, TRUE) +
-                      ", rules: " + prettify(rules, TRUE));
+                      ", context " + prettify(parseError.preContext, true) +
+                      ", rules: " + prettify(rules, true));
             } else {
                 delete u;
             }
@@ -670,7 +670,7 @@ class TestFilter : public UnicodeFilter {
         return result;
     }
     virtual UBool matchesIndexValue(uint8_t /*v*/) const override {
-        return FALSE;
+        return false;
     }
     virtual void addMatchSetTo(UnicodeSet& /*toUnionTo*/) const override {}
 public:
@@ -827,11 +827,11 @@ void TransliteratorTest::TestJ277(void) {
         }
         UnicodeString out(data[i]);
         gl->transliterate(out);
-        UBool ok = TRUE;
+        UBool ok = true;
         if (data[i].length() >= 2 && out.length() >= 2 &&
             u_isupper(data[i].charAt(0)) && u_islower(data[i].charAt(1))) {
             if (!(u_isupper(out.charAt(0)) && u_islower(out.charAt(1)))) {
-                ok = FALSE;
+                ok = false;
             }
         }
         if (ok) {
@@ -878,8 +878,8 @@ void TransliteratorTest::TestJ243(void) {
 void TransliteratorTest::TestJ329(void) {
     
     struct { UBool containsErrors; const char* rule; } DATA[] = {
-        { FALSE, "a > b; c > d" },
-        { TRUE,  "a > b; no operator; c > d" },
+        { false, "a > b; c > d" },
+        { true,  "a > b; no operator; c > d" },
     };
     int32_t DATA_length = UPRV_LENGTHOF(DATA);
 
@@ -1609,7 +1609,7 @@ void TransliteratorTest::TestCompoundRBT(void) {
     expect(*t, UNICODE_STRING_SIMPLE("\\u0043at in the hat, bat on the mat"),
            "C.A.t IN tHE H.A.t, .B..A.t ON tHE M.A.t");
     UnicodeString r;
-    t->toRules(r, TRUE);
+    t->toRules(r, true);
     if (r == rule) {
         logln((UnicodeString)"OK: toRules() => " + r);
     } else {
@@ -1625,7 +1625,7 @@ void TransliteratorTest::TestCompoundRBT(void) {
         return;
     }
     UnicodeString exp("::Greek-Latin;\n::Latin-Cyrillic;");
-    t->toRules(r, TRUE);
+    t->toRules(r, true);
     if (r != exp) {
         errln((UnicodeString)"FAIL: toRules() => " + r +
               ", expected " + exp);
@@ -1644,7 +1644,7 @@ void TransliteratorTest::TestCompoundRBT(void) {
     }
 
     // Test toRules again
-    t->toRules(r, TRUE);
+    t->toRules(r, true);
     if (r != exp) {
         errln((UnicodeString)"FAIL: toRules() => " + r +
               ", expected " + exp);
@@ -1824,8 +1824,8 @@ void TransliteratorTest::TestToRules(void) {
                 return;
             }
             UnicodeString rules, escapedRules;
-            t->toRules(rules, FALSE);
-            t->toRules(escapedRules, TRUE);
+            t->toRules(rules, false);
+            t->toRules(escapedRules, true);
             UnicodeString expRules = CharsToUnicodeString(DATA[d+2]);
             UnicodeString expEscapedRules(DATA[d+2], -1, US_INV);
             if (rules == expRules) {
@@ -1862,8 +1862,8 @@ void TransliteratorTest::TestToRules(void) {
                       " => " + toPat);
             } else {
                 errln((UnicodeString)"FAIL: " + pat +
-                      " => " + prettify(toPat, TRUE) +
-                      ", exp " + prettify(pat, TRUE));
+                      " => " + prettify(toPat, true) +
+                      ", exp " + prettify(pat, true));
             }
         }
     }
@@ -2568,7 +2568,7 @@ void TransliteratorTest::TestQuantifiedSegment(void) {
         return;
     }
     UnicodeString rr;
-    t->toRules(rr, TRUE);
+    t->toRules(rr, true);
     if (r != rr) {
         errln((UnicodeString)"FAIL: \"" + r + "\" x toRules() => \"" + rr + "\"");
     } else {
@@ -2585,7 +2585,7 @@ void TransliteratorTest::TestQuantifiedSegment(void) {
         delete t;
         return;
     }
-    t->toRules(rr, TRUE);
+    t->toRules(rr, true);
     if (r != rr) {
         errln((UnicodeString)"FAIL: \"" + r + "\" x toRules() => \"" + rr + "\"");
     } else {
@@ -3203,7 +3203,7 @@ static const UChar EMPTY[]   = {0};
 
 void TransliteratorTest::checkRules(const UnicodeString& label, Transliterator& t2,
                                     const UnicodeString& testRulesForward) {
-    UnicodeString rules2; t2.toRules(rules2, TRUE);
+    UnicodeString rules2; t2.toRules(rules2, true);
     //rules2 = TestUtility.replaceAll(rules2, new UnicodeSet("[' '\n\r]"), "");
     rules2.findAndReplace(SPACE, EMPTY);
     rules2.findAndReplace(NEWLINE, EMPTY);
@@ -3337,8 +3337,8 @@ void TransliteratorTest::TestAnchorMasking(){
               /*", parse error " + parseError.code +*/
               ", line " + parseError.line +
               ", offset " + parseError.offset +
-              ", context " + prettify(parseError.preContext, TRUE) +
-              ", rules: " + prettify(rule, TRUE));
+              ", context " + prettify(parseError.preContext, true) +
+              ", rules: " + prettify(rule, true));
     }
     delete t;
 }
@@ -3715,7 +3715,7 @@ void TransliteratorTest::CheckIncrementalAux(const Transliterator* t,
         errln((UnicodeString)"FAIL: transliterate() error " + u_errorName(ec));
         return;
     }
-    UBool gotError = FALSE;
+    UBool gotError = false;
     (void)gotError;    // Suppress set but not used warning.
 
     // we have a few special cases. Any-Remove (pos.start = 0, but also = limit) and U+XXXXX?X?
@@ -3723,7 +3723,7 @@ void TransliteratorTest::CheckIncrementalAux(const Transliterator* t,
     if (pos.start == 0 && pos.limit != 0 && t->getID() != "Hex-Any/Unicode") {
         errln((UnicodeString)"No Progress, " +
               t->getID() + ": " + formatInput(test, input, pos));
-        gotError = TRUE;
+        gotError = true;
     } else {
         logln((UnicodeString)"PASS Progress, " +
               t->getID() + ": " + formatInput(test, input, pos));
@@ -3732,7 +3732,7 @@ void TransliteratorTest::CheckIncrementalAux(const Transliterator* t,
     if (pos.start != pos.limit) {
         errln((UnicodeString)"Incomplete, " +
               t->getID() + ": " + formatInput(test, input, pos));
-        gotError = TRUE;
+        gotError = true;
     }
 }
 
@@ -3752,7 +3752,7 @@ void TransliteratorTest::TestFunction() {
     }
     
     UnicodeString r;
-    t->toRules(r, TRUE);
+    t->toRules(r, true);
     if (r == rule) {
         logln((UnicodeString)"OK: toRules() => " + r);
     } else {
@@ -4059,15 +4059,15 @@ void TransliteratorTest::TestSourceTargetSet() {
     if (src == expSrc && trg == expTrg) {
         UnicodeString a, b;
         logln((UnicodeString)"Ok: " +
-              r + " => source = " + src.toPattern(a, TRUE) +
-              ", target = " + trg.toPattern(b, TRUE));
+              r + " => source = " + src.toPattern(a, true) +
+              ", target = " + trg.toPattern(b, true));
     } else {
         UnicodeString a, b, c, d;
         errln((UnicodeString)"FAIL: " +
-              r + " => source = " + src.toPattern(a, TRUE) +
-              ", expected " + expSrc.toPattern(b, TRUE) +
-              "; target = " + trg.toPattern(c, TRUE) +
-              ", expected " + expTrg.toPattern(d, TRUE));
+              r + " => source = " + src.toPattern(a, true) +
+              ", expected " + expSrc.toPattern(b, true) +
+              "; target = " + trg.toPattern(c, true) +
+              ", expected " + expTrg.toPattern(d, true));
     }
 
     delete t;
@@ -4500,7 +4500,7 @@ void TransliteratorTest::TestBeginEndToRules() {
             reportParseError(UnicodeString("FAIL: Couldn't create transliterator"), parseError, status);
         } else {
             UnicodeString rules;
-            t->toRules(rules, TRUE);
+            t->toRules(rules, true);
             Transliterator* t2 = Transliterator::createFromRules((UnicodeString)"Test case #" + (i / 3), rules,
                     UTRANS_FORWARD, parseError, status);
             if (U_FAILURE(status)) {
@@ -4526,7 +4526,7 @@ void TransliteratorTest::TestBeginEndToRules() {
         reportParseError(UnicodeString("FAIL: Couldn't create reversed transliterator"), parseError, status);
     } else {
         UnicodeString rules;
-        reversed->toRules(rules, FALSE);
+        reversed->toRules(rules, false);
         Transliterator* reversed2 = Transliterator::createFromRules("Reversed", rules, UTRANS_FORWARD,
                 parseError, status);
         if (U_FAILURE(status)) {
@@ -4573,8 +4573,8 @@ void TransliteratorTest::TestRegisterAlias() {
     UnicodeString rules1;
     UnicodeString rules2;
 
-    t1->toRules(rules1, TRUE);
-    t2->toRules(rules2, TRUE);
+    t1->toRules(rules1, true);
+    t2->toRules(rules2, true);
     if (rules1 != rules2)
         errln("Alias transliterators aren't the same");
 
@@ -4609,8 +4609,8 @@ void TransliteratorTest::TestRegisterAlias() {
         return;
     }
 
-    t1->toRules(rules1, TRUE);
-    t2->toRules(rules2, TRUE);
+    t1->toRules(rules1, true);
+    t2->toRules(rules2, true);
     if (rules1 != rules2)
         errln("Alias transliterators aren't the same");
 
@@ -4804,8 +4804,8 @@ void TransliteratorTest::reportParseError(const UnicodeString& message,
           /*", parse error " + parseError.code +*/
           ", line " + parseError.line +
           ", offset " + parseError.offset +
-          ", pre-context " + prettify(parseError.preContext, TRUE) +
-          ", post-context " + prettify(parseError.postContext,TRUE) +
+          ", pre-context " + prettify(parseError.preContext, true) +
+          ", post-context " + prettify(parseError.postContext,true) +
           ", Error: " + u_errorName(status));
 }
 
diff --git a/icu4c/source/test/intltest/trnserr.cpp b/icu4c/source/test/intltest/trnserr.cpp
index 1fc921fc79a..50cd8662ddd 100644
--- a/icu4c/source/test/intltest/trnserr.cpp
+++ b/icu4c/source/test/intltest/trnserr.cpp
@@ -189,14 +189,14 @@ void TransliteratorErrorTest::TestUnicodeSetErrors() {
 
 //void TransliteratorErrorTest::TestUniToHexErrors() {
 //    UErrorCode status = U_ZERO_ERROR;
-//    Transliterator *t = new UnicodeToHexTransliterator("", TRUE, NULL, status);
+//    Transliterator *t = new UnicodeToHexTransliterator("", true, NULL, status);
 //    if (U_SUCCESS(status)) {
 //        errln("FAIL: Created a UnicodeToHexTransliterator with an empty pattern.");
 //    }
 //    delete t;
 //
 //    status = U_ZERO_ERROR;
-//    t = new UnicodeToHexTransliterator("\\x", TRUE, NULL, status);
+//    t = new UnicodeToHexTransliterator("\\x", true, NULL, status);
 //    if (U_SUCCESS(status)) {
 //        errln("FAIL: Created a UnicodeToHexTransliterator with a bad pattern.");
 //    }
diff --git a/icu4c/source/test/intltest/tsdate.cpp b/icu4c/source/test/intltest/tsdate.cpp
index 6f81f6238e1..1522cf38ec3 100644
--- a/icu4c/source/test/intltest/tsdate.cpp
+++ b/icu4c/source/test/intltest/tsdate.cpp
@@ -153,9 +153,9 @@ void IntlTestDateFormat::tryDate(UDate theDate)
 
     int32_t dateMatch = 0;
     int32_t stringMatch = 0;
-    UBool dump = FALSE;
+    UBool dump = false;
 #if defined (U_CAL_DEBUG)
-    dump = TRUE;
+    dump = true;
 #endif
     int32_t i;
 
@@ -177,8 +177,8 @@ void IntlTestDateFormat::tryDate(UDate theDate)
         {
             describeTest();
             errln("**** FAIL, locale " + UnicodeString(locID,-1,US_INV) +
-                    ": Parse of " + prettify(string[i-1], FALSE) + " failed.");
-            dump = TRUE;
+                    ": Parse of " + prettify(string[i-1], false) + " failed.");
+            dump = true;
             break;
         }
         fFormat->format(date[i], string[i]);
@@ -189,7 +189,7 @@ void IntlTestDateFormat::tryDate(UDate theDate)
             describeTest();
             errln("**** FAIL, locale " + UnicodeString(locID,-1,US_INV) +
                     ": Date mismatch after match for " + string[i]);
-            dump = TRUE;
+            dump = true;
             break;
         }
         if (stringMatch == 0 && string[i] == string[i-1])
@@ -199,7 +199,7 @@ void IntlTestDateFormat::tryDate(UDate theDate)
             describeTest();
             errln("**** FAIL, locale " + UnicodeString(locID,-1,US_INV) +
                     ": String mismatch after match for " + string[i]);
-            dump = TRUE;
+            dump = true;
             break;
         }
         if (dateMatch > 0 && stringMatch > 0)
@@ -213,7 +213,7 @@ void IntlTestDateFormat::tryDate(UDate theDate)
         describeTest();
         errln((UnicodeString)"**** FAIL: No string and/or date match within " + fLimit
             + " iterations for the Date " + string[0] + "\t(" + theDate + ").");
-        dump = TRUE;
+        dump = true;
     }
 
     if (dump)
diff --git a/icu4c/source/test/intltest/tsdcfmsy.cpp b/icu4c/source/test/intltest/tsdcfmsy.cpp
index 526d88a3a79..957a1ced25d 100644
--- a/icu4c/source/test/intltest/tsdcfmsy.cpp
+++ b/icu4c/source/test/intltest/tsdcfmsy.cpp
@@ -126,13 +126,13 @@ void IntlTestDecimalFormatSymbols::testSymbols(/* char *par */)
     status = U_ZERO_ERROR;
     for (int32_t i = 0; i < (int32_t)UNUM_CURRENCY_SPACING_COUNT; i++) {
         UnicodeString enCurrencyPattern = en.getPatternForCurrencySpacing(
-             (UCurrencySpacing)i, TRUE, status);
+             (UCurrencySpacing)i, true, status);
         if(U_FAILURE(status)) {
             errln("Error: cannot get CurrencyMatch for locale:en");
             status = U_ZERO_ERROR;
         }
         UnicodeString frCurrencyPattern = fr.getPatternForCurrencySpacing(
-             (UCurrencySpacing)i, TRUE, status);
+             (UCurrencySpacing)i, true, status);
         if(U_FAILURE(status)) {
             errln("Error: cannot get CurrencyMatch for locale:fr");
         }
@@ -144,13 +144,13 @@ void IntlTestDecimalFormatSymbols::testSymbols(/* char *par */)
     status = U_ZERO_ERROR;
     for (int32_t i = 0; i < UNUM_CURRENCY_SPACING_COUNT; i++) {
         UnicodeString enCurrencyPattern = en.getPatternForCurrencySpacing(
-            (UCurrencySpacing)i, FALSE, status);
+            (UCurrencySpacing)i, false, status);
         if(U_FAILURE(status)) {
             errln("Error: cannot get CurrencyMatch for locale:en");
             status = U_ZERO_ERROR;
         }
         UnicodeString frCurrencyPattern = fr.getPatternForCurrencySpacing(
-             (UCurrencySpacing)i, FALSE, status);
+             (UCurrencySpacing)i, false, status);
         if(U_FAILURE(status)) {
             errln("Error: cannot get CurrencyMatch for locale:fr");
         }
@@ -161,9 +161,9 @@ void IntlTestDecimalFormatSymbols::testSymbols(/* char *par */)
     // Test set curerncySpacing APIs
     status = U_ZERO_ERROR;
     UnicodeString dash = UnicodeString("-");
-    en.setPatternForCurrencySpacing(UNUM_CURRENCY_INSERT, TRUE, dash);
+    en.setPatternForCurrencySpacing(UNUM_CURRENCY_INSERT, true, dash);
     UnicodeString enCurrencyInsert = en.getPatternForCurrencySpacing(
-        UNUM_CURRENCY_INSERT, TRUE, status);
+        UNUM_CURRENCY_INSERT, true, status);
     if (dash != enCurrencyInsert) {
         errln("Error: Failed to setCurrencyInsert for locale:en");
     }
@@ -278,7 +278,7 @@ void IntlTestDecimalFormatSymbols::testDigitSymbols() {
             ? DecimalFormatSymbols::kZeroDigitSymbol
             : static_cast
                 (DecimalFormatSymbols::kOneDigitSymbol + i - 1);
-        symbols.setSymbol(key, UnicodeString(osmanyaDigitStrings[i]), FALSE);
+        symbols.setSymbol(key, UnicodeString(osmanyaDigitStrings[i]), false);
     }
     // NOTE: in ICU4J, the calculation of codePointZero is smarter;
     // in ICU4C, it is more conservative and is only set if propagateDigits is true.
@@ -294,7 +294,7 @@ void IntlTestDecimalFormatSymbols::testDigitSymbols() {
     // Check Osmanya codePointZero
     symbols.setSymbol(
         DecimalFormatSymbols::kZeroDigitSymbol,
-        UnicodeString(osmanyaDigitStrings[0]), TRUE);
+        UnicodeString(osmanyaDigitStrings[0]), true);
     if (osmanyaZero != symbols.getCodePointZero()) {
         errln("ERROR: Code point zero be Osmanya code point zero");
     }
@@ -327,7 +327,7 @@ void IntlTestDecimalFormatSymbols::testDigitSymbols() {
     }
 
     // Setting a digit somewhere in the middle should invalidate codePointZero
-    symbols.setSymbol(DecimalFormatSymbols::kOneDigitSymbol, u"foo", FALSE);
+    symbols.setSymbol(DecimalFormatSymbols::kOneDigitSymbol, u"foo", false);
     if (-1 != symbols.getCodePointZero()) {
         errln("ERROR: Code point zero be invalid");
     }
diff --git a/icu4c/source/test/intltest/tsdtfmsy.cpp b/icu4c/source/test/intltest/tsdtfmsy.cpp
index 76440c30cd5..311684afcac 100644
--- a/icu4c/source/test/intltest/tsdtfmsy.cpp
+++ b/icu4c/source/test/intltest/tsdtfmsy.cpp
@@ -135,10 +135,10 @@ UBool IntlTestDateFormatSymbols::UnicodeStringsArePrefixes(int32_t count, int32_
     for (i = 0; i < count; i++) {
         if (baseArray[i].compare(0, prefixLen, prefixArray[i]) != 0) {
             errln("ERROR: Mismatch example: expect prefix \"" + prefixArray[i] + "\" of base \"" + baseArray[i] + "\".");
-            return FALSE;
+            return false;
         }
     }
-    return TRUE;
+    return true;
 }
 
 void IntlTestDateFormatSymbols::TestGetSetSpecificItems()
diff --git a/icu4c/source/test/intltest/tsmthred.cpp b/icu4c/source/test/intltest/tsmthred.cpp
index dd8b725965f..7cff70051b9 100644
--- a/icu4c/source/test/intltest/tsmthred.cpp
+++ b/icu4c/source/test/intltest/tsmthred.cpp
@@ -381,7 +381,7 @@ ThreadSafeFormat::ThreadSafeFormat(UErrorCode &status) {
 static const UChar *kUSD = u"USD";
 
 UBool ThreadSafeFormat::doStuff(int32_t offset, UnicodeString &appendErr, UErrorCode &status) const {
-  UBool okay = TRUE;
+  UBool okay = true;
 
   if(u_strcmp(fFormat->getCurrency(), kUSD)) {
     appendErr.append(u"fFormat currency != ")
@@ -389,7 +389,7 @@ UBool ThreadSafeFormat::doStuff(int32_t offset, UnicodeString &appendErr, UError
       .append(u", =")
       .append(fFormat->getCurrency())
       .append(u"! ");
-    okay = FALSE;
+    okay = false;
   }
 
   if(u_strcmp(gSharedData->fFormat->getCurrency(), kUSD)) {
@@ -398,7 +398,7 @@ UBool ThreadSafeFormat::doStuff(int32_t offset, UnicodeString &appendErr, UError
       .append(u", =")
       .append(gSharedData->fFormat->getCurrency())
       .append(u"! ");
-    okay = FALSE;
+    okay = false;
   }
   UnicodeString str;
   const UnicodeString *o=NULL;
@@ -414,13 +414,13 @@ UBool ThreadSafeFormat::doStuff(int32_t offset, UnicodeString &appendErr, UError
 
   if(*o != str) {
     appendErr.append(showDifference(*o, str));
-    okay = FALSE;
+    okay = false;
   }
   return okay;
 }
 
 UBool U_CALLCONV isAcceptable(void *, const char *, const char *, const UDataInfo *) {
-    return TRUE;
+    return true;
 }
 
 //static UMTX debugMutex = NULL;
@@ -665,7 +665,7 @@ void MultithreadTest::TestThreadedIntl()
     UErrorCode threadSafeErr = U_ZERO_ERROR;
 
     ThreadSafeFormatSharedData sharedData(threadSafeErr);
-    assertSuccess(WHERE, threadSafeErr, TRUE);
+    assertSuccess(WHERE, threadSafeErr, true);
 
     //
     //  Create and start the test threads
@@ -729,7 +729,7 @@ public:
         coll(NULL),
         lines(NULL),
         noLines(0),
-        isAtLeastUCA62(TRUE)
+        isAtLeastUCA62(true)
     {
     }
     void setCollator(Collator *c, Line *l, int32_t nl, UBool atLeastUCA62)
diff --git a/icu4c/source/test/intltest/tsputil.cpp b/icu4c/source/test/intltest/tsputil.cpp
index a59d37bcf3b..b566c850eaf 100644
--- a/icu4c/source/test/intltest/tsputil.cpp
+++ b/icu4c/source/test/intltest/tsputil.cpp
@@ -108,76 +108,76 @@ PUtilTest::testMaxMin()
     nzero *= -1;
 
     // +Inf with -Inf
-    maxMinTest(pinf, ninf, pinf, TRUE);
-    maxMinTest(pinf, ninf, ninf, FALSE);
+    maxMinTest(pinf, ninf, pinf, true);
+    maxMinTest(pinf, ninf, ninf, false);
 
     // +Inf with +0 and -0
-    maxMinTest(pinf, pzero, pinf, TRUE);
-    maxMinTest(pinf, pzero, pzero, FALSE);
-    maxMinTest(pinf, nzero, pinf, TRUE);
-    maxMinTest(pinf, nzero, nzero, FALSE);
+    maxMinTest(pinf, pzero, pinf, true);
+    maxMinTest(pinf, pzero, pzero, false);
+    maxMinTest(pinf, nzero, pinf, true);
+    maxMinTest(pinf, nzero, nzero, false);
 
     // -Inf with +0 and -0
-    maxMinTest(ninf, pzero, pzero, TRUE);
-    maxMinTest(ninf, pzero, ninf, FALSE);
-    maxMinTest(ninf, nzero, nzero, TRUE);
-    maxMinTest(ninf, nzero, ninf, FALSE);
+    maxMinTest(ninf, pzero, pzero, true);
+    maxMinTest(ninf, pzero, ninf, false);
+    maxMinTest(ninf, nzero, nzero, true);
+    maxMinTest(ninf, nzero, ninf, false);
 
     // NaN with +Inf and -Inf
-    maxMinTest(pinf, nan, nan, TRUE);
-    maxMinTest(pinf, nan, nan, FALSE);
-    maxMinTest(ninf, nan, nan, TRUE);
-    maxMinTest(ninf, nan, nan, FALSE);
+    maxMinTest(pinf, nan, nan, true);
+    maxMinTest(pinf, nan, nan, false);
+    maxMinTest(ninf, nan, nan, true);
+    maxMinTest(ninf, nan, nan, false);
 
     // NaN with NaN
-    maxMinTest(nan, nan, nan, TRUE);
-    maxMinTest(nan, nan, nan, FALSE);
+    maxMinTest(nan, nan, nan, true);
+    maxMinTest(nan, nan, nan, false);
 
     // NaN with +0 and -0
-    maxMinTest(nan, pzero, nan, TRUE);
-    maxMinTest(nan, pzero, nan, FALSE);
-    maxMinTest(nan, nzero, nan, TRUE);
-    maxMinTest(nan, nzero, nan, FALSE);
+    maxMinTest(nan, pzero, nan, true);
+    maxMinTest(nan, pzero, nan, false);
+    maxMinTest(nan, nzero, nan, true);
+    maxMinTest(nan, nzero, nan, false);
 
     // +Inf with DBL_MAX and DBL_MIN
-    maxMinTest(pinf, DBL_MAX, pinf, TRUE);
-    maxMinTest(pinf, -DBL_MAX, pinf, TRUE);
-    maxMinTest(pinf, DBL_MIN, pinf, TRUE);
-    maxMinTest(pinf, -DBL_MIN, pinf, TRUE);
-    maxMinTest(pinf, DBL_MIN, DBL_MIN, FALSE);
-    maxMinTest(pinf, -DBL_MIN, -DBL_MIN, FALSE);
-    maxMinTest(pinf, DBL_MAX, DBL_MAX, FALSE);
-    maxMinTest(pinf, -DBL_MAX, -DBL_MAX, FALSE);
+    maxMinTest(pinf, DBL_MAX, pinf, true);
+    maxMinTest(pinf, -DBL_MAX, pinf, true);
+    maxMinTest(pinf, DBL_MIN, pinf, true);
+    maxMinTest(pinf, -DBL_MIN, pinf, true);
+    maxMinTest(pinf, DBL_MIN, DBL_MIN, false);
+    maxMinTest(pinf, -DBL_MIN, -DBL_MIN, false);
+    maxMinTest(pinf, DBL_MAX, DBL_MAX, false);
+    maxMinTest(pinf, -DBL_MAX, -DBL_MAX, false);
 
     // -Inf with DBL_MAX and DBL_MIN
-    maxMinTest(ninf, DBL_MAX, DBL_MAX, TRUE);
-    maxMinTest(ninf, -DBL_MAX, -DBL_MAX, TRUE);
-    maxMinTest(ninf, DBL_MIN, DBL_MIN, TRUE);
-    maxMinTest(ninf, -DBL_MIN, -DBL_MIN, TRUE);
-    maxMinTest(ninf, DBL_MIN, ninf, FALSE);
-    maxMinTest(ninf, -DBL_MIN, ninf, FALSE);
-    maxMinTest(ninf, DBL_MAX, ninf, FALSE);
-    maxMinTest(ninf, -DBL_MAX, ninf, FALSE);
+    maxMinTest(ninf, DBL_MAX, DBL_MAX, true);
+    maxMinTest(ninf, -DBL_MAX, -DBL_MAX, true);
+    maxMinTest(ninf, DBL_MIN, DBL_MIN, true);
+    maxMinTest(ninf, -DBL_MIN, -DBL_MIN, true);
+    maxMinTest(ninf, DBL_MIN, ninf, false);
+    maxMinTest(ninf, -DBL_MIN, ninf, false);
+    maxMinTest(ninf, DBL_MAX, ninf, false);
+    maxMinTest(ninf, -DBL_MAX, ninf, false);
 
     // +0 with DBL_MAX and DBL_MIN
-    maxMinTest(pzero, DBL_MAX, DBL_MAX, TRUE);
-    maxMinTest(pzero, -DBL_MAX, pzero, TRUE);
-    maxMinTest(pzero, DBL_MIN, DBL_MIN, TRUE);
-    maxMinTest(pzero, -DBL_MIN, pzero, TRUE);
-    maxMinTest(pzero, DBL_MIN, pzero, FALSE);
-    maxMinTest(pzero, -DBL_MIN, -DBL_MIN, FALSE);
-    maxMinTest(pzero, DBL_MAX, pzero, FALSE);
-    maxMinTest(pzero, -DBL_MAX, -DBL_MAX, FALSE);
+    maxMinTest(pzero, DBL_MAX, DBL_MAX, true);
+    maxMinTest(pzero, -DBL_MAX, pzero, true);
+    maxMinTest(pzero, DBL_MIN, DBL_MIN, true);
+    maxMinTest(pzero, -DBL_MIN, pzero, true);
+    maxMinTest(pzero, DBL_MIN, pzero, false);
+    maxMinTest(pzero, -DBL_MIN, -DBL_MIN, false);
+    maxMinTest(pzero, DBL_MAX, pzero, false);
+    maxMinTest(pzero, -DBL_MAX, -DBL_MAX, false);
 
     // -0 with DBL_MAX and DBL_MIN
-    maxMinTest(nzero, DBL_MAX, DBL_MAX, TRUE);
-    maxMinTest(nzero, -DBL_MAX, nzero, TRUE);
-    maxMinTest(nzero, DBL_MIN, DBL_MIN, TRUE);
-    maxMinTest(nzero, -DBL_MIN, nzero, TRUE);
-    maxMinTest(nzero, DBL_MIN, nzero, FALSE);
-    maxMinTest(nzero, -DBL_MIN, -DBL_MIN, FALSE);
-    maxMinTest(nzero, DBL_MAX, nzero, FALSE);
-    maxMinTest(nzero, -DBL_MAX, -DBL_MAX, FALSE);
+    maxMinTest(nzero, DBL_MAX, DBL_MAX, true);
+    maxMinTest(nzero, -DBL_MAX, nzero, true);
+    maxMinTest(nzero, DBL_MIN, DBL_MIN, true);
+    maxMinTest(nzero, -DBL_MIN, nzero, true);
+    maxMinTest(nzero, DBL_MIN, nzero, false);
+    maxMinTest(nzero, -DBL_MIN, -DBL_MIN, false);
+    maxMinTest(nzero, DBL_MAX, nzero, false);
+    maxMinTest(nzero, -DBL_MAX, -DBL_MAX, false);
 }
 
 void
@@ -244,32 +244,32 @@ PUtilTest::testPositiveInfinity(void)
     double  ninf    = -uprv_getInfinity();
     double  ten     = 10.0;
 
-    if(uprv_isInfinite(pinf) != TRUE) {
-        errln("FAIL: isInfinite(+Infinity) returned FALSE, should be TRUE.");
+    if(uprv_isInfinite(pinf) != true) {
+        errln("FAIL: isInfinite(+Infinity) returned false, should be true.");
     }
 
-    if(uprv_isPositiveInfinity(pinf) != TRUE) {
-        errln("FAIL: isPositiveInfinity(+Infinity) returned FALSE, should be TRUE.");
+    if(uprv_isPositiveInfinity(pinf) != true) {
+        errln("FAIL: isPositiveInfinity(+Infinity) returned false, should be true.");
     }
 
-    if(uprv_isNegativeInfinity(pinf) != FALSE) {
-        errln("FAIL: isNegativeInfinity(+Infinity) returned TRUE, should be FALSE.");
+    if(uprv_isNegativeInfinity(pinf) != false) {
+        errln("FAIL: isNegativeInfinity(+Infinity) returned true, should be false.");
     }
 
-    if((pinf > DBL_MAX) != TRUE) {
-        errln("FAIL: +Infinity > DBL_MAX returned FALSE, should be TRUE.");
+    if((pinf > DBL_MAX) != true) {
+        errln("FAIL: +Infinity > DBL_MAX returned false, should be true.");
     }
 
-    if((pinf > DBL_MIN) != TRUE) {
-        errln("FAIL: +Infinity > DBL_MIN returned FALSE, should be TRUE.");
+    if((pinf > DBL_MIN) != true) {
+        errln("FAIL: +Infinity > DBL_MIN returned false, should be true.");
     }
 
-    if((pinf > ninf) != TRUE) {
-        errln("FAIL: +Infinity > -Infinity returned FALSE, should be TRUE.");
+    if((pinf > ninf) != true) {
+        errln("FAIL: +Infinity > -Infinity returned false, should be true.");
     }
 
-    if((pinf > ten) != TRUE) {
-        errln("FAIL: +Infinity > 10.0 returned FALSE, should be TRUE.");
+    if((pinf > ten) != true) {
+        errln("FAIL: +Infinity > 10.0 returned false, should be true.");
     }
 }
 
@@ -282,40 +282,40 @@ PUtilTest::testNegativeInfinity(void)
     double  ninf    = -uprv_getInfinity();
     double  ten     = 10.0;
 
-    if(uprv_isInfinite(ninf) != TRUE) {
-        errln("FAIL: isInfinite(-Infinity) returned FALSE, should be TRUE.");
+    if(uprv_isInfinite(ninf) != true) {
+        errln("FAIL: isInfinite(-Infinity) returned false, should be true.");
     }
 
-    if(uprv_isNegativeInfinity(ninf) != TRUE) {
-        errln("FAIL: isNegativeInfinity(-Infinity) returned FALSE, should be TRUE.");
+    if(uprv_isNegativeInfinity(ninf) != true) {
+        errln("FAIL: isNegativeInfinity(-Infinity) returned false, should be true.");
     }
 
-    if(uprv_isPositiveInfinity(ninf) != FALSE) {
-        errln("FAIL: isPositiveInfinity(-Infinity) returned TRUE, should be FALSE.");
+    if(uprv_isPositiveInfinity(ninf) != false) {
+        errln("FAIL: isPositiveInfinity(-Infinity) returned true, should be false.");
     }
 
-    if((ninf < DBL_MAX) != TRUE) {
-        errln("FAIL: -Infinity < DBL_MAX returned FALSE, should be TRUE.");
+    if((ninf < DBL_MAX) != true) {
+        errln("FAIL: -Infinity < DBL_MAX returned false, should be true.");
     }
 
-    if((ninf < DBL_MIN) != TRUE) {
-        errln("FAIL: -Infinity < DBL_MIN returned FALSE, should be TRUE.");
+    if((ninf < DBL_MIN) != true) {
+        errln("FAIL: -Infinity < DBL_MIN returned false, should be true.");
     }
 
-    if((ninf < pinf) != TRUE) {
-        errln("FAIL: -Infinity < +Infinity returned FALSE, should be TRUE.");
+    if((ninf < pinf) != true) {
+        errln("FAIL: -Infinity < +Infinity returned false, should be true.");
     }
 
-    if((ninf < ten) != TRUE) {
-        errln("FAIL: -Infinity < 10.0 returned FALSE, should be TRUE.");
+    if((ninf < ten) != true) {
+        errln("FAIL: -Infinity < 10.0 returned false, should be true.");
     }
 }
 
 //==============================
 
 // notes about zero:
-// -0.0 == 0.0 == TRUE
-// -0.0 <  0.0 == FALSE
+// -0.0 == 0.0 == true
+// -0.0 <  0.0 == false
 // generating -0.0 must be done at runtime.  compiler apparently ignores sign?
 void           
 PUtilTest::testZero(void)
@@ -326,40 +326,40 @@ PUtilTest::testZero(void)
 
     nzero = nzero * -1;
 
-    if((pzero == nzero) != TRUE) {
-        errln("FAIL: 0.0 == -0.0 returned FALSE, should be TRUE.");
+    if((pzero == nzero) != true) {
+        errln("FAIL: 0.0 == -0.0 returned false, should be true.");
     }
 
-    if((pzero > nzero) != FALSE) {
-        errln("FAIL: 0.0 > -0.0 returned TRUE, should be FALSE.");
+    if((pzero > nzero) != false) {
+        errln("FAIL: 0.0 > -0.0 returned true, should be false.");
     }
 
-    if((pzero >= nzero) != TRUE) {
-        errln("FAIL: 0.0 >= -0.0 returned FALSE, should be TRUE.");
+    if((pzero >= nzero) != true) {
+        errln("FAIL: 0.0 >= -0.0 returned false, should be true.");
     }
 
-    if((pzero < nzero) != FALSE) {
-        errln("FAIL: 0.0 < -0.0 returned TRUE, should be FALSE.");
+    if((pzero < nzero) != false) {
+        errln("FAIL: 0.0 < -0.0 returned true, should be false.");
     }
 
-    if((pzero <= nzero) != TRUE) {
-        errln("FAIL: 0.0 <= -0.0 returned FALSE, should be TRUE.");
+    if((pzero <= nzero) != true) {
+        errln("FAIL: 0.0 <= -0.0 returned false, should be true.");
     }
 #if U_PLATFORM != U_PF_OS400 /* OS/400 will generate divide by zero exception MCH1214 */
-    if(uprv_isInfinite(1/pzero) != TRUE) {
-        errln("FAIL: isInfinite(1/0.0) returned FALSE, should be TRUE.");
+    if(uprv_isInfinite(1/pzero) != true) {
+        errln("FAIL: isInfinite(1/0.0) returned false, should be true.");
     }
 
-    if(uprv_isInfinite(1/nzero) != TRUE) {
-        errln("FAIL: isInfinite(1/-0.0) returned FALSE, should be TRUE.");
+    if(uprv_isInfinite(1/nzero) != true) {
+        errln("FAIL: isInfinite(1/-0.0) returned false, should be true.");
     }
 
-    if(uprv_isPositiveInfinity(1/pzero) != TRUE) {
-        errln("FAIL: isPositiveInfinity(1/0.0) returned FALSE, should be TRUE.");
+    if(uprv_isPositiveInfinity(1/pzero) != true) {
+        errln("FAIL: isPositiveInfinity(1/0.0) returned false, should be true.");
     }
 
-    if(uprv_isNegativeInfinity(1/nzero) != TRUE) {
-        errln("FAIL: isNegativeInfinity(1/-0.0) returned FALSE, should be TRUE.");
+    if(uprv_isNegativeInfinity(1/nzero) != true) {
+        errln("FAIL: isNegativeInfinity(1/-0.0) returned false, should be true.");
     }
 #endif
 }
@@ -374,20 +374,20 @@ PUtilTest::testIsNaN(void)
     double  nan     = uprv_getNaN();
     double  ten     = 10.0;
 
-    if(uprv_isNaN(nan) == FALSE) {
-        errln("FAIL: isNaN() returned FALSE for NaN.");
+    if(uprv_isNaN(nan) == false) {
+        errln("FAIL: isNaN() returned false for NaN.");
     }
 
-    if(uprv_isNaN(pinf) == TRUE) {
-        errln("FAIL: isNaN() returned TRUE for +Infinity.");
+    if(uprv_isNaN(pinf) == true) {
+        errln("FAIL: isNaN() returned true for +Infinity.");
     }
 
-    if(uprv_isNaN(ninf) == TRUE) {
-        errln("FAIL: isNaN() returned TRUE for -Infinity.");
+    if(uprv_isNaN(ninf) == true) {
+        errln("FAIL: isNaN() returned true for -Infinity.");
     }
 
-    if(uprv_isNaN(ten) == TRUE) {
-        errln("FAIL: isNaN() returned TRUE for 10.0.");
+    if(uprv_isNaN(ten) == true) {
+        errln("FAIL: isNaN() returned true for 10.0.");
     }
 }
 
@@ -401,20 +401,20 @@ PUtilTest::NaNGT(void)
     double  nan     = uprv_getNaN();
     double  ten     = 10.0;
 
-    if((nan > nan) != FALSE) {
-        logln("WARNING: NaN > NaN returned TRUE, should be FALSE");
+    if((nan > nan) != false) {
+        logln("WARNING: NaN > NaN returned true, should be false");
     }
 
-    if((nan > pinf) != FALSE) {
-        logln("WARNING: NaN > +Infinity returned TRUE, should be FALSE");
+    if((nan > pinf) != false) {
+        logln("WARNING: NaN > +Infinity returned true, should be false");
     }
 
-    if((nan > ninf) != FALSE) {
-        logln("WARNING: NaN > -Infinity returned TRUE, should be FALSE");
+    if((nan > ninf) != false) {
+        logln("WARNING: NaN > -Infinity returned true, should be false");
     }
 
-    if((nan > ten) != FALSE) {
-        logln("WARNING: NaN > 10.0 returned TRUE, should be FALSE");
+    if((nan > ten) != false) {
+        logln("WARNING: NaN > 10.0 returned true, should be false");
     }
 }
 
@@ -428,20 +428,20 @@ PUtilTest::NaNLT(void)
     double  nan     = uprv_getNaN();
     double  ten     = 10.0;
 
-    if((nan < nan) != FALSE) {
-        logln("WARNING: NaN < NaN returned TRUE, should be FALSE");
+    if((nan < nan) != false) {
+        logln("WARNING: NaN < NaN returned true, should be false");
     }
 
-    if((nan < pinf) != FALSE) {
-        logln("WARNING: NaN < +Infinity returned TRUE, should be FALSE");
+    if((nan < pinf) != false) {
+        logln("WARNING: NaN < +Infinity returned true, should be false");
     }
 
-    if((nan < ninf) != FALSE) {
-        logln("WARNING: NaN < -Infinity returned TRUE, should be FALSE");
+    if((nan < ninf) != false) {
+        logln("WARNING: NaN < -Infinity returned true, should be false");
     }
 
-    if((nan < ten) != FALSE) {
-        logln("WARNING: NaN < 10.0 returned TRUE, should be FALSE");
+    if((nan < ten) != false) {
+        logln("WARNING: NaN < 10.0 returned true, should be false");
     }
 }
 
@@ -455,20 +455,20 @@ PUtilTest::NaNGTE(void)
     double  nan     = uprv_getNaN();
     double  ten     = 10.0;
 
-    if((nan >= nan) != FALSE) {
-        logln("WARNING: NaN >= NaN returned TRUE, should be FALSE");
+    if((nan >= nan) != false) {
+        logln("WARNING: NaN >= NaN returned true, should be false");
     }
 
-    if((nan >= pinf) != FALSE) {
-        logln("WARNING: NaN >= +Infinity returned TRUE, should be FALSE");
+    if((nan >= pinf) != false) {
+        logln("WARNING: NaN >= +Infinity returned true, should be false");
     }
 
-    if((nan >= ninf) != FALSE) {
-        logln("WARNING: NaN >= -Infinity returned TRUE, should be FALSE");
+    if((nan >= ninf) != false) {
+        logln("WARNING: NaN >= -Infinity returned true, should be false");
     }
 
-    if((nan >= ten) != FALSE) {
-        logln("WARNING: NaN >= 10.0 returned TRUE, should be FALSE");
+    if((nan >= ten) != false) {
+        logln("WARNING: NaN >= 10.0 returned true, should be false");
     }
 }
 
@@ -482,20 +482,20 @@ PUtilTest::NaNLTE(void)
     double  nan     = uprv_getNaN();
     double  ten     = 10.0;
 
-    if((nan <= nan) != FALSE) {
-        logln("WARNING: NaN <= NaN returned TRUE, should be FALSE");
+    if((nan <= nan) != false) {
+        logln("WARNING: NaN <= NaN returned true, should be false");
     }
 
-    if((nan <= pinf) != FALSE) {
-        logln("WARNING: NaN <= +Infinity returned TRUE, should be FALSE");
+    if((nan <= pinf) != false) {
+        logln("WARNING: NaN <= +Infinity returned true, should be false");
     }
 
-    if((nan <= ninf) != FALSE) {
-        logln("WARNING: NaN <= -Infinity returned TRUE, should be FALSE");
+    if((nan <= ninf) != false) {
+        logln("WARNING: NaN <= -Infinity returned true, should be false");
     }
 
-    if((nan <= ten) != FALSE) {
-        logln("WARNING: NaN <= 10.0 returned TRUE, should be FALSE");
+    if((nan <= ten) != false) {
+        logln("WARNING: NaN <= 10.0 returned true, should be false");
     }
 }
 
@@ -509,20 +509,20 @@ PUtilTest::NaNE(void)
     double  nan     = uprv_getNaN();
     double  ten     = 10.0;
 
-    if((nan == nan) != FALSE) {
-        logln("WARNING: NaN == NaN returned TRUE, should be FALSE");
+    if((nan == nan) != false) {
+        logln("WARNING: NaN == NaN returned true, should be false");
     }
 
-    if((nan == pinf) != FALSE) {
-        logln("WARNING: NaN == +Infinity returned TRUE, should be FALSE");
+    if((nan == pinf) != false) {
+        logln("WARNING: NaN == +Infinity returned true, should be false");
     }
 
-    if((nan == ninf) != FALSE) {
-        logln("WARNING: NaN == -Infinity returned TRUE, should be FALSE");
+    if((nan == ninf) != false) {
+        logln("WARNING: NaN == -Infinity returned true, should be false");
     }
 
-    if((nan == ten) != FALSE) {
-        logln("WARNING: NaN == 10.0 returned TRUE, should be FALSE");
+    if((nan == ten) != false) {
+        logln("WARNING: NaN == 10.0 returned true, should be false");
     }
 }
 
@@ -536,19 +536,19 @@ PUtilTest::NaNNE(void)
     double  nan     = uprv_getNaN();
     double  ten     = 10.0;
 
-    if((nan != nan) != TRUE) {
-        logln("WARNING: NaN != NaN returned FALSE, should be TRUE");
+    if((nan != nan) != true) {
+        logln("WARNING: NaN != NaN returned false, should be true");
     }
 
-    if((nan != pinf) != TRUE) {
-        logln("WARNING: NaN != +Infinity returned FALSE, should be TRUE");
+    if((nan != pinf) != true) {
+        logln("WARNING: NaN != +Infinity returned false, should be true");
     }
 
-    if((nan != ninf) != TRUE) {
-        logln("WARNING: NaN != -Infinity returned FALSE, should be TRUE");
+    if((nan != ninf) != true) {
+        logln("WARNING: NaN != -Infinity returned false, should be true");
     }
 
-    if((nan != ten) != TRUE) {
-        logln("WARNING: NaN != 10.0 returned FALSE, should be TRUE");
+    if((nan != ten) != true) {
+        logln("WARNING: NaN != 10.0 returned false, should be true");
     }
 }
diff --git a/icu4c/source/test/intltest/tstnorm.cpp b/icu4c/source/test/intltest/tstnorm.cpp
index 5c652e403f2..912861cb95c 100644
--- a/icu4c/source/test/intltest/tstnorm.cpp
+++ b/icu4c/source/test/intltest/tstnorm.cpp
@@ -883,8 +883,8 @@ ref_norm_compare(const UnicodeString &s1, const UnicodeString &s2, uint32_t opti
     int32_t normOptions=(int32_t)(options>>UNORM_COMPARE_NORM_OPTIONS_SHIFT);
 
     if(options&U_COMPARE_IGNORE_CASE) {
-        Normalizer::decompose(s1, FALSE, normOptions, r1, errorCode);
-        Normalizer::decompose(s2, FALSE, normOptions, r2, errorCode);
+        Normalizer::decompose(s1, false, normOptions, r1, errorCode);
+        Normalizer::decompose(s2, false, normOptions, r2, errorCode);
 
         r1.foldCase(options);
         r2.foldCase(options);
@@ -893,8 +893,8 @@ ref_norm_compare(const UnicodeString &s1, const UnicodeString &s2, uint32_t opti
         r2=s2;
     }
 
-    Normalizer::decompose(r1, FALSE, normOptions, t1, errorCode);
-    Normalizer::decompose(r2, FALSE, normOptions, t2, errorCode);
+    Normalizer::decompose(r1, false, normOptions, t1, errorCode);
+    Normalizer::decompose(r2, false, normOptions, t2, errorCode);
 
     if(options&U_COMPARE_CODE_POINT_ORDER) {
         return t1.compareCodePointOrder(t2);
@@ -1194,7 +1194,7 @@ BasicNormalizerTest::TestCompare() {
         nfcNorm2->getDecomposition(0x4e00, s2) ||
         nfcNorm2->getDecomposition(0x20002, s2)
     ) {
-        errln("NFC.getDecomposition() returns TRUE for characters which do not have decompositions");
+        errln("NFC.getDecomposition() returns true for characters which do not have decompositions");
     }
 
     // test getRawDecomposition() for some characters that do not decompose
@@ -1202,7 +1202,7 @@ BasicNormalizerTest::TestCompare() {
         nfcNorm2->getRawDecomposition(0x4e00, s2) ||
         nfcNorm2->getRawDecomposition(0x20002, s2)
     ) {
-        errln("NFC.getRawDecomposition() returns TRUE for characters which do not have decompositions");
+        errln("NFC.getRawDecomposition() returns true for characters which do not have decompositions");
     }
 
     // test composePair() for some pairs of characters that do not compose
@@ -1280,14 +1280,14 @@ BasicNormalizerTest::countFoldFCDExceptions(uint32_t foldingOptions) {
         s.setTo(c);
 
         // get leading and trailing cc for c
-        Normalizer::decompose(s, FALSE, 0, d, errorCode);
+        Normalizer::decompose(s, false, 0, d, errorCode);
         isNFD= s==d;
         cc=u_getCombiningClass(d.char32At(0));
         trailCC=u_getCombiningClass(d.char32At(d.length()-1));
 
         // get leading and trailing cc for the case-folding of c
         s.foldCase(foldingOptions);
-        Normalizer::decompose(s, FALSE, 0, d, errorCode);
+        Normalizer::decompose(s, false, 0, d, errorCode);
         foldCC=u_getCombiningClass(d.char32At(0));
         foldTrailCC=u_getCombiningClass(d.char32At(d.length()-1));
 
@@ -1438,12 +1438,12 @@ BasicNormalizerTest::TestSkippable() {
             // expectSets ourselves in initSkippables().
 
             s=UNICODE_STRING_SIMPLE("skip-expect=");
-            (diff=skipSets[i]).removeAll(expectSets[i]).toPattern(pattern, TRUE);
+            (diff=skipSets[i]).removeAll(expectSets[i]).toPattern(pattern, true);
             s.append(pattern);
 
             pattern.remove();
             s.append(UNICODE_STRING_SIMPLE("\n\nexpect-skip="));
-            (diff=expectSets[i]).removeAll(skipSets[i]).toPattern(pattern, TRUE);
+            (diff=expectSets[i]).removeAll(skipSets[i]).toPattern(pattern, true);
             s.append(pattern);
             s.append(UNICODE_STRING_SIMPLE("\n\n"));
 
@@ -1585,25 +1585,25 @@ BasicNormalizerTest::TestComposeUTF8WithEdits() {
     assertSuccess("normalizeUTF8 with Edits", errorCode.get());
     assertEquals("normalizeUTF8 with Edits", expected.data(), result.c_str());
     static const EditChange expectedChanges[] = {
-        { FALSE, 2, 2 },  // 2 spaces
-        { TRUE, 1, 1 },  // A→a
-        { TRUE, 2, 2 },  // Ä→ä
-        { TRUE, 3, 2 },  // A\u0308→ä
-        { TRUE, 7, 5 },  // A\u0308\u00ad\u0323→ạ\u0308 removes the soft hyphen
-        { TRUE, 4, 5 },  // Ä\u0323→ạ\u0308
-        { FALSE, 1, 1 },  // comma
-        { TRUE, 2, 0 },  // U+00AD soft hyphen maps to empty
-        { TRUE, 6, 3 },  // \u1100\u1161→가
-        { TRUE, 6, 3 },  // ę°€\u11A8→ę°
-        { TRUE, 6, 3 },  // ę°€\u3133→ę°
-        { FALSE, 2, 2 }  // 2 spaces
+        { false, 2, 2 },  // 2 spaces
+        { true, 1, 1 },  // A→a
+        { true, 2, 2 },  // Ä→ä
+        { true, 3, 2 },  // A\u0308→ä
+        { true, 7, 5 },  // A\u0308\u00ad\u0323→ạ\u0308 removes the soft hyphen
+        { true, 4, 5 },  // Ä\u0323→ạ\u0308
+        { false, 1, 1 },  // comma
+        { true, 2, 0 },  // U+00AD soft hyphen maps to empty
+        { true, 6, 3 },  // \u1100\u1161→가
+        { true, 6, 3 },  // ę°€\u11A8→ę°
+        { true, 6, 3 },  // ę°€\u3133→ę°
+        { false, 2, 2 }  // 2 spaces
     };
     assertTrue("normalizeUTF8 with Edits hasChanges", edits.hasChanges());
     assertEquals("normalizeUTF8 with Edits numberOfChanges", 9, edits.numberOfChanges());
     TestUtility::checkEditsIter(*this, u"normalizeUTF8 with Edits",
             edits.getFineIterator(), edits.getFineIterator(),
             expectedChanges, UPRV_LENGTHOF(expectedChanges),
-            TRUE, errorCode);
+            true, errorCode);
 
     assertFalse("isNormalizedUTF8(source)", nfkc_cf->isNormalizedUTF8(src, errorCode));
     assertTrue("isNormalizedUTF8(normalized)", nfkc_cf->isNormalizedUTF8(result, errorCode));
@@ -1620,7 +1620,7 @@ BasicNormalizerTest::TestComposeUTF8WithEdits() {
     TestUtility::checkEditsIter(*this, u"normalizeUTF8 omit unchanged",
             edits.getFineIterator(), edits.getFineIterator(),
             expectedChanges, UPRV_LENGTHOF(expectedChanges),
-            TRUE, errorCode);
+            true, errorCode);
 
     // With filter: The normalization code does not see the "A" substrings.
     UnicodeSet filter(u"[^A]", errorCode);
@@ -1632,24 +1632,24 @@ BasicNormalizerTest::TestComposeUTF8WithEdits() {
     assertSuccess("filtered normalizeUTF8", errorCode.get());
     assertEquals("filtered normalizeUTF8", expected.data(), result.c_str());
     static const EditChange filteredChanges[] = {
-        { FALSE, 3, 3 },  // 2 spaces + A
-        { TRUE, 2, 2 },  // Ä→ä
-        { FALSE, 4, 4 },  // A\u0308A
-        { TRUE, 6, 4 },  // \u0308\u00ad\u0323→\u0323\u0308 removes the soft hyphen
-        { TRUE, 4, 5 },  // Ä\u0323→ạ\u0308
-        { FALSE, 1, 1 },  // comma
-        { TRUE, 2, 0 },  // U+00AD soft hyphen maps to empty
-        { TRUE, 6, 3 },  // \u1100\u1161→가
-        { TRUE, 6, 3 },  // ę°€\u11A8→ę°
-        { TRUE, 6, 3 },  // ę°€\u3133→ę°
-        { FALSE, 2, 2 }  // 2 spaces
+        { false, 3, 3 },  // 2 spaces + A
+        { true, 2, 2 },  // Ä→ä
+        { false, 4, 4 },  // A\u0308A
+        { true, 6, 4 },  // \u0308\u00ad\u0323→\u0323\u0308 removes the soft hyphen
+        { true, 4, 5 },  // Ä\u0323→ạ\u0308
+        { false, 1, 1 },  // comma
+        { true, 2, 0 },  // U+00AD soft hyphen maps to empty
+        { true, 6, 3 },  // \u1100\u1161→가
+        { true, 6, 3 },  // ę°€\u11A8→ę°
+        { true, 6, 3 },  // ę°€\u3133→ę°
+        { false, 2, 2 }  // 2 spaces
     };
     assertTrue("filtered normalizeUTF8 hasChanges", edits.hasChanges());
     assertEquals("filtered normalizeUTF8 numberOfChanges", 7, edits.numberOfChanges());
     TestUtility::checkEditsIter(*this, u"filtered normalizeUTF8",
             edits.getFineIterator(), edits.getFineIterator(),
             filteredChanges, UPRV_LENGTHOF(filteredChanges),
-            TRUE, errorCode);
+            true, errorCode);
 
     assertFalse("filtered isNormalizedUTF8(source)", fn2.isNormalizedUTF8(src, errorCode));
     assertTrue("filtered isNormalizedUTF8(normalized)", fn2.isNormalizedUTF8(result, errorCode));
@@ -1668,7 +1668,7 @@ BasicNormalizerTest::TestComposeUTF8WithEdits() {
     TestUtility::checkEditsIter(*this, u"filtered normalizeUTF8 omit unchanged",
             edits.getFineIterator(), edits.getFineIterator(),
             filteredChanges, UPRV_LENGTHOF(filteredChanges),
-            TRUE, errorCode);
+            true, errorCode);
 }
 
 void
@@ -1691,29 +1691,29 @@ BasicNormalizerTest::TestDecomposeUTF8WithEdits() {
     assertSuccess("normalizeUTF8 with Edits", errorCode.get());
     assertEquals("normalizeUTF8 with Edits", expected.data(), result.c_str());
     static const EditChange expectedChanges[] = {
-        { FALSE, 2, 2 },  // 2 spaces
-        { TRUE, 1, 1 },  // A→a
-        { TRUE, 2, 3 },  // Ä→a\u0308
-        { TRUE, 1, 1 },  // A→a
-        { FALSE, 2, 2 },  // \u0308→\u0308 unchanged
-        { TRUE, 1, 1 },  // A→a
-        { TRUE, 6, 4 },  // \u0308\u00ad\u0323→\u0323\u0308 removes the soft hyphen
-        { TRUE, 4, 5 },  // Ä\u0323→a\u0323\u0308
-        { FALSE, 1, 1 },  // comma
-        { TRUE, 2, 0 },  // U+00AD soft hyphen maps to empty
-        { FALSE, 6, 6 },  // \u1100\u1161 unchanged
-        { TRUE, 3, 6 },  // 가→\u1100\u1161
-        { FALSE, 3, 3 },  // \u11A8 unchanged
-        { TRUE, 3, 6 },  // 가→\u1100\u1161
-        { TRUE, 3, 3 },  // \u3133→\u11AA
-        { FALSE, 2, 2 }  // 2 spaces
+        { false, 2, 2 },  // 2 spaces
+        { true, 1, 1 },  // A→a
+        { true, 2, 3 },  // Ä→a\u0308
+        { true, 1, 1 },  // A→a
+        { false, 2, 2 },  // \u0308→\u0308 unchanged
+        { true, 1, 1 },  // A→a
+        { true, 6, 4 },  // \u0308\u00ad\u0323→\u0323\u0308 removes the soft hyphen
+        { true, 4, 5 },  // Ä\u0323→a\u0323\u0308
+        { false, 1, 1 },  // comma
+        { true, 2, 0 },  // U+00AD soft hyphen maps to empty
+        { false, 6, 6 },  // \u1100\u1161 unchanged
+        { true, 3, 6 },  // 가→\u1100\u1161
+        { false, 3, 3 },  // \u11A8 unchanged
+        { true, 3, 6 },  // 가→\u1100\u1161
+        { true, 3, 3 },  // \u3133→\u11AA
+        { false, 2, 2 }  // 2 spaces
     };
     assertTrue("normalizeUTF8 with Edits hasChanges", edits.hasChanges());
     assertEquals("normalizeUTF8 with Edits numberOfChanges", 10, edits.numberOfChanges());
     TestUtility::checkEditsIter(*this, u"normalizeUTF8 with Edits",
             edits.getFineIterator(), edits.getFineIterator(),
             expectedChanges, UPRV_LENGTHOF(expectedChanges),
-            TRUE, errorCode);
+            true, errorCode);
 
     assertFalse("isNormalizedUTF8(source)", nfkd_cf->isNormalizedUTF8(src, errorCode));
     assertTrue("isNormalizedUTF8(normalized)", nfkd_cf->isNormalizedUTF8(result, errorCode));
@@ -1730,7 +1730,7 @@ BasicNormalizerTest::TestDecomposeUTF8WithEdits() {
     TestUtility::checkEditsIter(*this, u"normalizeUTF8 omit unchanged",
             edits.getFineIterator(), edits.getFineIterator(),
             expectedChanges, UPRV_LENGTHOF(expectedChanges),
-            TRUE, errorCode);
+            true, errorCode);
 
     // Not testing FilteredNormalizer2:
     // The code there is the same for all normalization modes, and
diff --git a/icu4c/source/test/intltest/tstnrapi.cpp b/icu4c/source/test/intltest/tstnrapi.cpp
index 744b0ce9171..e661c1ed861 100644
--- a/icu4c/source/test/intltest/tstnrapi.cpp
+++ b/icu4c/source/test/intltest/tstnrapi.cpp
@@ -61,8 +61,8 @@ BasicNormalizerTest::TestNormalizerAPI() {
     tel.insert(1, (UChar)0x301);
 
     UErrorCode errorCode=U_ZERO_ERROR;
-    Normalizer::compose(tel, TRUE, 0, nfkc, errorCode);
-    Normalizer::decompose(tel, TRUE, 0, nfkd, errorCode);
+    Normalizer::compose(tel, true, 0, nfkc, errorCode);
+    Normalizer::decompose(tel, true, 0, nfkd, errorCode);
     if(U_FAILURE(errorCode)) {
         dataerrln("error in Normalizer::(de)compose(): %s", u_errorName(errorCode));
     } else if(
@@ -119,8 +119,8 @@ BasicNormalizerTest::TestNormalizerAPI() {
     }
 
     // test setOption() and getOption()
-    copy.setOption(0xaa0000, TRUE);
-    copy.setOption(0x20000, FALSE);
+    copy.setOption(0xaa0000, true);
+    copy.setOption(0x20000, false);
     if(!copy.getOption(0x880000) || copy.getOption(0x20000)) {
         errln("error in Normalizer::setOption() or Normalizer::getOption()");
     }
@@ -152,11 +152,11 @@ BasicNormalizerTest::TestNormalizerAPI() {
     if(s.charAt(0)!=0xe4) {
         dataerrln("error in Normalizer::normalize(UNORM_NFC, self)");
     }
-    Normalizer::decompose(s, FALSE, 0, s, status);
+    Normalizer::decompose(s, false, 0, s, status);
     if(s.charAt(1)!=0x308) {
         dataerrln("error in Normalizer::decompose(self)");
     }
-    Normalizer::compose(s, FALSE, 0, s, status);
+    Normalizer::compose(s, false, 0, s, status);
     if(s.charAt(0)!=0xe4) {
         dataerrln("error in Normalizer::compose(self)");
     }
diff --git a/icu4c/source/test/intltest/tufmtts.cpp b/icu4c/source/test/intltest/tufmtts.cpp
index db082ac736f..8ce314b7e5f 100644
--- a/icu4c/source/test/intltest/tufmtts.cpp
+++ b/icu4c/source/test/intltest/tufmtts.cpp
@@ -84,15 +84,15 @@ extern IntlTest *createTimeUnitTest() {
 // double 3.0 hours to be equal
 static UBool tmaEqual(const TimeUnitAmount& left, const TimeUnitAmount& right) {
     if (left.getTimeUnitField() != right.getTimeUnitField()) {
-        return FALSE;
+        return false;
     }
     UErrorCode status = U_ZERO_ERROR;
     if (!left.getNumber().isNumeric() || !right.getNumber().isNumeric()) {
-        return FALSE;
+        return false;
     }
     UBool result = left.getNumber().getDouble(status) == right.getNumber().getDouble(status);
     if (U_FAILURE(status)) {
-        return FALSE;
+        return false;
     }
     return result;
 }
@@ -109,7 +109,7 @@ void TimeUnitTest::testBasic() {
         Locale loc(locales[locIndex]);
         TimeUnitFormat** formats = new TimeUnitFormat*[2];
         formats[UTMUTFMT_FULL_STYLE] = new TimeUnitFormat(loc, status);
-        if (!assertSuccess("TimeUnitFormat(full)", status, TRUE)) return;
+        if (!assertSuccess("TimeUnitFormat(full)", status, true)) return;
         formats[UTMUTFMT_ABBREVIATED_STYLE] = new TimeUnitFormat(loc, UTMUTFMT_ABBREVIATED_STYLE, status);
         if (!assertSuccess("TimeUnitFormat(short)", status)) return;
 #ifdef TUFMTTS_DEBUG
@@ -254,7 +254,7 @@ void TimeUnitTest::testAPI() {
     //================= TimeUnitFormat =================
     //
     TimeUnitFormat* tmf_en = new TimeUnitFormat(Locale("en"), status);
-    if (!assertSuccess("TimeUnitFormat(en...)", status, TRUE)) return;
+    if (!assertSuccess("TimeUnitFormat(en...)", status, true)) return;
     TimeUnitFormat tmf_fr(Locale("fr"), status);
     if (!assertSuccess("TimeUnitFormat(fr...)", status)) return;
 
@@ -444,7 +444,7 @@ void TimeUnitTest::testGreekWithSanitization() {
     UErrorCode status = U_ZERO_ERROR;
     Locale elLoc("el");
     NumberFormat* numberFmt = NumberFormat::createInstance(Locale("el"), status);
-    if (!assertSuccess("NumberFormat::createInstance for el locale", status, TRUE)) return;
+    if (!assertSuccess("NumberFormat::createInstance for el locale", status, true)) return;
     numberFmt->setMaximumFractionDigits(1);
 
     TimeUnitFormat* timeUnitFormat = new TimeUnitFormat(elLoc, status);
@@ -523,7 +523,7 @@ void TimeUnitTest::TestBritishShortHourFallback() {
     UnicodeString result;
     formatter.format(oneHour, result, status);
     assertSuccess("TestBritishShortHourFallback()", status);
-    assertEquals("TestBritishShortHourFallback()", UNICODE_STRING_SIMPLE("1 hr"), result, TRUE);
+    assertEquals("TestBritishShortHourFallback()", UNICODE_STRING_SIMPLE("1 hr"), result, true);
 }
 
 #endif
diff --git a/icu4c/source/test/intltest/tzbdtest.cpp b/icu4c/source/test/intltest/tzbdtest.cpp
index 5106e996832..bce8ff4ab9f 100644
--- a/icu4c/source/test/intltest/tzbdtest.cpp
+++ b/icu4c/source/test/intltest/tzbdtest.cpp
@@ -125,7 +125,7 @@ TimeZoneBoundaryTest::findDaylightBoundaryUsingTimeZone(UDate d, UBool startsInD
         dataerrln("FAIL: " + tz->getID(str) + " inDaylightTime(" + dateToString(d) + ") != " + (startsInDST ? "true" : "false"));
         startsInDST = !startsInDST;
     }
-    if (failure(status, "TimeZone::inDaylightTime", TRUE)) return;
+    if (failure(status, "TimeZone::inDaylightTime", true)) return;
     if (tz->inDaylightTime(max, status) == startsInDST) {
         dataerrln("FAIL: " + tz->getID(str) + " inDaylightTime(" + dateToString(max) + ") != " + (startsInDST ? "false" : "true"));
         return;
@@ -197,7 +197,7 @@ TimeZoneBoundaryTest::verifyDST(UDate d, TimeZone* time_zone, UBool expUseDaylig
         logln(UnicodeString("PASS: inDaylightTime = ") + (time_zone->inDaylightTime(d, status)?"true":"false"));
     else 
         dataerrln(UnicodeString("FAIL: inDaylightTime = ") + (time_zone->inDaylightTime(d, status)?"true":"false"));
-    if (failure(status, "TimeZone::inDaylightTime", TRUE)) 
+    if (failure(status, "TimeZone::inDaylightTime", true)) 
         return;
     if (time_zone->useDaylightTime() == expUseDaylightTime)
         logln(UnicodeString("PASS: useDaylightTime = ") + (time_zone->useDaylightTime()?"true":"false"));
@@ -312,7 +312,7 @@ TimeZoneBoundaryTest::TestBoundaries()
         {
             UBool inDST = (i >= 120);
             tempcal->setTime(d + i*60*1000, status);
-            verifyDST(tempcal->getTime(status),pst, TRUE, inDST, -8*ONE_HOUR,inDST ? -7*ONE_HOUR : -8*ONE_HOUR);
+            verifyDST(tempcal->getTime(status),pst, true, inDST, -8*ONE_HOUR,inDST ? -7*ONE_HOUR : -8*ONE_HOUR);
         }
     }
     TimeZone::setDefault(*save);
@@ -328,7 +328,7 @@ TimeZoneBoundaryTest::TestBoundaries()
         for (int32_t i = 60; i <= 180; i += 15) {
             UBool inDST = (i >= 120);
             UDate e = d + i * 60 * 1000;
-            verifyDST(e, z, TRUE, inDST, - 8 * ONE_HOUR, inDST ? - 7 * ONE_HOUR: - 8 * ONE_HOUR);
+            verifyDST(e, z, true, inDST, - 8 * ONE_HOUR, inDST ? - 7 * ONE_HOUR: - 8 * ONE_HOUR);
         }
         delete z;
     }
@@ -350,9 +350,9 @@ TimeZoneBoundaryTest::TestBoundaries()
         logln("--- Test c ---");
         logln("========================================");
         TimeZone* z = TimeZone::createTimeZone("Australia/Adelaide");
-        findDaylightBoundaryUsingTimeZone(date(97, 0, 1), TRUE, 859653000000.0, z);
+        findDaylightBoundaryUsingTimeZone(date(97, 0, 1), true, 859653000000.0, z);
         logln("========================================");
-        findDaylightBoundaryUsingTimeZone(date(97, 6, 1), FALSE, 877797000000.0, z);
+        findDaylightBoundaryUsingTimeZone(date(97, 6, 1), false, 877797000000.0, z);
         delete z;
     }
 #endif
@@ -360,9 +360,9 @@ TimeZoneBoundaryTest::TestBoundaries()
     {
         logln("--- Test d ---");
         logln("========================================");
-        findDaylightBoundaryUsingTimeZone(date(97, 0, 1), FALSE, PST_1997_BEG);
+        findDaylightBoundaryUsingTimeZone(date(97, 0, 1), false, PST_1997_BEG);
         logln("========================================");
-        findDaylightBoundaryUsingTimeZone(date(97, 6, 1), TRUE, PST_1997_END);
+        findDaylightBoundaryUsingTimeZone(date(97, 6, 1), true, PST_1997_END);
     }
 #endif
 #if 0
@@ -387,7 +387,7 @@ TimeZoneBoundaryTest::testUsingBinarySearch(SimpleTimeZone* tz, UDate d, UDate e
     UDate min = d;
     UDate max = min + SIX_MONTHS;
     UBool startsInDST = tz->inDaylightTime(d, status);
-    if (failure(status, "SimpleTimeZone::inDaylightTime", TRUE)) return;
+    if (failure(status, "SimpleTimeZone::inDaylightTime", true)) return;
     if (tz->inDaylightTime(max, status) == startsInDST) {
         errln("Error: inDaylightTime(" + dateToString(max) + ") != " + ((!startsInDST)?"true":"false"));
     }
@@ -456,7 +456,7 @@ TimeZoneBoundaryTest::findBoundariesStepwise(int32_t year, UDate interval, TimeZ
     UDate time = d;
     UDate limit = time + ONE_YEAR + ONE_DAY;
     UBool lastState = z->inDaylightTime(d, status);
-    if (failure(status, "TimeZone::inDaylightTime", TRUE)) return;
+    if (failure(status, "TimeZone::inDaylightTime", true)) return;
     int32_t changes = 0;
     logln(UnicodeString("-- Zone ") + z->getID(str) + " starts in " + year + " with DST = " + (lastState?"true":"false"));
     logln(UnicodeString("useDaylightTime = ") + (z->useDaylightTime()?"true":"false"));
diff --git a/icu4c/source/test/intltest/tzfmttst.cpp b/icu4c/source/test/intltest/tzfmttst.cpp
index 9808de04cda..2fd11b1562e 100644
--- a/icu4c/source/test/intltest/tzfmttst.cpp
+++ b/icu4c/source/test/intltest/tzfmttst.cpp
@@ -64,10 +64,10 @@ static const UChar RIYADH8[] = { 0x52, 0x69, 0x79, 0x61, 0x64, 0x68, 0x38, 0 };
 static UBool contains(const char** list, const char* str) {
     for (int32_t i = 0; list[i]; i++) {
         if (uprv_strcmp(list[i], str) == 0) {
-            return TRUE;
+            return true;
         }
     }
-    return FALSE;
+    return false;
 }
 
 void
@@ -275,7 +275,7 @@ TimeZoneFormatTest::TestTimeZoneRoundTrip(void) {
                             status = U_ZERO_ERROR;
                         } else if (outtzid != canonical) {
                             // Canonical ID did not match - check the rules
-                            if (!((BasicTimeZone*)&outtz)->hasEquivalentTransitions((BasicTimeZone&)*tz, low, high, TRUE, status)) {
+                            if (!((BasicTimeZone*)&outtz)->hasEquivalentTransitions((BasicTimeZone&)*tz, low, high, true, status)) {
                                 if (canonical.indexOf((UChar)0x27 /*'/'*/) == -1) {
                                     // Exceptional cases, such as CET, EET, MET and WET
                                     logln((UnicodeString)"Canonical round trip failed (as expected); tz=" + *tzid
@@ -300,7 +300,7 @@ TimeZoneFormatTest::TestTimeZoneRoundTrip(void) {
                                                 || *PATTERNS[patidx] == 'O'
                                                 || *PATTERNS[patidx] == 'X'
                                                 || *PATTERNS[patidx] == 'x');
-                        UBool minutesOffset = FALSE;
+                        UBool minutesOffset = false;
                         if (*PATTERNS[patidx] == 'X' || *PATTERNS[patidx] == 'x') {
                             minutesOffset = (uprv_strlen(PATTERNS[patidx]) <= 3);
                         }
@@ -372,13 +372,13 @@ static UBool isSpecialTimeRoundTripCase(const char* loc,
         {NULL, NULL, NULL, U_DATE_MIN}
     };
 
-    UBool isExcluded = FALSE;
+    UBool isExcluded = false;
     for (int32_t i = 0; EXCLUSIONS[i].id != NULL; i++) {
         if (EXCLUSIONS[i].loc == NULL || uprv_strcmp(loc, EXCLUSIONS[i].loc) == 0) {
             if (id.compare(EXCLUSIONS[i].id) == 0) {
                 if (EXCLUSIONS[i].pattern == NULL || uprv_strcmp(pattern, EXCLUSIONS[i].pattern) == 0) {
                     if (EXCLUSIONS[i].time == U_DATE_MIN || EXCLUSIONS[i].time == time) {
-                        isExcluded = TRUE;
+                        isExcluded = true;
                     }
                 }
             }
@@ -427,7 +427,7 @@ struct LocaleData {
         Mutex lock;
         if (patternIndex >= UPRV_LENGTHOF(PATTERNS) - 1) {
             if (localeIndex >= nLocales - 1) {
-                return FALSE;
+                return false;
             }
             patternIndex = -1;
             ++localeIndex;
@@ -436,7 +436,7 @@ struct LocaleData {
         rLocaleIndex = localeIndex;
         rPatternIndex = patternIndex;
         ++numDone;
-        return TRUE;
+        return true;
     }
 
     void addTime(UDate amount, int32_t patIdx) {
@@ -531,7 +531,7 @@ TimeZoneFormatTest::TestTimeRoundTrip(void) {
 //    
 void TimeZoneFormatTest::RunTimeRoundTripTests(int32_t threadNumber) {
     UErrorCode status = U_ZERO_ERROR;
-    UBool REALLY_VERBOSE = FALSE;
+    UBool REALLY_VERBOSE = false;
 
     // These patterns are ambiguous at DST->STD local time overlap
     const char* AMBIGUOUS_DST_DECESSION[] = { "v", "vvvv", "V", "VV", "VVV", "VVVV", 0 };
@@ -618,13 +618,13 @@ void TimeZoneFormatTest::RunTimeRoundTripTests(int32_t threadNumber) {
 
             UDate t = gLocaleData->START_TIME;
             TimeZoneTransition tzt;
-            UBool tztAvail = FALSE;
-            UBool middle = TRUE;
+            UBool tztAvail = false;
+            UBool middle = true;
 
             while (t < gLocaleData->END_TIME) {
                 if (!tztAvail) {
                     testTimes[0] = t;
-                    expectedRoundTrip[0] = TRUE;
+                    expectedRoundTrip[0] = true;
                     testLen = 1;
                 } else {
                     int32_t fromOffset = tzt.getFrom()->getRawOffset() + tzt.getFrom()->getDSTSavings();
@@ -633,7 +633,7 @@ void TimeZoneFormatTest::RunTimeRoundTripTests(int32_t threadNumber) {
                     if (delta < 0) {
                         UBool isDstDecession = tzt.getFrom()->getDSTSavings() > 0 && tzt.getTo()->getDSTSavings() == 0;
                         testTimes[0] = t + delta - 1;
-                        expectedRoundTrip[0] = TRUE;
+                        expectedRoundTrip[0] = true;
                         testTimes[1] = t + delta;
                         expectedRoundTrip[1] = isDstDecession ?
                             !contains(AMBIGUOUS_DST_DECESSION, PATTERNS[patidx]) :
@@ -643,13 +643,13 @@ void TimeZoneFormatTest::RunTimeRoundTripTests(int32_t threadNumber) {
                             !contains(AMBIGUOUS_DST_DECESSION, PATTERNS[patidx]) :
                             !contains(AMBIGUOUS_NEGATIVE_SHIFT, PATTERNS[patidx]);
                         testTimes[3] = t;
-                        expectedRoundTrip[3] = TRUE;
+                        expectedRoundTrip[3] = true;
                         testLen = 4;
                     } else {
                         testTimes[0] = t - 1;
-                        expectedRoundTrip[0] = TRUE;
+                        expectedRoundTrip[0] = true;
                         testTimes[1] = t;
-                        expectedRoundTrip[1] = TRUE;
+                        expectedRoundTrip[1] = true;
                         testLen = 2;
                     }
                 }
@@ -695,15 +695,15 @@ void TimeZoneFormatTest::RunTimeRoundTripTests(int32_t threadNumber) {
                         }
                     }
                 }
-                tztAvail = tz->getNextTransition(t, FALSE, tzt);
+                tztAvail = tz->getNextTransition(t, false, tzt);
                 if (!tztAvail) {
                     break;
                 }
                 if (middle) {
                     // Test the date in the middle of two transitions.
                     t += (int64_t) ((tzt.getTime() - t) / 2);
-                    middle = FALSE;
-                    tztAvail = FALSE;
+                    middle = false;
+                    tztAvail = false;
                 } else {
                     t = tzt.getTime();
                 }
@@ -752,9 +752,9 @@ void TimeZoneFormatTest::RunAdoptDefaultThreadSafeTests(int32_t threadNumber) {
             date += 6000 * i;
             std::unique_ptr tz(icu::TimeZone::createDefault());
             status = U_ZERO_ERROR;
-            tz->getOffset(static_cast(date), TRUE, rawOffset, dstOffset, status);
+            tz->getOffset(static_cast(date), true, rawOffset, dstOffset, status);
             status = U_ZERO_ERROR;
-            tz->getOffset(static_cast(date), FALSE, rawOffset, dstOffset, status);
+            tz->getOffset(static_cast(date), false, rawOffset, dstOffset, status);
         }
     }
 }
diff --git a/icu4c/source/test/intltest/tzoffloc.cpp b/icu4c/source/test/intltest/tzoffloc.cpp
index d567cb99ac0..b28a0c5bb18 100644
--- a/icu4c/source/test/intltest/tzoffloc.cpp
+++ b/icu4c/source/test/intltest/tzoffloc.cpp
@@ -78,7 +78,7 @@ TimeZoneOffsetLocalTest::TestGetOffsetAroundTransition() {
     };
 
     // Expected offsets by void getOffset(UDate date, UBool local, int32_t& rawOffset,
-    // int32_t& dstOffset, UErrorCode& ec) with local=TRUE
+    // int32_t& dstOffset, UErrorCode& ec) with local=true
     // or void getOffsetFromLocal(UDate date, UTimeZoneLocalOption nonExistingTimeOpt, UTimeZoneLocalOption duplicatedTimeOpt,
     // int32_t& rawOffset, int32_t& dstOffset, UErrorCode& status) with
     // nonExistingTimeOpt=STANDARD_*/duplicatedTimeOpt=STANDARD_*
@@ -219,11 +219,11 @@ TimeZoneOffsetLocalTest::TestGetOffsetAroundTransition() {
     }
 
     // Test getOffset(UDate date, UBool local, int32_t& rawOffset,
-    // int32_t& dstOffset, UErrorCode& ec) with local = TRUE
+    // int32_t& dstOffset, UErrorCode& ec) with local = true
     for (int32_t i = 0; i < NUM_TIMEZONES; i++) {
         for (int32_t m = 0; m < NUM_DATES; m++) {
             status = U_ZERO_ERROR;
-            TESTZONES[i]->getOffset(MILLIS[m], TRUE, rawOffset, dstOffset, status);
+            TESTZONES[i]->getOffset(MILLIS[m], true, rawOffset, dstOffset, status);
             if (U_FAILURE(status)) {
                 errln((UnicodeString)"getOffset(date,local,rawOfset,dstOffset,ec) failed for TESTZONES[" + i + "]");
             } else if (rawOffset != OFFSETS2[m][0] || dstOffset != OFFSETS2[m][1]) {
diff --git a/icu4c/source/test/intltest/tzregts.cpp b/icu4c/source/test/intltest/tzregts.cpp
index bc8a0029765..745bc265c9d 100644
--- a/icu4c/source/test/intltest/tzregts.cpp
+++ b/icu4c/source/test/intltest/tzregts.cpp
@@ -57,10 +57,10 @@ TimeZoneRegressionTest::failure(UErrorCode status, const char* msg)
 {
     if(U_FAILURE(status)) {
         errln(UnicodeString("FAIL: ") + msg + " failed, error " + u_errorName(status));
-        return TRUE;
+        return true;
     }
 
-    return FALSE;
+    return false;
 }
 
 /**
@@ -91,7 +91,7 @@ UDate TimeZoneRegressionTest::findTransitionBinary(const SimpleTimeZone& tz, UDa
     UBool startsInDST = tz.inDaylightTime(min, status);
     if (failure(status, "SimpleTimeZone::inDaylightTime")) return 0;
     if (tz.inDaylightTime(max, status) == startsInDST) {
-        logln((UnicodeString)"Error: inDaylightTime() != " + ((!startsInDST)?"TRUE":"FALSE"));
+        logln((UnicodeString)"Error: inDaylightTime() != " + ((!startsInDST)?"true":"false"));
         return 0;
     }
     if (failure(status, "SimpleTimeZone::inDaylightTime")) return 0;
@@ -166,7 +166,7 @@ void TimeZoneRegressionTest:: Test4073215()
     UBool indt = cal.getTimeZone().inDaylightTime(jan31 = cal.getTime(status), status);
     failure(status, "inDaylightTime or getTime call on Jan 31");
     if (indt) {
-        errln("Fail: Jan 31 inDaylightTime=TRUE, exp FALSE");
+        errln("Fail: Jan 31 inDaylightTime=true, exp false");
     }
     cal.set(1997, UCAL_MARCH, 1);
     indt = cal.getTimeZone().inDaylightTime(mar1 = cal.getTime(status), status);
@@ -175,13 +175,13 @@ void TimeZoneRegressionTest:: Test4073215()
         UnicodeString str;
         sdf.format(cal.getTime(status), str);
         failure(status, "getTime");
-        errln((UnicodeString)"Fail: " + str + " inDaylightTime=FALSE, exp TRUE");
+        errln((UnicodeString)"Fail: " + str + " inDaylightTime=false, exp true");
     }
     cal.set(1997, UCAL_MARCH, 31);
     indt = cal.getTimeZone().inDaylightTime(mar31 = cal.getTime(status), status);
     failure(status, "inDaylightTime or getTime call on Mar 31");
     if (indt) {
-        errln("Fail: Mar 31 inDaylightTime=TRUE, exp FALSE");
+        errln("Fail: Mar 31 inDaylightTime=true, exp false");
     }
 
     /*
@@ -271,7 +271,7 @@ void TimeZoneRegressionTest:: Test4096952() {
     // {sfb} serialization not applicable
 /*
     UnicodeString ZONES [] = { UnicodeString("GMT"), UnicodeString("MET"), UnicodeString("IST") };
-    UBool pass = TRUE;
+    UBool pass = true;
     //try {
         for (int32_t i=0; i < ZONES.length; ++i) {
             TimeZone *zone = TimeZone::createTimeZone(ZONES[i]);
@@ -334,7 +334,7 @@ void TimeZoneRegressionTest:: Test4109314() {
         CalendarRegressionTest::makeDate(98,UCAL_OCTOBER,24,22,0), 
         CalendarRegressionTest::makeDate(98,UCAL_OCTOBER,25,6,0)
     };
-    UBool pass = TRUE;
+    UBool pass = true;
     for (int32_t i = 0; i < 4; i+=2) {
         //testCal->setTimeZone((TimeZone) testData[i]);
         testCal->setTimeZone(*PST);
@@ -343,7 +343,7 @@ void TimeZoneRegressionTest:: Test4109314() {
         while(testCal->getTime(status) < end) { 
             testCal->setTime(t, status);
             if ( ! checkCalendar314(testCal, PST))
-                pass = FALSE;
+                pass = false;
             t += 60*60*1000.0;
         } 
     }
@@ -549,7 +549,7 @@ void TimeZoneRegressionTest:: Test4151429() {
     //try {
         /*TimeZone *tz = TimeZone::createTimeZone("GMT");
         UnicodeString name;
-        tz->getDisplayName(TRUE, TimeZone::LONG,
+        tz->getDisplayName(true, TimeZone::LONG,
                                         Locale.getDefault(), name);
         errln("IllegalArgumentException not thrown by TimeZone::getDisplayName()");*/
     //} catch(IllegalArgumentException e) {}
@@ -979,21 +979,21 @@ void TimeZoneRegressionTest::Test4176686() {
     UnicodeString a,b,c,d,e,f,g,h,i,j,k,l;
     UnicodeString DATA[] = {
         "z1.getDisplayName(false, SHORT)/std zone",
-        z1.getDisplayName(FALSE, TimeZone::SHORT, a), "GMT+1:30",
+        z1.getDisplayName(false, TimeZone::SHORT, a), "GMT+1:30",
         "z1.getDisplayName(false, LONG)/std zone",
-        z1.getDisplayName(FALSE, TimeZone::LONG, b), "GMT+01:30",
+        z1.getDisplayName(false, TimeZone::LONG, b), "GMT+01:30",
         "z1.getDisplayName(true, SHORT)/std zone",
-        z1.getDisplayName(TRUE, TimeZone::SHORT, c), "GMT+1:30",
+        z1.getDisplayName(true, TimeZone::SHORT, c), "GMT+1:30",
         "z1.getDisplayName(true, LONG)/std zone",
-        z1.getDisplayName(TRUE, TimeZone::LONG, d ), "GMT+01:30",
+        z1.getDisplayName(true, TimeZone::LONG, d ), "GMT+01:30",
         "z2.getDisplayName(false, SHORT)/dst zone",
-        z2.getDisplayName(FALSE, TimeZone::SHORT, e), "GMT+1:30",
+        z2.getDisplayName(false, TimeZone::SHORT, e), "GMT+1:30",
         "z2.getDisplayName(false, LONG)/dst zone",
-        z2.getDisplayName(FALSE, TimeZone::LONG, f ), "GMT+01:30",
+        z2.getDisplayName(false, TimeZone::LONG, f ), "GMT+01:30",
         "z2.getDisplayName(true, SHORT)/dst zone",
-        z2.getDisplayName(TRUE, TimeZone::SHORT, g), "GMT+2:15",
+        z2.getDisplayName(true, TimeZone::SHORT, g), "GMT+2:15",
         "z2.getDisplayName(true, LONG)/dst zone",
-        z2.getDisplayName(TRUE, TimeZone::LONG, h ), "GMT+02:15",
+        z2.getDisplayName(true, TimeZone::LONG, h ), "GMT+02:15",
         "DateFormat.format(std)/std zone", fmt1.format(std, i), "GMT+1:30",
         "DateFormat.format(dst)/std zone", fmt1.format(dst, j), "GMT+1:30",
         "DateFormat.format(std)/dst zone", fmt2.format(std, k), "GMT+1:30",
@@ -1257,7 +1257,7 @@ void TimeZoneRegressionTest::TestNegativeDaylightSaving() {
     }
     failure(status, "inDaylightTime() - Jan 15");
 
-    stzDublin.getOffset(testDate, FALSE, rawOffset, dstOffset, status);
+    stzDublin.getOffset(testDate, false, rawOffset, dstOffset, status);
     failure(status, "getOffset() - Jan 15");
     if (rawOffset != stdOff || dstOffset != save) {
         errln((UnicodeString)"FAIL: Expected [stdoff=" + stdOff + ",save=" + save
@@ -1274,7 +1274,7 @@ void TimeZoneRegressionTest::TestNegativeDaylightSaving() {
     }
     failure(status, "inDaylightTime() - Jul 15");
 
-    stzDublin.getOffset(testDate, FALSE, rawOffset, dstOffset, status);
+    stzDublin.getOffset(testDate, false, rawOffset, dstOffset, status);
     failure(status, "getOffset() - Jul 15");
     if (rawOffset != stdOff || dstOffset != 0) {
         errln((UnicodeString)"FAIL: Expected [stdoff=" + stdOff + ",save=" + 0
diff --git a/icu4c/source/test/intltest/tzrulets.cpp b/icu4c/source/test/intltest/tzrulets.cpp
index b55dd2ef7d7..d539dbb9162 100644
--- a/icu4c/source/test/intltest/tzrulets.cpp
+++ b/icu4c/source/test/intltest/tzrulets.cpp
@@ -56,7 +56,7 @@ static UBool hasEquivalentTransitions(/*const*/ BasicTimeZone& tz1, /*const*/Bas
 
 class TestZIDEnumeration : public StringEnumeration {
 public:
-    TestZIDEnumeration(UBool all = FALSE);
+    TestZIDEnumeration(UBool all = false);
     ~TestZIDEnumeration();
 
     virtual int32_t count(UErrorCode& /*status*/) const override {
@@ -171,7 +171,7 @@ TimeZoneRuleTest::TestSimpleRuleBasedTimeZone(void) {
 
     // Original rules
     RuleBasedTimeZone *rbtz1 = new RuleBasedTimeZone("RBTZ1", ir->clone());
-    dtr = new DateTimeRule(UCAL_SEPTEMBER, 30, UCAL_SATURDAY, FALSE,
+    dtr = new DateTimeRule(UCAL_SEPTEMBER, 30, UCAL_SATURDAY, false,
         1*HOUR, DateTimeRule::WALL_TIME); // SUN<=30 in September, at 1AM wall time
     atzr = new AnnualTimeZoneRule("RBTZ_DST1",
         -1*HOUR /*rawOffset*/, 1*HOUR /*dstSavings*/, dtr,
@@ -240,19 +240,19 @@ TimeZoneRuleTest::TestSimpleRuleBasedTimeZone(void) {
     UDate start = getUTCMillis(STARTYEAR, UCAL_JANUARY, 1);
     UDate until = getUTCMillis(STARTYEAR + 10, UCAL_JANUARY, 1);
 
-    if (!(stz.hasEquivalentTransitions(*rbtz1, start, until, TRUE, status))) {
+    if (!(stz.hasEquivalentTransitions(*rbtz1, start, until, true, status))) {
         errln("FAIL: rbtz1 must be equivalent to the SimpleTimeZone in the time range.");
     }
     if (U_FAILURE(status)) {
         errln("FAIL: error returned from hasEquivalentTransitions");
     }
-    if (!(stz.hasEquivalentTransitions(*rbtz2, start, until, TRUE, status))) {
+    if (!(stz.hasEquivalentTransitions(*rbtz2, start, until, true, status))) {
         errln("FAIL: rbtz2 must be equivalent to the SimpleTimeZone in the time range.");
     }
     if (U_FAILURE(status)) {
         errln("FAIL: error returned from hasEquivalentTransitions");
     }
-    if (!(stz.hasEquivalentTransitions(*rbtz3, start, until, TRUE, status))) {
+    if (!(stz.hasEquivalentTransitions(*rbtz3, start, until, true, status))) {
         errln("FAIL: rbtz3 must be equivalent to the SimpleTimeZone in the time range.");
     }
     if (U_FAILURE(status)) {
@@ -317,7 +317,7 @@ TimeZoneRuleTest::TestSimpleRuleBasedTimeZone(void) {
     if (!dst) {
         errln("FAIL: Invalid daylight saving time");
     }
-    rbtz1->getOffset(time, TRUE, offset, dstSavings, status);
+    rbtz1->getOffset(time, true, offset, dstSavings, status);
     if (U_FAILURE(status)) {
         errln("FAIL: getOffset(5 args) failed.");
     }
@@ -356,7 +356,7 @@ TimeZoneRuleTest::TestSimpleRuleBasedTimeZone(void) {
     if (dst) {
         errln("FAIL: Invalid daylight saving time");
     }
-    rbtz1->getOffset(time, TRUE, offset, dstSavings, status);
+    rbtz1->getOffset(time, true, offset, dstSavings, status);
     if (U_FAILURE(status)) {
         errln("FAIL: getOffset(5 args) failed.");
     }
@@ -393,7 +393,7 @@ TimeZoneRuleTest::TestSimpleRuleBasedTimeZone(void) {
 
     // useDaylightTime
     if (!rbtz1->useDaylightTime()) {
-        errln("FAIL: useDaylightTime returned FALSE");
+        errln("FAIL: useDaylightTime returned false");
     }
 
     // Try to add 3rd final rule
@@ -513,13 +513,13 @@ TimeZoneRuleTest::TestHistoricalRuleBasedTimeZone(void) {
     UDate jan1_1967 = getUTCMillis(1971, UCAL_JANUARY, 1);
     UDate jan1_2010 = getUTCMillis(2010, UCAL_JANUARY, 1);        
 
-    if (!ny->hasEquivalentTransitions(*rbtz, jan1_1967, jan1_2010, TRUE, status)) {
+    if (!ny->hasEquivalentTransitions(*rbtz, jan1_1967, jan1_2010, true, status)) {
         dataerrln("FAIL: The RBTZ must be equivalent to America/New_York between 1967 and 2010");
     }
     if (U_FAILURE(status)) {
         errln("FAIL: error returned from hasEquivalentTransitions for ny/rbtz 1967-2010");
     }
-    if (ny->hasEquivalentTransitions(*rbtz, jan1_1950, jan1_2010, TRUE, status)) {
+    if (ny->hasEquivalentTransitions(*rbtz, jan1_1950, jan1_2010, true, status)) {
         errln("FAIL: The RBTZ must not be equivalent to America/New_York between 1950 and 2010");
     }
     if (U_FAILURE(status)) {
@@ -527,13 +527,13 @@ TimeZoneRuleTest::TestHistoricalRuleBasedTimeZone(void) {
     }
 
     // Same with above, but calling RBTZ#hasEquivalentTransitions against OlsonTimeZone
-    if (!rbtz->hasEquivalentTransitions(*ny, jan1_1967, jan1_2010, TRUE, status)) {
+    if (!rbtz->hasEquivalentTransitions(*ny, jan1_1967, jan1_2010, true, status)) {
         dataerrln("FAIL: The RBTZ must be equivalent to America/New_York between 1967 and 2010 ");
     }
     if (U_FAILURE(status)) {
         errln("FAIL: error returned from hasEquivalentTransitions for rbtz/ny 1967-2010");
     }
-    if (rbtz->hasEquivalentTransitions(*ny, jan1_1950, jan1_2010, TRUE, status)) {
+    if (rbtz->hasEquivalentTransitions(*ny, jan1_1950, jan1_2010, true, status)) {
         errln("FAIL: The RBTZ must not be equivalent to America/New_York between 1950 and 2010");
     }
     if (U_FAILURE(status)) {
@@ -545,7 +545,7 @@ TimeZoneRuleTest::TestHistoricalRuleBasedTimeZone(void) {
         errln("FAIL: hasSameRules must return false");
     }
     RuleBasedTimeZone *rbtzc = rbtz->clone();
-    if (!rbtz->hasSameRules(*rbtzc) || !rbtz->hasEquivalentTransitions(*rbtzc, jan1_1950, jan1_2010, TRUE, status)) {
+    if (!rbtz->hasSameRules(*rbtzc) || !rbtz->hasEquivalentTransitions(*rbtzc, jan1_1950, jan1_2010, true, status)) {
         errln("FAIL: hasSameRules/hasEquivalentTransitions must return true for cloned RBTZs");
     }
     if (U_FAILURE(status)) {
@@ -566,11 +566,11 @@ TimeZoneRuleTest::TestHistoricalRuleBasedTimeZone(void) {
 
     for (int i = 0; times[i] != 0; i++) {
         // Check getOffset - must return the same results for these time data
-        rbtz->getOffset(times[i], FALSE, offset1, dst1, status);
+        rbtz->getOffset(times[i], false, offset1, dst1, status);
         if (U_FAILURE(status)) {
             errln("FAIL: rbtz->getOffset failed");
         }
-        ny->getOffset(times[i], FALSE, offset2, dst2, status);
+        ny->getOffset(times[i], false, offset2, dst2, status);
         if (U_FAILURE(status)) {
             errln("FAIL: ny->getOffset failed");
         }
@@ -608,7 +608,7 @@ TimeZoneRuleTest::TestOlsonTransition(void) {
 
     UErrorCode status = U_ZERO_ERROR;
     TestZIDEnumeration tzenum(!quick);
-    while (TRUE) {
+    while (true) {
         const UnicodeString *tzid = tzenum.snext(status);
         if (tzid == NULL) {
             break;
@@ -643,7 +643,7 @@ TimeZoneRuleTest::TestRBTZTransition(void) {
 
     UErrorCode status = U_ZERO_ERROR;
     TestZIDEnumeration tzenum(!quick);
-    while (TRUE) {
+    while (true) {
         const UnicodeString *tzid = tzenum.snext(status);
         if (tzid == NULL) {
             break;
@@ -682,13 +682,13 @@ TimeZoneRuleTest::TestRBTZTransition(void) {
             // Compare the original OlsonTimeZone with the RBTZ starting the startTime for 20 years
 
             // Ascending
-            compareTransitionsAscending(*tz, *rbtz, start, until, FALSE);
+            compareTransitionsAscending(*tz, *rbtz, start, until, false);
             // Ascending/inclusive
-            compareTransitionsAscending(*tz, *rbtz, start + 1, until, TRUE);
+            compareTransitionsAscending(*tz, *rbtz, start + 1, until, true);
             // Descending
-            compareTransitionsDescending(*tz, *rbtz, start, until, FALSE);
+            compareTransitionsDescending(*tz, *rbtz, start, until, false);
             // Descending/inclusive
-            compareTransitionsDescending(*tz, *rbtz, start + 1, until, TRUE);
+            compareTransitionsDescending(*tz, *rbtz, start + 1, until, true);
         }
         delete [] trsrules;
         delete rbtz;
@@ -711,26 +711,26 @@ TimeZoneRuleTest::TestHasEquivalentTransitions(void) {
     UDate jan1_2007 = getUTCMillis(2007, UCAL_JANUARY, 1);
     UDate jan1_2011 = getUTCMillis(2010, UCAL_JANUARY, 1);
 
-    if (newyork->hasEquivalentTransitions(*indianapolis, jan1_2005, jan1_2011, TRUE, status)) {
+    if (newyork->hasEquivalentTransitions(*indianapolis, jan1_2005, jan1_2011, true, status)) {
         dataerrln("FAIL: New_York is not equivalent to Indianapolis between 2005 and 2010");
     }
     if (U_FAILURE(status)) {
         errln("FAIL: error status is returned from hasEquivalentTransition");
     }
-    if (!newyork->hasEquivalentTransitions(*indianapolis, jan1_2006, jan1_2011, TRUE, status)) {
+    if (!newyork->hasEquivalentTransitions(*indianapolis, jan1_2006, jan1_2011, true, status)) {
         errln("FAIL: New_York is equivalent to Indianapolis between 2006 and 2010");
     }
     if (U_FAILURE(status)) {
         errln("FAIL: error status is returned from hasEquivalentTransition");
     }
 
-    if (!indianapolis->hasEquivalentTransitions(*gmt_5, jan1_1971, jan1_2006, TRUE, status)) {
+    if (!indianapolis->hasEquivalentTransitions(*gmt_5, jan1_1971, jan1_2006, true, status)) {
         errln("FAIL: Indianapolis is equivalent to GMT+5 between 1971 and 2005");
     }
     if (U_FAILURE(status)) {
         errln("FAIL: error status is returned from hasEquivalentTransition");
     }
-    if (indianapolis->hasEquivalentTransitions(*gmt_5, jan1_1971, jan1_2007, TRUE, status)) {
+    if (indianapolis->hasEquivalentTransitions(*gmt_5, jan1_1971, jan1_2007, true, status)) {
         dataerrln("FAIL: Indianapolis is not equivalent to GMT+5 between 1971 and 2006");
     }
     if (U_FAILURE(status)) {
@@ -739,13 +739,13 @@ TimeZoneRuleTest::TestHasEquivalentTransitions(void) {
 
     // Cloned TimeZone
     BasicTimeZone *newyork2 = newyork->clone();
-    if (!newyork->hasEquivalentTransitions(*newyork2, jan1_1971, jan1_2011, FALSE, status)) {
+    if (!newyork->hasEquivalentTransitions(*newyork2, jan1_1971, jan1_2011, false, status)) {
         errln("FAIL: Cloned TimeZone must have the same transitions");
     }
     if (U_FAILURE(status)) {
         errln("FAIL: error status is returned from hasEquivalentTransition for newyork/newyork2");
     }
-    if (!newyork->hasEquivalentTransitions(*newyork2, jan1_1971, jan1_2011, TRUE, status)) {
+    if (!newyork->hasEquivalentTransitions(*newyork2, jan1_1971, jan1_2011, true, status)) {
         errln("FAIL: Cloned TimeZone must have the same transitions");
     }
     if (U_FAILURE(status)) {
@@ -755,7 +755,7 @@ TimeZoneRuleTest::TestHasEquivalentTransitions(void) {
     // America/New_York and America/Los_Angeles has same DST start rules, but
     // raw offsets are different
     BasicTimeZone *losangeles = (BasicTimeZone*)TimeZone::createTimeZone("America/Los_Angeles");
-    if (newyork->hasEquivalentTransitions(*losangeles, jan1_2006, jan1_2011, TRUE, status)) {
+    if (newyork->hasEquivalentTransitions(*losangeles, jan1_2006, jan1_2011, true, status)) {
         dataerrln("FAIL: New_York is not equivalent to Los Angeles, but returned true");
     }
     if (U_FAILURE(status)) {
@@ -780,7 +780,7 @@ TimeZoneRuleTest::TestVTimeZoneRoundTrip(void) {
 
     UErrorCode status = U_ZERO_ERROR;
     TestZIDEnumeration tzenum(!quick);
-    while (TRUE) {
+    while (true) {
         const UnicodeString *tzid = tzenum.snext(status);
         if (tzid == NULL) {
             break;
@@ -823,8 +823,8 @@ TimeZoneRuleTest::TestVTimeZoneRoundTrip(void) {
                 // because there is no good way to represent the initial time with
                 // VTIMEZONE.
                 int32_t raw1, raw2, dst1, dst2;
-                tz->getOffset(startTime, FALSE, raw1, dst1, status);
-                vtz_new->getOffset(startTime, FALSE, raw2, dst2, status);
+                tz->getOffset(startTime, false, raw1, dst1, status);
+                vtz_new->getOffset(startTime, false, raw2, dst2, status);
                 if (U_FAILURE(status)) {
                     errln("FAIL: error status is returned from getOffset");
                 } else {
@@ -834,13 +834,13 @@ TimeZoneRuleTest::TestVTimeZoneRoundTrip(void) {
                             + dateToString(startTime));
                     }
                     TimeZoneTransition trans;
-                    UBool avail = tz->getNextTransition(startTime, FALSE, trans);
+                    UBool avail = tz->getNextTransition(startTime, false, trans);
                     if (avail) {
                         if (!vtz_new->hasEquivalentTransitions(*tz, trans.getTime(),
-                                endTime, TRUE, status)) {
+                                endTime, true, status)) {
                             int32_t maxDelta = 1000;
                             if (!hasEquivalentTransitions(*vtz_new, *tz, trans.getTime() + maxDelta,
-                                endTime, TRUE, maxDelta, status)) {
+                                endTime, true, maxDelta, status)) {
                                 errln("FAIL: VTimeZone for " + *tzid +
                                     " is not equivalent to its OlsonTimeZone corresponding.");
                             } else {
@@ -880,7 +880,7 @@ TimeZoneRuleTest::TestVTimeZoneRoundTripPartial(void) {
 
     UErrorCode status = U_ZERO_ERROR;
     TestZIDEnumeration tzenum(!quick);
-    while (TRUE) {
+    while (true) {
         const UnicodeString *tzid = tzenum.snext(status);
         if (tzid == NULL) {
             break;
@@ -913,8 +913,8 @@ TimeZoneRuleTest::TestVTimeZoneRoundTripPartial(void) {
                     // because there is no good way to represent the initial time with
                     // VTIMEZONE.
                     int32_t raw1, raw2, dst1, dst2;
-                    tz->getOffset(startTime, FALSE, raw1, dst1, status);
-                    vtz_new->getOffset(startTime, FALSE, raw2, dst2, status);
+                    tz->getOffset(startTime, false, raw1, dst1, status);
+                    vtz_new->getOffset(startTime, false, raw2, dst2, status);
                     if (U_FAILURE(status)) {
                         errln("FAIL: error status is returned from getOffset");
                     } else {
@@ -924,13 +924,13 @@ TimeZoneRuleTest::TestVTimeZoneRoundTripPartial(void) {
                                 + dateToString(startTime));
                         }
                         TimeZoneTransition trans;
-                        UBool avail = tz->getNextTransition(startTime, FALSE, trans);
+                        UBool avail = tz->getNextTransition(startTime, false, trans);
                         if (avail) {
                             if (!vtz_new->hasEquivalentTransitions(*tz, trans.getTime(),
-                                    endTime, TRUE, status)) {
+                                    endTime, true, status)) {
                                 int32_t maxDelta = 1000;
                                 if (!hasEquivalentTransitions(*vtz_new, *tz, trans.getTime() + maxDelta,
-                                    endTime, TRUE, maxDelta, status)) {
+                                    endTime, true, maxDelta, status)) {
                                     errln("FAIL: VTimeZone for " + *tzid +
                                         " is not equivalent to its OlsonTimeZone corresponding.");
                                 } else {
@@ -976,7 +976,7 @@ TimeZoneRuleTest::TestVTimeZoneSimpleWrite(void) {
 
     UErrorCode status = U_ZERO_ERROR;
     TestZIDEnumeration tzenum(!quick);
-    while (TRUE) {
+    while (true) {
         const UnicodeString *tzid = tzenum.snext(status);
         if (tzid == NULL) {
             break;
@@ -1006,8 +1006,8 @@ TimeZoneRuleTest::TestVTimeZoneSimpleWrite(void) {
                     // Check equivalency
                     int32_t raw0, dst0;
                     int32_t raw1, dst1;
-                    vtz_org->getOffset(time, FALSE, raw0, dst0, status);
-                    vtz_new->getOffset(time, FALSE, raw1, dst1, status);
+                    vtz_org->getOffset(time, false, raw0, dst0, status);
+                    vtz_new->getOffset(time, false, raw1, dst1, status);
                     if (U_SUCCESS(status)) {
                         if (raw0 != raw1 || dst0 != dst1) {
                             errln("FAIL: VTimeZone writeSimple for " + *tzid + " at "
@@ -1116,7 +1116,7 @@ TimeZoneRuleTest::TestGetSimpleRules(void) {
     InitialTimeZoneRule *initial;
     AnnualTimeZoneRule *std, *dst;
     for (int32_t i = 0; i < numTimes ; i++) {
-        while (TRUE) {
+        while (true) {
             const UnicodeString *tzid = tzenum.snext(status);
             if (tzid == NULL) {
                 break;
@@ -1178,11 +1178,11 @@ TimeZoneRuleTest::TestGetSimpleRules(void) {
             }
 
             int32_t raw0, dst0, raw1, dst1;
-            tz->getOffset(testTimes[i], FALSE, raw0, dst0, status);
+            tz->getOffset(testTimes[i], false, raw0, dst0, status);
             if (U_FAILURE(status)) {
                 errln("FAIL: couldn't get offsets from tz for " + *tzid);
             }
-            rbtz->getOffset(testTimes[i], FALSE, raw1, dst1, status);
+            rbtz->getOffset(testTimes[i], false, raw1, dst1, status);
             if (U_FAILURE(status)) {
                 errln("FAIL: couldn't get offsets from rbtz for " + *tzid);
             }
@@ -1204,13 +1204,13 @@ TimeZoneRuleTest::TestTimeZoneRuleCoverage(void) {
     UDate time2 = getUTCMillis(2015, UCAL_JULY, 4);
     UDate time3 = getUTCMillis(1950, UCAL_JULY, 4);
 
-    DateTimeRule *dtr1 = new DateTimeRule(UCAL_FEBRUARY, 29, UCAL_SUNDAY, FALSE,
+    DateTimeRule *dtr1 = new DateTimeRule(UCAL_FEBRUARY, 29, UCAL_SUNDAY, false,
             3*HOUR, DateTimeRule::WALL_TIME); // Last Sunday on or before Feb 29, at 3 AM, wall time
     DateTimeRule *dtr2 = new DateTimeRule(UCAL_MARCH, 11, 2*HOUR,
             DateTimeRule::STANDARD_TIME); // Mar 11, at 2 AM, standard time
     DateTimeRule *dtr3 = new DateTimeRule(UCAL_OCTOBER, -1, UCAL_SATURDAY,
             6*HOUR, DateTimeRule::UTC_TIME); //Last Saturday in Oct, at 6 AM, UTC
-    DateTimeRule *dtr4 = new DateTimeRule(UCAL_MARCH, 8, UCAL_SUNDAY, TRUE,
+    DateTimeRule *dtr4 = new DateTimeRule(UCAL_MARCH, 8, UCAL_SUNDAY, true,
             2*HOUR, DateTimeRule::WALL_TIME); // First Sunday on or after Mar 8, at 2 AM, wall time
 
     AnnualTimeZoneRule *a1 = new AnnualTimeZoneRule("a1", -3*HOUR, 1*HOUR, *dtr1,
@@ -1294,7 +1294,7 @@ TimeZoneRuleTest::TestTimeZoneRuleCoverage(void) {
     }
     b2 = a3->getStartInYear(2015, -3*HOUR, 0, d2);
     if (b2) {
-        errln("FAIL: AnnualTimeZoneRule::getStartInYear returned TRUE for 2015 which is out of rule range");
+        errln("FAIL: AnnualTimeZoneRule::getStartInYear returned true for 2015 which is out of rule range");
     }
 
     // AnnualTimeZone::getFirstStart
@@ -1307,7 +1307,7 @@ TimeZoneRuleTest::TestTimeZoneRuleCoverage(void) {
     // AnnualTimeZone::getFinalStart
     b1 = a1->getFinalStart(-3*HOUR, 0, d1);
     if (b1) {
-        errln("FAIL: getFinalStart returned TRUE for a1");
+        errln("FAIL: getFinalStart returned true for a1");
     }
     b1 = a1->getStartInYear(2010, -3*HOUR, 0, d1);
     b2 = a3->getFinalStart(-3*HOUR, 0, d2);
@@ -1316,37 +1316,37 @@ TimeZoneRuleTest::TestTimeZoneRuleCoverage(void) {
     }
 
     // AnnualTimeZone::getNextStart / getPreviousStart
-    b1 = a1->getNextStart(time1, -3*HOUR, 0, FALSE, d1);
+    b1 = a1->getNextStart(time1, -3*HOUR, 0, false, d1);
     if (!b1) {
-        errln("FAIL: getNextStart returned FALSE for ai");
+        errln("FAIL: getNextStart returned false for ai");
     } else {
-        b2 = a1->getPreviousStart(d1, -3*HOUR, 0, TRUE, d2);
+        b2 = a1->getPreviousStart(d1, -3*HOUR, 0, true, d2);
         if (!b2 || d1 != d2) {
             errln("FAIL: Bad Date is returned by getPreviousStart");
         }
     }
-    b1 = a3->getNextStart(time2, -3*HOUR, 0, FALSE, d1);
+    b1 = a3->getNextStart(time2, -3*HOUR, 0, false, d1);
     if (b1) {
-        dataerrln("FAIL: getNextStart must return FALSE when no start time is available after the base time");
+        dataerrln("FAIL: getNextStart must return false when no start time is available after the base time");
     }
     b1 = a3->getFinalStart(-3*HOUR, 0, d1);
-    b2 = a3->getPreviousStart(time2, -3*HOUR, 0, FALSE, d2);
+    b2 = a3->getPreviousStart(time2, -3*HOUR, 0, false, d2);
     if (!b1 || !b2 || d1 != d2) {
         dataerrln("FAIL: getPreviousStart does not match with getFinalStart after the end year");
     }
 
     // AnnualTimeZone::isEquavalentTo
     if (!a1->isEquivalentTo(*a2)) {
-        errln("FAIL: AnnualTimeZoneRule a1 is equivalent to a2, but returned FALSE");
+        errln("FAIL: AnnualTimeZoneRule a1 is equivalent to a2, but returned false");
     }
     if (a1->isEquivalentTo(*a3)) {
-        errln("FAIL: AnnualTimeZoneRule a1 is not equivalent to a3, but returned TRUE");
+        errln("FAIL: AnnualTimeZoneRule a1 is not equivalent to a3, but returned true");
     }
     if (!a1->isEquivalentTo(*a1)) {
-        errln("FAIL: AnnualTimeZoneRule a1 is equivalent to itself, but returned FALSE");
+        errln("FAIL: AnnualTimeZoneRule a1 is equivalent to itself, but returned false");
     }
     if (a1->isEquivalentTo(*t1)) {
-        errln("FAIL: AnnualTimeZoneRule is not equivalent to TimeArrayTimeZoneRule, but returned TRUE");
+        errln("FAIL: AnnualTimeZoneRule is not equivalent to TimeArrayTimeZoneRule, but returned true");
     }
 
     // InitialTimezoneRule::operator=/clone
@@ -1366,31 +1366,31 @@ TimeZoneRuleTest::TestTimeZoneRuleCoverage(void) {
 
     // InitialTimeZoneRule::isEquivalentRule
     if (!i1->isEquivalentTo(*i2)) {
-        errln("FAIL: InitialTimeZoneRule i1 is equivalent to i2, but returned FALSE");
+        errln("FAIL: InitialTimeZoneRule i1 is equivalent to i2, but returned false");
     }
     if (i1->isEquivalentTo(*i3)) {
-        errln("FAIL: InitialTimeZoneRule i1 is not equivalent to i3, but returned TRUE");
+        errln("FAIL: InitialTimeZoneRule i1 is not equivalent to i3, but returned true");
     }
     if (i1->isEquivalentTo(*a1)) {
-        errln("FAIL: An InitialTimeZoneRule is not equivalent to an AnnualTimeZoneRule, but returned TRUE");
+        errln("FAIL: An InitialTimeZoneRule is not equivalent to an AnnualTimeZoneRule, but returned true");
     }
 
     // InitialTimeZoneRule::getFirstStart/getFinalStart/getNextStart/getPreviousStart
     b1 = i1->getFirstStart(0, 0, d1);
     if (b1) {
-        errln("FAIL: InitialTimeZone::getFirstStart returned TRUE");
+        errln("FAIL: InitialTimeZone::getFirstStart returned true");
     }
     b1 = i1->getFinalStart(0, 0, d1);
     if (b1) {
-        errln("FAIL: InitialTimeZone::getFinalStart returned TRUE");
+        errln("FAIL: InitialTimeZone::getFinalStart returned true");
     }
-    b1 = i1->getNextStart(time1, 0, 0, FALSE, d1);
+    b1 = i1->getNextStart(time1, 0, 0, false, d1);
     if (b1) {
-        errln("FAIL: InitialTimeZone::getNextStart returned TRUE");
+        errln("FAIL: InitialTimeZone::getNextStart returned true");
     }
-    b1 = i1->getPreviousStart(time1, 0, 0, FALSE, d1);
+    b1 = i1->getPreviousStart(time1, 0, 0, false, d1);
     if (b1) {
-        errln("FAIL: InitialTimeZone::getPreviousStart returned TRUE");
+        errln("FAIL: InitialTimeZone::getPreviousStart returned true");
     }
 
     // TimeArrayTimeZoneRule::operator=/clone
@@ -1416,7 +1416,7 @@ TimeZoneRuleTest::TestTimeZoneRuleCoverage(void) {
     // TimeArrayTimeZoneRule::getStartTimeAt
     b1 = t1->getStartTimeAt(-1, d1);
     if (b1) {
-        errln("FAIL: TimeArrayTimeZoneRule::getStartTimeAt returned TRUE for index -1");
+        errln("FAIL: TimeArrayTimeZoneRule::getStartTimeAt returned true for index -1");
     }
     b1 = t1->getStartTimeAt(0, d1);
     if (!b1 || d1 != trtimes1[0]) {
@@ -1424,7 +1424,7 @@ TimeZoneRuleTest::TestTimeZoneRuleCoverage(void) {
     }
     b1 = t1->getStartTimeAt(1, d1);
     if (b1) {
-        errln("FAIL: TimeArrayTimeZoneRule::getStartTimeAt returned TRUE for index 1");
+        errln("FAIL: TimeArrayTimeZoneRule::getStartTimeAt returned true for index 1");
     }
 
     // TimeArrayTimeZoneRule::getTimeType
@@ -1457,36 +1457,36 @@ TimeZoneRuleTest::TestTimeZoneRuleCoverage(void) {
     }
 
     // TimeArrayTimeZoneRule::getNextStart/getPreviousStart
-    b1 = t3->getNextStart(time1, -3*HOUR, 1*HOUR, FALSE, d1);
+    b1 = t3->getNextStart(time1, -3*HOUR, 1*HOUR, false, d1);
     if (b1) {
-        dataerrln("FAIL: getNextStart returned TRUE after the final transition for t3");
+        dataerrln("FAIL: getNextStart returned true after the final transition for t3");
     }
-    b1 = t3->getPreviousStart(time1, -3*HOUR, 1*HOUR, FALSE, d1);
+    b1 = t3->getPreviousStart(time1, -3*HOUR, 1*HOUR, false, d1);
     if (!b1 || d1 != trtimes2[1]) {
         dataerrln("FAIL: Bad start time returned by getPreviousStart for t3");
     } else {
-        b2 = t3->getPreviousStart(d1, -3*HOUR, 1*HOUR, FALSE, d2);
+        b2 = t3->getPreviousStart(d1, -3*HOUR, 1*HOUR, false, d2);
         if (!b2 || d2 != trtimes2[0]) {
             errln("FAIL: Bad start time returned by getPreviousStart for t3");
         }
     }
-    b1 = t3->getPreviousStart(time3, -3*HOUR, 1*HOUR, FALSE, d1); //time3 - year 1950, no result expected
+    b1 = t3->getPreviousStart(time3, -3*HOUR, 1*HOUR, false, d1); //time3 - year 1950, no result expected
     if (b1) {
-        errln("FAIL: getPreviousStart returned TRUE before the first transition for t3");
+        errln("FAIL: getPreviousStart returned true before the first transition for t3");
     }
 
     // TimeArrayTimeZoneRule::isEquivalentTo
     if (!t1->isEquivalentTo(*t2)) {
-        errln("FAIL: TimeArrayTimeZoneRule t1 is equivalent to t2, but returned FALSE");
+        errln("FAIL: TimeArrayTimeZoneRule t1 is equivalent to t2, but returned false");
     }
     if (t1->isEquivalentTo(*t3)) {
-        errln("FAIL: TimeArrayTimeZoneRule t1 is not equivalent to t3, but returned TRUE");
+        errln("FAIL: TimeArrayTimeZoneRule t1 is not equivalent to t3, but returned true");
     }
     if (t1->isEquivalentTo(*t4)) {
-        errln("FAIL: TimeArrayTimeZoneRule t1 is not equivalent to t4, but returned TRUE");
+        errln("FAIL: TimeArrayTimeZoneRule t1 is not equivalent to t4, but returned true");
     }
     if (t1->isEquivalentTo(*a1)) {
-        errln("FAIL: TimeArrayTimeZoneRule is not equivalent to AnnualTimeZoneRule, but returned TRUE");
+        errln("FAIL: TimeArrayTimeZoneRule is not equivalent to AnnualTimeZoneRule, but returned true");
     }
 
     delete dtr1;
@@ -1524,11 +1524,11 @@ TimeZoneRuleTest::TestSimpleTimeZoneCoverage(void) {
     // BasicTimeZone API implementation in SimpleTimeZone
     SimpleTimeZone *stz1 = new SimpleTimeZone(-5*HOUR, "GMT-5");
 
-    avail1 = stz1->getNextTransition(time1, FALSE, tzt1);
+    avail1 = stz1->getNextTransition(time1, false, tzt1);
     if (avail1) {
         errln("FAIL: No transition must be returned by getNextTransition for SimpleTimeZone with no DST rule");
     }
-    avail1 = stz1->getPreviousTransition(time1, FALSE, tzt1);
+    avail1 = stz1->getPreviousTransition(time1, false, tzt1);
     if (avail1) {
         errln("FAIL: No transition must be returned by getPreviousTransition  for SimpleTimeZone with no DST rule");
     }
@@ -1559,11 +1559,11 @@ TimeZoneRuleTest::TestSimpleTimeZoneCoverage(void) {
         errln("FAIL: Failed to set DST rules in a SimpleTimeZone");
     }
 
-    avail1 = stz1->getNextTransition(time1, FALSE, tzt1);
+    avail1 = stz1->getNextTransition(time1, false, tzt1);
     if (!avail1) {
         errln("FAIL: Non-null transition must be returned by getNextTransition for SimpleTimeZone with a DST rule");
     }
-    avail1 = stz1->getPreviousTransition(time1, FALSE, tzt1);
+    avail1 = stz1->getPreviousTransition(time1, false, tzt1);
     if (!avail1) {
         errln("FAIL: Non-null transition must be returned by getPreviousTransition  for SimpleTimeZone with a DST rule");
     }
@@ -1598,12 +1598,12 @@ TimeZoneRuleTest::TestSimpleTimeZoneCoverage(void) {
 
     // Set DST start year
     stz1->setStartYear(2007);
-    avail1 = stz1->getPreviousTransition(time1, FALSE, tzt1);
+    avail1 = stz1->getPreviousTransition(time1, false, tzt1);
     if (avail1) {
         errln("FAIL: No transition must be returned before 1990");
     }
-    avail1 = stz1->getNextTransition(time1, FALSE, tzt1); // transition after 1990-06-01
-    avail2 = stz1->getNextTransition(time2, FALSE, tzt2); // transition after 2000-06-01
+    avail1 = stz1->getNextTransition(time1, false, tzt1); // transition after 1990-06-01
+    avail2 = stz1->getNextTransition(time2, false, tzt2); // transition after 2000-06-01
     if (!avail1 || !avail2 || tzt1 != tzt2) {
         errln("FAIL: Bad transition returned by SimpleTimeZone::getNextTransition");
     }
@@ -1653,11 +1653,11 @@ TimeZoneRuleTest::TestVTimeZoneCoverage(void) {
     int32_t rawOffset1, dstSavings1;
     int32_t rawOffset2, dstSavings2;
 
-    otz->getOffset(t, FALSE, rawOffset1, dstSavings1, status);
+    otz->getOffset(t, false, rawOffset1, dstSavings1, status);
     if (U_FAILURE(status)) {
         errln("FAIL: getOffset(5 args) failed for otz");
     }
-    vtz->getOffset(t, FALSE, rawOffset2, dstSavings2, status);
+    vtz->getOffset(t, false, rawOffset2, dstSavings2, status);
     if (U_FAILURE(status)) {
         errln("FAIL: getOffset(5 args) failed for vtz");
     }
@@ -1699,13 +1699,13 @@ TimeZoneRuleTest::TestVTimeZoneCoverage(void) {
 
     // hasSameRules
     UBool bSame = otz->hasSameRules(*vtz);
-    logln((UnicodeString)"OlsonTimeZone::hasSameRules(VTimeZone) should return FALSE always for now - actual: " + bSame);
+    logln((UnicodeString)"OlsonTimeZone::hasSameRules(VTimeZone) should return false always for now - actual: " + bSame);
 
     // getTZURL/setTZURL
     UnicodeString TZURL("http://icu-project.org/timezone");
     UnicodeString url;
     if (vtz->getTZURL(url)) {
-        errln("FAIL: getTZURL returned TRUE");
+        errln("FAIL: getTZURL returned true");
     }
     vtz->setTZURL(TZURL);
     if (!vtz->getTZURL(url) || url != TZURL) {
@@ -1715,7 +1715,7 @@ TimeZoneRuleTest::TestVTimeZoneCoverage(void) {
     // getLastModified/setLastModified
     UDate lastmod;
     if (vtz->getLastModified(lastmod)) {
-        errln("FAIL: getLastModified returned TRUE");
+        errln("FAIL: getLastModified returned true");
     }
     vtz->setLastModified(t);
     if (!vtz->getLastModified(lastmod) || lastmod != t) {
@@ -1725,13 +1725,13 @@ TimeZoneRuleTest::TestVTimeZoneCoverage(void) {
     // getNextTransition/getPreviousTransition
     UDate base = getUTCMillis(2007, UCAL_JULY, 1);
     TimeZoneTransition tzt1, tzt2;
-    UBool btr1 = otz->getNextTransition(base, TRUE, tzt1);
-    UBool btr2 = vtz->getNextTransition(base, TRUE, tzt2);
+    UBool btr1 = otz->getNextTransition(base, true, tzt1);
+    UBool btr2 = vtz->getNextTransition(base, true, tzt2);
     if (!btr1 || !btr2 || tzt1 != tzt2) {
         dataerrln("FAIL: getNextTransition returned different results in VTimeZone and OlsonTimeZone");
     }
-    btr1 = otz->getPreviousTransition(base, FALSE, tzt1);
-    btr2 = vtz->getPreviousTransition(base, FALSE, tzt2);
+    btr1 = otz->getPreviousTransition(base, false, tzt1);
+    btr2 = vtz->getPreviousTransition(base, false, tzt2);
     if (!btr1 || !btr2 || tzt1 != tzt2) {
         dataerrln("FAIL: getPreviousTransition returned different results in VTimeZone and OlsonTimeZone");
     }
@@ -1750,7 +1750,7 @@ TimeZoneRuleTest::TestVTimeZoneCoverage(void) {
     // hasEquivalentTransitions
     UDate time1 = getUTCMillis(1950, UCAL_JANUARY, 1);
     UDate time2 = getUTCMillis(2020, UCAL_JANUARY, 1);
-    UBool equiv = vtz->hasEquivalentTransitions(*otz, time1, time2, FALSE, status);
+    UBool equiv = vtz->hasEquivalentTransitions(*otz, time1, time2, false, status);
     if (U_FAILURE(status)) {
         dataerrln("FAIL: hasEquivalentTransitions failed for vtz/otz: %s", u_errorName(status));
     }
@@ -1806,7 +1806,7 @@ TimeZoneRuleTest::TestVTimeZoneCoverage(void) {
             errln("File %s, line %d, failed with status = %s", __FILE__, __LINE__, u_errorName(status));
             goto end_basic_tz_test;
         }
-        if (vtzFromBasic->hasSameRules(simpleTZ2) == FALSE) {
+        if (vtzFromBasic->hasSameRules(simpleTZ2) == false) {
             errln("File %s, line %d, failed hasSameRules() ", __FILE__, __LINE__);
             goto end_basic_tz_test;
         }
@@ -1873,7 +1873,7 @@ TimeZoneRuleTest::TestVTimeZoneParse(void) {
         }
         // Make sure offsets are correct
         int32_t rawOffset, dstSavings;
-        tokyo->getOffset(Calendar::getNow(), FALSE, rawOffset, dstSavings, status);
+        tokyo->getOffset(Calendar::getNow(), false, rawOffset, dstSavings, status);
         if (U_FAILURE(status)) {
             errln("FAIL: getOffset failed for tokyo");
         }
@@ -2134,7 +2134,7 @@ TimeZoneRuleTest::TestT6216(void) {
         for (j = 0; j < numTimes; j++) {
             int32_t raw, dst;
             status = U_ZERO_ERROR;
-            vtz->getOffset(times[j], FALSE, raw, dst, status);
+            vtz->getOffset(times[j], false, raw, dst, status);
             if (U_FAILURE(status)) {
                 errln((UnicodeString)"FAIL: getOffset failed for time zone " + i + " at " + times[j]);
             }
@@ -2161,7 +2161,7 @@ TimeZoneRuleTest::TestT6669(void) {
     UDate expectedPrev = 1215298800000.0; //2008-07-06T00:00:00
 
     TimeZoneTransition tzt;
-    UBool avail = stz.getNextTransition(t, FALSE, tzt);
+    UBool avail = stz.getNextTransition(t, false, tzt);
     if (!avail) {
         errln("FAIL: No transition returned by getNextTransition.");
     } else if (tzt.getTime() != expectedNext) {
@@ -2169,7 +2169,7 @@ TimeZoneRuleTest::TestT6669(void) {
             + tzt.getTime() + " Expected: " + expectedNext);
     }
 
-    avail = stz.getPreviousTransition(t, TRUE, tzt);
+    avail = stz.getPreviousTransition(t, true, tzt);
     if (!avail) {
         errln("FAIL: No transition returned by getPreviousTransition.");
     } else if (tzt.getTime() != expectedPrev) {
@@ -2332,13 +2332,13 @@ TimeZoneRuleTest::verifyTransitions(BasicTimeZone& icutz, UDate start, UDate end
     int32_t raw, dst, raw0, dst0;
     TimeZoneTransition tzt, tzt0;
     UBool avail;
-    UBool first = TRUE;
+    UBool first = true;
     UnicodeString tzid;
 
     // Ascending
     time = start;
-    while (TRUE) {
-        avail = icutz.getNextTransition(time, FALSE, tzt);
+    while (true) {
+        avail = icutz.getNextTransition(time, false, tzt);
         if (!avail) {
             break;
         }
@@ -2346,8 +2346,8 @@ TimeZoneRuleTest::verifyTransitions(BasicTimeZone& icutz, UDate start, UDate end
         if (time >= end) {
             break;
         }
-        icutz.getOffset(time, FALSE, raw, dst, status);
-        icutz.getOffset(time - 1, FALSE, raw0, dst0, status);
+        icutz.getOffset(time, false, raw, dst, status);
+        icutz.getOffset(time - 1, false, raw0, dst0, status);
         if (U_FAILURE(status)) {
             errln("FAIL: Error in getOffset");
             break;
@@ -2364,14 +2364,14 @@ TimeZoneRuleTest::verifyTransitions(BasicTimeZone& icutz, UDate start, UDate end
                     + dateToString(time) + " for " + icutz.getID(tzid));                
         }
         tzt0 = tzt;
-        first = FALSE;
+        first = false;
     }
 
     // Descending
-    first = TRUE;
+    first = true;
     time = end;
     while(true) {
-        avail = icutz.getPreviousTransition(time, FALSE, tzt);
+        avail = icutz.getPreviousTransition(time, false, tzt);
         if (!avail) {
             break;
         }
@@ -2379,8 +2379,8 @@ TimeZoneRuleTest::verifyTransitions(BasicTimeZone& icutz, UDate start, UDate end
         if (time <= start) {
             break;
         }
-        icutz.getOffset(time, FALSE, raw, dst, status);
-        icutz.getOffset(time - 1, FALSE, raw0, dst0, status);
+        icutz.getOffset(time, false, raw, dst, status);
+        icutz.getOffset(time - 1, false, raw0, dst0, status);
         if (U_FAILURE(status)) {
             errln("FAIL: Error in getOffset");
             break;
@@ -2398,7 +2398,7 @@ TimeZoneRuleTest::verifyTransitions(BasicTimeZone& icutz, UDate start, UDate end
                     + dateToString(time) + " for " + icutz.getID(tzid));                
         }
         tzt0 = tzt;
-        first = FALSE;
+        first = false;
     }
 }
 
@@ -2417,19 +2417,19 @@ TimeZoneRuleTest::compareTransitionsAscending(BasicTimeZone& z1, BasicTimeZone&
     z2.getID(zid2);
 
     UDate time = start;
-    while (TRUE) {
+    while (true) {
         avail1 = z1.getNextTransition(time, inclusive, tzt1);
         avail2 = z2.getNextTransition(time, inclusive, tzt2);
 
-        inRange1 = inRange2 = FALSE;
+        inRange1 = inRange2 = false;
         if (avail1) {
             if (tzt1.getTime() < end || (inclusive && tzt1.getTime() == end)) {
-                inRange1 = TRUE;
+                inRange1 = true;
             }
         }
         if (avail2) {
             if (tzt2.getTime() < end || (inclusive && tzt2.getTime() == end)) {
-                inRange2 = TRUE;
+                inRange2 = true;
             }
         }
         if (!inRange1 && !inRange2) {
@@ -2474,19 +2474,19 @@ TimeZoneRuleTest::compareTransitionsDescending(BasicTimeZone& z1, BasicTimeZone&
     z2.getID(zid2);
 
     UDate time = end;
-    while (TRUE) {
+    while (true) {
         avail1 = z1.getPreviousTransition(time, inclusive, tzt1);
         avail2 = z2.getPreviousTransition(time, inclusive, tzt2);
 
-        inRange1 = inRange2 = FALSE;
+        inRange1 = inRange2 = false;
         if (avail1) {
             if (tzt1.getTime() > start || (inclusive && tzt1.getTime() == start)) {
-                inRange1 = TRUE;
+                inRange1 = true;
             }
         }
         if (avail2) {
             if (tzt2.getTime() > start || (inclusive && tzt2.getTime() == start)) {
-                inRange2 = TRUE;
+                inRange2 = true;
             }
         }
         if (!inRange1 && !inRange2) {
@@ -2517,66 +2517,66 @@ TimeZoneRuleTest::compareTransitionsDescending(BasicTimeZone& z1, BasicTimeZone&
 }
 
 // Slightly modified version of BasicTimeZone::hasEquivalentTransitions.
-// This version returns TRUE if transition time delta is within the given
+// This version returns true if transition time delta is within the given
 // delta range.
 static UBool hasEquivalentTransitions(/*const*/ BasicTimeZone& tz1, /*const*/BasicTimeZone& tz2,
                                         UDate start, UDate end,
                                         UBool ignoreDstAmount, int32_t maxTransitionTimeDelta,
                                         UErrorCode& status) {
     if (U_FAILURE(status)) {
-        return FALSE;
+        return false;
     }
     if (tz1.hasSameRules(tz2)) {
-        return TRUE;
+        return true;
     }
     // Check the offsets at the start time
     int32_t raw1, raw2, dst1, dst2;
-    tz1.getOffset(start, FALSE, raw1, dst1, status);
+    tz1.getOffset(start, false, raw1, dst1, status);
     if (U_FAILURE(status)) {
-        return FALSE;
+        return false;
     }
-    tz2.getOffset(start, FALSE, raw2, dst2, status);
+    tz2.getOffset(start, false, raw2, dst2, status);
     if (U_FAILURE(status)) {
-        return FALSE;
+        return false;
     }
     if (ignoreDstAmount) {
         if ((raw1 + dst1 != raw2 + dst2)
             || (dst1 != 0 && dst2 == 0)
             || (dst1 == 0 && dst2 != 0)) {
-            return FALSE;
+            return false;
         }
     } else {
         if (raw1 != raw2 || dst1 != dst2) {
-            return FALSE;
+            return false;
         }            
     }
     // Check transitions in the range
     UDate time = start;
     TimeZoneTransition tr1, tr2;
-    while (TRUE) {
-        UBool avail1 = tz1.getNextTransition(time, FALSE, tr1);
-        UBool avail2 = tz2.getNextTransition(time, FALSE, tr2);
+    while (true) {
+        UBool avail1 = tz1.getNextTransition(time, false, tr1);
+        UBool avail2 = tz2.getNextTransition(time, false, tr2);
 
         if (ignoreDstAmount) {
             // Skip a transition which only differ the amount of DST savings
-            while (TRUE) {
+            while (true) {
                 if (avail1
                         && tr1.getTime() <= end
                         && (tr1.getFrom()->getRawOffset() + tr1.getFrom()->getDSTSavings()
                                 == tr1.getTo()->getRawOffset() + tr1.getTo()->getDSTSavings())
                         && (tr1.getFrom()->getDSTSavings() != 0 && tr1.getTo()->getDSTSavings() != 0)) {
-                    tz1.getNextTransition(tr1.getTime(), FALSE, tr1);
+                    tz1.getNextTransition(tr1.getTime(), false, tr1);
                 } else {
                     break;
                 }
             }
-            while (TRUE) {
+            while (true) {
                 if (avail2
                         && tr2.getTime() <= end
                         && (tr2.getFrom()->getRawOffset() + tr2.getFrom()->getDSTSavings()
                                 == tr2.getTo()->getRawOffset() + tr2.getTo()->getDSTSavings())
                         && (tr2.getFrom()->getDSTSavings() != 0 && tr2.getTo()->getDSTSavings() != 0)) {
-                    tz2.getNextTransition(tr2.getTime(), FALSE, tr2);
+                    tz2.getNextTransition(tr2.getTime(), false, tr2);
                 } else {
                     break;
                 }
@@ -2590,28 +2590,28 @@ static UBool hasEquivalentTransitions(/*const*/ BasicTimeZone& tz1, /*const*/Bas
             break;
         }
         if (!inRange1 || !inRange2) {
-            return FALSE;
+            return false;
         }
         double delta = tr1.getTime() >= tr2.getTime() ? tr1.getTime() - tr2.getTime() : tr2.getTime() - tr1.getTime();
         if (delta > (double)maxTransitionTimeDelta) {
-            return FALSE;
+            return false;
         }
         if (ignoreDstAmount) {
             if (tr1.getTo()->getRawOffset() + tr1.getTo()->getDSTSavings()
                         != tr2.getTo()->getRawOffset() + tr2.getTo()->getDSTSavings()
                     || (tr1.getTo()->getDSTSavings() != 0 &&  tr2.getTo()->getDSTSavings() == 0)
                     || (tr1.getTo()->getDSTSavings() == 0 &&  tr2.getTo()->getDSTSavings() != 0)) {
-                return FALSE;
+                return false;
             }
         } else {
             if (tr1.getTo()->getRawOffset() != tr2.getTo()->getRawOffset() ||
                 tr1.getTo()->getDSTSavings() != tr2.getTo()->getDSTSavings()) {
-                return FALSE;
+                return false;
             }
         }
         time = tr1.getTime() > tr2.getTime() ? tr1.getTime() : tr2.getTime();
     }
-    return TRUE;
+    return true;
 }
 
 // Test case for ticket#8943
@@ -2647,7 +2647,7 @@ TimeZoneRuleTest::TestT8943(void) {
         errln("Failed to construct a RuleBasedTimeZone");
     } else {
         int32_t raw, dst;
-        rbtz->getOffset(1293822000000.0 /* 2010-12-31 19:00:00 UTC */, FALSE, raw, dst, status);
+        rbtz->getOffset(1293822000000.0 /* 2010-12-31 19:00:00 UTC */, false, raw, dst, status);
         if (U_FAILURE(status)) {
             errln("Error invoking getOffset");
         } else if (raw != 21600000 || dst != 0) {
diff --git a/icu4c/source/test/intltest/tztest.cpp b/icu4c/source/test/intltest/tztest.cpp
index d7e0bd6d054..b3b5d305529 100644
--- a/icu4c/source/test/intltest/tztest.cpp
+++ b/icu4c/source/test/intltest/tztest.cpp
@@ -95,7 +95,7 @@ TimeZoneTest::TestGenericAPI()
     int32_t offset = 12345;
 
     SimpleTimeZone *zone = new SimpleTimeZone(offset, id);
-    if (zone->useDaylightTime()) errln("FAIL: useDaylightTime should return FALSE");
+    if (zone->useDaylightTime()) errln("FAIL: useDaylightTime should return false");
 
     TimeZone* zoneclone = zone->clone();
     if (!(*zoneclone == *zone)) errln("FAIL: clone or operator== failed");
@@ -177,12 +177,12 @@ TimeZoneTest::TestRuleAPI()
 
     UDate offset = 60*60*1000*1.75; // Pick a weird offset
     SimpleTimeZone *zone = new SimpleTimeZone((int32_t)offset, "TestZone");
-    if (zone->useDaylightTime()) errln("FAIL: useDaylightTime should return FALSE");
+    if (zone->useDaylightTime()) errln("FAIL: useDaylightTime should return false");
 
     // Establish our expected transition times.  Do this with a non-DST
     // calendar with the (above) declared local offset.
     GregorianCalendar *gc = new GregorianCalendar(*zone, status);
-    if (failure(status, "new GregorianCalendar", TRUE)) return;
+    if (failure(status, "new GregorianCalendar", true)) return;
     gc->clear();
     gc->set(1990, UCAL_MARCH, 1);
     UDate marchOneStd = gc->getTime(status); // Local Std time midnight
@@ -251,8 +251,8 @@ TimeZoneTest::findTransition(const TimeZone& tz,
     UBool startsInDST = tz.inDaylightTime(min, ec);
     if (failure(ec, "TimeZone::inDaylightTime")) return;
     if (tz.inDaylightTime(max, ec) == startsInDST) {
-        logln("Error: " + tz.getID(id) + ".inDaylightTime(" + dateToString(min) + ") = " + (startsInDST?"TRUE":"FALSE") +
-              ", inDaylightTime(" + dateToString(max) + ") = " + (startsInDST?"TRUE":"FALSE"));
+        logln("Error: " + tz.getID(id) + ".inDaylightTime(" + dateToString(min) + ") = " + (startsInDST?"true":"false") +
+              ", inDaylightTime(" + dateToString(max) + ") = " + (startsInDST?"true":"false"));
         return;
     }
     if (failure(ec, "TimeZone::inDaylightTime")) return;
@@ -282,7 +282,7 @@ TimeZoneTest::testUsingBinarySearch(const TimeZone& tz,
     UBool startsInDST = tz.inDaylightTime(min, status);
     if (failure(status, "TimeZone::inDaylightTime")) return;
     if (tz.inDaylightTime(max, status) == startsInDST) {
-        logln("Error: inDaylightTime(" + dateToString(max) + ") != " + ((!startsInDST)?"TRUE":"FALSE"));
+        logln("Error: inDaylightTime(" + dateToString(max) + ") != " + ((!startsInDST)?"true":"false"));
         return;
     }
     if (failure(status, "TimeZone::inDaylightTime")) return;
@@ -351,9 +351,9 @@ TimeZoneTest::TestVariousAPI518()
     UDate d = date(97, UCAL_APRIL, 30);
     UnicodeString str;
     logln("The timezone is " + time_zone->getID(str));
-    if (!time_zone->inDaylightTime(d, status)) dataerrln("FAIL: inDaylightTime returned FALSE");
-    if (failure(status, "TimeZone::inDaylightTime", TRUE)) return;
-    if (!time_zone->useDaylightTime()) dataerrln("FAIL: useDaylightTime returned FALSE");
+    if (!time_zone->inDaylightTime(d, status)) dataerrln("FAIL: inDaylightTime returned false");
+    if (failure(status, "TimeZone::inDaylightTime", true)) return;
+    if (!time_zone->useDaylightTime()) dataerrln("FAIL: useDaylightTime returned false");
     if (time_zone->getRawOffset() != - 8 * millisPerHour) dataerrln("FAIL: getRawOffset returned wrong value");
     GregorianCalendar *gc = new GregorianCalendar(status);
     if (U_FAILURE(status)) { errln("FAIL: Couldn't create GregorianCalendar"); return; }
@@ -640,11 +640,11 @@ TimeZoneTest::TestGetAvailableIDsNew()
     // And ID in any set, but not in canonical set must not be a canonical ID
     any->reset(ec);
     while ((id1 = any->snext(ec)) != NULL) {
-        UBool found = FALSE;
+        UBool found = false;
         canonical->reset(ec);
         while ((id2 = canonical->snext(ec)) != NULL) {
             if (*id1 == *id2) {
-                found = TRUE;
+                found = true;
                 break;
             }
         }
@@ -765,11 +765,11 @@ TimeZoneTest::checkContainsAll(StringEnumeration *s1, const char *name1,
     s2->reset(ec);
 
     while ((id2 = s2->snext(ec)) != NULL) {
-        UBool found = FALSE;
+        UBool found = false;
         s1->reset(ec);
         while ((id1 = s1->snext(ec)) != NULL) {
             if (*id1 == *id2) {
-                found = TRUE;
+                found = true;
                 break;
             }
         }
@@ -875,63 +875,63 @@ void TimeZoneTest::TestShortZoneIDs()
     }
     kReferenceList [] =
     {
-        {"HST", -600, FALSE}, // Olson northamerica -10:00
-        {"AST", -540, TRUE},  // ICU Link - America/Anchorage
-        {"PST", -480, TRUE},  // ICU Link - America/Los_Angeles
-        {"PNT", -420, FALSE}, // ICU Link - America/Phoenix
-        {"MST", -420, FALSE}, // updated Aug 2003 aliu
-        {"CST", -360, TRUE},  // Olson northamerica -7:00
-        {"IET", -300, TRUE},  // ICU Link - America/Indiana/Indianapolis
-        {"EST", -300, FALSE}, // Olson northamerica -5:00
-        {"PRT", -240, FALSE}, // ICU Link - America/Puerto_Rico
-        {"CNT", -210, TRUE},  // ICU Link - America/St_Johns
-        {"AGT", -180, FALSE}, // ICU Link - America/Argentina/Buenos_Aires
+        {"HST", -600, false}, // Olson northamerica -10:00
+        {"AST", -540, true},  // ICU Link - America/Anchorage
+        {"PST", -480, true},  // ICU Link - America/Los_Angeles
+        {"PNT", -420, false}, // ICU Link - America/Phoenix
+        {"MST", -420, false}, // updated Aug 2003 aliu
+        {"CST", -360, true},  // Olson northamerica -7:00
+        {"IET", -300, true},  // ICU Link - America/Indiana/Indianapolis
+        {"EST", -300, false}, // Olson northamerica -5:00
+        {"PRT", -240, false}, // ICU Link - America/Puerto_Rico
+        {"CNT", -210, true},  // ICU Link - America/St_Johns
+        {"AGT", -180, false}, // ICU Link - America/Argentina/Buenos_Aires
         // Per https://mm.icann.org/pipermail/tz-announce/2019-July/000056.html
         //      Brazil has canceled DST and will stay on standard time indefinitely.
-        {"BET", -180, FALSE},  // ICU Link - America/Sao_Paulo
-        {"GMT", 0, FALSE},    // Olson etcetera Link - Etc/GMT
-        {"UTC", 0, FALSE},    // Olson etcetera 0
-        {"ECT", 60, TRUE},    // ICU Link - Europe/Paris
-        {"MET", 60, TRUE},    // Olson europe 1:00 C-Eur
-        {"CAT", 120, FALSE},  // ICU Link - Africa/Maputo
-        {"ART", 120, FALSE},  // ICU Link - Africa/Cairo
-        {"EET", 120, TRUE},   // Olson europe 2:00 EU
-        {"EAT", 180, FALSE},  // ICU Link - Africa/Addis_Ababa
-        {"NET", 240, FALSE},  // ICU Link - Asia/Yerevan
-        {"PLT", 300, FALSE},  // ICU Link - Asia/Karachi
-        {"IST", 330, FALSE},  // ICU Link - Asia/Kolkata
-        {"BST", 360, FALSE},  // ICU Link - Asia/Dhaka
-        {"VST", 420, FALSE},  // ICU Link - Asia/Ho_Chi_Minh
-        {"CTT", 480, FALSE},  // ICU Link - Asia/Shanghai
-        {"JST", 540, FALSE},  // ICU Link - Asia/Tokyo
-        {"ACT", 570, FALSE},  // ICU Link - Australia/Darwin
-        {"AET", 600, TRUE},   // ICU Link - Australia/Sydney
-        {"SST", 660, FALSE},  // ICU Link - Pacific/Guadalcanal
-        {"NST", 720, TRUE},   // ICU Link - Pacific/Auckland
-        {"MIT", 780, FALSE},  // ICU Link - Pacific/Apia
+        {"BET", -180, false},  // ICU Link - America/Sao_Paulo
+        {"GMT", 0, false},    // Olson etcetera Link - Etc/GMT
+        {"UTC", 0, false},    // Olson etcetera 0
+        {"ECT", 60, true},    // ICU Link - Europe/Paris
+        {"MET", 60, true},    // Olson europe 1:00 C-Eur
+        {"CAT", 120, false},  // ICU Link - Africa/Maputo
+        {"ART", 120, false},  // ICU Link - Africa/Cairo
+        {"EET", 120, true},   // Olson europe 2:00 EU
+        {"EAT", 180, false},  // ICU Link - Africa/Addis_Ababa
+        {"NET", 240, false},  // ICU Link - Asia/Yerevan
+        {"PLT", 300, false},  // ICU Link - Asia/Karachi
+        {"IST", 330, false},  // ICU Link - Asia/Kolkata
+        {"BST", 360, false},  // ICU Link - Asia/Dhaka
+        {"VST", 420, false},  // ICU Link - Asia/Ho_Chi_Minh
+        {"CTT", 480, false},  // ICU Link - Asia/Shanghai
+        {"JST", 540, false},  // ICU Link - Asia/Tokyo
+        {"ACT", 570, false},  // ICU Link - Australia/Darwin
+        {"AET", 600, true},   // ICU Link - Australia/Sydney
+        {"SST", 660, false},  // ICU Link - Pacific/Guadalcanal
+        {"NST", 720, true},   // ICU Link - Pacific/Auckland
+        {"MIT", 780, false},  // ICU Link - Pacific/Apia
 
-        {"Etc/Unknown", 0, FALSE},  // CLDR
+        {"Etc/Unknown", 0, false},  // CLDR
 
-        {"SystemV/AST4ADT", -240, TRUE},
-        {"SystemV/EST5EDT", -300, TRUE},
-        {"SystemV/CST6CDT", -360, TRUE},
-        {"SystemV/MST7MDT", -420, TRUE},
-        {"SystemV/PST8PDT", -480, TRUE},
-        {"SystemV/YST9YDT", -540, TRUE},
-        {"SystemV/AST4", -240, FALSE},
-        {"SystemV/EST5", -300, FALSE},
-        {"SystemV/CST6", -360, FALSE},
-        {"SystemV/MST7", -420, FALSE},
-        {"SystemV/PST8", -480, FALSE},
-        {"SystemV/YST9", -540, FALSE},
-        {"SystemV/HST10", -600, FALSE},
+        {"SystemV/AST4ADT", -240, true},
+        {"SystemV/EST5EDT", -300, true},
+        {"SystemV/CST6CDT", -360, true},
+        {"SystemV/MST7MDT", -420, true},
+        {"SystemV/PST8PDT", -480, true},
+        {"SystemV/YST9YDT", -540, true},
+        {"SystemV/AST4", -240, false},
+        {"SystemV/EST5", -300, false},
+        {"SystemV/CST6", -360, false},
+        {"SystemV/MST7", -420, false},
+        {"SystemV/PST8", -480, false},
+        {"SystemV/YST9", -540, false},
+        {"SystemV/HST10", -600, false},
 
-        {"",0,FALSE}
+        {"",0,false}
     };
 
     for(i=0;kReferenceList[i].id[0];i++) {
         UnicodeString itsID(kReferenceList[i].id);
-        UBool ok = TRUE;
+        UBool ok = true;
         // Check existence.
         TimeZone *tz = TimeZone::createTimeZone(itsID);
         if (!tz || (kReferenceList[i].offset != 0 && *tz == *TimeZone::getGMT())) {
@@ -944,16 +944,16 @@ void TimeZoneTest::TestShortZoneIDs()
         if (usesDaylight != kReferenceList[i].daylight) {
             if (!isDevelopmentBuild) {
                 logln("Warning: Time Zone " + itsID + " use daylight is " +
-                      (usesDaylight?"TRUE":"FALSE") +
+                      (usesDaylight?"true":"false") +
                       " but it should be " +
-                      ((kReferenceList[i].daylight)?"TRUE":"FALSE"));
+                      ((kReferenceList[i].daylight)?"true":"false"));
             } else {
                 dataerrln("FAIL: Time Zone " + itsID + " use daylight is " +
-                      (usesDaylight?"TRUE":"FALSE") +
+                      (usesDaylight?"true":"false") +
                       " but it should be " +
-                      ((kReferenceList[i].daylight)?"TRUE":"FALSE"));
+                      ((kReferenceList[i].daylight)?"true":"false"));
             }
-            ok = FALSE;
+            ok = false;
         }
 
         // Check offset
@@ -968,7 +968,7 @@ void TimeZoneTest::TestShortZoneIDs()
                       offsetInMinutes +
                       " but it should be " + kReferenceList[i].offset);
             }
-            ok = FALSE;
+            ok = false;
         }
 
         if (ok) {
@@ -1377,7 +1377,7 @@ TimeZoneTest::TestAliasedNames()
     };
 
     TimeZone::EDisplayType styles[] = { TimeZone::SHORT, TimeZone::LONG };
-    UBool useDst[] = { FALSE, TRUE };
+    UBool useDst[] = { false, true };
     int32_t noLoc = uloc_countAvailable();
 
     int32_t i, j, k, loc;
@@ -1455,27 +1455,27 @@ TimeZoneTest::TestDisplayName()
         TimeZone::EDisplayType style;
         const char *expect;
     } kData[] = {
-        {FALSE, TimeZone::SHORT, "PST"},
-        {TRUE,  TimeZone::SHORT, "PDT"},
-        {FALSE, TimeZone::LONG,  "Pacific Standard Time"},
-        {TRUE,  TimeZone::LONG,  "Pacific Daylight Time"},
+        {false, TimeZone::SHORT, "PST"},
+        {true,  TimeZone::SHORT, "PDT"},
+        {false, TimeZone::LONG,  "Pacific Standard Time"},
+        {true,  TimeZone::LONG,  "Pacific Daylight Time"},
 
-        {FALSE, TimeZone::SHORT_GENERIC, "PT"},
-        {TRUE,  TimeZone::SHORT_GENERIC, "PT"},
-        {FALSE, TimeZone::LONG_GENERIC,  "Pacific Time"},
-        {TRUE,  TimeZone::LONG_GENERIC,  "Pacific Time"},
+        {false, TimeZone::SHORT_GENERIC, "PT"},
+        {true,  TimeZone::SHORT_GENERIC, "PT"},
+        {false, TimeZone::LONG_GENERIC,  "Pacific Time"},
+        {true,  TimeZone::LONG_GENERIC,  "Pacific Time"},
 
-        {FALSE, TimeZone::SHORT_GMT, "-0800"},
-        {TRUE,  TimeZone::SHORT_GMT, "-0700"},
-        {FALSE, TimeZone::LONG_GMT,  "GMT-08:00"},
-        {TRUE,  TimeZone::LONG_GMT,  "GMT-07:00"},
+        {false, TimeZone::SHORT_GMT, "-0800"},
+        {true,  TimeZone::SHORT_GMT, "-0700"},
+        {false, TimeZone::LONG_GMT,  "GMT-08:00"},
+        {true,  TimeZone::LONG_GMT,  "GMT-07:00"},
 
-        {FALSE, TimeZone::SHORT_COMMONLY_USED, "PST"},
-        {TRUE,  TimeZone::SHORT_COMMONLY_USED, "PDT"},
-        {FALSE, TimeZone::GENERIC_LOCATION,  "Los Angeles Time"},
-        {TRUE,  TimeZone::GENERIC_LOCATION,  "Los Angeles Time"},
+        {false, TimeZone::SHORT_COMMONLY_USED, "PST"},
+        {true,  TimeZone::SHORT_COMMONLY_USED, "PDT"},
+        {false, TimeZone::GENERIC_LOCATION,  "Los Angeles Time"},
+        {true,  TimeZone::GENERIC_LOCATION,  "Los Angeles Time"},
 
-        {FALSE, TimeZone::LONG, ""}
+        {false, TimeZone::LONG, ""}
     };
 
     for (i=0; kData[i].expect[0] != '\0'; i++)
@@ -1508,9 +1508,9 @@ TimeZoneTest::TestDisplayName()
 
     UnicodeString inDaylight;
     if (zone2->inDaylightTime(UDate(0), status)) {
-        inDaylight = UnicodeString("TRUE");
+        inDaylight = UnicodeString("true");
     } else {
-        inDaylight = UnicodeString("FALSE");
+        inDaylight = UnicodeString("false");
     }
     logln(UnicodeString("Modified PST inDaylightTime->") + inDaylight );
     if(U_FAILURE(status))
@@ -1689,10 +1689,10 @@ TimeZoneTest::TestAlternateRules()
               + (offset / U_MILLIS_PER_HOUR) + " hours.");
 
     // test the day-of-week-after-day-in-month API
-    tz.setStartRule(UCAL_MARCH, 10, UCAL_FRIDAY, 12 * millisPerHour, TRUE, status);
+    tz.setStartRule(UCAL_MARCH, 10, UCAL_FRIDAY, 12 * millisPerHour, true, status);
     if(U_FAILURE(status))
         errln("tz.setStartRule failed");
-    tz.setEndRule(UCAL_OCTOBER, 20, UCAL_FRIDAY, 12 * millisPerHour, FALSE, status);
+    tz.setEndRule(UCAL_OCTOBER, 20, UCAL_FRIDAY, 12 * millisPerHour, false, status);
     if(U_FAILURE(status))
         errln("tz.setStartRule failed");
 
@@ -1751,7 +1751,7 @@ void TimeZoneTest::TestCountries() {
         return;
     }
     n = s->count(ec);
-    UBool la = FALSE, tokyo = FALSE;
+    UBool la = false, tokyo = false;
     UnicodeString laZone("America/Los_Angeles", "");
     UnicodeString tokyoZone("Asia/Tokyo", "");
     int32_t i;
@@ -1763,10 +1763,10 @@ void TimeZoneTest::TestCountries() {
     for (i=0; isnext(ec);
         if (*id == (laZone)) {
-            la = TRUE;
+            la = true;
         }
         if (*id == (tokyoZone)) {
-            tokyo = TRUE;
+            tokyo = true;
         }
     }
     if (!la || tokyo) {
@@ -1781,15 +1781,15 @@ void TimeZoneTest::TestCountries() {
         return;
     }
     n = s->count(ec);
-    la = FALSE; tokyo = FALSE;
+    la = false; tokyo = false;
     
     for (i=0; isnext(ec);
         if (*id == (laZone)) {
-            la = TRUE;
+            la = true;
         }
         if (*id == (tokyoZone)) {
-            tokyo = TRUE;
+            tokyo = true;
         }
     }
     if (la || !tokyo) {
@@ -1862,7 +1862,7 @@ void TimeZoneTest::TestHistorical() {
             UErrorCode ec = U_ZERO_ERROR;
             int32_t raw, dst;
             UDate when = (double) DATA[i].time * U_MILLIS_PER_SECOND;
-            tz->getOffset(when, FALSE, raw, dst, ec);
+            tz->getOffset(when, false, raw, dst, ec);
             if (U_FAILURE(ec)) {
                 errln("FAIL: getOffset");
             } else if ((raw+dst) != DATA[i].offset) {
@@ -1886,12 +1886,12 @@ void TimeZoneTest::TestEquivalentIDs() {
     if (n < 2) {
         dataerrln((UnicodeString)"FAIL: countEquivalentIDs(PST) = " + n);
     } else {
-        UBool sawLA = FALSE;
+        UBool sawLA = false;
         for (int32_t i=0; igetOffset(dt, FALSE, raw, dst, status);
+            tz->getOffset(dt, false, raw, dst, status);
             if (U_FAILURE(status)) {
                 errln("test case %d.%d: tz.getOffset(%04d-%02d-%02d %02d:%02d:%02d) fails: %s",
                       t, i,
@@ -2030,10 +2030,10 @@ void TimeZoneTest::TestCanonicalIDAPI() {
     canonicalID.setToBogus();
     ec = U_ZERO_ERROR;
     pResult = &TimeZone::getCanonicalID(berlin, canonicalID, ec);
-    assertSuccess("TimeZone::getCanonicalID(bogus dest) should succeed", ec, TRUE);
+    assertSuccess("TimeZone::getCanonicalID(bogus dest) should succeed", ec, true);
     assertTrue("TimeZone::getCanonicalID(bogus dest) should return the dest string", pResult == &canonicalID);
     assertFalse("TimeZone::getCanonicalID(bogus dest) should un-bogus the dest string", canonicalID.isBogus());
-    assertEquals("TimeZone::getCanonicalID(bogus dest) unexpected result", canonicalID, berlin, TRUE);
+    assertEquals("TimeZone::getCanonicalID(bogus dest) unexpected result", canonicalID, berlin, true);
 }
 
 void TimeZoneTest::TestCanonicalID() {
@@ -2202,7 +2202,7 @@ void TimeZoneTest::TestCanonicalID() {
         if (nEquiv == 0) {
             continue;
         }
-        UBool bFoundCanonical = FALSE;
+        UBool bFoundCanonical = false;
         // Make sure getCanonicalID returns the exact same result
         // for all entries within a same equivalency group with some
         // exceptions listed in exluded1.
@@ -2229,17 +2229,17 @@ void TimeZoneTest::TestCanonicalID() {
             }
 
             if (canonicalID == tmp) {
-                bFoundCanonical = TRUE;
+                bFoundCanonical = true;
             }
         }
         // At least one ID in an equvalency group must match the
         // canonicalID
-        if (bFoundCanonical == FALSE) {
+        if (bFoundCanonical == false) {
             // test exclusion because of differences between Olson tzdata and CLDR
-            UBool isExcluded = FALSE;
+            UBool isExcluded = false;
             for (k = 0; excluded2[k] != 0; k++) {
                 if (*tzid == UnicodeString(excluded2[k])) {
-                    isExcluded = TRUE;
+                    isExcluded = true;
                     break;
                 }
             }
@@ -2257,20 +2257,20 @@ void TimeZoneTest::TestCanonicalID() {
         const char *expected;
         UBool isSystem;
     } data[] = {
-        {"GMT-03", "GMT-03:00", FALSE},
-        {"GMT+4", "GMT+04:00", FALSE},
-        {"GMT-055", "GMT-00:55", FALSE},
-        {"GMT+430", "GMT+04:30", FALSE},
-        {"GMT-12:15", "GMT-12:15", FALSE},
-        {"GMT-091015", "GMT-09:10:15", FALSE},
-        {"GMT+1:90", 0, FALSE},
-        {"America/Argentina/Buenos_Aires", "America/Buenos_Aires", TRUE},
-        {"Etc/Unknown", "Etc/Unknown", FALSE},
-        {"bogus", 0, FALSE},
-        {"", 0, FALSE},
-        {"America/Marigot", "America/Marigot", TRUE},     // Olson link, but CLDR canonical (#8953)
-        {"Europe/Bratislava", "Europe/Bratislava", TRUE}, // Same as above
-        {0, 0, FALSE}
+        {"GMT-03", "GMT-03:00", false},
+        {"GMT+4", "GMT+04:00", false},
+        {"GMT-055", "GMT-00:55", false},
+        {"GMT+430", "GMT+04:30", false},
+        {"GMT-12:15", "GMT-12:15", false},
+        {"GMT-091015", "GMT-09:10:15", false},
+        {"GMT+1:90", 0, false},
+        {"America/Argentina/Buenos_Aires", "America/Buenos_Aires", true},
+        {"Etc/Unknown", "Etc/Unknown", false},
+        {"bogus", 0, false},
+        {"", 0, false},
+        {"America/Marigot", "America/Marigot", true},     // Olson link, but CLDR canonical (#8953)
+        {"Europe/Bratislava", "Europe/Bratislava", true}, // Same as above
+        {0, 0, false}
     };
 
     UBool isSystemID;
@@ -2307,59 +2307,59 @@ static struct   {
     const char            *expectedDisplayName; } 
  zoneDisplayTestData [] =  {
      //  zone id         locale   summer   format          expected display name
-      {"Europe/London",     "en", FALSE, TimeZone::SHORT, "GMT"},
-      {"Europe/London",     "en", FALSE, TimeZone::LONG,  "Greenwich Mean Time"},
-      {"Europe/London",     "en", TRUE,  TimeZone::SHORT, "GMT+1" /*"BST"*/},
-      {"Europe/London",     "en", TRUE,  TimeZone::LONG,  "British Summer Time"},
+      {"Europe/London",     "en", false, TimeZone::SHORT, "GMT"},
+      {"Europe/London",     "en", false, TimeZone::LONG,  "Greenwich Mean Time"},
+      {"Europe/London",     "en", true,  TimeZone::SHORT, "GMT+1" /*"BST"*/},
+      {"Europe/London",     "en", true,  TimeZone::LONG,  "British Summer Time"},
       
-      {"America/Anchorage", "en", FALSE, TimeZone::SHORT, "AKST"},
-      {"America/Anchorage", "en", FALSE, TimeZone::LONG,  "Alaska Standard Time"},
-      {"America/Anchorage", "en", TRUE,  TimeZone::SHORT, "AKDT"},
-      {"America/Anchorage", "en", TRUE,  TimeZone::LONG,  "Alaska Daylight Time"},
+      {"America/Anchorage", "en", false, TimeZone::SHORT, "AKST"},
+      {"America/Anchorage", "en", false, TimeZone::LONG,  "Alaska Standard Time"},
+      {"America/Anchorage", "en", true,  TimeZone::SHORT, "AKDT"},
+      {"America/Anchorage", "en", true,  TimeZone::LONG,  "Alaska Daylight Time"},
       
       // Southern Hemisphere, all data from meta:Australia_Western
-      {"Australia/Perth",   "en", FALSE, TimeZone::SHORT, "GMT+8"/*"AWST"*/},
-      {"Australia/Perth",   "en", FALSE, TimeZone::LONG,  "Australian Western Standard Time"},
+      {"Australia/Perth",   "en", false, TimeZone::SHORT, "GMT+8"/*"AWST"*/},
+      {"Australia/Perth",   "en", false, TimeZone::LONG,  "Australian Western Standard Time"},
       // Note: Perth does not observe DST currently. When display name is missing,
       // the localized GMT format with the current offset is used even daylight name was
       // requested. See #9350.
-      {"Australia/Perth",   "en", TRUE,  TimeZone::SHORT, "GMT+8"/*"AWDT"*/},
-      {"Australia/Perth",   "en", TRUE,  TimeZone::LONG,  "Australian Western Daylight Time"},
+      {"Australia/Perth",   "en", true,  TimeZone::SHORT, "GMT+8"/*"AWDT"*/},
+      {"Australia/Perth",   "en", true,  TimeZone::LONG,  "Australian Western Daylight Time"},
        
-      {"America/Sao_Paulo",  "en", FALSE, TimeZone::SHORT, "GMT-3"/*"BRT"*/},
-      {"America/Sao_Paulo",  "en", FALSE, TimeZone::LONG,  "Brasilia Standard Time"},
+      {"America/Sao_Paulo",  "en", false, TimeZone::SHORT, "GMT-3"/*"BRT"*/},
+      {"America/Sao_Paulo",  "en", false, TimeZone::LONG,  "Brasilia Standard Time"},
 
       // Per https://mm.icann.org/pipermail/tz-announce/2019-July/000056.html
       //      Brazil has canceled DST and will stay on standard time indefinitely.
-      // {"America/Sao_Paulo",  "en", TRUE,  TimeZone::SHORT, "GMT-2"/*"BRST"*/},
-      // {"America/Sao_Paulo",  "en", TRUE,  TimeZone::LONG,  "Brasilia Summer Time"},
+      // {"America/Sao_Paulo",  "en", true,  TimeZone::SHORT, "GMT-2"/*"BRST"*/},
+      // {"America/Sao_Paulo",  "en", true,  TimeZone::LONG,  "Brasilia Summer Time"},
        
       // No Summer Time, but had it before 1983.
-      {"Pacific/Honolulu",   "en", FALSE, TimeZone::SHORT, "HST"},
-      {"Pacific/Honolulu",   "en", FALSE, TimeZone::LONG,  "Hawaii-Aleutian Standard Time"},
-      {"Pacific/Honolulu",   "en", TRUE,  TimeZone::SHORT, "HDT"},
-      {"Pacific/Honolulu",   "en", TRUE,  TimeZone::LONG,  "Hawaii-Aleutian Daylight Time"},
+      {"Pacific/Honolulu",   "en", false, TimeZone::SHORT, "HST"},
+      {"Pacific/Honolulu",   "en", false, TimeZone::LONG,  "Hawaii-Aleutian Standard Time"},
+      {"Pacific/Honolulu",   "en", true,  TimeZone::SHORT, "HDT"},
+      {"Pacific/Honolulu",   "en", true,  TimeZone::LONG,  "Hawaii-Aleutian Daylight Time"},
        
       // Northern, has Summer, not commonly used.
-      {"Europe/Helsinki",    "en", FALSE, TimeZone::SHORT, "GMT+2"/*"EET"*/},
-      {"Europe/Helsinki",    "en", FALSE, TimeZone::LONG,  "Eastern European Standard Time"},
-      {"Europe/Helsinki",    "en", TRUE,  TimeZone::SHORT, "GMT+3"/*"EEST"*/},
-      {"Europe/Helsinki",    "en", TRUE,  TimeZone::LONG,  "Eastern European Summer Time"},
+      {"Europe/Helsinki",    "en", false, TimeZone::SHORT, "GMT+2"/*"EET"*/},
+      {"Europe/Helsinki",    "en", false, TimeZone::LONG,  "Eastern European Standard Time"},
+      {"Europe/Helsinki",    "en", true,  TimeZone::SHORT, "GMT+3"/*"EEST"*/},
+      {"Europe/Helsinki",    "en", true,  TimeZone::LONG,  "Eastern European Summer Time"},
 
       // Repeating the test data for DST.  The test data below trigger the problem reported
       // by Ticket#6644
-      {"Europe/London",       "en", TRUE, TimeZone::SHORT, "GMT+1" /*"BST"*/},
-      {"Europe/London",       "en", TRUE, TimeZone::LONG,  "British Summer Time"},
+      {"Europe/London",       "en", true, TimeZone::SHORT, "GMT+1" /*"BST"*/},
+      {"Europe/London",       "en", true, TimeZone::LONG,  "British Summer Time"},
 
-      {NULL, NULL, FALSE, TimeZone::SHORT, NULL}   // NULL values terminate list
+      {NULL, NULL, false, TimeZone::SHORT, NULL}   // NULL values terminate list
     };
 
 void TimeZoneTest::TestDisplayNamesMeta() {
     UErrorCode status = U_ZERO_ERROR;
     GregorianCalendar cal(*TimeZone::getGMT(), status);
-    if (failure(status, "GregorianCalendar", TRUE)) return;
+    if (failure(status, "GregorianCalendar", true)) return;
 
-    UBool sawAnError = FALSE;
+    UBool sawAnError = false;
     for (int testNum   = 0; zoneDisplayTestData[testNum].zoneName != NULL; testNum++) {
         Locale locale  = Locale::createFromName(zoneDisplayTestData[testNum].localeName);
         TimeZone *zone = TimeZone::createTimeZone(zoneDisplayTestData[testNum].zoneName);
@@ -2373,7 +2373,7 @@ void TimeZoneTest::TestDisplayNamesMeta() {
             UErrorCode status = U_ZERO_ERROR;
             displayName.extract(name, 100, NULL, status);
             if (isDevelopmentBuild) {
-                sawAnError = TRUE;
+                sawAnError = true;
                 dataerrln("Incorrect time zone display name.  zone = \"%s\",\n"
                       "   locale = \"%s\",   style = %s,  Summertime = %d\n"
                       "   Expected \"%s\", "
@@ -2534,7 +2534,7 @@ void TimeZoneTest::TestGetWindowsID(void) {
 
         TimeZone::getWindowsID(UnicodeString(TESTDATA[i].id), windowsID, sts);
         assertSuccess(TESTDATA[i].id, sts);
-        assertEquals(TESTDATA[i].id, UnicodeString(TESTDATA[i].winid), windowsID, TRUE);
+        assertEquals(TESTDATA[i].id, UnicodeString(TESTDATA[i].winid), windowsID, true);
     }
 }
 
@@ -2563,7 +2563,7 @@ void TimeZoneTest::TestGetIDForWindowsID(void) {
         TimeZone::getIDForWindowsID(UnicodeString(TESTDATA[i].winid), TESTDATA[i].region,
                                     id, sts);
         assertSuccess(UnicodeString(TESTDATA[i].winid) + "/" + TESTDATA[i].region, sts);
-        assertEquals(UnicodeString(TESTDATA[i].winid) + "/" + TESTDATA[i].region, TESTDATA[i].id, id, TRUE);
+        assertEquals(UnicodeString(TESTDATA[i].winid) + "/" + TESTDATA[i].region, TESTDATA[i].id, id, true);
     }
 }
 
diff --git a/icu4c/source/test/intltest/ucaconf.cpp b/icu4c/source/test/intltest/ucaconf.cpp
index e239ccf939d..331079585bf 100644
--- a/icu4c/source/test/intltest/ucaconf.cpp
+++ b/icu4c/source/test/intltest/ucaconf.cpp
@@ -162,7 +162,7 @@ skipLineBecauseOfBug(const UChar *s, int32_t length, uint32_t flags) {
     (void)s;
     (void)length;
     (void)flags;
-    return FALSE;
+    return false;
 }
 
 static UCollationResult
@@ -225,7 +225,7 @@ void UCAConformanceTest::testConformance(const Collator *coll)
         int32_t resLen = withSortKeys ? coll->getSortKey(buffer, buflen, newSk, 1024) : 0;
 
         if(oldSk != NULL) {
-            UBool ok=TRUE;
+            UBool ok=true;
             int32_t skres = withSortKeys ? strcmp((char *)oldSk, (char *)newSk) : 0;
             int32_t cmpres = coll->compare(oldB, oldBlen, buffer, buflen, status);
             int32_t cmpres2 = coll->compare(buffer, buflen, oldB, oldBlen, status);
@@ -234,7 +234,7 @@ void UCAConformanceTest::testConformance(const Collator *coll)
                 errln("Compare result not symmetrical on line %i: "
                       "previous vs. current (%d) / current vs. previous (%d)",
                       line, cmpres, cmpres2);
-                ok = FALSE;
+                ok = false;
             }
 
             // TODO: Compare with normalization turned off if the input passes the FCD test.
@@ -242,7 +242,7 @@ void UCAConformanceTest::testConformance(const Collator *coll)
             if(withSortKeys && cmpres != normalizeResult(skres)) {
                 errln("Difference between coll->compare (%d) and sortkey compare (%d) on line %i",
                       cmpres, skres, line);
-                ok = FALSE;
+                ok = false;
             }
 
             int32_t res = cmpres;
@@ -256,7 +256,7 @@ void UCAConformanceTest::testConformance(const Collator *coll)
             }
             if(res > 0) {
                 errln("Line %i is not greater or equal than previous line", line);
-                ok = FALSE;
+                ok = false;
             }
 
             if(!ok) {
diff --git a/icu4c/source/test/intltest/ucdtest.cpp b/icu4c/source/test/intltest/ucdtest.cpp
index 0304c61c448..a02011b77d9 100644
--- a/icu4c/source/test/intltest/ucdtest.cpp
+++ b/icu4c/source/test/intltest/ucdtest.cpp
@@ -240,7 +240,7 @@ void UnicodeTest::TestAdditionalProperties() {
     uint32_t i;
     UChar32 start, end;
 
-    // test all TRUE properties
+    // test all true properties
     for(i=0; i=MAX_ERRORS) {
                       dataerrln("Too many errors, moving to the next test");
                       break;
@@ -263,7 +263,7 @@ void UnicodeTest::TestAdditionalProperties() {
         derivedProps[i].complement();
     }
 
-    // test all FALSE properties
+    // test all false properties
     for(i=0; i=MAX_ERRORS) {
                       errln("Too many errors, moving to the next test");
                       break;
@@ -365,9 +365,9 @@ void UnicodeTest::TestConsistency() {
         // because the new internal normalization functions are in C++.
         //compareUSets(set1, set2,
         //             "[canon start set of 0049]", "[all c with canon decomp with 0049]",
-        //             TRUE);
+        //             true);
     } else {
-        errln("NFC.getCanonStartSet() returned FALSE");
+        errln("NFC.getCanonStartSet() returned false");
     }
 #endif
 }
@@ -402,16 +402,16 @@ void UnicodeTest::TestPatternProperties() {
         }
     }
     compareUSets(syn_pp, syn_prop,
-                 "PatternProps.isSyntax()", "[:Pattern_Syntax:]", TRUE);
+                 "PatternProps.isSyntax()", "[:Pattern_Syntax:]", true);
     compareUSets(syn_pp, syn_list,
-                 "PatternProps.isSyntax()", "[Pattern_Syntax ranges]", TRUE);
+                 "PatternProps.isSyntax()", "[Pattern_Syntax ranges]", true);
     compareUSets(ws_pp, ws_prop,
-                 "PatternProps.isWhiteSpace()", "[:Pattern_White_Space:]", TRUE);
+                 "PatternProps.isWhiteSpace()", "[:Pattern_White_Space:]", true);
     compareUSets(ws_pp, ws_list,
-                 "PatternProps.isWhiteSpace()", "[Pattern_White_Space ranges]", TRUE);
+                 "PatternProps.isWhiteSpace()", "[Pattern_White_Space ranges]", true);
     compareUSets(syn_ws_pp, syn_ws_prop,
                  "PatternProps.isSyntaxOrWhiteSpace()",
-                 "[[:Pattern_Syntax:][:Pattern_White_Space:]]", TRUE);
+                 "[[:Pattern_Syntax:][:Pattern_White_Space:]]", true);
 }
 
 // So far only minimal port of Java & cucdtst.c compareUSets().
diff --git a/icu4c/source/test/intltest/ucharstrietest.cpp b/icu4c/source/test/intltest/ucharstrietest.cpp
index bab827eb390..c026c0204ae 100644
--- a/icu4c/source/test/intltest/ucharstrietest.cpp
+++ b/icu4c/source/test/intltest/ucharstrietest.cpp
@@ -913,13 +913,13 @@ void UCharsTrieTest::checkNext(UCharsTrie &trie,
         }
         // Compare the final current() with whether next() can actually continue.
         trie.saveState(state);
-        UBool nextContinues=FALSE;
+        UBool nextContinues=false;
         for(int32_t c=0x20; c<0xe000; ++c) {
             if(c==0x80) {
                 c=0xd800;  // Check for ASCII and surrogates but not all of the BMP.
             }
             if(trie.resetToState(state).next(c)) {
-                nextContinues=TRUE;
+                nextContinues=true;
                 break;
             }
         }
@@ -1079,7 +1079,7 @@ void UCharsTrieTest::checkIterator(UCharsTrie::Iterator &iter,
     IcuTestErrorCode errorCode(*this, "checkIterator()");
     for(int32_t i=0; i " + pat0 + ", " + pat1 + ", " + pat2 + ", " + pat3);
     logln((UnicodeString)source + " => " + pat0 + ", " + pat2);
-    return TRUE;
+    return true;
 }
 
 UBool UnicodeSetTest::checkPat(const UnicodeString& source,
@@ -261,9 +261,9 @@ UBool UnicodeSetTest::checkPat(const UnicodeString& source,
     UnicodeSet testSet2(pat, ec);
     if (testSet2 != testSet) {
         errln((UnicodeString)"Fail toPattern: " + source + " => " + pat);
-        return FALSE;
+        return false;
     }
-    return TRUE;
+    return true;
 }
 
 void
@@ -395,14 +395,14 @@ UnicodeSetTest::TestCloneEqualHash(void) {
 void
 UnicodeSetTest::TestAddRemove(void) {
     UnicodeSet set; // Construct empty set
-    doAssert(set.isEmpty() == TRUE, "set should be empty");
+    doAssert(set.isEmpty() == true, "set should be empty");
     doAssert(set.size() == 0, "size should be 0");
     set.complement();
     doAssert(set.size() == 0x110000, "size should be 0x110000");
     set.clear();
     set.add(0x0061, 0x007a);
     expectPairs(set, "az");
-    doAssert(set.isEmpty() == FALSE, "set should not be empty");
+    doAssert(set.isEmpty() == false, "set should not be empty");
     doAssert(set.size() != 0, "size should not be equal to 0");
     doAssert(set.size() == 26, "size should be equal to 26");
     set.remove(0x006d, 0x0070);
@@ -424,10 +424,10 @@ UnicodeSetTest::TestAddRemove(void) {
     expectPairs(set, "hqsz");
     set.remove(0x0061, 0x007a);
     expectPairs(set, "");
-    doAssert(set.isEmpty() == TRUE, "set should be empty");
+    doAssert(set.isEmpty() == true, "set should be empty");
     doAssert(set.size() == 0, "size should be 0");
     set.add(0x0061);
-    doAssert(set.isEmpty() == FALSE, "set should not be empty");
+    doAssert(set.isEmpty() == false, "set should not be empty");
     doAssert(set.size() == 1, "size should not be equal to 1");
     set.add(0x0062);
     set.add(0x0063);
@@ -439,7 +439,7 @@ UnicodeSetTest::TestAddRemove(void) {
     doAssert(set.size() == 5, "size should not be equal to 5");
     set.clear();
     expectPairs(set, "");
-    doAssert(set.isEmpty() == TRUE, "set should be empty");
+    doAssert(set.isEmpty() == true, "set should be empty");
     doAssert(set.size() == 0, "size should be 0");
 
     // Try removing an entire set from another set
@@ -454,19 +454,19 @@ UnicodeSetTest::TestAddRemove(void) {
     expectPattern(set2, "[hitoshinamekatajamesanderson]", "aadehkmort");
     set.addAll(set2);
     expectPairs(set, "aacehort");
-    doAssert(set.containsAll(set2) == TRUE, "set should contain all the elements in set2");
+    doAssert(set.containsAll(set2) == true, "set should contain all the elements in set2");
 
     // Try retaining an set of elements contained in another set (intersection)
     UnicodeSet set3;
     expectPattern(set3, "[a-c]", "ac");
-    doAssert(set.containsAll(set3) == FALSE, "set doesn't contain all the elements in set3");
+    doAssert(set.containsAll(set3) == false, "set doesn't contain all the elements in set3");
     set3.remove(0x0062);
     expectPairs(set3, "aacc");
-    doAssert(set.containsAll(set3) == TRUE, "set should contain all the elements in set3");
+    doAssert(set.containsAll(set3) == true, "set should contain all the elements in set3");
     set.retainAll(set3);
     expectPairs(set, "aacc");
     doAssert(set.size() == set3.size(), "set.size() should be set3.size()");
-    doAssert(set.containsAll(set3) == TRUE, "set should contain all the elements in set3");
+    doAssert(set.containsAll(set3) == true, "set should contain all the elements in set3");
     set.clear();
     doAssert(set.size() != set3.size(), "set.size() != set3.size()");
 
@@ -475,7 +475,7 @@ UnicodeSetTest::TestAddRemove(void) {
     expectPattern(set2, "[jackiemclean]", "aacceein");
     set.addAll(set2);
     expectPairs(set, "aacehort");
-    doAssert(set.containsAll(set2) == TRUE, "set should contain all the elements in set2");
+    doAssert(set.containsAll(set2) == true, "set should contain all the elements in set2");
 
 
 
@@ -802,56 +802,56 @@ void UnicodeSetTest::TestIteration() {
             UnicodeString s   = it.getString();
             switch (i) {
             case 0:
-                TEST_ASSERT(nextv == TRUE);
-                TEST_ASSERT(isString == FALSE);
+                TEST_ASSERT(nextv == true);
+                TEST_ASSERT(isString == false);
                 TEST_ASSERT(codePoint==0x61);
                 TEST_ASSERT(s == "a");
                 break;
             case 1:
-                TEST_ASSERT(nextv == TRUE);
-                TEST_ASSERT(isString == FALSE);
+                TEST_ASSERT(nextv == true);
+                TEST_ASSERT(isString == false);
                 TEST_ASSERT(codePoint==0x62);
                 TEST_ASSERT(s == "b");
                 break;
             case 2:
-                TEST_ASSERT(nextv == TRUE);
-                TEST_ASSERT(isString == FALSE);
+                TEST_ASSERT(nextv == true);
+                TEST_ASSERT(isString == false);
                 TEST_ASSERT(codePoint==0x63);
                 TEST_ASSERT(s == "c");
                 break;
             case 3:
-                TEST_ASSERT(nextv == TRUE);
-                TEST_ASSERT(isString == FALSE);
+                TEST_ASSERT(nextv == true);
+                TEST_ASSERT(isString == false);
                 TEST_ASSERT(codePoint==0x79);
                 TEST_ASSERT(s == "y");
                 break;
             case 4:
-                TEST_ASSERT(nextv == TRUE);
-                TEST_ASSERT(isString == FALSE);
+                TEST_ASSERT(nextv == true);
+                TEST_ASSERT(isString == false);
                 TEST_ASSERT(codePoint==0x7a);
                 TEST_ASSERT(s == "z");
                 break;
             case 5:
-                TEST_ASSERT(nextv == TRUE);
-                TEST_ASSERT(isString == FALSE);
+                TEST_ASSERT(nextv == true);
+                TEST_ASSERT(isString == false);
                 TEST_ASSERT(codePoint==0x1abcd);
                 TEST_ASSERT(s == UnicodeString((UChar32)0x1abcd));
                 break;
             case 6:
-                TEST_ASSERT(nextv == TRUE);
-                TEST_ASSERT(isString == TRUE);
+                TEST_ASSERT(nextv == true);
+                TEST_ASSERT(isString == true);
                 TEST_ASSERT(s == "str1");
                 break;
             case 7:
-                TEST_ASSERT(nextv == TRUE);
-                TEST_ASSERT(isString == TRUE);
+                TEST_ASSERT(nextv == true);
+                TEST_ASSERT(isString == true);
                 TEST_ASSERT(s == "str2");
                 break;
             case 8:
-                TEST_ASSERT(nextv == FALSE);
+                TEST_ASSERT(nextv == false);
                 break;
             case 9:
-                TEST_ASSERT(nextv == FALSE);
+                TEST_ASSERT(nextv == false);
                 break;
             }
         }
@@ -890,8 +890,8 @@ void UnicodeSetTest::TestStrings() {
     for (int32_t i = 0; testList[i] != NULL; i+=2) {
         if (U_SUCCESS(ec)) {
             UnicodeString pat0, pat1;
-            testList[i]->toPattern(pat0, TRUE);
-            testList[i+1]->toPattern(pat1, TRUE);
+            testList[i]->toPattern(pat0, true);
+            testList[i+1]->toPattern(pat1, true);
             if (*testList[i] == *testList[i+1]) {
                 logln((UnicodeString)"Ok: " + pat0 + " == " + pat1);
             } else {
@@ -1337,7 +1337,7 @@ void UnicodeSetTest::TestCloseOver() {
             logln((UnicodeString)"Ok: " + pat + ".closeOver(" + selector + ") => " + exp);
         } else {
             dataerrln((UnicodeString)"FAIL: " + pat + ".closeOver(" + selector + ") => " +
-                  s.toPattern(buf, TRUE) + ", expected " + exp);
+                  s.toPattern(buf, true) + ", expected " + exp);
         }
     }
 
@@ -1378,7 +1378,7 @@ void UnicodeSetTest::TestCloseOver() {
             t.closeOver(0x100);
             if(s!=t) {
                 errln("FAIL: closeOver(U+%04x) differs: ", c);
-                errln((UnicodeString)"old "+s.toPattern(buf, TRUE)+" new: "+t.toPattern(buf2, TRUE));
+                errln((UnicodeString)"old "+s.toPattern(buf, true)+" new: "+t.toPattern(buf2, true));
             }
         }
     }
@@ -1395,8 +1395,8 @@ void UnicodeSetTest::TestCloseOver() {
             s.closeOver(USET_CASE);
             t.closeOver(0x100);
             if(s!=t) {
-                errln((UnicodeString)"FAIL: closeOver("+s2.toPattern(buf, TRUE)+") differs: ");
-                errln((UnicodeString)"old "+s.toPattern(buf, TRUE)+" new: "+t.toPattern(buf2, TRUE));
+                errln((UnicodeString)"FAIL: closeOver("+s2.toPattern(buf, true)+") differs: ");
+                errln((UnicodeString)"old "+s.toPattern(buf, true)+" new: "+t.toPattern(buf2, true));
             }
         }
     }
@@ -1455,7 +1455,7 @@ void UnicodeSetTest::TestEscapePattern() {
         }
 
         UnicodeString newpat;
-        set.toPattern(newpat, TRUE);
+        set.toPattern(newpat, true);
         if (newpat == UnicodeString(exp, -1, US_INV)) {
             logln(escape(pat) + " => " + newpat);
         } else {
@@ -1486,12 +1486,12 @@ void UnicodeSetTest::expectRange(const UnicodeString& label,
     UnicodeSet exp(start, end);
     UnicodeString pat;
     if (set == exp) {
-        logln(label + " => " + set.toPattern(pat, TRUE));
+        logln(label + " => " + set.toPattern(pat, true));
     } else {
         UnicodeString xpat;
         errln((UnicodeString)"FAIL: " + label + " => " +
-              set.toPattern(pat, TRUE) +
-              ", expected " + exp.toPattern(xpat, TRUE));
+              set.toPattern(pat, true) +
+              ", expected " + exp.toPattern(xpat, true));
     }
 }
 
@@ -1614,7 +1614,7 @@ class TokenSymbolTable : public SymbolTable {
 public:
     Hashtable contents;
 
-    TokenSymbolTable(UErrorCode& ec) : contents(FALSE, ec) {
+    TokenSymbolTable(UErrorCode& ec) : contents(false, ec) {
         contents.setValueDeleter(uprv_deleteUObject);
     }
 
@@ -1725,10 +1725,10 @@ void UnicodeSetTest::TestSymbolTable() {
         
         UnicodeString a, b;
         if (us != us2) {
-            errln((UnicodeString)"Failed, got " + us.toPattern(a, TRUE) +
-                  ", expected " + us2.toPattern(b, TRUE));
+            errln((UnicodeString)"Failed, got " + us.toPattern(a, true) +
+                  ", expected " + us2.toPattern(b, true));
         } else {
-            logln((UnicodeString)"Ok, got " + us.toPattern(a, TRUE));
+            logln((UnicodeString)"Ok, got " + us.toPattern(a, true));
         }
     }
 }
@@ -1956,13 +1956,13 @@ void UnicodeSetTest::checkRoundTrip(const UnicodeSet& s) {
 
     {
         UnicodeSet t;
-        copyWithIterator(t, s, FALSE);
+        copyWithIterator(t, s, false);
         checkEqual(s, t, "iterator roundtrip");
     }
 
     {
         UnicodeSet t;
-        copyWithIterator(t, s, TRUE); // try range
+        copyWithIterator(t, s, true); // try range
         checkEqual(s, t, "iterator roundtrip");
     }
 
@@ -1970,10 +1970,10 @@ void UnicodeSetTest::checkRoundTrip(const UnicodeSet& s) {
         UnicodeSet t;
         UnicodeString pat;
         UErrorCode ec = U_ZERO_ERROR;
-        s.toPattern(pat, FALSE);
+        s.toPattern(pat, false);
         t.applyPattern(pat, ec);
         if (U_FAILURE(ec)) {
-            errln("FAIL: toPattern(escapeUnprintable=FALSE), applyPattern - %s", u_errorName(ec));
+            errln("FAIL: toPattern(escapeUnprintable=false), applyPattern - %s", u_errorName(ec));
             return;
         } else {
             checkEqual(s, t, "toPattern(false)");
@@ -1984,10 +1984,10 @@ void UnicodeSetTest::checkRoundTrip(const UnicodeSet& s) {
         UnicodeSet t;
         UnicodeString pat;
         UErrorCode ec = U_ZERO_ERROR;
-        s.toPattern(pat, TRUE);
+        s.toPattern(pat, true);
         t.applyPattern(pat, ec);
         if (U_FAILURE(ec)) {
-            errln("FAIL: toPattern(escapeUnprintable=TRUE), applyPattern - %s", u_errorName(ec));
+            errln("FAIL: toPattern(escapeUnprintable=true), applyPattern - %s", u_errorName(ec));
             return;
         } else {
             checkEqual(s, t, "toPattern(true)");
@@ -2042,21 +2042,21 @@ void UnicodeSetTest::copyWithIterator(UnicodeSet& t, const UnicodeSet& s, UBool
 UBool UnicodeSetTest::checkEqual(const UnicodeSet& s, const UnicodeSet& t, const char* message) {
   assertEquals(UnicodeString("RangeCount: ","") + message, s.getRangeCount(), t.getRangeCount());
   assertEquals(UnicodeString("size: ","") + message, s.size(), t.size());
-    UnicodeString source; s.toPattern(source, TRUE);
-    UnicodeString result; t.toPattern(result, TRUE);
+    UnicodeString source; s.toPattern(source, true);
+    UnicodeString result; t.toPattern(result, true);
     if (s != t) {
         errln((UnicodeString)"FAIL: " + message
               + "; source = " + source
               + "; result = " + result
               );
-        return FALSE;
+        return false;
     } else {
         logln((UnicodeString)"Ok: " + message
               + "; source = " + source
               + "; result = " + result
               );
     }
-    return TRUE;
+    return true;
 }
 
 void
@@ -2175,7 +2175,7 @@ void UnicodeSetTest::expectToPattern(const UnicodeSet& set,
                                      const UnicodeString& expPat,
                                      const char** expStrings) {
     UnicodeString pat;
-    set.toPattern(pat, TRUE);
+    set.toPattern(pat, true);
     if (pat == expPat) {
         logln((UnicodeString)"Ok:   toPattern() => \"" + pat + "\"");
     } else {
@@ -2185,10 +2185,10 @@ void UnicodeSetTest::expectToPattern(const UnicodeSet& set,
     if (expStrings == NULL) {
         return;
     }
-    UBool in = TRUE;
+    UBool in = true;
     for (int32_t i=0; expStrings[i] != NULL; ++i) {
         if (expStrings[i] == NOT) { // sic; pointer comparison
-            in = FALSE;
+            in = false;
             continue;
         }
         UnicodeString s = CharsToUnicodeString(expStrings[i]);
@@ -2406,7 +2406,7 @@ class UnicodeSetWithStringsIterator;
 class UnicodeSetWithStrings {
 public:
     UnicodeSetWithStrings(const UnicodeSet &normalSet) :
-            set(normalSet), stringsLength(0), hasSurrogates(FALSE) {
+            set(normalSet), stringsLength(0), hasSurrogates(false) {
         int32_t size=set.size();
         if(size>0 && set.charAt(size-1)<0) {
             // If a set's last element is not a code point, then it must contain strings.
@@ -2426,7 +2426,7 @@ public:
                         appendUTF8(s->getBuffer(), s->length(),
                                    s8, (int32_t)(sizeof(utf8)-utf8Count));
                     if(length8==0) {
-                        hasSurrogates=TRUE;  // Contains unpaired surrogates.
+                        hasSurrogates=true;  // Contains unpaired surrogates.
                     }
                     s8+=length8;
                     ++stringsLength;
@@ -2540,7 +2540,7 @@ static int32_t containsSpanUTF16(const UnicodeSetWithStrings &set, const UChar *
             iter.reset();
             while((str=iter.nextString())!=NULL) {
                 if(str->length()<=(length-start) && matches16CPB(s, start, length, *str)) {
-                    // spanNeedsStrings=TRUE;
+                    // spanNeedsStrings=true;
                     return start;
                 }
             }
@@ -2560,7 +2560,7 @@ static int32_t containsSpanUTF16(const UnicodeSetWithStrings &set, const UChar *
             iter.reset();
             while((str=iter.nextString())!=NULL) {
                 if(str->length()<=(length-start) && matches16CPB(s, start, length, *str)) {
-                    // spanNeedsStrings=TRUE;
+                    // spanNeedsStrings=true;
                     int32_t matchLimit=start+str->length();
                     if(matchLimit==length) {
                         return length;
@@ -2641,7 +2641,7 @@ static int32_t containsSpanBackUTF16(const UnicodeSetWithStrings &set, const UCh
             iter.reset();
             while((str=iter.nextString())!=NULL) {
                 if(str->length()<=prev && matches16CPB(s, prev-str->length(), length0, *str)) {
-                    // spanNeedsStrings=TRUE;
+                    // spanNeedsStrings=true;
                     return prev;
                 }
             }
@@ -2660,7 +2660,7 @@ static int32_t containsSpanBackUTF16(const UnicodeSetWithStrings &set, const UCh
             iter.reset();
             while((str=iter.nextString())!=NULL) {
                 if(str->length()<=prev && matches16CPB(s, prev-str->length(), length0, *str)) {
-                    // spanNeedsStrings=TRUE;
+                    // spanNeedsStrings=true;
                     int32_t matchStart=prev-str->length();
                     if(matchStart==0) {
                         return 0;
@@ -2738,7 +2738,7 @@ static int32_t containsSpanUTF8(const UnicodeSetWithStrings &set, const char *s,
             iter.reset();
             while((s8=iter.nextUTF8(length8))!=NULL) {
                 if(length8!=0 && length8<=(length-start) && 0==memcmp(s+start, s8, length8)) {
-                    // spanNeedsStrings=TRUE;
+                    // spanNeedsStrings=true;
                     return start;
                 }
             }
@@ -2759,7 +2759,7 @@ static int32_t containsSpanUTF8(const UnicodeSetWithStrings &set, const char *s,
             iter.reset();
             while((s8=iter.nextUTF8(length8))!=NULL) {
                 if(length8!=0 && length8<=(length-start) && 0==memcmp(s+start, s8, length8)) {
-                    // spanNeedsStrings=TRUE;
+                    // spanNeedsStrings=true;
                     int32_t matchLimit=start+length8;
                     if(matchLimit==length) {
                         return length;
@@ -2841,7 +2841,7 @@ static int32_t containsSpanBackUTF8(const UnicodeSetWithStrings &set, const char
             iter.reset();
             while((s8=iter.nextUTF8(length8))!=NULL) {
                 if(length8!=0 && length8<=prev && 0==memcmp(s+prev-length8, s8, length8)) {
-                    // spanNeedsStrings=TRUE;
+                    // spanNeedsStrings=true;
                     return prev;
                 }
             }
@@ -2861,7 +2861,7 @@ static int32_t containsSpanBackUTF8(const UnicodeSetWithStrings &set, const char
             iter.reset();
             while((s8=iter.nextUTF8(length8))!=NULL) {
                 if(length8!=0 && length8<=prev && 0==memcmp(s+prev-length8, s8, length8)) {
-                    // spanNeedsStrings=TRUE;
+                    // spanNeedsStrings=true;
                     int32_t matchStart=prev-length8;
                     if(matchStart==0) {
                         return 0;
@@ -2983,13 +2983,13 @@ static int32_t getSpans(const UnicodeSetWithStrings &set, UBool isComplement,
         if((whichSpans&SPAN_FWD)==0) {
             return -1;
         }
-        isForward=TRUE;
+        isForward=true;
     } else {
         // span backward
         if((whichSpans&SPAN_BACK)==0) {
             return -1;
         }
-        isForward=FALSE;
+        isForward=false;
     }
     if((type&1)==0) {
         // use USET_SPAN_CONTAINED
@@ -3211,26 +3211,26 @@ void UnicodeSetTest::testSpan(const UnicodeSetWithStrings *sets[4],
             limit=expectLimits[i];
             length=limit-prev;
             if(length>0) {
-                string.setTo(FALSE, s16+prev, length);  // read-only alias
+                string.setTo(false, s16+prev, length);  // read-only alias
                 if(i&1) {
                     if(!sets[SLOW]->getSet().containsAll(string)) {
-                        errln("FAIL: %s[0x%lx].%s.containsAll(%ld..%ld)==FALSE contradicts span()",
+                        errln("FAIL: %s[0x%lx].%s.containsAll(%ld..%ld)==false contradicts span()",
                               testName, (long)index, setNames[SLOW], (long)prev, (long)limit);
                         return;
                     }
                     if(!sets[FAST]->getSet().containsAll(string)) {
-                        errln("FAIL: %s[0x%lx].%s.containsAll(%ld..%ld)==FALSE contradicts span()",
+                        errln("FAIL: %s[0x%lx].%s.containsAll(%ld..%ld)==false contradicts span()",
                               testName, (long)index, setNames[FAST], (long)prev, (long)limit);
                         return;
                     }
                 } else {
                     if(!sets[SLOW]->getSet().containsNone(string)) {
-                        errln("FAIL: %s[0x%lx].%s.containsNone(%ld..%ld)==FALSE contradicts span()",
+                        errln("FAIL: %s[0x%lx].%s.containsNone(%ld..%ld)==false contradicts span()",
                               testName, (long)index, setNames[SLOW], (long)prev, (long)limit);
                         return;
                     }
                     if(!sets[FAST]->getSet().containsNone(string)) {
-                        errln("FAIL: %s[0x%lx].%s.containsNone(%ld..%ld)==FALSE contradicts span()",
+                        errln("FAIL: %s[0x%lx].%s.containsNone(%ld..%ld)==false contradicts span()",
                               testName, (long)index, setNames[FAST], (long)prev, (long)limit);
                         return;
                     }
@@ -3260,7 +3260,7 @@ UBool stringContainsUnpairedSurrogate(const UChar *s, int32_t length) {
             --length;
             if(0xd800<=c && c<0xe000) {
                 if(c>=0xdc00 || length==0 || !U16_IS_TRAIL(c2=*s++)) {
-                    return TRUE;
+                    return true;
                 }
                 --length;
             }
@@ -3269,12 +3269,12 @@ UBool stringContainsUnpairedSurrogate(const UChar *s, int32_t length) {
         while((c=*s++)!=0) {
             if(0xd800<=c && c<0xe000) {
                 if(c>=0xdc00 || !U16_IS_TRAIL(c2=*s++)) {
-                    return TRUE;
+                    return true;
                 }
             }
         }
     }
-    return FALSE;
+    return false;
 }
 
 // Test both UTF-16 and UTF-8 versions of span() etc. on the same sets and text,
@@ -3291,7 +3291,7 @@ void UnicodeSetTest::testSpanBothUTFs(const UnicodeSetWithStrings *sets[4],
     expectCount=-1;  // Get expectLimits[] from testSpan().
 
     if((whichSpans&SPAN_UTF16)!=0) {
-        testSpan(sets, s16, length16, TRUE, whichSpans, expectLimits, expectCount, testName, index);
+        testSpan(sets, s16, length16, true, whichSpans, expectLimits, expectCount, testName, index);
     }
     if((whichSpans&SPAN_UTF8)==0) {
         return;
@@ -3308,7 +3308,7 @@ void UnicodeSetTest::testSpanBothUTFs(const UnicodeSetWithStrings *sets[4],
     UErrorCode errorCode=U_ZERO_ERROR;
 
     // Convert with substitution: Turn unpaired surrogates into U+FFFD.
-    ucnv_fromUnicode(openUTF8Converter(), &t, tLimit, &s16, s16Limit, o, TRUE, &errorCode);
+    ucnv_fromUnicode(openUTF8Converter(), &t, tLimit, &s16, s16Limit, o, true, &errorCode);
     if(U_FAILURE(errorCode)) {
         errln("FAIL: %s[0x%lx] ucnv_fromUnicode(to UTF-8) fails with %s",
               testName, (long)index, u_errorName(errorCode));
@@ -3331,7 +3331,7 @@ void UnicodeSetTest::testSpanBothUTFs(const UnicodeSetWithStrings *sets[4],
         }
     }
 
-    testSpan(sets, s8, length8, FALSE, whichSpans, expectLimits, expectCount, testName, index);
+    testSpan(sets, s8, length8, false, whichSpans, expectLimits, expectCount, testName, index);
 }
 
 static UChar32 nextCodePoint(UChar32 c) {
@@ -3409,8 +3409,8 @@ void UnicodeSetTest::testSpanUTF16String(const UnicodeSetWithStrings *sets[4], u
     if((whichSpans&SPAN_UTF16)==0) {
         return;
     }
-    testSpan(sets, s, -1, TRUE, (whichSpans&~SPAN_UTF8), testName, 0);
-    testSpan(sets, s, UPRV_LENGTHOF(s)-1, TRUE, (whichSpans&~SPAN_UTF8), testName, 1);
+    testSpan(sets, s, -1, true, (whichSpans&~SPAN_UTF8), testName, 0);
+    testSpan(sets, s, UPRV_LENGTHOF(s)-1, true, (whichSpans&~SPAN_UTF8), testName, 1);
 }
 
 void UnicodeSetTest::testSpanUTF8String(const UnicodeSetWithStrings *sets[4], uint32_t whichSpans, const char *testName) {
@@ -3506,8 +3506,8 @@ void UnicodeSetTest::testSpanUTF8String(const UnicodeSetWithStrings *sets[4], ui
     if((whichSpans&SPAN_UTF8)==0) {
         return;
     }
-    testSpan(sets, s, -1, FALSE, (whichSpans&~SPAN_UTF16), testName, 0);
-    testSpan(sets, s, UPRV_LENGTHOF(s)-1, FALSE, (whichSpans&~SPAN_UTF16), testName, 1);
+    testSpan(sets, s, -1, false, (whichSpans&~SPAN_UTF16), testName, 0);
+    testSpan(sets, s, UPRV_LENGTHOF(s)-1, false, (whichSpans&~SPAN_UTF16), testName, 1);
 }
 
 // Take a set of span options and multiply them so that
@@ -3599,7 +3599,7 @@ void UnicodeSetTest::TestSpan() {
 
         // More repetitions of "xya" would take too long with the recursive
         // reference implementation.
-        // containsAll()=FALSE
+        // containsAll()=false
         // test_string 0x14
         "xx"
         "xyaxyaxyaxya"  // set.complement().span(longest match) will stop here.
@@ -3609,7 +3609,7 @@ void UnicodeSetTest::TestSpan() {
         "xyaxyaxyaxya"  // span() ends here.
         "aaa",
 
-        // containsAll()=TRUE
+        // containsAll()=true
         // test_string 0x15
         "xx"
         "xyaxyaxyaxya"
@@ -3851,13 +3851,13 @@ void UnicodeSetTest::TestStringSpan() {
     UnicodeString string16=UnicodeString(string, -1, US_INV).unescape();
 
     if(set.containsAll(string16)) {
-        errln("FAIL: UnicodeSet(%s).containsAll(%s) should be FALSE", pattern, string);
+        errln("FAIL: UnicodeSet(%s).containsAll(%s) should be false", pattern, string);
     }
 
     // Remove trailing "aaaa".
     string16.truncate(string16.length()-4);
     if(!set.containsAll(string16)) {
-        errln("FAIL: UnicodeSet(%s).containsAll(%s[:-4]) should be TRUE", pattern, string);
+        errln("FAIL: UnicodeSet(%s).containsAll(%s[:-4]) should be true", pattern, string);
     }
 
     string16=u"byayaxya";
diff --git a/icu4c/source/test/intltest/ustrtest.cpp b/icu4c/source/test/intltest/ustrtest.cpp
index 309a29713d7..a4da8e04665 100644
--- a/icu4c/source/test/intltest/ustrtest.cpp
+++ b/icu4c/source/test/intltest/ustrtest.cpp
@@ -245,7 +245,7 @@ UnicodeStringTest::TestBasicManipulation()
         static const UChar utf16[]={ 0x61, 0xE4, 0xDF, 0x4E00 };
         UnicodeString from8a = UnicodeString((const char *)utf8);
         UnicodeString from8b = UnicodeString((const char *)utf8, (int32_t)sizeof(utf8)-1);
-        UnicodeString from16(FALSE, utf16, UPRV_LENGTHOF(utf16));
+        UnicodeString from16(false, utf16, UPRV_LENGTHOF(utf16));
         if(from8a != from16 || from8b != from16) {
             errln("UnicodeString(const char * U_CHARSET_IS_UTF8) failed");
         }
@@ -368,7 +368,7 @@ UnicodeStringTest::TestCompare()
         int32_t i;
 
         for(i=0; isetTo(TRUE, workingBuffer, 2);
+    test->setTo(true, workingBuffer, 2);
     if(test->length() != 2 || test->charAt(0) != 0x20ac || test->charAt(1) != 0x125) {
         errln("UnicodeString.setTo(readonly alias) does not alias correctly");
     }
@@ -1267,12 +1267,12 @@ UnicodeStringTest::TestStackAllocation()
     }
     delete c;
 
-    test->setTo(TRUE, workingBuffer, -1);
+    test->setTo(true, workingBuffer, -1);
     if(test->length() != 2 || test->charAt(0) != 0x20ac || test->charAt(1) != 0x109) {
         errln("UnicodeString.setTo(readonly alias, length -1) does not alias correctly");
     }
 
-    test->setTo(FALSE, workingBuffer, -1);
+    test->setTo(false, workingBuffer, -1);
     if(!test->isBogus()) {
         errln("UnicodeString.setTo(unterminated readonly alias, length -1) does not result in isBogus()");
     }
@@ -1454,14 +1454,14 @@ UnicodeStringTest::TestBogus() {
 
     // test isBogus() and setToBogus()
     if (test1.isBogus() || test2.isBogus() || test3.isBogus()) {
-        errln("A string returned TRUE for isBogus()!");
+        errln("A string returned true for isBogus()!");
     }
 
     // NULL pointers are treated like empty strings
     // use other illegal arguments to make a bogus string
-    test3.setTo(FALSE, test1.getBuffer(), -2);
+    test3.setTo(false, test1.getBuffer(), -2);
     if(!test3.isBogus()) {
-        errln("A bogus string returned FALSE for isBogus()!");
+        errln("A bogus string returned false for isBogus()!");
     }
     if (test1.hashCode() != test2.hashCode() || test1.hashCode() == test3.hashCode()) {
         errln("hashCode() failed");
@@ -1559,7 +1559,7 @@ UnicodeStringTest::TestBogus() {
     }
 
     test3.setToBogus();
-    if(!test3.isBogus() || test3.setTo(FALSE, test1.getBuffer(), test1.length()).isBogus() || test3!=test1) {
+    if(!test3.isBogus() || test3.setTo(false, test1.getBuffer(), test1.length()).isBogus() || test3!=test1) {
         errln("bogus.setTo(readonly alias) failed");
     }
 
@@ -1630,7 +1630,7 @@ UnicodeStringTest::TestBogus() {
     UErrorCode errorCode=U_ZERO_ERROR;
     UnicodeString
         test4((const UChar *)NULL),
-        test5(TRUE, (const UChar *)NULL, 1),
+        test5(true, (const UChar *)NULL, 1),
         test6((UChar *)NULL, 5, 5),
         test7((const char *)NULL, 3, NULL, errorCode);
     if(test4.isBogus() || test5.isBogus() || test6.isBogus() || test7.isBogus()) {
@@ -1638,7 +1638,7 @@ UnicodeStringTest::TestBogus() {
     }
 
     test4.setTo(NULL, 3);
-    test5.setTo(TRUE, (const UChar *)NULL, 1);
+    test5.setTo(true, (const UChar *)NULL, 1);
     test6.setTo((UChar *)NULL, 5, 5);
     if(test4.isBogus() || test5.isBogus() || test6.isBogus()) {
         errln("a setTo() set to bogus for a NULL input string, should be empty");
@@ -1744,7 +1744,7 @@ UnicodeStringTest::TestStringEnumeration() {
         status=U_ZERO_ERROR;
         pu=ten.unext(&length, status);
         s=UnicodeString(testEnumStrings[i], "");
-        if(U_FAILURE(status) || pu==NULL || length!=s.length() || UnicodeString(TRUE, pu, length)!=s) {
+        if(U_FAILURE(status) || pu==NULL || length!=s.length() || UnicodeString(true, pu, length)!=s) {
             errln("StringEnumeration.unext(%d) failed", i);
         }
     }
@@ -1787,7 +1787,7 @@ UnicodeStringTest::TestStringEnumeration() {
         status=U_ZERO_ERROR;
         pu=uenum_unext(uten, &length, &status);
         s=UnicodeString(testEnumStrings[i], "");
-        if(U_FAILURE(status) || pu==NULL || length!=s.length() || UnicodeString(TRUE, pu, length)!=s) {
+        if(U_FAILURE(status) || pu==NULL || length!=s.length() || UnicodeString(true, pu, length)!=s) {
             errln("File %s, Line %d, uenum_unext(%d) failed", __FILE__, __LINE__, i);
         }
     }
@@ -1849,7 +1849,7 @@ UnicodeStringTest::TestUTF32() {
         0xd800, 0xdc00, 0xd840, 0xdc00, 0xdb40, 0xdc00, 0xdbff, 0xdfff
     };
     UnicodeString from32 = UnicodeString::fromUTF32(utf32, UPRV_LENGTHOF(utf32));
-    UnicodeString expected(FALSE, expected_utf16, UPRV_LENGTHOF(expected_utf16));
+    UnicodeString expected(false, expected_utf16, UPRV_LENGTHOF(expected_utf16));
     if(from32 != expected) {
         errln("UnicodeString::fromUTF32() did not create the expected string.");
     }
@@ -1863,7 +1863,7 @@ UnicodeStringTest::TestUTF32() {
     UChar32 result32[16];
     UErrorCode errorCode = U_ZERO_ERROR;
     int32_t length32 =
-        UnicodeString(FALSE, utf16, UPRV_LENGTHOF(utf16)).
+        UnicodeString(false, utf16, UPRV_LENGTHOF(utf16)).
         toUTF32(result32, UPRV_LENGTHOF(result32), errorCode);
     if( length32 != UPRV_LENGTHOF(expected_utf32) ||
         0 != uprv_memcmp(result32, expected_utf32, length32*4) ||
@@ -1876,8 +1876,8 @@ UnicodeStringTest::TestUTF32() {
 class TestCheckedArrayByteSink : public CheckedArrayByteSink {
 public:
     TestCheckedArrayByteSink(char* outbuf, int32_t capacity)
-            : CheckedArrayByteSink(outbuf, capacity), calledFlush(FALSE) {}
-    virtual void Flush() override { calledFlush = TRUE; }
+            : CheckedArrayByteSink(outbuf, capacity), calledFlush(false) {}
+    virtual void Flush() override { calledFlush = true; }
     UBool calledFlush;
 };
 
@@ -1907,7 +1907,7 @@ UnicodeStringTest::TestUTF8() {
         0xdb40, 0xdc00, 0xdbff, 0xdfff
     };
     UnicodeString from8 = UnicodeString::fromUTF8(StringPiece((const char *)utf8, (int32_t)sizeof(utf8)));
-    UnicodeString expected(FALSE, expected_utf16, UPRV_LENGTHOF(expected_utf16));
+    UnicodeString expected(false, expected_utf16, UPRV_LENGTHOF(expected_utf16));
 
     if(from8 != expected) {
         errln("UnicodeString::fromUTF8(StringPiece) did not create the expected string.");
@@ -1925,7 +1925,7 @@ UnicodeStringTest::TestUTF8() {
         0x41, 0xef, 0xbf, 0xbd, 0x61, 0xef, 0xbf, 0xbd, 0x5a, 0xf1, 0x90, 0x80, 0x80, 0x7a,
         0xf0, 0x90, 0x80, 0x80, 0xf4, 0x8f, 0xbf, 0xbf
     };
-    UnicodeString us(FALSE, utf16, UPRV_LENGTHOF(utf16));
+    UnicodeString us(false, utf16, UPRV_LENGTHOF(utf16));
 
     char buffer[64];
     TestCheckedArrayByteSink sink(buffer, (int32_t)sizeof(buffer));
@@ -1950,13 +1950,13 @@ UnicodeStringTest::TestUTF8() {
 
 // Test if this compiler supports Return Value Optimization of unnamed temporary objects.
 static UnicodeString wrapUChars(const UChar *uchars) {
-    return UnicodeString(TRUE, uchars, -1);
+    return UnicodeString(true, uchars, -1);
 }
 
 void
 UnicodeStringTest::TestReadOnlyAlias() {
     UChar uchars[]={ 0x61, 0x62, 0 };
-    UnicodeString alias(TRUE, uchars, 2);
+    UnicodeString alias(true, uchars, 2);
     if(alias.length()!=2 || alias.getBuffer()!=uchars || alias.getTerminatedBuffer()!=uchars) {
         errln("UnicodeString read-only-aliasing constructor does not behave as expected.");
         return;
@@ -1978,7 +1978,7 @@ UnicodeStringTest::TestReadOnlyAlias() {
               "does not return a buffer terminated at the proper length.");
     }
 
-    alias.setTo(TRUE, uchars, 2);
+    alias.setTo(true, uchars, 2);
     if(alias.length()!=2 || alias.getBuffer()!=uchars || alias.getTerminatedBuffer()!=uchars) {
         errln("UnicodeString read-only-aliasing setTo() does not behave as expected.");
         return;
@@ -2001,17 +2001,17 @@ UnicodeStringTest::TestReadOnlyAlias() {
     }
 
     UnicodeString longString=UNICODE_STRING_SIMPLE("abcdefghijklmnopqrstuvwxyz0123456789");
-    alias.setTo(FALSE, longString.getBuffer(), longString.length());
+    alias.setTo(false, longString.getBuffer(), longString.length());
     alias.remove(0, 10);
     if(longString.compare(10, INT32_MAX, alias)!=0 || alias.getBuffer()!=longString.getBuffer()+10) {
         errln("UnicodeString.setTo(read-only-alias).remove(0, 10) did not preserve aliasing as expected.");
     }
-    alias.setTo(FALSE, longString.getBuffer(), longString.length());
+    alias.setTo(false, longString.getBuffer(), longString.length());
     alias.remove(27, 99);
     if(longString.compare(0, 27, alias)!=0 || alias.getBuffer()!=longString.getBuffer()) {
         errln("UnicodeString.setTo(read-only-alias).remove(27, 99) did not preserve aliasing as expected.");
     }
-    alias.setTo(FALSE, longString.getBuffer(), longString.length());
+    alias.setTo(false, longString.getBuffer(), longString.length());
     alias.retainBetween(6, 30);
     if(longString.compare(6, 24, alias)!=0 || alias.getBuffer()!=longString.getBuffer()+6) {
         errln("UnicodeString.setTo(read-only-alias).retainBetween(6, 30) did not preserve aliasing as expected.");
@@ -2092,7 +2092,7 @@ UnicodeStringTest::doTestAppendable(UnicodeString &dest, Appendable &app) {
 class SimpleAppendable : public Appendable {
 public:
     explicit SimpleAppendable(UnicodeString &dest) : str(dest) {}
-    virtual UBool appendCodeUnit(UChar c) override { str.append(c); return TRUE; }
+    virtual UBool appendCodeUnit(UChar c) override { str.append(c); return true; }
     SimpleAppendable &reset() { str.remove(); return *this; }
 private:
     UnicodeString &str;
@@ -2156,7 +2156,7 @@ void moveFrom(UnicodeString &dest, UnicodeString &src) {
 void
 UnicodeStringTest::TestMoveSwap() {
     static const UChar abc[3] = { 0x61, 0x62, 0x63 };  // "abc"
-    UnicodeString s1(FALSE, abc, UPRV_LENGTHOF(abc));  // read-only alias
+    UnicodeString s1(false, abc, UPRV_LENGTHOF(abc));  // read-only alias
     UnicodeString s2(100, 0x7a, 100);  // 100 * 'z' should be on the heap
     UnicodeString s3("defg", 4, US_INV);  // in stack buffer
     const UChar *p = s2.getBuffer();
@@ -2219,7 +2219,7 @@ UnicodeStringTest::TestUInt16Pointers() {
     UnicodeString expected(u"abc");
     assertEquals("abc from pointer", expected, UnicodeString(carr));
     assertEquals("abc from pointer+length", expected, UnicodeString(carr, 3));
-    assertEquals("abc from read-only-alias pointer", expected, UnicodeString(TRUE, carr, 3));
+    assertEquals("abc from read-only-alias pointer", expected, UnicodeString(true, carr, 3));
 
     UnicodeString alias(arr, 0, 4);
     alias.append(u'a').append(u'b').append(u'c');
@@ -2241,7 +2241,7 @@ UnicodeStringTest::TestWCharPointers() {
     UnicodeString expected(u"abc");
     assertEquals("abc from pointer", expected, UnicodeString(carr));
     assertEquals("abc from pointer+length", expected, UnicodeString(carr, 3));
-    assertEquals("abc from read-only-alias pointer", expected, UnicodeString(TRUE, carr, 3));
+    assertEquals("abc from read-only-alias pointer", expected, UnicodeString(true, carr, 3));
 
     UnicodeString alias(arr, 0, 4);
     alias.append(u'a').append(u'b').append(u'c');
@@ -2259,7 +2259,7 @@ void
 UnicodeStringTest::TestNullPointers() {
     assertTrue("empty from nullptr", UnicodeString(nullptr).isEmpty());
     assertTrue("empty from nullptr+length", UnicodeString(nullptr, 2).isEmpty());
-    assertTrue("empty from read-only-alias nullptr", UnicodeString(TRUE, nullptr, 3).isEmpty());
+    assertTrue("empty from read-only-alias nullptr", UnicodeString(true, nullptr, 3).isEmpty());
 
     UnicodeString alias(nullptr, 4, 4);  // empty, no alias
     assertTrue("empty from writable alias", alias.isEmpty());
@@ -2283,7 +2283,7 @@ void UnicodeStringTest::TestUnicodeStringInsertAppendToSelf() {
     assertEquals("", u"foo foo foo foo foo foo foo foo ", str);
 
     // Test append operation with readonly alias to start
-    str = UnicodeString(TRUE, u"foo ", 4);
+    str = UnicodeString(true, u"foo ", 4);
     str.append(str);
     str.append(str);
     str.append(str);
@@ -2296,7 +2296,7 @@ void UnicodeStringTest::TestUnicodeStringInsertAppendToSelf() {
     assertEquals("", u"abcdebc", str);
 
     // Test append operation with double-aliased substring
-    str = UnicodeString(TRUE, u"abcde", 5);
+    str = UnicodeString(true, u"abcde", 5);
     sub = str.tempSubString(1, 2);
     str.append(sub);
     assertEquals("", u"abcdebc", str);
@@ -2309,7 +2309,7 @@ void UnicodeStringTest::TestUnicodeStringInsertAppendToSelf() {
     assertEquals("", u"a-a-a-a-a-a-a-a-*b*b*b*b*b*b*b*b", str);
 
     // Test insert operation with readonly alias to start
-    str = UnicodeString(TRUE, u"a-*b", 4);
+    str = UnicodeString(true, u"a-*b", 4);
     str.insert(2, str);
     str.insert(4, str);
     str.insert(8, str);
@@ -2322,7 +2322,7 @@ void UnicodeStringTest::TestUnicodeStringInsertAppendToSelf() {
     assertEquals("", u"abbcdcde", str);
 
     // Test insert operation with double-aliased substring
-    str = UnicodeString(TRUE, u"abcde", 5);
+    str = UnicodeString(true, u"abcde", 5);
     sub = str.tempSubString(1, 3);
     str.insert(2, sub);
     assertEquals("", u"abbcdcde", str);
diff --git a/icu4c/source/test/intltest/uts46test.cpp b/icu4c/source/test/intltest/uts46test.cpp
index 99d03a0d283..555ef453127 100644
--- a/icu4c/source/test/intltest/uts46test.cpp
+++ b/icu4c/source/test/intltest/uts46test.cpp
@@ -106,22 +106,22 @@ static UBool isASCII(const UnicodeString &str) {
     int32_t length=str.length();
     for(int32_t i=0; i=0x80) {
-            return FALSE;
+            return false;
         }
     }
-    return TRUE;
+    return true;
 }
 
 class TestCheckedArrayByteSink : public CheckedArrayByteSink {
 public:
     TestCheckedArrayByteSink(char* outbuf, int32_t capacity)
-            : CheckedArrayByteSink(outbuf, capacity), calledFlush(FALSE) {}
+            : CheckedArrayByteSink(outbuf, capacity), calledFlush(false) {}
     virtual CheckedArrayByteSink& Reset() override {
         CheckedArrayByteSink::Reset();
-        calledFlush = FALSE;
+        calledFlush = false;
         return *this;
     }
-    virtual void Flush() override { calledFlush = TRUE; }
+    virtual void Flush() override { calledFlush = true; }
     UBool calledFlush;
 };
 
@@ -1045,13 +1045,13 @@ void UTS46Test::checkIdnaTestResult(const char *line, const char *type,
                                     const char *status, const IDNAInfo &info) {
     // An error in toUnicode or toASCII is indicated by a value in square brackets,
     // such as "[B5 B6]".
-    UBool expectedHasErrors = FALSE;
+    UBool expectedHasErrors = false;
     if (*status != 0) {
         if (*status != u'[') {
             errln("%s  status field does not start with '[': %s\n    %s", type, status, line);
         }
         if (strcmp(status, reinterpret_cast(u8"[]")) != 0) {
-            expectedHasErrors = TRUE;
+            expectedHasErrors = true;
         }
     }
     if (expectedHasErrors != info.hasErrors()) {
diff --git a/icu4c/source/test/intltest/utxttest.cpp b/icu4c/source/test/intltest/utxttest.cpp
index 942c94dc9f1..d0e5ffb571d 100644
--- a/icu4c/source/test/intltest/utxttest.cpp
+++ b/icu4c/source/test/intltest/utxttest.cpp
@@ -23,16 +23,16 @@
 #include "cstr.h"
 #include "utxttest.h"
 
-static UBool  gFailed = FALSE;
+static UBool  gFailed = false;
 static int    gTestNum = 0;
 
 // Forward decl
 UText *openFragmentedUnicodeString(UText *ut, UnicodeString *s, UErrorCode *status);
 
 #define TEST_ASSERT(x) UPRV_BLOCK_MACRO_BEGIN { \
-    if ((x)==FALSE) { \
+    if ((x)==false) { \
         errln("Test #%d failure in file %s at line %d\n", gTestNum, __FILE__, __LINE__); \
-        gFailed = TRUE; \
+        gFailed = true; \
     } \
 } UPRV_BLOCK_MACRO_END
 
@@ -41,7 +41,7 @@ UText *openFragmentedUnicodeString(UText *ut, UnicodeString *s, UErrorCode *stat
     if (U_FAILURE(status)) { \
         errln("Test #%d failure in file %s at line %d. Error = \"%s\"\n", \
               gTestNum, __FILE__, __LINE__, u_errorName(status)); \
-        gFailed = TRUE; \
+        gFailed = true; \
     } \
 } UPRV_BLOCK_MACRO_END
 
@@ -300,7 +300,7 @@ void UTextTest::TestString(const UnicodeString &s) {
 //     The UText is deep-cloned prior to each operation, so that the original UText remains unchanged.
 //
 void UTextTest::TestCMR(const UnicodeString &us, UText *ut, int cpCount, m *nativeMap, m *u16Map) {
-    TEST_ASSERT(utext_isWritable(ut) == TRUE);
+    TEST_ASSERT(utext_isWritable(ut) == true);
 
     int  srcLengthType;       // Loop variables for selecting the position and length
     int  srcPosType;          //   of the block to operate on within the source text.
@@ -368,12 +368,12 @@ void UTextTest::TestCMR(const UnicodeString &us, UText *ut, int cpCount, m *nati
                 u16Limit    = u16Map[srcIndex+srcLength].nativeIdx;
                 u16Dest     = u16Map[destIndex].nativeIdx;
 
-                gFailed = FALSE;
-                TestCopyMove(us, ut, FALSE,
+                gFailed = false;
+                TestCopyMove(us, ut, false,
                     nativeStart, nativeLimit, nativeDest,
                     u16Start, u16Limit, u16Dest);
 
-                TestCopyMove(us, ut, TRUE,
+                TestCopyMove(us, ut, true,
                     nativeStart, nativeLimit, nativeDest,
                     u16Start, u16Limit, u16Dest);
 
@@ -413,13 +413,13 @@ void UTextTest::TestCopyMove(const UnicodeString &us, UText *ut, UBool move,
     UErrorCode      status   = U_ZERO_ERROR;
     UText          *targetUT = NULL;
     gTestNum++;
-    gFailed = FALSE;
+    gFailed = false;
 
     //
     //  clone the UText.  The test will be run in the cloned copy
     //  so that we don't alter the original.
     //
-    targetUT = utext_clone(NULL, ut, TRUE, FALSE, &status);
+    targetUT = utext_clone(NULL, ut, true, false, &status);
     TEST_SUCCESS(status);
     UnicodeString targetUS(us);    // And copy the reference string.
 
@@ -464,7 +464,7 @@ void UTextTest::TestCopyMove(const UnicodeString &us, UText *ut, UBool move,
             }
         }
         int64_t expectedNativeLength = utext_nativeLength(ut);
-        if (move == FALSE) {
+        if (move == false) {
             expectedNativeLength += nativeLimit - nativeStart;
         }
         uti = utext_getNativeIndex(targetUT);
@@ -491,13 +491,13 @@ void UTextTest::TestReplace(
     UErrorCode      status   = U_ZERO_ERROR;
     UText          *targetUT = NULL;
     gTestNum++;
-    gFailed = FALSE;
+    gFailed = false;
 
     //
     //  clone the target UText.  The test will be run in the cloned copy
     //  so that we don't alter the original.
     //
-    targetUT = utext_clone(NULL, ut, TRUE, FALSE, &status);
+    targetUT = utext_clone(NULL, ut, true, false, &status);
     TEST_SUCCESS(status);
     UnicodeString targetUS(us);    // And copy the reference string.
 
@@ -560,7 +560,7 @@ void UTextTest::TestAccess(const UnicodeString &us, UText *ut, int cpCount, m *c
     // Re-run tests on a shallow clone.
     utext_setNativeIndex(ut, 0);
     UErrorCode status = U_ZERO_ERROR;
-    UText *shallowClone = utext_clone(NULL, ut, FALSE /*deep*/, FALSE /*readOnly*/, &status);
+    UText *shallowClone = utext_clone(NULL, ut, false /*deep*/, false /*readOnly*/, &status);
     TEST_SUCCESS(status);
     TestAccessNoClone(us, shallowClone, cpCount, cpMap);
 
@@ -571,7 +571,7 @@ void UTextTest::TestAccess(const UnicodeString &us, UText *ut, int cpCount, m *c
     //
     status = U_ZERO_ERROR;
     utext_setNativeIndex(shallowClone, 0);
-    UText *deepClone = utext_clone(NULL, shallowClone, TRUE, FALSE, &status);
+    UText *deepClone = utext_clone(NULL, shallowClone, true, false, &status);
     utext_close(shallowClone);
     if (status != U_UNSUPPORTED_ERROR) {
         TEST_SUCCESS(status);
@@ -982,17 +982,17 @@ void UTextTest::ErrorTest()
         UText *uta = utext_openUnicodeString(NULL, &sa, &status);
         TEST_SUCCESS(status);
         isExpensive = utext_isLengthExpensive(uta);
-        TEST_ASSERT(isExpensive == FALSE);
+        TEST_ASSERT(isExpensive == false);
         utext_close(uta);
 
         UText *utb = utext_openUChars(NULL, sb, -1, &status);
         TEST_SUCCESS(status);
         isExpensive = utext_isLengthExpensive(utb);
-        TEST_ASSERT(isExpensive == TRUE);
+        TEST_ASSERT(isExpensive == true);
         int64_t  len = utext_nativeLength(utb);
         TEST_ASSERT(len == 99);
         isExpensive = utext_isLengthExpensive(utb);
-        TEST_ASSERT(isExpensive == FALSE);
+        TEST_ASSERT(isExpensive == false);
         utext_close(utb);
     }
 
@@ -1226,49 +1226,49 @@ void UTextTest::FreezeTest() {
     ut = utext_openUTF8(ut, u8str, -1, &status);
     TEST_SUCCESS(status);
     UBool writable = utext_isWritable(ut);
-    TEST_ASSERT(writable == FALSE);
-    utext_copy(ut, 1, 2, 0, TRUE, &status);
+    TEST_ASSERT(writable == false);
+    utext_copy(ut, 1, 2, 0, true, &status);
     TEST_ASSERT(status == U_NO_WRITE_PERMISSION);
 
     status = U_ZERO_ERROR;
     ut = utext_openUChars(ut, u16str, -1, &status);
     TEST_SUCCESS(status);
     writable = utext_isWritable(ut);
-    TEST_ASSERT(writable == FALSE);
-    utext_copy(ut, 1, 2, 0, TRUE, &status);
+    TEST_ASSERT(writable == false);
+    utext_copy(ut, 1, 2, 0, true, &status);
     TEST_ASSERT(status == U_NO_WRITE_PERMISSION);
 
     status = U_ZERO_ERROR;
     ut = utext_openUnicodeString(ut, &ustr, &status);
     TEST_SUCCESS(status);
     writable = utext_isWritable(ut);
-    TEST_ASSERT(writable == TRUE);
+    TEST_ASSERT(writable == true);
     utext_freeze(ut);
     writable = utext_isWritable(ut);
-    TEST_ASSERT(writable == FALSE);
-    utext_copy(ut, 1, 2, 0, TRUE, &status);
+    TEST_ASSERT(writable == false);
+    utext_copy(ut, 1, 2, 0, true, &status);
     TEST_ASSERT(status == U_NO_WRITE_PERMISSION);
 
     status = U_ZERO_ERROR;
     ut = utext_openUnicodeString(ut, &ustr, &status);
     TEST_SUCCESS(status);
-    ut2 = utext_clone(ut2, ut, FALSE, FALSE, &status);  // clone with readonly = false
+    ut2 = utext_clone(ut2, ut, false, false, &status);  // clone with readonly = false
     TEST_SUCCESS(status);
     writable = utext_isWritable(ut2);
-    TEST_ASSERT(writable == TRUE);
-    ut2 = utext_clone(ut2, ut, FALSE, TRUE, &status);  // clone with readonly = true
+    TEST_ASSERT(writable == true);
+    ut2 = utext_clone(ut2, ut, false, true, &status);  // clone with readonly = true
     TEST_SUCCESS(status);
     writable = utext_isWritable(ut2);
-    TEST_ASSERT(writable == FALSE);
-    utext_copy(ut2, 1, 2, 0, TRUE, &status);
+    TEST_ASSERT(writable == false);
+    utext_copy(ut2, 1, 2, 0, true, &status);
     TEST_ASSERT(status == U_NO_WRITE_PERMISSION);
 
     status = U_ZERO_ERROR;
     ut = utext_openConstUnicodeString(ut, (const UnicodeString *)&ustr, &status);
     TEST_SUCCESS(status);
     writable = utext_isWritable(ut);
-    TEST_ASSERT(writable == FALSE);
-    utext_copy(ut, 1, 2, 0, TRUE, &status);
+    TEST_ASSERT(writable == false);
+    utext_copy(ut, 1, 2, 0, true, &status);
     TEST_ASSERT(status == U_NO_WRITE_PERMISSION);
 
     // Deep Clone of a frozen UText should re-enable writing in the copy.
@@ -1276,10 +1276,10 @@ void UTextTest::FreezeTest() {
     ut = utext_openUnicodeString(ut, &ustr, &status);
     TEST_SUCCESS(status);
     utext_freeze(ut);
-    ut2 = utext_clone(ut2, ut, TRUE, FALSE, &status);   // deep clone
+    ut2 = utext_clone(ut2, ut, true, false, &status);   // deep clone
     TEST_SUCCESS(status);
     writable = utext_isWritable(ut2);
-    TEST_ASSERT(writable == TRUE);
+    TEST_ASSERT(writable == true);
 
 
     // Deep clone of a frozen UText, where the base type is intrinsically non-writable,
@@ -1288,10 +1288,10 @@ void UTextTest::FreezeTest() {
     ut = utext_openUChars(ut, u16str, -1, &status);
     TEST_SUCCESS(status);
     utext_freeze(ut);
-    ut2 = utext_clone(ut2, ut, TRUE, FALSE, &status);   // deep clone
+    ut2 = utext_clone(ut2, ut, true, false, &status);   // deep clone
     TEST_SUCCESS(status);
     writable = utext_isWritable(ut2);
-    TEST_ASSERT(writable == FALSE);
+    TEST_ASSERT(writable == false);
 
     // cleanup
     utext_close(ut);
@@ -1385,7 +1385,7 @@ openFragmentedUnicodeString(UText *ut, UnicodeString *s, UErrorCode *status) {
     ut->pFuncs = &fragmentFuncs;
 
     ut->chunkContents = (UChar *)&ut->b;
-    ut->pFuncs->access(ut, 0, TRUE);
+    ut->pFuncs->access(ut, 0, true);
     return ut;
 }
 
@@ -1413,7 +1413,7 @@ void UTextTest::Ticket5560() {
 	UChar c = utext_next32(&ut1);
 	TEST_ASSERT(c == 0x41);  // c == 'A'
 
-	utext_clone(&ut2, &ut1, TRUE, FALSE, &status);
+	utext_clone(&ut2, &ut1, true, false, &status);
 	TEST_SUCCESS(status);
     c = utext_next32(&ut2);
 	TEST_ASSERT(c == 0x42);  // c == 'B'
@@ -1471,9 +1471,9 @@ void UTextTest::Ticket10562() {
     const char *utf8_string = "\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41\x41";
     UText *utf8Text = utext_openUTF8(NULL, utf8_string, -1, &status);
     TEST_SUCCESS(status);
-    UText *deepClone = utext_clone(NULL, utf8Text, TRUE, FALSE, &status);
+    UText *deepClone = utext_clone(NULL, utf8Text, true, false, &status);
     TEST_SUCCESS(status);
-    UText *shallowClone = utext_clone(NULL, deepClone, FALSE, FALSE, &status);
+    UText *shallowClone = utext_clone(NULL, deepClone, false, false, &status);
     TEST_SUCCESS(status);
     utext_close(shallowClone);
     utext_close(deepClone);
@@ -1483,9 +1483,9 @@ void UTextTest::Ticket10562() {
     UnicodeString usString("Hello, World.");
     UText *usText = utext_openUnicodeString(NULL, &usString, &status);
     TEST_SUCCESS(status);
-    UText *usDeepClone = utext_clone(NULL, usText, TRUE, FALSE, &status);
+    UText *usDeepClone = utext_clone(NULL, usText, true, false, &status);
     TEST_SUCCESS(status);
-    UText *usShallowClone = utext_clone(NULL, usDeepClone, FALSE, FALSE, &status);
+    UText *usShallowClone = utext_clone(NULL, usDeepClone, false, false, &status);
     TEST_SUCCESS(status);
     utext_close(usShallowClone);
     utext_close(usDeepClone);
@@ -1502,7 +1502,7 @@ void UTextTest::Ticket10983() {
     TEST_SUCCESS(status);
 
     status = U_INVALID_STATE_ERROR;
-    UText *cloned = utext_clone(NULL, ut, TRUE, TRUE, &status);
+    UText *cloned = utext_clone(NULL, ut, true, true, &status);
     TEST_ASSERT(cloned == NULL);
     TEST_ASSERT(status == U_INVALID_STATE_ERROR);
 
diff --git a/icu4c/source/test/intltest/uvectest.cpp b/icu4c/source/test/intltest/uvectest.cpp
index 0832663d666..058da1808eb 100644
--- a/icu4c/source/test/intltest/uvectest.cpp
+++ b/icu4c/source/test/intltest/uvectest.cpp
@@ -65,7 +65,7 @@ void UVectorTest::runIndexedTest( int32_t index, UBool exec, const char* &name,
 } UPRV_BLOCK_MACRO_END
 
 #define TEST_ASSERT(expr) UPRV_BLOCK_MACRO_BEGIN {\
-    if ((expr)==FALSE) {\
+    if ((expr)==false) {\
         errln("UVectorTest failure at line %d.\n", __LINE__);\
     }\
 } UPRV_BLOCK_MACRO_END
@@ -181,7 +181,7 @@ void UVectorTest::UStack_API() {
 
 U_CDECL_BEGIN
 static UBool U_CALLCONV neverTRUE(const UElement /*key1*/, const UElement /*key2*/) {
-    return FALSE;
+    return false;
 }
 
 U_CDECL_END
@@ -201,7 +201,7 @@ void UVectorTest::Hashtable_API() {
     Hashtable b(status);
     TEST_ASSERT((!a->equals(b)));
     TEST_ASSERT((b.puti("b", 2, status) == 0));
-    TEST_ASSERT((!a->equals(b))); // Without a value comparator, this will be FALSE by default.
+    TEST_ASSERT((!a->equals(b))); // Without a value comparator, this will be false by default.
     b.setValueComparator(uhash_compareLong);
     TEST_ASSERT((!a->equals(b)));
     a->setValueComparator(uhash_compareLong);
diff --git a/icu4c/source/test/intltest/v32test.cpp b/icu4c/source/test/intltest/v32test.cpp
index 5380bcc0dfe..9502ee7f76e 100644
--- a/icu4c/source/test/intltest/v32test.cpp
+++ b/icu4c/source/test/intltest/v32test.cpp
@@ -65,7 +65,7 @@ void UVector32Test::runIndexedTest( int32_t index, UBool exec, const char* &name
 } UPRV_BLOCK_MACRO_END
 
 #define TEST_ASSERT(expr) UPRV_BLOCK_MACRO_BEGIN {\
-    if ((expr)==FALSE) {\
+    if ((expr)==false) {\
         errln("UVector32Test failure at line %d.\n", __LINE__);\
     }\
 } UPRV_BLOCK_MACRO_END
@@ -207,10 +207,10 @@ void UVector32Test::UVector32_API() {
     a->addElement(10, status);
     a->addElement(20, status);
     a->addElement(30, status);
-    TEST_ASSERT(a->contains(10) == TRUE);
-    TEST_ASSERT(a->contains(11) == FALSE);
-    TEST_ASSERT(a->contains(20) == TRUE);
-    TEST_ASSERT(a->contains(-10) == FALSE);
+    TEST_ASSERT(a->contains(10) == true);
+    TEST_ASSERT(a->contains(11) == false);
+    TEST_ASSERT(a->contains(20) == true);
+    TEST_ASSERT(a->contains(-10) == false);
     TEST_CHECK_STATUS(status);
     delete a;
 
@@ -224,19 +224,19 @@ void UVector32Test::UVector32_API() {
     a->addElement(20, status);
     a->addElement(30, status);
     b = new UVector32(status);
-    TEST_ASSERT(a->containsAll(*b) == TRUE);
+    TEST_ASSERT(a->containsAll(*b) == true);
     b->addElement(2, status);
-    TEST_ASSERT(a->containsAll(*b) == FALSE);
+    TEST_ASSERT(a->containsAll(*b) == false);
     b->setElementAt(10, 0);
-    TEST_ASSERT(a->containsAll(*b) == TRUE);
-    TEST_ASSERT(b->containsAll(*a) == FALSE);
+    TEST_ASSERT(a->containsAll(*b) == true);
+    TEST_ASSERT(b->containsAll(*a) == false);
     b->addElement(30, status);
     b->addElement(20, status);
-    TEST_ASSERT(a->containsAll(*b) == TRUE);
-    TEST_ASSERT(b->containsAll(*a) == TRUE);
+    TEST_ASSERT(a->containsAll(*b) == true);
+    TEST_ASSERT(b->containsAll(*a) == true);
     b->addElement(2, status);
-    TEST_ASSERT(a->containsAll(*b) == FALSE);
-    TEST_ASSERT(b->containsAll(*a) == TRUE);
+    TEST_ASSERT(a->containsAll(*b) == false);
+    TEST_ASSERT(b->containsAll(*a) == true);
     TEST_CHECK_STATUS(status);
     delete a;
     delete b;
@@ -255,12 +255,12 @@ void UVector32Test::UVector32_API() {
     b->addElement(20, status);
     a->removeAll(*b);
     TEST_ASSERT(a->size() == 2);
-    TEST_ASSERT(a->contains(10)==TRUE);
-    TEST_ASSERT(a->contains(30)==TRUE);
+    TEST_ASSERT(a->contains(10)==true);
+    TEST_ASSERT(a->contains(30)==true);
     b->addElement(10, status);
     a->removeAll(*b);
     TEST_ASSERT(a->size() == 1);
-    TEST_ASSERT(a->contains(30) == TRUE);
+    TEST_ASSERT(a->contains(30) == true);
     TEST_CHECK_STATUS(status);
     delete a;
     delete b;
@@ -282,7 +282,7 @@ void UVector32Test::UVector32_API() {
     TEST_ASSERT(a->size() == 3);
     b->removeElementAt(1);
     a->retainAll(*b);
-    TEST_ASSERT(a->contains(20) == FALSE);
+    TEST_ASSERT(a->contains(20) == false);
     TEST_ASSERT(a->size() == 2);
     b->removeAllElements();
     TEST_ASSERT(b->size() == 0);
@@ -309,14 +309,14 @@ void UVector32Test::UVector32_API() {
     //
     status = U_ZERO_ERROR;
     a = new UVector32(status);
-    TEST_ASSERT(a->isEmpty() == TRUE);
+    TEST_ASSERT(a->isEmpty() == true);
     a->addElement(10, status);
-    TEST_ASSERT(a->isEmpty() == FALSE);
+    TEST_ASSERT(a->isEmpty() == false);
     a->addElement(20, status);
     a->removeElementAt(0);
-    TEST_ASSERT(a->isEmpty() == FALSE);
+    TEST_ASSERT(a->isEmpty() == false);
     a->removeElementAt(0);
-    TEST_ASSERT(a->isEmpty() == TRUE);
+    TEST_ASSERT(a->isEmpty() == true);
     TEST_CHECK_STATUS(status);
     delete a;
 
@@ -326,10 +326,10 @@ void UVector32Test::UVector32_API() {
     //
     status = U_ZERO_ERROR;
     a = new UVector32(status);
-    TEST_ASSERT(a->isEmpty() == TRUE);
+    TEST_ASSERT(a->isEmpty() == true);
     a->addElement(10, status);
-    TEST_ASSERT(a->ensureCapacity(5000, status)== TRUE);
-    TEST_ASSERT(a->expandCapacity(20000, status) == TRUE);
+    TEST_ASSERT(a->ensureCapacity(5000, status)== true);
+    TEST_ASSERT(a->expandCapacity(20000, status) == true);
     TEST_CHECK_STATUS(status);
     delete a;
     
@@ -356,7 +356,7 @@ void UVector32Test::UVector32_API() {
     TEST_ASSERT(a->elementAti(2) == 0);
     TEST_ASSERT(a->size() == 2);
     a->setSize(0);
-    TEST_ASSERT(a->empty() == TRUE);
+    TEST_ASSERT(a->empty() == true);
     TEST_ASSERT(a->size() == 0);
 
     TEST_CHECK_STATUS(status);
@@ -371,11 +371,11 @@ void UVector32Test::UVector32_API() {
     a->addElement(20, status);
     a->addElement(30, status);
     b = new UVector32(status);
-    TEST_ASSERT(a->containsNone(*b) == TRUE);
+    TEST_ASSERT(a->containsNone(*b) == true);
     b->addElement(5, status);
-    TEST_ASSERT(a->containsNone(*b) == TRUE);
+    TEST_ASSERT(a->containsNone(*b) == true);
     b->addElement(30, status);
-    TEST_ASSERT(a->containsNone(*b) == FALSE);
+    TEST_ASSERT(a->containsNone(*b) == false);
 
     TEST_CHECK_STATUS(status);
     delete a;
@@ -422,14 +422,14 @@ void UVector32Test::UVector32_API() {
     //
     status = U_ZERO_ERROR;
     a = new UVector32(status);
-    TEST_ASSERT(a->empty() == TRUE);
+    TEST_ASSERT(a->empty() == true);
     a->addElement(10, status);
-    TEST_ASSERT(a->empty() == FALSE);
+    TEST_ASSERT(a->empty() == false);
     a->addElement(20, status);
     a->removeElementAt(0);
-    TEST_ASSERT(a->empty() == FALSE);
+    TEST_ASSERT(a->empty() == false);
     a->removeElementAt(0);
-    TEST_ASSERT(a->empty() == TRUE);
+    TEST_ASSERT(a->empty() == true);
     TEST_CHECK_STATUS(status);
     delete a;
 
diff --git a/icu4c/source/test/intltest/windttst.cpp b/icu4c/source/test/intltest/windttst.cpp
index 9fec23aca4b..b6ab7fc9f45 100644
--- a/icu4c/source/test/intltest/windttst.cpp
+++ b/icu4c/source/test/intltest/windttst.cpp
@@ -82,7 +82,7 @@ void Win32DateTimeTest::testLocales(DateFormatTest *log)
 
     tz->getID(zoneID);
     if (! uprv_getWindowsTimeZoneInfo(&tzi, zoneID.getBuffer(), zoneID.length())) {
-        UBool found = FALSE;
+        UBool found = false;
         int32_t ec = TimeZone::countEquivalentIDs(zoneID);
 
         for (int z = 0; z < ec; z += 1) {
diff --git a/icu4c/source/test/intltest/winnmtst.cpp b/icu4c/source/test/intltest/winnmtst.cpp
index 953fb5d2c38..bf6a86afae3 100644
--- a/icu4c/source/test/intltest/winnmtst.cpp
+++ b/icu4c/source/test/intltest/winnmtst.cpp
@@ -57,7 +57,7 @@
 
 #define LOOP_COUNT 1000
 
-static UBool initialized = FALSE;
+static UBool initialized = false;
 
 /**
  * Return a random int64_t where U_INT64_MIN <= ran <= U_INT64_MAX.
@@ -69,7 +69,7 @@ static uint64_t randomInt64(void)
 
     if (!initialized) {
         srand((unsigned)time(NULL));
-        initialized = TRUE;
+        initialized = true;
     }
 
     /* Assume rand has at least 12 bits of precision */
@@ -89,7 +89,7 @@ static double randomDouble(void)
 
     if (!initialized) {
         srand((unsigned)time(NULL));
-        initialized = TRUE;
+        initialized = true;
     }
 #if 0
     int32_t i;
@@ -123,7 +123,7 @@ static uint32_t randomInt32(void)
 
     if (!initialized) {
         srand((unsigned)time(NULL));
-        initialized = TRUE;
+        initialized = true;
     }
 
     /* Assume rand has at least 12 bits of precision */
@@ -315,16 +315,16 @@ void Win32NumberTest::testLocales(NumberFormatTest *log)
         NumberFormat *wnf = NumberFormat::createInstance(ulocale, status);
         NumberFormat *wcf = NumberFormat::createCurrencyInstance(ulocale, status);
 
-        testLocale(lcidRecords[i].localeID, lcidRecords[i].lcid, wnf, FALSE, log);
-        testLocale(lcidRecords[i].localeID, lcidRecords[i].lcid, wcf, TRUE,  log);
+        testLocale(lcidRecords[i].localeID, lcidRecords[i].lcid, wnf, false, log);
+        testLocale(lcidRecords[i].localeID, lcidRecords[i].lcid, wcf, true,  log);
 
 #if 0
         char *old_locale = strdup(setlocale(LC_ALL, NULL));
         
         setlocale(LC_ALL, "German");
 
-        testLocale(lcidRecords[i].localeID, lcidRecords[i].lcid, wnf, FALSE, log);
-        testLocale(lcidRecords[i].localeID, lcidRecords[i].lcid, wcf, TRUE,  log);
+        testLocale(lcidRecords[i].localeID, lcidRecords[i].lcid, wnf, false, log);
+        testLocale(lcidRecords[i].localeID, lcidRecords[i].lcid, wcf, true,  log);
 
         setlocale(LC_ALL, old_locale);
 
diff --git a/icu4c/source/test/intltest/winutil.cpp b/icu4c/source/test/intltest/winutil.cpp
index 87b2d402e83..c3e9135b308 100644
--- a/icu4c/source/test/intltest/winutil.cpp
+++ b/icu4c/source/test/intltest/winutil.cpp
@@ -68,7 +68,7 @@ BOOL CALLBACK EnumLocalesProc(LPSTR lpLocaleString)
 
     lcidCount += 1;
 
-    return TRUE;
+    return true;
 }
 
 // TODO: Note that this test will skip locale names and only hit locales with assigned LCIDs
diff --git a/icu4c/source/test/iotest/filetst.c b/icu4c/source/test/iotest/filetst.c
index 3a00c88cd80..ad268ace472 100644
--- a/icu4c/source/test/iotest/filetst.c
+++ b/icu4c/source/test/iotest/filetst.c
@@ -21,8 +21,9 @@
 #include "unicode/ustring.h"
 #include "unicode/uloc.h"
 
-#include 
+#include 
 #include 
+#include 
 
 const char *STANDARD_TEST_FILE = "iotest-c.txt";
 
@@ -1369,39 +1370,39 @@ static void TestFScanset(void) {
     static const UChar abcUChars[] = {0x61,0x62,0x63,0x63,0x64,0x65,0x66,0x67,0};
     static const char abcChars[] = "abccdefg";
 
-    TestFScanSetFormat("%[bc]S", abcUChars, abcChars, TRUE);
-    TestFScanSetFormat("%[cb]S", abcUChars, abcChars, TRUE);
+    TestFScanSetFormat("%[bc]S", abcUChars, abcChars, true);
+    TestFScanSetFormat("%[cb]S", abcUChars, abcChars, true);
 
-    TestFScanSetFormat("%[ab]S", abcUChars, abcChars, TRUE);
-    TestFScanSetFormat("%[ba]S", abcUChars, abcChars, TRUE);
+    TestFScanSetFormat("%[ab]S", abcUChars, abcChars, true);
+    TestFScanSetFormat("%[ba]S", abcUChars, abcChars, true);
 
-    TestFScanSetFormat("%[ab]", abcUChars, abcChars, TRUE);
-    TestFScanSetFormat("%[ba]", abcUChars, abcChars, TRUE);
+    TestFScanSetFormat("%[ab]", abcUChars, abcChars, true);
+    TestFScanSetFormat("%[ba]", abcUChars, abcChars, true);
 
-    TestFScanSetFormat("%[abcdefgh]", abcUChars, abcChars, TRUE);
-    TestFScanSetFormat("%[;hgfedcba]", abcUChars, abcChars, TRUE);
+    TestFScanSetFormat("%[abcdefgh]", abcUChars, abcChars, true);
+    TestFScanSetFormat("%[;hgfedcba]", abcUChars, abcChars, true);
 
-    TestFScanSetFormat("%[^a]", abcUChars, abcChars, TRUE);
-    TestFScanSetFormat("%[^e]", abcUChars, abcChars, TRUE);
-    TestFScanSetFormat("%[^ed]", abcUChars, abcChars, TRUE);
-    TestFScanSetFormat("%[^dc]", abcUChars, abcChars, TRUE);
-    TestFScanSetFormat("%[^e]  ", abcUChars, abcChars, TRUE);
+    TestFScanSetFormat("%[^a]", abcUChars, abcChars, true);
+    TestFScanSetFormat("%[^e]", abcUChars, abcChars, true);
+    TestFScanSetFormat("%[^ed]", abcUChars, abcChars, true);
+    TestFScanSetFormat("%[^dc]", abcUChars, abcChars, true);
+    TestFScanSetFormat("%[^e]  ", abcUChars, abcChars, true);
 
-    TestFScanSetFormat("%1[ab]  ", abcUChars, abcChars, TRUE);
-    TestFScanSetFormat("%2[^f]", abcUChars, abcChars, TRUE);
+    TestFScanSetFormat("%1[ab]  ", abcUChars, abcChars, true);
+    TestFScanSetFormat("%2[^f]", abcUChars, abcChars, true);
 
-    TestFScanSetFormat("%[qrst]", abcUChars, abcChars, TRUE);
+    TestFScanSetFormat("%[qrst]", abcUChars, abcChars, true);
 
     /* Extra long string for testing */
     TestFScanSetFormat("                                                                                                                         %[qrst]",
-        abcUChars, abcChars, TRUE);
+        abcUChars, abcChars, true);
 
-    TestFScanSetFormat("%[a-]", abcUChars, abcChars, TRUE);
+    TestFScanSetFormat("%[a-]", abcUChars, abcChars, true);
 
     /* Bad format */
-    TestFScanSetFormat("%[f-a]", abcUChars, abcChars, FALSE);
-    TestFScanSetFormat("%[c-a]", abcUChars, abcChars, FALSE);
-    TestFScanSetFormat("%[a", abcUChars, abcChars, FALSE);
+    TestFScanSetFormat("%[f-a]", abcUChars, abcChars, false);
+    TestFScanSetFormat("%[c-a]", abcUChars, abcChars, false);
+    TestFScanSetFormat("%[a", abcUChars, abcChars, false);
     /* The following is not deterministic on Windows */
 /*    TestFScanSetFormat("%[a-", abcUChars, abcChars);*/
 
diff --git a/icu4c/source/test/iotest/strtst.c b/icu4c/source/test/iotest/strtst.c
index 3ffec2b25dc..baf03e9d50a 100644
--- a/icu4c/source/test/iotest/strtst.c
+++ b/icu4c/source/test/iotest/strtst.c
@@ -19,6 +19,7 @@
 #include "cmemory.h"
 #include "iotest.h"
 
+#include 
 #include 
 
 static void TestString(void) {
@@ -648,39 +649,39 @@ static void TestSScanset(void) {
     static const UChar abcUChars[] = {0x61,0x62,0x63,0x63,0x64,0x65,0x66,0x67,0};
     static const char abcChars[] = "abccdefg";
 
-    TestSScanSetFormat("%[bc]S", abcUChars, abcChars, TRUE);
-    TestSScanSetFormat("%[cb]S", abcUChars, abcChars, TRUE);
+    TestSScanSetFormat("%[bc]S", abcUChars, abcChars, true);
+    TestSScanSetFormat("%[cb]S", abcUChars, abcChars, true);
 
-    TestSScanSetFormat("%[ab]S", abcUChars, abcChars, TRUE);
-    TestSScanSetFormat("%[ba]S", abcUChars, abcChars, TRUE);
+    TestSScanSetFormat("%[ab]S", abcUChars, abcChars, true);
+    TestSScanSetFormat("%[ba]S", abcUChars, abcChars, true);
 
-    TestSScanSetFormat("%[ab]", abcUChars, abcChars, TRUE);
-    TestSScanSetFormat("%[ba]", abcUChars, abcChars, TRUE);
+    TestSScanSetFormat("%[ab]", abcUChars, abcChars, true);
+    TestSScanSetFormat("%[ba]", abcUChars, abcChars, true);
 
-    TestSScanSetFormat("%[abcdefgh]", abcUChars, abcChars, TRUE);
-    TestSScanSetFormat("%[;hgfedcba]", abcUChars, abcChars, TRUE);
+    TestSScanSetFormat("%[abcdefgh]", abcUChars, abcChars, true);
+    TestSScanSetFormat("%[;hgfedcba]", abcUChars, abcChars, true);
 
-    TestSScanSetFormat("%[^a]", abcUChars, abcChars, TRUE);
-    TestSScanSetFormat("%[^e]", abcUChars, abcChars, TRUE);
-    TestSScanSetFormat("%[^ed]", abcUChars, abcChars, TRUE);
-    TestSScanSetFormat("%[^dc]", abcUChars, abcChars, TRUE);
-    TestSScanSetFormat("%[^e]  ", abcUChars, abcChars, TRUE);
+    TestSScanSetFormat("%[^a]", abcUChars, abcChars, true);
+    TestSScanSetFormat("%[^e]", abcUChars, abcChars, true);
+    TestSScanSetFormat("%[^ed]", abcUChars, abcChars, true);
+    TestSScanSetFormat("%[^dc]", abcUChars, abcChars, true);
+    TestSScanSetFormat("%[^e]  ", abcUChars, abcChars, true);
 
-    TestSScanSetFormat("%1[ab]  ", abcUChars, abcChars, TRUE);
-    TestSScanSetFormat("%2[^f]", abcUChars, abcChars, TRUE);
+    TestSScanSetFormat("%1[ab]  ", abcUChars, abcChars, true);
+    TestSScanSetFormat("%2[^f]", abcUChars, abcChars, true);
 
-    TestSScanSetFormat("%[qrst]", abcUChars, abcChars, TRUE);
+    TestSScanSetFormat("%[qrst]", abcUChars, abcChars, true);
 
     /* Extra long string for testing */
     TestSScanSetFormat("                                                                                                                         %[qrst]",
-        abcUChars, abcChars, TRUE);
+        abcUChars, abcChars, true);
 
-    TestSScanSetFormat("%[a-]", abcUChars, abcChars, TRUE);
+    TestSScanSetFormat("%[a-]", abcUChars, abcChars, true);
 
     /* Bad format */
-    TestSScanSetFormat("%[a", abcUChars, abcChars, FALSE);
-    TestSScanSetFormat("%[f-a]", abcUChars, abcChars, FALSE);
-    TestSScanSetFormat("%[c-a]", abcUChars, abcChars, FALSE);
+    TestSScanSetFormat("%[a", abcUChars, abcChars, false);
+    TestSScanSetFormat("%[f-a]", abcUChars, abcChars, false);
+    TestSScanSetFormat("%[c-a]", abcUChars, abcChars, false);
     /* The following is not deterministic on Windows */
 /*    TestSScanSetFormat("%[a-", abcUChars, abcChars);*/
 
diff --git a/icu4c/source/test/letest/testdata.cpp b/icu4c/source/test/letest/testdata.cpp
index 914fa22eaa1..af58dfefd65 100644
--- a/icu4c/source/test/letest/testdata.cpp
+++ b/icu4c/source/test/letest/testdata.cpp
@@ -622,10 +622,10 @@ float resultPositions3[] =
 
 TestInput testInputs[] = 
 {
-    {"raghu.ttf", fontVersionString0, fontChecksum0, inputText0, 136, devaScriptCode, FALSE},
-    {"CODE2000.TTF", fontVersionString1, fontChecksum1, inputText1, 252, arabScriptCode, TRUE},
-    {"LucidaSansRegular.ttf", fontVersionString2, fontChecksum2, inputText2, 252, arabScriptCode, TRUE},
-    {"angsd___.ttf", fontVersionString3, fontChecksum3, inputText3, 168, thaiScriptCode, FALSE},
+    {"raghu.ttf", fontVersionString0, fontChecksum0, inputText0, 136, devaScriptCode, false},
+    {"CODE2000.TTF", fontVersionString1, fontChecksum1, inputText1, 252, arabScriptCode, true},
+    {"LucidaSansRegular.ttf", fontVersionString2, fontChecksum2, inputText2, 252, arabScriptCode, true},
+    {"angsd___.ttf", fontVersionString3, fontChecksum3, inputText3, 168, thaiScriptCode, false},
 };
 
 le_int32 testCount = ARRAY_LENGTH(testInputs);
diff --git a/icu4c/source/test/perf/DateFmtPerf/DateFmtPerf.cpp b/icu4c/source/test/perf/DateFmtPerf/DateFmtPerf.cpp
index facb39ac352..9385b84210a 100644
--- a/icu4c/source/test/perf/DateFmtPerf/DateFmtPerf.cpp
+++ b/icu4c/source/test/perf/DateFmtPerf/DateFmtPerf.cpp
@@ -283,7 +283,7 @@ int main(int argc, const char* argv[]){
     }
 	//cout << "Done initializing!\n" << endl;
     
-    if(test.run()==FALSE){
+    if(test.run()==false){
 		cout << "run failed!" << endl;
         fprintf(stderr,"FAILED: Tests could not be run please check the arguments.\n");
         return -1;
diff --git a/icu4c/source/test/perf/charperf/charperf.cpp b/icu4c/source/test/perf/charperf/charperf.cpp
index 651434b6a49..78231d890ad 100644
--- a/icu4c/source/test/perf/charperf/charperf.cpp
+++ b/icu4c/source/test/perf/charperf/charperf.cpp
@@ -41,7 +41,7 @@ int main(int argc, const char *argv[])
     if (U_FAILURE(status)){
         return status;
     }
-    if (test.run() == FALSE){
+    if (test.run() == false){
         fprintf(stderr, "FAILED: Tests could not be run please check the "
             "arguments.\n");
         return -1;
diff --git a/icu4c/source/test/perf/collperf/collperf.cpp b/icu4c/source/test/perf/collperf/collperf.cpp
index 8622ea365f2..ae8e00c1bfb 100644
--- a/icu4c/source/test/perf/collperf/collperf.cpp
+++ b/icu4c/source/test/perf/collperf/collperf.cpp
@@ -226,7 +226,7 @@ public:
         int count5 = 5;
         int strindex = 0;
         ucol_setOffset(iter, strindex, status);
-        while (TRUE) {
+        while (true) {
             if (ucol_next(iter, status) == UCOL_NULLORDER) {
                 break;
             }
@@ -248,7 +248,7 @@ public:
         int count5 = 5;
         int strindex = 5;
         ucol_setOffset(iter, strindex, status);
-        while (TRUE) {
+        while (true) {
             if (ucol_previous(iter, status) == UCOL_NULLORDER) {
                 break;
             }
@@ -425,7 +425,7 @@ public:
             int guess;
             int last_guess = -1;
             int r;
-            while (TRUE) {
+            while (true) {
                 guess = (high + low)/2;
                 if (last_guess == guess) break; // nothing to search
 
@@ -898,7 +898,7 @@ int main(int argc, const char *argv[])
         return status;
     }
 
-    if (test.run() == FALSE){
+    if (test.run() == false){
         fprintf(stderr, "FAILED: Tests could not be run please check the "
             "arguments.\n");
         return -1;
diff --git a/icu4c/source/test/perf/collperf2/collperf2.cpp b/icu4c/source/test/perf/collperf2/collperf2.cpp
index afb90c5b468..1f80b371613 100644
--- a/icu4c/source/test/perf/collperf2/collperf2.cpp
+++ b/icu4c/source/test/perf/collperf2/collperf2.cpp
@@ -794,7 +794,7 @@ public:
             : CollPerfFunction(coll, ucoll), d16(data16),
               source(new UnicodeString*[d16->count]) {
         for (int32_t i = 0; i < d16->count; ++i) {
-            source[i] = new UnicodeString(TRUE, d16->dataOf(i), d16->lengthOf(i));
+            source[i] = new UnicodeString(true, d16->dataOf(i), d16->lengthOf(i));
         }
     }
     virtual ~UniStrCollPerfFunction();
@@ -837,7 +837,7 @@ void UniStrSort::call(UErrorCode* status) {
     int32_t count = d16->count;
     memcpy(dest, source, count * sizeof(UnicodeString *));
     uprv_sortArray(dest, count, (int32_t)sizeof(UnicodeString *),
-                   UniStrCollatorComparator, &cc, TRUE, status);
+                   UniStrCollatorComparator, &cc, true, status);
     ops = cc.counter;
 }
 
@@ -922,7 +922,7 @@ void StringPieceSortCpp::call(UErrorCode* status) {
     int32_t count = d8->count;
     memcpy(dest, source, count * sizeof(StringPiece));
     uprv_sortArray(dest, count, (int32_t)sizeof(StringPiece),
-                   StringPieceCollatorComparator, &cc, TRUE, status);
+                   StringPieceCollatorComparator, &cc, true, status);
     ops = cc.counter;
 }
 
@@ -946,7 +946,7 @@ void StringPieceSortC::call(UErrorCode* status) {
     int32_t count = d8->count;
     memcpy(dest, source, count * sizeof(StringPiece));
     uprv_sortArray(dest, count, (int32_t)sizeof(StringPiece),
-                   StringPieceUCollatorComparator, &cc, TRUE, status);
+                   StringPieceUCollatorComparator, &cc, true, status);
     ops = cc.counter;
 }
 
@@ -1333,7 +1333,7 @@ CA_uchar* CollPerf2Test::sortData16(const CA_uchar* d16,
     for (int32_t i = 0; i < d16->count; ++i) {
         indexes[i] = i;
     }
-    uprv_sortArray(indexes.getAlias(), d16->count, 4, cmp, context, TRUE, &status);
+    uprv_sortArray(indexes.getAlias(), d16->count, 4, cmp, context, true, &status);
     if (U_FAILURE(status)) return NULL;
 
     // Copy the strings in sorted order into a new array.
@@ -1443,7 +1443,7 @@ CollPerf2Test::runIndexedTest(int32_t index, UBool exec, const char *&name, char
 UPerfFunction* CollPerf2Test::TestStrcoll()
 {
     UErrorCode status = U_ZERO_ERROR;
-    Strcoll *testCase = new Strcoll(coll, getData16(status), TRUE /* useLen */);
+    Strcoll *testCase = new Strcoll(coll, getData16(status), true /* useLen */);
     if (U_FAILURE(status)) {
         delete testCase;
         return NULL;
@@ -1454,7 +1454,7 @@ UPerfFunction* CollPerf2Test::TestStrcoll()
 UPerfFunction* CollPerf2Test::TestStrcollNull()
 {
     UErrorCode status = U_ZERO_ERROR;
-    Strcoll *testCase = new Strcoll(coll, getData16(status), FALSE /* useLen */);
+    Strcoll *testCase = new Strcoll(coll, getData16(status), false /* useLen */);
     if (U_FAILURE(status)) {
         delete testCase;
         return NULL;
@@ -1465,7 +1465,7 @@ UPerfFunction* CollPerf2Test::TestStrcollNull()
 UPerfFunction* CollPerf2Test::TestStrcollSimilar()
 {
     UErrorCode status = U_ZERO_ERROR;
-    Strcoll_2 *testCase = new Strcoll_2(coll, getData16(status), getModData16(status), TRUE /* useLen */);
+    Strcoll_2 *testCase = new Strcoll_2(coll, getData16(status), getModData16(status), true /* useLen */);
     if (U_FAILURE(status)) {
         delete testCase;
         return NULL;
@@ -1476,7 +1476,7 @@ UPerfFunction* CollPerf2Test::TestStrcollSimilar()
 UPerfFunction* CollPerf2Test::TestStrcollUTF8()
 {
     UErrorCode status = U_ZERO_ERROR;
-    StrcollUTF8 *testCase = new StrcollUTF8(coll, getData8(status), TRUE /* useLen */);
+    StrcollUTF8 *testCase = new StrcollUTF8(coll, getData8(status), true /* useLen */);
     if (U_FAILURE(status)) {
         delete testCase;
         return NULL;
@@ -1487,7 +1487,7 @@ UPerfFunction* CollPerf2Test::TestStrcollUTF8()
 UPerfFunction* CollPerf2Test::TestStrcollUTF8Null()
 {
     UErrorCode status = U_ZERO_ERROR;
-    StrcollUTF8 *testCase = new StrcollUTF8(coll, getData8(status),FALSE /* useLen */);
+    StrcollUTF8 *testCase = new StrcollUTF8(coll, getData8(status),false /* useLen */);
     if (U_FAILURE(status)) {
         delete testCase;
         return NULL;
@@ -1498,7 +1498,7 @@ UPerfFunction* CollPerf2Test::TestStrcollUTF8Null()
 UPerfFunction* CollPerf2Test::TestStrcollUTF8Similar()
 {
     UErrorCode status = U_ZERO_ERROR;
-    StrcollUTF8_2 *testCase = new StrcollUTF8_2(coll, getData8(status), getModData8(status), TRUE /* useLen */);
+    StrcollUTF8_2 *testCase = new StrcollUTF8_2(coll, getData8(status), getModData8(status), true /* useLen */);
     if (U_FAILURE(status)) {
         delete testCase;
         return NULL;
@@ -1509,7 +1509,7 @@ UPerfFunction* CollPerf2Test::TestStrcollUTF8Similar()
 UPerfFunction* CollPerf2Test::TestGetSortKey()
 {
     UErrorCode status = U_ZERO_ERROR;
-    GetSortKey *testCase = new GetSortKey(coll, getData16(status), TRUE /* useLen */);
+    GetSortKey *testCase = new GetSortKey(coll, getData16(status), true /* useLen */);
     if (U_FAILURE(status)) {
         delete testCase;
         return NULL;
@@ -1520,7 +1520,7 @@ UPerfFunction* CollPerf2Test::TestGetSortKey()
 UPerfFunction* CollPerf2Test::TestGetSortKeyNull()
 {
     UErrorCode status = U_ZERO_ERROR;
-    GetSortKey *testCase = new GetSortKey(coll, getData16(status), FALSE /* useLen */);
+    GetSortKey *testCase = new GetSortKey(coll, getData16(status), false /* useLen */);
     if (U_FAILURE(status)) {
         delete testCase;
         return NULL;
@@ -1641,7 +1641,7 @@ UPerfFunction* CollPerf2Test::TestNextSortKeyPartUTF8_32x2()
 UPerfFunction* CollPerf2Test::TestCppCompare()
 {
     UErrorCode status = U_ZERO_ERROR;
-    CppCompare *testCase = new CppCompare(collObj, getData16(status), TRUE /* useLen */);
+    CppCompare *testCase = new CppCompare(collObj, getData16(status), true /* useLen */);
     if (U_FAILURE(status)) {
         delete testCase;
         return NULL;
@@ -1652,7 +1652,7 @@ UPerfFunction* CollPerf2Test::TestCppCompare()
 UPerfFunction* CollPerf2Test::TestCppCompareNull()
 {
     UErrorCode status = U_ZERO_ERROR;
-    CppCompare *testCase = new CppCompare(collObj, getData16(status), FALSE /* useLen */);
+    CppCompare *testCase = new CppCompare(collObj, getData16(status), false /* useLen */);
     if (U_FAILURE(status)) {
         delete testCase;
         return NULL;
@@ -1663,7 +1663,7 @@ UPerfFunction* CollPerf2Test::TestCppCompareNull()
 UPerfFunction* CollPerf2Test::TestCppCompareSimilar()
 {
     UErrorCode status = U_ZERO_ERROR;
-    CppCompare_2 *testCase = new CppCompare_2(collObj, getData16(status), getModData16(status), TRUE /* useLen */);
+    CppCompare_2 *testCase = new CppCompare_2(collObj, getData16(status), getModData16(status), true /* useLen */);
     if (U_FAILURE(status)) {
         delete testCase;
         return NULL;
@@ -1674,7 +1674,7 @@ UPerfFunction* CollPerf2Test::TestCppCompareSimilar()
 UPerfFunction* CollPerf2Test::TestCppCompareUTF8()
 {
     UErrorCode status = U_ZERO_ERROR;
-    CppCompareUTF8 *testCase = new CppCompareUTF8(collObj, getData8(status), TRUE /* useLen */);
+    CppCompareUTF8 *testCase = new CppCompareUTF8(collObj, getData8(status), true /* useLen */);
     if (U_FAILURE(status)) {
         delete testCase;
         return NULL;
@@ -1685,7 +1685,7 @@ UPerfFunction* CollPerf2Test::TestCppCompareUTF8()
 UPerfFunction* CollPerf2Test::TestCppCompareUTF8Null()
 {
     UErrorCode status = U_ZERO_ERROR;
-    CppCompareUTF8 *testCase = new CppCompareUTF8(collObj, getData8(status), FALSE /* useLen */);
+    CppCompareUTF8 *testCase = new CppCompareUTF8(collObj, getData8(status), false /* useLen */);
     if (U_FAILURE(status)) {
         delete testCase;
         return NULL;
@@ -1696,7 +1696,7 @@ UPerfFunction* CollPerf2Test::TestCppCompareUTF8Null()
 UPerfFunction* CollPerf2Test::TestCppCompareUTF8Similar()
 {
     UErrorCode status = U_ZERO_ERROR;
-    CppCompareUTF8_2 *testCase = new CppCompareUTF8_2(collObj, getData8(status), getModData8(status), TRUE /* useLen */);
+    CppCompareUTF8_2 *testCase = new CppCompareUTF8_2(collObj, getData8(status), getModData8(status), true /* useLen */);
     if (U_FAILURE(status)) {
         delete testCase;
         return NULL;
@@ -1707,7 +1707,7 @@ UPerfFunction* CollPerf2Test::TestCppCompareUTF8Similar()
 UPerfFunction* CollPerf2Test::TestCppGetCollationKey()
 {
     UErrorCode status = U_ZERO_ERROR;
-    CppGetCollationKey *testCase = new CppGetCollationKey(collObj, getData16(status), TRUE /* useLen */);
+    CppGetCollationKey *testCase = new CppGetCollationKey(collObj, getData16(status), true /* useLen */);
     if (U_FAILURE(status)) {
         delete testCase;
         return NULL;
@@ -1718,7 +1718,7 @@ UPerfFunction* CollPerf2Test::TestCppGetCollationKey()
 UPerfFunction* CollPerf2Test::TestCppGetCollationKeyNull()
 {
     UErrorCode status = U_ZERO_ERROR;
-    CppGetCollationKey *testCase = new CppGetCollationKey(collObj, getData16(status), FALSE /* useLen */);
+    CppGetCollationKey *testCase = new CppGetCollationKey(collObj, getData16(status), false /* useLen */);
     if (U_FAILURE(status)) {
         delete testCase;
         return NULL;
@@ -1798,7 +1798,7 @@ int main(int argc, const char *argv[])
         return status;
     }
 
-    if (test.run() == FALSE){
+    if (test.run() == false){
         fprintf(stderr, "FAILED: Tests could not be run please check the arguments.\n");
         return -1;
     }
diff --git a/icu4c/source/test/perf/convperf/convperf.cpp b/icu4c/source/test/perf/convperf/convperf.cpp
index 072011112ab..d6790f304c1 100644
--- a/icu4c/source/test/perf/convperf/convperf.cpp
+++ b/icu4c/source/test/perf/convperf/convperf.cpp
@@ -26,7 +26,7 @@ int main(int argc, const char* argv[]){
     if(U_FAILURE(status)){
         return status;
     }
-    if(test.run()==FALSE){
+    if(test.run()==false){
         fprintf(stderr,"FAILED: Tests could not be run please check the arguments.\n");
         return -1;
     }
@@ -126,7 +126,7 @@ UPerfFunction* ConverterPerformanceTest::runIndexedTest(int32_t index, UBool exe
 
 UPerfFunction* ConverterPerformanceTest::TestICU_CleanOpenAllConverters() {
     UErrorCode status = U_ZERO_ERROR;
-    UPerfFunction* pf = new ICUOpenAllConvertersFunction(TRUE, status);
+    UPerfFunction* pf = new ICUOpenAllConvertersFunction(true, status);
     if(U_FAILURE(status)){
         return NULL;
     }
@@ -135,7 +135,7 @@ UPerfFunction* ConverterPerformanceTest::TestICU_CleanOpenAllConverters() {
 
 UPerfFunction* ConverterPerformanceTest::TestICU_OpenAllConverters() {
     UErrorCode status = U_ZERO_ERROR;
-    UPerfFunction* pf = new ICUOpenAllConvertersFunction(FALSE, status);
+    UPerfFunction* pf = new ICUOpenAllConvertersFunction(false, status);
     if(U_FAILURE(status)){
         return NULL;
     }
diff --git a/icu4c/source/test/perf/convperf/convperf.h b/icu4c/source/test/perf/convperf/convperf.h
index e185c908d3b..c5de6d80031 100644
--- a/icu4c/source/test/perf/convperf/convperf.h
+++ b/icu4c/source/test/perf/convperf/convperf.h
@@ -60,7 +60,7 @@ public:
         const char* mySrc = src;
         const char* sourceLimit = src + srcLen;
         UChar* myTarget = target;
-        ucnv_toUnicode(conv, &myTarget, targetLimit, &mySrc, sourceLimit, NULL, TRUE, status);
+        ucnv_toUnicode(conv, &myTarget, targetLimit, &mySrc, sourceLimit, NULL, true, status);
     }
     virtual long getOperationsPerIteration(void){
         return srcLen;
@@ -106,7 +106,7 @@ public:
         const UChar* mySrc = src;
         const UChar* sourceLimit = src + srcLen;
         char* myTarget = target;
-        ucnv_fromUnicode(conv,&myTarget, targetLimit, &mySrc, sourceLimit, NULL, TRUE, status);
+        ucnv_fromUnicode(conv,&myTarget, targetLimit, &mySrc, sourceLimit, NULL, true, status);
     }
     virtual long getOperationsPerIteration(void){
         return srcLen;
@@ -218,7 +218,7 @@ public:
         src = pszIn;
         srcLen = szLen;
         dstLen = UPRV_LENGTHOF(dest);
-        lpUsedDefaultChar=FALSE;
+        lpUsedDefaultChar=false;
         unsigned short bEnc[30]={'\0'};
         const char* tenc=name;
         for(int i=0;*tenc!='\0';i++){
diff --git a/icu4c/source/test/perf/dicttrieperf/dicttrieperf.cpp b/icu4c/source/test/perf/dicttrieperf/dicttrieperf.cpp
index 7d70233069e..a38885c6bc3 100644
--- a/icu4c/source/test/perf/dicttrieperf/dicttrieperf.cpp
+++ b/icu4c/source/test/perf/dicttrieperf/dicttrieperf.cpp
@@ -416,7 +416,7 @@ public:
             if(lines[i].name[0]<0x41) {
                 continue;
             }
-            builder->add(UnicodeString(FALSE, lines[i].name, lines[i].len), 0, errorCode);
+            builder->add(UnicodeString(false, lines[i].name, lines[i].len), 0, errorCode);
         }
         UnicodeString trieUChars;
         int32_t length=builder->buildUnicodeString(USTRINGTRIE_BUILD_SMALL, trieUChars, errorCode).length();
@@ -499,16 +499,16 @@ static UBool thaiWordToBytes(const UChar *s, int32_t length,
             str.append((char)b, errorCode);
         } else {
             fprintf(stderr, "thaiWordToBytes(): unable to encode U+%04X as a byte\n", c);
-            return FALSE;
+            return false;
         }
     }
-    return TRUE;
+    return true;
 }
 
 class BytesTrieDictLookup : public DictLookup {
 public:
     BytesTrieDictLookup(const DictionaryTriePerfTest &perfTest)
-            : DictLookup(perfTest), trie(NULL), noDict(FALSE) {
+            : DictLookup(perfTest), trie(NULL), noDict(false) {
         IcuToolErrorCode errorCode("BytesTrieDictLookup()");
         builder=new BytesTrieBuilder(errorCode);
         CharString str;
@@ -521,7 +521,7 @@ public:
             }
             if(!thaiWordToBytes(lines[i].name, lines[i].len, str.clear(), errorCode)) {
                 fprintf(stderr, "thaiWordToBytes(): failed for word %ld (0-based)\n", (long)i);
-                noDict=TRUE;
+                noDict=true;
                 break;
             }
             builder->add(str.toStringPiece(), 0, errorCode);
diff --git a/icu4c/source/test/perf/leperf/PortableFontInstance.cpp b/icu4c/source/test/perf/leperf/PortableFontInstance.cpp
index a7fe7e21b1d..a71a239e7f4 100644
--- a/icu4c/source/test/perf/leperf/PortableFontInstance.cpp
+++ b/icu4c/source/test/perf/leperf/PortableFontInstance.cpp
@@ -402,7 +402,7 @@ void PortableFontInstance::getGlyphAdvance(LEGlyphID glyph, LEPoint &advance) co
 
 le_bool PortableFontInstance::getGlyphPoint(LEGlyphID /*glyph*/, le_int32 /*pointNumber*/, LEPoint &/*point*/) const
 {
-    return FALSE;
+    return false;
 }
 
 le_int32 PortableFontInstance::getUnitsPerEM() const
diff --git a/icu4c/source/test/perf/leperf/SimpleFontInstance.cpp b/icu4c/source/test/perf/leperf/SimpleFontInstance.cpp
index 23ae00ee424..b6d29b16779 100644
--- a/icu4c/source/test/perf/leperf/SimpleFontInstance.cpp
+++ b/icu4c/source/test/perf/leperf/SimpleFontInstance.cpp
@@ -133,6 +133,6 @@ float SimpleFontInstance::getScaleFactorY() const
 
 le_bool SimpleFontInstance::getGlyphPoint(LEGlyphID /*glyph*/, le_int32 /*pointNumber*/, LEPoint &/*point*/) const
 {
-    return FALSE;
+    return false;
 }
 
diff --git a/icu4c/source/test/perf/leperf/cmaps.cpp b/icu4c/source/test/perf/leperf/cmaps.cpp
index 943befa82e1..e4cd5fd1b3c 100644
--- a/icu4c/source/test/perf/leperf/cmaps.cpp
+++ b/icu4c/source/test/perf/leperf/cmaps.cpp
@@ -62,7 +62,7 @@ CMAPMapper *CMAPMapper::createUnicodeMapper(const CMAPTable *cmap)
     le_uint16 i;
     le_uint16 nSubtables = SWAPW(cmap->numberSubtables);
     const CMAPEncodingSubtable *subtable = NULL;
-    le_bool found = FALSE;
+    le_bool found = false;
     le_uint16 foundPlatformID = 0xFFFF;
     le_uint16 foundPlatformSpecificID = 0xFFFF;
     le_uint32 foundOffset = 0;
@@ -80,7 +80,7 @@ CMAPMapper *CMAPMapper::createUnicodeMapper(const CMAPTable *cmap)
                 foundOffset = SWAPL(esh->encodingOffset);
                 foundPlatformID = platformID;
                 foundPlatformSpecificID = platformSpecificID;
-                found = TRUE;
+                found = true;
                 foundTable = i;
                 break;
 
@@ -110,7 +110,7 @@ CMAPMapper *CMAPMapper::createUnicodeMapper(const CMAPTable *cmap)
             foundPlatformID = platformID;
             foundPlatformSpecificID = platformSpecificID;
             foundTable = i;
-            found = TRUE;
+            found = true;
             break;
 
           default: printf("Error: table %d (psid %d) is unknown. Skipping.\n", i, platformSpecificID); break;
diff --git a/icu4c/source/test/perf/leperf/leperf.cpp b/icu4c/source/test/perf/leperf/leperf.cpp
index 9fa8a5e4e2f..3183abc8b1c 100644
--- a/icu4c/source/test/perf/leperf/leperf.cpp
+++ b/icu4c/source/test/perf/leperf/leperf.cpp
@@ -45,7 +45,7 @@ void iterate(void * p) {
     float     *positions = NULL;
     le_int32   glyphCount = 0;
     LEUnicode *chars = params->chars;
-    glyphCount = engine->layoutChars(chars, 0, params->charLen, params->charLen, TRUE, 0.0, 0.0, status);
+    glyphCount = engine->layoutChars(chars, 0, params->charLen, params->charLen, true, 0.0, 0.0, status);
     glyphs    = LE_NEW_ARRAY(LEGlyphID, glyphCount + 10);
     indices   = LE_NEW_ARRAY(le_int32, glyphCount + 10);
     positions = LE_NEW_ARRAY(float, glyphCount + 10);
diff --git a/icu4c/source/test/perf/leperf/xmlreader.cpp b/icu4c/source/test/perf/leperf/xmlreader.cpp
index e0f595de365..a0981a6864a 100644
--- a/icu4c/source/test/perf/leperf/xmlreader.cpp
+++ b/icu4c/source/test/perf/leperf/xmlreader.cpp
@@ -212,14 +212,14 @@ void readTestFile(const char *testFilePath, TestCaseCallback callback)
                     fontCksum = getCString(element->getAttribute(cksum_attr));
 
                 } else if (tag.compare(test_text) == 0) {
-                    text = element->getText(TRUE);
+                    text = element->getText(true);
                     charCount = text.length();
                 } else if (tag.compare(result_glyphs) == 0) {
-                    glyphs = element->getText(TRUE);
+                    glyphs = element->getText(true);
                 } else if (tag.compare(result_indices) == 0) {
-                    indices = element->getText(TRUE);
+                    indices = element->getText(true);
                 } else if (tag.compare(result_positions) == 0) {
-                    positions = element->getText(TRUE);
+                    positions = element->getText(true);
                 } else {
                     // an unknown tag...
                     char *cTag = getCString(&tag);
diff --git a/icu4c/source/test/perf/localecanperf/localecanperf.cpp b/icu4c/source/test/perf/localecanperf/localecanperf.cpp
index 9e561344ae9..336fb35bd6d 100644
--- a/icu4c/source/test/perf/localecanperf/localecanperf.cpp
+++ b/icu4c/source/test/perf/localecanperf/localecanperf.cpp
@@ -85,7 +85,7 @@ int main(int argc, const char *argv[])
         return status;
     }
 
-    if (test.run() == FALSE){
+    if (test.run() == false){
         test.usage();
         fprintf(stderr, "FAILED: Tests could not be run please check the arguments.\n");
         return -1;
diff --git a/icu4c/source/test/perf/normperf/dtfmtrtperf.cpp b/icu4c/source/test/perf/normperf/dtfmtrtperf.cpp
index a53fb7373e4..102183f1c6f 100644
--- a/icu4c/source/test/perf/normperf/dtfmtrtperf.cpp
+++ b/icu4c/source/test/perf/normperf/dtfmtrtperf.cpp
@@ -69,7 +69,7 @@ int main(int argc, const char* argv[]){
         return status;
     }
 
-    if(test.run()==FALSE){
+    if(test.run()==false){
 		cout << "run failed!" << endl;
         fprintf(stderr,"FAILED: Tests could not be run please check the arguments.\n");
         return -1;
diff --git a/icu4c/source/test/perf/normperf/normperf.cpp b/icu4c/source/test/perf/normperf/normperf.cpp
index 8ec29d5fde3..be2e7fb96ce 100644
--- a/icu4c/source/test/perf/normperf/normperf.cpp
+++ b/icu4c/source/test/perf/normperf/normperf.cpp
@@ -500,7 +500,7 @@ int main(int argc, const char* argv[]){
     if(U_FAILURE(status)){
         return status;
     }
-    if(test.run()==FALSE){
+    if(test.run()==false){
         fprintf(stderr,"FAILED: Tests could not be run please check the arguments.\n");
         return -1;
     }
diff --git a/icu4c/source/test/perf/strsrchperf/strsrchperf.cpp b/icu4c/source/test/perf/strsrchperf/strsrchperf.cpp
index cc674862348..e138864bf32 100644
--- a/icu4c/source/test/perf/strsrchperf/strsrchperf.cpp
+++ b/icu4c/source/test/perf/strsrchperf/strsrchperf.cpp
@@ -111,7 +111,7 @@ int main (int argc, const char* argv[]) {
     if(U_FAILURE(status)){
         return status;
     }
-    if(test.run()==FALSE){
+    if(test.run()==false){
         fprintf(stderr,"FAILED: Tests could not be run please check the arguments.\n");
         return -1;
     }
diff --git a/icu4c/source/test/perf/ubrkperf/ubrkperf.cpp b/icu4c/source/test/perf/ubrkperf/ubrkperf.cpp
index a8d2bd1197d..7d092bc6383 100644
--- a/icu4c/source/test/perf/ubrkperf/ubrkperf.cpp
+++ b/icu4c/source/test/perf/ubrkperf/ubrkperf.cpp
@@ -41,13 +41,13 @@ void createMACBrkIt() {
   LocaleRef lref;
   status = LocaleRefFromLocaleString(opt_locale, &lref);
   status = UCCreateTextBreakLocator(lref, 0, kUCTextBreakAllMask, (TextBreakLocatorRef*)&breakRef);
-  if(opt_char == TRUE) {
+  if(opt_char == true) {
     macBreakType = kUCTextBreakClusterMask;
-  } else if(opt_word == TRUE) {
+  } else if(opt_word == true) {
     macBreakType = kUCTextBreakWordMask;
-  } else if(opt_line == TRUE) {
+  } else if(opt_line == true) {
     macBreakType = kUCTextBreakLineMask;
-  } else if(opt_sentence == TRUE) {
+  } else if(opt_sentence == true) {
     // error
     // brkit = BreakIterator::createSentenceInstance(opt_locale, status);
   } else {
@@ -59,7 +59,7 @@ void createMACBrkIt() {
 
 
 void doForwardTest() {
-  if (opt_terse == FALSE) {
+  if (opt_terse == false) {
     printf("Doing the forward test\n");
   }
   int32_t noBreaks = 0;
@@ -70,14 +70,14 @@ void doForwardTest() {
     createICUBrkIt();
     brkit->setText(text);
     brkit->first();
-    if (opt_terse == FALSE) {
+    if (opt_terse == false) {
       printf("Warmup\n");
     }
     while(brkit->next() != BreakIterator::DONE) {
       noBreaks++;
     }
   
-    if (opt_terse == FALSE) {
+    if (opt_terse == false) {
       printf("Measure\n");
     } 
     startTime = timeGetTime();
@@ -131,7 +131,7 @@ void doForwardTest() {
   }
 
 
-  if (opt_terse == FALSE) {
+  if (opt_terse == false) {
   int32_t loopTime = (int)(float(1000) * ((float)elapsedTime/(float)opt_loopCount));
       int32_t timePerCU = (int)(float(1000) * ((float)loopTime/(float)textSize));
       int32_t timePerBreak = (int)(float(1000) * ((float)loopTime/(float)noBreaks));
@@ -249,7 +249,7 @@ int main(int argc, const char** argv) {
     if(U_FAILURE(status)){
         return status;
     }
-    if(test.run()==FALSE){
+    if(test.run()==false){
         fprintf(stderr,"FAILED: Tests could not be run please check the arguments.\n");
         return -1;
     }
diff --git a/icu4c/source/test/perf/ubrkperf/ubrkperfold.cpp b/icu4c/source/test/perf/ubrkperf/ubrkperfold.cpp
index 8571a3edf54..973f069acd6 100644
--- a/icu4c/source/test/perf/ubrkperf/ubrkperfold.cpp
+++ b/icu4c/source/test/perf/ubrkperf/ubrkperfold.cpp
@@ -100,25 +100,25 @@ char * opt_fName      = 0;
 char * opt_locale     = "en_US";
 int    opt_langid     = 0;         // Defaults to value corresponding to opt_locale.
 char * opt_rules      = 0;
-UBool  opt_help       = FALSE;
+UBool  opt_help       = false;
 int    opt_time       = 0;
 int    opt_loopCount  = 0;
 int    opt_passesCount= 1;
-UBool  opt_terse      = FALSE;
-UBool  opt_icu        = TRUE;
-UBool  opt_win        = FALSE;      // Run with Windows native functions.
-UBool  opt_unix       = FALSE;      // Run with UNIX strcoll, strxfrm functions.
-UBool  opt_mac        = FALSE;      // Run with MacOSX word break services.
-UBool  opt_uselen     = FALSE;
-UBool  opt_dump       = FALSE;
-UBool  opt_char       = FALSE;
-UBool  opt_word       = FALSE;
-UBool  opt_line       = FALSE;
-UBool  opt_sentence   = FALSE;
-UBool  opt_capi       = FALSE;
+UBool  opt_terse      = false;
+UBool  opt_icu        = true;
+UBool  opt_win        = false;      // Run with Windows native functions.
+UBool  opt_unix       = false;      // Run with UNIX strcoll, strxfrm functions.
+UBool  opt_mac        = false;      // Run with MacOSX word break services.
+UBool  opt_uselen     = false;
+UBool  opt_dump       = false;
+UBool  opt_char       = false;
+UBool  opt_word       = false;
+UBool  opt_line       = false;
+UBool  opt_sentence   = false;
+UBool  opt_capi       = false;
 
-UBool  opt_next       = FALSE;
-UBool  opt_isBound    = FALSE;
+UBool  opt_next       = false;
+UBool  opt_isBound    = false;
 
 
 
@@ -184,13 +184,13 @@ void createMACBrkIt() {
   LocaleRef lref;
   status = LocaleRefFromLocaleString(opt_locale, &lref);
   status = UCCreateTextBreakLocator(lref, 0, kUCTextBreakAllMask, (TextBreakLocatorRef*)&breakRef);
-  if(opt_char == TRUE) {
+  if(opt_char == true) {
     macBreakType = kUCTextBreakClusterMask;
-  } else if(opt_word == TRUE) {
+  } else if(opt_word == true) {
     macBreakType = kUCTextBreakWordMask;
-  } else if(opt_line == TRUE) {
+  } else if(opt_line == true) {
     macBreakType = kUCTextBreakLineMask;
-  } else if(opt_sentence == TRUE) {
+  } else if(opt_sentence == true) {
     // error
     // brkit = BreakIterator::createSentenceInstance(opt_locale, status);
   } else {
@@ -205,22 +205,22 @@ void createICUBrkIt() {
   //  Set up an ICU break iterator
   //
   UErrorCode          status = U_ZERO_ERROR;
-  if(opt_char == TRUE) {
+  if(opt_char == true) {
     brkit = BreakIterator::createCharacterInstance(opt_locale, status);
-  } else if(opt_word == TRUE) {
+  } else if(opt_word == true) {
     brkit = BreakIterator::createWordInstance(opt_locale, status);
-  } else if(opt_line == TRUE) {
+  } else if(opt_line == true) {
     brkit = BreakIterator::createLineInstance(opt_locale, status);
-  } else if(opt_sentence == TRUE) {
+  } else if(opt_sentence == true) {
     brkit = BreakIterator::createSentenceInstance(opt_locale, status);
   } else {
     // default is character iterator
     brkit = BreakIterator::createCharacterInstance(opt_locale, status);
   }
-  if (status==U_USING_DEFAULT_WARNING && opt_terse==FALSE) {
+  if (status==U_USING_DEFAULT_WARNING && opt_terse==false) {
     fprintf(stderr, "Warning, U_USING_DEFAULT_WARNING for %s\n", opt_locale);
   }
-  if (status==U_USING_FALLBACK_WARNING && opt_terse==FALSE) {
+  if (status==U_USING_FALLBACK_WARNING && opt_terse==false) {
     fprintf(stderr, "Warning, U_USING_FALLBACK_ERROR for %s\n", opt_locale);
   }
 
@@ -244,13 +244,13 @@ UBool ProcessOptions(int argc, const char **argv, OptSpec opts[])
             if (strcmp(pOpt->name, pArgName) == 0) {
                 switch (pOpt->type) {
                 case OptSpec::FLAG:
-                    *(UBool *)(pOpt->pVar) = TRUE;
+                    *(UBool *)(pOpt->pVar) = true;
                     break;
                 case OptSpec::STRING:
                     argNum ++;
                     if (argNum >= argc) {
                         fprintf(stderr, "value expected for \"%s\" option.\n", pOpt->name);
-                        return FALSE;
+                        return false;
                     }
                     *(const char **)(pOpt->pVar)  = argv[argNum];
                     break;
@@ -258,13 +258,13 @@ UBool ProcessOptions(int argc, const char **argv, OptSpec opts[])
                     argNum ++;
                     if (argNum >= argc) {
                         fprintf(stderr, "value expected for \"%s\" option.\n", pOpt->name);
-                        return FALSE;
+                        return false;
                     }
                     char *endp;
                     i = strtol(argv[argNum], &endp, 0);
                     if (endp == argv[argNum]) {
                         fprintf(stderr, "integer value expected for \"%s\" option.\n", pOpt->name);
-                        return FALSE;
+                        return false;
                     }
                     *(int *)(pOpt->pVar) = i;
                 }
@@ -274,15 +274,15 @@ UBool ProcessOptions(int argc, const char **argv, OptSpec opts[])
         if (pOpt->name == 0)
         {
             fprintf(stderr, "Unrecognized option \"%s\"\n", pArgName);
-            return FALSE;
+            return false;
         }
     }
-return TRUE;
+return true;
 }
 
 
 void doForwardTest() {
-  if (opt_terse == FALSE) {
+  if (opt_terse == false) {
     printf("Doing the forward test\n");
   }
   int32_t noBreaks = 0;
@@ -293,7 +293,7 @@ void doForwardTest() {
     createICUBrkIt();
     brkit->setText(UnicodeString(text, textSize));
     brkit->first();
-    if (opt_terse == FALSE) {
+    if (opt_terse == false) {
       printf("Warmup\n");
     }
     int j;
@@ -302,7 +302,7 @@ void doForwardTest() {
       //fprintf(stderr, "%d ", j);
     }
   
-    if (opt_terse == FALSE) {
+    if (opt_terse == false) {
       printf("Measure\n");
     } 
     startTime = timeGetTime();
@@ -356,7 +356,7 @@ void doForwardTest() {
   }
 
 
-  if (opt_terse == FALSE) {
+  if (opt_terse == false) {
   int32_t loopTime = (int)(float(1000) * ((float)elapsedTime/(float)opt_loopCount));
       int32_t timePerCU = (int)(float(1000) * ((float)loopTime/(float)textSize));
       int32_t timePerBreak = (int)(float(1000) * ((float)loopTime/(float)noBreaks));
@@ -401,7 +401,7 @@ void doIsBoundTest() {
 
   elapsedTime = timeGetTime()-startTime;
   int32_t loopTime = (int)(float(1000) * ((float)elapsedTime/(float)opt_loopCount));
-  if (opt_terse == FALSE) {
+  if (opt_terse == false) {
       int32_t timePerCU = (int)(float(1000) * ((float)loopTime/(float)textSize));
       int32_t timePerBreak = (int)(float(1000) * ((float)loopTime/(float)noBreaks));
       printf("forward break iteration average loop time %d\n", loopTime);
@@ -494,8 +494,8 @@ private:
 };
 
 UCharFile::UCharFile(const char * fileName) {
-    fEof                 = FALSE;
-    fError               = FALSE;
+    fEof                 = false;
+    fError               = false;
     fName                = fileName;
     struct stat buf;
     int32_t result = stat(fileName, &buf);
@@ -509,7 +509,7 @@ UCharFile::UCharFile(const char * fileName) {
     fPending2ndSurrogate = 0;
     if (fFile == NULL) {
         fprintf(stderr, "Can not open file \"%s\"\n", opt_fName);
-        fError = TRUE;
+        fError = true;
         return;
     }
     //
@@ -552,7 +552,7 @@ UChar UCharFile::get() {
             c  = cL  | (cH << 8);
             if (cH == EOF) {
                 c   = 0;
-                fEof = TRUE;
+                fEof = true;
             }
             break;
         }
@@ -564,7 +564,7 @@ UChar UCharFile::get() {
             c  = cL  | (cH << 8);
             if (cL == EOF) {
                 c   = 0;
-                fEof = TRUE;
+                fEof = true;
             }
             break;
         }
@@ -579,7 +579,7 @@ UChar UCharFile::get() {
             int ch = fgetc(fFile);   // Note:  c and ch are separate cause eof test doesn't work on UChar type.
             if (ch == EOF) {
                 c = 0;
-                fEof = TRUE;
+                fEof = true;
                 break;
             }
             
@@ -597,7 +597,7 @@ UChar UCharFile::get() {
             else if (ch >= 0xC0) {nBytes=2;}
             else {
                 fprintf(stderr, "not likely utf-8 encoded file %s contains corrupt data at offset %d.\n", fName, ftell(fFile));
-                fError = TRUE;
+                fError = true;
                 return 0;
             }
             
@@ -608,7 +608,7 @@ UChar UCharFile::get() {
                 bytes[i] = fgetc(fFile);
                 if (bytes[i] < 0x80 || bytes[i] >= 0xc0) {
                     fprintf(stderr, "utf-8 encoded file %s contains corrupt data at offset %d. Expected %d bytes, byte %d is invalid. First byte is %02X\n", fName, ftell(fFile), nBytes, i, ch);
-                    fError = TRUE;
+                    fError = true;
                     return 0;
                 }
             }
@@ -643,14 +643,14 @@ UChar UCharFile::get() {
 //
 //----------------------------------------------------------------------------------------
 int main(int argc, const char** argv) {
-    if (ProcessOptions(argc, argv, opts) != TRUE || opt_help || opt_fName == 0) {
+    if (ProcessOptions(argc, argv, opts) != true || opt_help || opt_fName == 0) {
         printf(gUsageString);
         exit (1);
     }
     // Make sure that we've only got one API selected.
-    if (opt_mac || opt_unix || opt_win) opt_icu = FALSE;
-    if (opt_mac || opt_unix) opt_win = FALSE;
-    if (opt_mac) opt_unix = FALSE;
+    if (opt_mac || opt_unix || opt_win) opt_icu = false;
+    if (opt_mac || opt_unix) opt_win = false;
+    if (opt_mac) opt_unix = false;
 
     UErrorCode          status = U_ZERO_ERROR;
 
@@ -730,7 +730,7 @@ int main(int argc, const char** argv) {
     }
 
 
-    if (opt_terse == FALSE) {
+    if (opt_terse == false) {
         printf("file \"%s\", %d charCount code units.\n", opt_fName, charCount);
     }
 
diff --git a/icu4c/source/test/perf/unisetperf/draft/trieset.cpp b/icu4c/source/test/perf/unisetperf/draft/trieset.cpp
index 0e007d7b03f..7d6269e208a 100644
--- a/icu4c/source/test/perf/unisetperf/draft/trieset.cpp
+++ b/icu4c/source/test/perf/unisetperf/draft/trieset.cpp
@@ -44,7 +44,7 @@ public:
             return;
         }
 
-        UNewTrie *newTrie=utrie_open(NULL, NULL, 0x11000, 0, 0, TRUE);
+        UNewTrie *newTrie=utrie_open(NULL, NULL, 0x11000, 0, 0, true);
         UChar32 start, end;
 
         UnicodeSetIterator iter(set);
@@ -58,7 +58,7 @@ public:
             if(end>0xffff) {
                 end=0xffff;
             }
-            if(!utrie_setRange32(newTrie, start, end+1, TRUE, TRUE)) {
+            if(!utrie_setRange32(newTrie, start, end+1, true, true)) {
                 errorCode=U_INTERNAL_PROGRAM_ERROR;
                 return;
             }
diff --git a/icu4c/source/test/perf/unisetperf/unisetperf.cpp b/icu4c/source/test/perf/unisetperf/unisetperf.cpp
index 6bc7957ddcb..e85d4492e25 100644
--- a/icu4c/source/test/perf/unisetperf/unisetperf.cpp
+++ b/icu4c/source/test/perf/unisetperf/unisetperf.cpp
@@ -99,7 +99,7 @@ public:
         const UChar *s=getBuffer();
         int32_t length=getBufferLen();
         int32_t i=0;
-        UBool tf=FALSE;
+        UBool tf=false;
         while(inext();
         
@@ -248,11 +248,11 @@ UBool ThaiWordbreakTest::compareWordBreaks(const UChar *spaces, int32_t spaceCou
                nextSpaceBreak != BreakIterator::DONE && nextBreak != BreakIterator::DONE) {
             if (nextSpaceBreak < nextBreak) {
                 breakNotFound(nextSpaceBreak);
-                result = FALSE;
+                result = false;
                 nextSpaceBreak = spaceIter.next();
             } else if (nextSpaceBreak > nextBreak) {
                 foundInvalidBreak(nextBreak);
-                result = FALSE;
+                result = false;
                 nextBreak = breakIter->next();
             }
         }
@@ -441,16 +441,16 @@ int main(int argc, char **argv)
 {
     char *fileName = "space.txt";
     int arg = 1;
-    UBool verbose = FALSE;
-    UBool generate = FALSE;
+    UBool verbose = false;
+    UBool generate = false;
 
     if (argc >= 2 && strcmp(argv[1], "-generate") == 0) {
-        generate = TRUE;
+        generate = true;
         arg += 1;
     }
 
     if (argc >= 2 && strcmp(argv[1], "-verbose") == 0) {
-        verbose = TRUE;
+        verbose = true;
         arg += 1;
     }
 
@@ -496,7 +496,7 @@ int main(int argc, char **argv)
  * word instance of a BreakIterator.
  */
 SpaceBreakIterator::SpaceBreakIterator(const UChar *text, int32_t count)
-  : fBreakIter(0), fText(text), fTextCount(count), fWordCount(0), fSpaceCount(0), fDone(FALSE)
+  : fBreakIter(0), fText(text), fTextCount(count), fWordCount(0), fSpaceCount(0), fDone(false)
 {
     UCharCharacterIterator *iter = new UCharCharacterIterator(text, count);
     UErrorCode status = U_ZERO_ERROR;
@@ -534,7 +534,7 @@ int32_t SpaceBreakIterator::next()
         nextBreak = fBreakIter->next();
         
         if (nextBreak == BreakIterator::DONE) {
-            fDone = TRUE;
+            fDone = true;
             return BreakIterator::DONE;
         }
     }
diff --git a/icu4c/source/tools/ctestfw/ctest.c b/icu4c/source/tools/ctestfw/ctest.c
index 4562959ec69..99f9789d3fb 100644
--- a/icu4c/source/tools/ctestfw/ctest.c
+++ b/icu4c/source/tools/ctestfw/ctest.c
@@ -8,12 +8,13 @@
 *
 ********************************************************************************
 */
+#include 
+#include 
+#include 
+#include 
 #include 
 #include 
 #include 
-#include 
-#include 
-#include 
 
 #include "unicode/utrace.h"
 #include "unicode/uclean.h"
@@ -113,11 +114,11 @@ static int ERROR_COUNT = 0; /* Count of errors from all tests. */
 static int ONE_ERROR = 0; /* were there any other errors? */
 static int DATA_ERROR_COUNT = 0; /* count of data related errors or warnings */
 static int INDENT_LEVEL = 0;
-static UBool NO_KNOWN = FALSE;
+static UBool NO_KNOWN = false;
 static void *knownList = NULL;
 static char gTestName[1024] = "";
-static UBool ON_LINE = FALSE; /* are we on the top line with our test name? */
-static UBool HANGING_OUTPUT = FALSE; /* did the user leave us without a trailing \n ? */
+static UBool ON_LINE = false; /* are we on the top line with our test name? */
+static UBool HANGING_OUTPUT = false; /* did the user leave us without a trailing \n ? */
 static int GLOBAL_PRINT_COUNT = 0; /* global count of printouts */
 int REPEAT_TESTS_INIT = 0; /* Was REPEAT_TESTS initialized? */
 int REPEAT_TESTS = 1; /* Number of times to run the test */
@@ -364,7 +365,7 @@ static void iterateTestsWithLevel ( const TestNode* root,
     } else {
     	log_testinfo_i("(%s) ", ARGV_0);
     }
-    ON_LINE = TRUE;  /* we are still on the line with the test name */
+    ON_LINE = true;  /* we are still on the line with the test name */
 
 
     if ( (mode == RUNTESTS) &&
@@ -383,7 +384,7 @@ static void iterateTestsWithLevel ( const TestNode* root,
         currentTest = root;
         INDENT_LEVEL = depth;  /* depth of subitems */
         ONE_ERROR=0;
-        HANGING_OUTPUT=FALSE;
+        HANGING_OUTPUT=false;
 #if SHOW_TIMES
         startTime = uprv_getRawUTCtime();
 #endif
@@ -394,7 +395,7 @@ static void iterateTestsWithLevel ( const TestNode* root,
 #endif
         if(HANGING_OUTPUT) {
           log_testinfo("\n");
-          HANGING_OUTPUT=FALSE;
+          HANGING_OUTPUT=false;
         }
         INDENT_LEVEL = depth-1;  /* depth of root */
         currentTest = NULL;
@@ -431,7 +432,7 @@ static void iterateTestsWithLevel ( const TestNode* root,
         if(timeDelta[0]) printf("%s", timeDelta);
 #endif
          
-        ON_LINE = TRUE; /* we are back on-line */
+        ON_LINE = true; /* we are back on-line */
     }
 
     INDENT_LEVEL = depth-1; /* root */
@@ -467,7 +468,7 @@ static void iterateTestsWithLevel ( const TestNode* root,
                   }
                 }
 
-    		ON_LINE=TRUE;
+    		ON_LINE=true;
     	}
 	}
     depth--;
@@ -519,7 +520,7 @@ runTests ( const TestNode *root )
 
     /*print out result summary*/
 
-    ON_LINE=FALSE; /* just in case */
+    ON_LINE=false; /* just in case */
 
     if(knownList != NULL) {
       if( udbg_knownIssue_print(knownList) ) {
@@ -640,7 +641,7 @@ static void go_offline_with_marker(const char *mrk) {
   
   if(ON_LINE) {
     log_testinfo(" {\n");
-    ON_LINE=FALSE;
+    ON_LINE=false;
   }
   
   if(!HANGING_OUTPUT || wasON_LINE) {
@@ -677,7 +678,7 @@ static void first_line_test() {
 
 static void vlog_err(const char *prefix, const char *pattern, va_list ap)
 {
-    if( ERR_MSG == FALSE){
+    if( ERR_MSG == false){
         return;
     }
     fputs("!", stdout); /* col 1 - bang */
@@ -702,7 +703,7 @@ static UBool vlog_knownIssue(const char *ticket, const char *pattern, va_list ap
     UBool firstForTicket;
     UBool firstForWhere;
 
-    if(NO_KNOWN) return FALSE;
+    if(NO_KNOWN) return false;
     if(pattern==NULL) pattern="";
 
     vsprintf(buf, pattern, ap);
@@ -715,7 +716,7 @@ static UBool vlog_knownIssue(const char *ticket, const char *pattern, va_list ap
       log_verbose("(Known issue %s) %s\n", ticket, buf);
     }
 
-    return TRUE;
+    return true;
 }
 
 
@@ -768,7 +769,7 @@ static void log_testinfo(const char *pattern, ...)
 
 static void vlog_verbose(const char *prefix, const char *pattern, va_list ap)
 {
-    if ( VERBOSITY == FALSE )
+    if ( VERBOSITY == false )
         return;
 
     first_line_verbose();
@@ -960,8 +961,8 @@ initArgs( int argc, const char* const argv[], ArgHandlerPtr argHandler, void *co
     int                i;
     int                argSkip = 0;
 
-    VERBOSITY = FALSE;
-    ERR_MSG = TRUE;
+    VERBOSITY = false;
+    ERR_MSG = true;
 
     ARGV_0=argv[0];
 
@@ -979,11 +980,11 @@ initArgs( int argc, const char* const argv[], ArgHandlerPtr argHandler, void *co
         }
         else if (strcmp( argv[i], "-v" )==0 || strcmp( argv[i], "-verbose")==0)
         {
-            VERBOSITY = TRUE;
+            VERBOSITY = true;
         }
         else if (strcmp( argv[i], "-l" )==0 )
         {
-            /* doList = TRUE; */
+            /* doList = true; */
         }
         else if (strcmp( argv[i], "-e1") == 0)
         {
@@ -1003,7 +1004,7 @@ initArgs( int argc, const char* const argv[], ArgHandlerPtr argHandler, void *co
         }
         else if (strcmp( argv[i], "-w") ==0)
         {
-            WARN_ON_MISSING_DATA = TRUE;
+            WARN_ON_MISSING_DATA = true;
         }
         else if (strcmp( argv[i], "-m") ==0)
         {
@@ -1037,7 +1038,7 @@ initArgs( int argc, const char* const argv[], ArgHandlerPtr argHandler, void *co
         }
         else if(strcmp( argv[i], "-n") == 0 || strcmp( argv[i], "-no_err_msg") == 0)
         {
-            ERR_MSG = FALSE;
+            ERR_MSG = false;
         }
         else if (strcmp( argv[i], "-r") == 0)
         {
@@ -1107,8 +1108,8 @@ runTestRequest(const TestNode* root,
      */
     const TestNode*    toRun;
     int                i;
-    int                doList = FALSE;
-    int                subtreeOptionSeen = FALSE;
+    int                doList = false;
+    int                subtreeOptionSeen = false;
 
     int                errorCount = 0;
 
@@ -1135,40 +1136,40 @@ runTestRequest(const TestNode* root,
                 return -1;
             }
 
-            ON_LINE=FALSE; /* just in case */
+            ON_LINE=false; /* just in case */
 
-            if( doList == TRUE)
+            if( doList == true)
                 showTests(toRun);
             else
                 runTests(toRun);
 
-            ON_LINE=FALSE; /* just in case */
+            ON_LINE=false; /* just in case */
 
             errorCount += ERROR_COUNT;
 
-            subtreeOptionSeen = TRUE;
+            subtreeOptionSeen = true;
         } else if ((strcmp( argv[i], "-a") == 0) || (strcmp(argv[i],"-all") == 0)) {
-            subtreeOptionSeen=FALSE;
+            subtreeOptionSeen=false;
         } else if (strcmp( argv[i], "-l") == 0) {
-            doList = TRUE;
+            doList = true;
         }
         /* else option already handled by initArgs */
     }
 
-    if( subtreeOptionSeen == FALSE) /* no other subtree given, run the default */
+    if( subtreeOptionSeen == false) /* no other subtree given, run the default */
     {
-        ON_LINE=FALSE; /* just in case */
-        if( doList == TRUE)
+        ON_LINE=false; /* just in case */
+        if( doList == true)
             showTests(toRun);
         else
             runTests(toRun);
-        ON_LINE=FALSE; /* just in case */
+        ON_LINE=false; /* just in case */
 
         errorCount += ERROR_COUNT;
     }
     else
     {
-        if( ( doList == FALSE ) && ( errorCount > 0 ) )
+        if( ( doList == false ) && ( errorCount > 0 ) )
             printf(" Total errors: %d\n", errorCount );
     }
 
diff --git a/icu4c/source/tools/ctestfw/datamap.cpp b/icu4c/source/tools/ctestfw/datamap.cpp
index 96241a0657b..d0ab0742a10 100644
--- a/icu4c/source/tools/ctestfw/datamap.cpp
+++ b/icu4c/source/tools/ctestfw/datamap.cpp
@@ -44,7 +44,7 @@ RBDataMap::~RBDataMap()
 RBDataMap::RBDataMap()
 {
   UErrorCode status = U_ZERO_ERROR;
-  fData = new Hashtable(TRUE, status);
+  fData = new Hashtable(true, status);
   fData->setValueDeleter(deleteResBund);
 }
 
@@ -53,7 +53,7 @@ RBDataMap::RBDataMap()
 // keys.
 RBDataMap::RBDataMap(UResourceBundle *data, UErrorCode &status)
 {
-  fData = new Hashtable(TRUE, status);
+  fData = new Hashtable(true, status);
   fData->setValueDeleter(deleteResBund);
   init(data, status);
 }
@@ -63,7 +63,7 @@ RBDataMap::RBDataMap(UResourceBundle *data, UErrorCode &status)
 // header size
 RBDataMap::RBDataMap(UResourceBundle *headers, UResourceBundle *data, UErrorCode &status) 
 {
-  fData = new Hashtable(TRUE, status);
+  fData = new Hashtable(true, status);
   fData->setValueDeleter(deleteResBund);
   init(headers, data, status);
 }
diff --git a/icu4c/source/tools/ctestfw/testdata.cpp b/icu4c/source/tools/ctestfw/testdata.cpp
index 3ccf009cee6..fe894352616 100644
--- a/icu4c/source/tools/ctestfw/testdata.cpp
+++ b/icu4c/source/tools/ctestfw/testdata.cpp
@@ -94,10 +94,10 @@ UBool RBTestData::getInfo(const DataMap *& info, UErrorCode &/*status*/) const
 {
   if(fInfo) {
     info = fInfo;
-    return TRUE;
+    return true;
   } else {
     info = NULL;
-    return FALSE;
+    return false;
   }
 }
 
@@ -115,10 +115,10 @@ UBool RBTestData::nextSettings(const DataMap *& settings, UErrorCode &status)
     }
     ures_close(data);
     settings = fCurrSettings;
-    return TRUE;
+    return true;
   } else {
     settings = NULL;
-    return FALSE;
+    return false;
   }
 }
 
@@ -134,10 +134,10 @@ UBool RBTestData::nextCase(const DataMap *& nextCase, UErrorCode &status)
     }
     ures_close(currCase);
     nextCase = fCurrCase;
-    return TRUE;
+    return true;
   } else {
     nextCase = NULL;
-    return FALSE;
+    return false;
   }
 }
 
diff --git a/icu4c/source/tools/ctestfw/tstdtmod.cpp b/icu4c/source/tools/ctestfw/tstdtmod.cpp
index 94df68fe29f..8808b10ba13 100644
--- a/icu4c/source/tools/ctestfw/tstdtmod.cpp
+++ b/icu4c/source/tools/ctestfw/tstdtmod.cpp
@@ -21,18 +21,18 @@ TestLog::~TestLog() {}
 IcuTestErrorCode::~IcuTestErrorCode() {
     // Safe because our errlog() does not throw exceptions.
     if(isFailure()) {
-        errlog(FALSE, u"destructor: expected success", nullptr);
+        errlog(false, u"destructor: expected success", nullptr);
     }
 }
 
 UBool IcuTestErrorCode::errIfFailureAndReset() {
     if(isFailure()) {
-        errlog(FALSE, u"expected success", nullptr);
+        errlog(false, u"expected success", nullptr);
         reset();
-        return TRUE;
+        return true;
     } else {
         reset();
-        return FALSE;
+        return false;
     }
 }
 
@@ -43,23 +43,23 @@ UBool IcuTestErrorCode::errIfFailureAndReset(const char *fmt, ...) {
         va_start(ap, fmt);
         vsprintf(buffer, fmt, ap);
         va_end(ap);
-        errlog(FALSE, u"expected success", buffer);
+        errlog(false, u"expected success", buffer);
         reset();
-        return TRUE;
+        return true;
     } else {
         reset();
-        return FALSE;
+        return false;
     }
 }
 
 UBool IcuTestErrorCode::errDataIfFailureAndReset() {
     if(isFailure()) {
-        errlog(TRUE, u"data: expected success", nullptr);
+        errlog(true, u"data: expected success", nullptr);
         reset();
-        return TRUE;
+        return true;
     } else {
         reset();
-        return FALSE;
+        return false;
     }
 }
 
@@ -70,18 +70,18 @@ UBool IcuTestErrorCode::errDataIfFailureAndReset(const char *fmt, ...) {
         va_start(ap, fmt);
         vsprintf(buffer, fmt, ap);
         va_end(ap);
-        errlog(TRUE, u"data: expected success", buffer);
+        errlog(true, u"data: expected success", buffer);
         reset();
-        return TRUE;
+        return true;
     } else {
         reset();
-        return FALSE;
+        return false;
     }
 }
 
 UBool IcuTestErrorCode::expectErrorAndReset(UErrorCode expectedError) {
     if(get() != expectedError) {
-        errlog(FALSE, UnicodeString(u"expected: ") + u_errorName(expectedError), nullptr);
+        errlog(false, UnicodeString(u"expected: ") + u_errorName(expectedError), nullptr);
     }
     UBool retval = isFailure();
     reset();
@@ -95,7 +95,7 @@ UBool IcuTestErrorCode::expectErrorAndReset(UErrorCode expectedError, const char
         va_start(ap, fmt);
         vsprintf(buffer, fmt, ap);
         va_end(ap);
-        errlog(FALSE, UnicodeString(u"expected: ") + u_errorName(expectedError), buffer);
+        errlog(false, UnicodeString(u"expected: ") + u_errorName(expectedError), buffer);
     }
     UBool retval = isFailure();
     reset();
@@ -111,7 +111,7 @@ void IcuTestErrorCode::setScope(const UnicodeString& message) {
 }
 
 void IcuTestErrorCode::handleFailure() const {
-    errlog(FALSE, u"(handleFailure)", nullptr);
+    errlog(false, u"(handleFailure)", nullptr);
 }
 
 void IcuTestErrorCode::errlog(UBool dataErr, const UnicodeString& mainMessage, const char* extraMessage) const {
@@ -189,7 +189,7 @@ RBTestDataModule::RBTestDataModule(const char* name, TestLog& log, UErrorCode& s
   tdpath(NULL)
 {
   fNumberOfTests = 0;
-  fDataTestValid = TRUE;
+  fDataTestValid = true;
   fModuleBundle = getTestBundle(name, status);
   if(fDataTestValid) {
     fTestData = ures_getByKey(fModuleBundle, "TestData", NULL, &status);
@@ -197,7 +197,7 @@ RBTestDataModule::RBTestDataModule(const char* name, TestLog& log, UErrorCode& s
     fInfoRB = ures_getByKey(fModuleBundle, "Info", NULL, &status);
     if(status != U_ZERO_ERROR) {
       log.errln(UNICODE_STRING_SIMPLE("Unable to initialize test data - missing mandatory description resources!"));
-      fDataTestValid = FALSE;
+      fDataTestValid = false;
     } else {
       fInfo = new RBDataMap(fInfoRB, status);
     }
@@ -208,9 +208,9 @@ UBool RBTestDataModule::getInfo(const DataMap *& info, UErrorCode &/*status*/) c
 {
     info = fInfo;
     if(fInfo) {
-        return TRUE;
+        return true;
     } else {
-        return FALSE;
+        return false;
     }
 }
 
@@ -219,7 +219,7 @@ TestData* RBTestDataModule::createTestData(int32_t index, UErrorCode &status) co
   TestData *result = NULL;
   UErrorCode intStatus = U_ZERO_ERROR;
 
-  if(fDataTestValid == TRUE) {
+  if(fDataTestValid == true) {
     // Both of these resources get adopted by a TestData object.
     UResourceBundle *DataFillIn = ures_getByIndex(fTestData, index, NULL, &status); 
     UResourceBundle *headers = ures_getByKey(fInfoRB, "Headers", NULL, &intStatus);
@@ -247,7 +247,7 @@ TestData* RBTestDataModule::createTestData(const char* name, UErrorCode &status)
   TestData *result = NULL;
   UErrorCode intStatus = U_ZERO_ERROR;
 
-  if(fDataTestValid == TRUE) {
+  if(fDataTestValid == true) {
     // Both of these resources get adopted by a TestData object.
     UResourceBundle *DataFillIn = ures_getByKey(fTestData, name, NULL, &status); 
     UResourceBundle *headers = ures_getByKey(fInfoRB, "Headers", NULL, &intStatus);
@@ -282,7 +282,7 @@ RBTestDataModule::getTestBundle(const char* bundleName, UErrorCode &status)
         testBundle = ures_openDirect(icu_data, bundleName, &status);
         if (status != U_ZERO_ERROR) {
             fLog.dataerrln(UNICODE_STRING_SIMPLE("Could not load test data from resourcebundle: ") + UnicodeString(bundleName, -1, US_INV));
-            fDataTestValid = FALSE;
+            fDataTestValid = false;
         }
     }
     return testBundle;
diff --git a/icu4c/source/tools/ctestfw/unicode/ctest.h b/icu4c/source/tools/ctestfw/unicode/ctest.h
index 3debcf68054..da75be55b28 100644
--- a/icu4c/source/tools/ctestfw/unicode/ctest.h
+++ b/icu4c/source/tools/ctestfw/unicode/ctest.h
@@ -237,7 +237,7 @@ log_data_err(const char *pattern, ...);
  * Log a known issue.
  * @param ticket ticket number such as "ICU-12345" for ICU tickets or "CLDR-6636" for CLDR tickets.
  * @param fmt ...  sprintf-style format, optional message. can be NULL.
- * @return TRUE if known issue test should be skipped, FALSE if it should be run
+ * @return true if known issue test should be skipped, false if it should be run
  */
 T_CTEST_API UBool
 T_CTEST_EXPORT2
diff --git a/icu4c/source/tools/ctestfw/unicode/testdata.h b/icu4c/source/tools/ctestfw/unicode/testdata.h
index 614e36a14d6..ab0bc955866 100644
--- a/icu4c/source/tools/ctestfw/unicode/testdata.h
+++ b/icu4c/source/tools/ctestfw/unicode/testdata.h
@@ -68,7 +68,7 @@ public:
    *  @param settings a DataMap pointer provided by the user. Will be NULL if 
    *                  no more settings are available.
    *  @param status for reporting unexpected errors.
-   *  @return A boolean, TRUE if there are settings, FALSE if there is no more 
+   *  @return A boolean, true if there are settings, false if there is no more 
    *          settings. 
    */
   virtual UBool nextSettings(const DataMap *& settings, UErrorCode &status) = 0;
@@ -78,7 +78,7 @@ public:
    *  @param data a DataMap pointer provided by the user. Will be NULL if 
    *                  no more cases are available.
    *  @param status for reporting unexpected errors.
-   *  @return A boolean, TRUE if there are cases, FALSE if there is no more 
+   *  @return A boolean, true if there are cases, false if there is no more 
    *          cases. 
    */
   virtual UBool nextCase(const DataMap *& data, UErrorCode &status) = 0;
diff --git a/icu4c/source/tools/ctestfw/unicode/testlog.h b/icu4c/source/tools/ctestfw/unicode/testlog.h
index 1392335270b..a7ffbc60848 100644
--- a/icu4c/source/tools/ctestfw/unicode/testlog.h
+++ b/icu4c/source/tools/ctestfw/unicode/testlog.h
@@ -36,7 +36,7 @@ public:
             : testClass(callingTestClass), testName(callingTestName), scopeMessage() {}
     virtual ~IcuTestErrorCode();
 
-    // Returns TRUE if isFailure().
+    // Returns true if isFailure().
     UBool errIfFailureAndReset();
     UBool errIfFailureAndReset(const char *fmt, ...);
     UBool errDataIfFailureAndReset();
diff --git a/icu4c/source/tools/ctestfw/unicode/testtype.h b/icu4c/source/tools/ctestfw/unicode/testtype.h
index 0a0228e96ff..a5c70d577a2 100644
--- a/icu4c/source/tools/ctestfw/unicode/testtype.h
+++ b/icu4c/source/tools/ctestfw/unicode/testtype.h
@@ -38,10 +38,3 @@
     #define T_CTEST_API C_CTEST_API  T_CTEST_IMPORT
     #define T_CTEST_EXPORT_API T_CTEST_IMPORT
 #endif
-
-#ifndef TRUE
-#   define TRUE  1
-#endif
-#ifndef FALSE
-#   define FALSE 0
-#endif
diff --git a/icu4c/source/tools/ctestfw/uperf.cpp b/icu4c/source/tools/ctestfw/uperf.cpp
index 67b9fe50aae..45811ddd030 100644
--- a/icu4c/source/tools/ctestfw/uperf.cpp
+++ b/icu4c/source/tools/ctestfw/uperf.cpp
@@ -83,11 +83,11 @@ static UOption options[OPTIONS_COUNT+20]={
 UPerfTest::UPerfTest(int32_t argc, const char* argv[], UErrorCode& status)
         : _argc(argc), _argv(argv), _addUsage(NULL),
           ucharBuf(NULL), encoding(""),
-          uselen(FALSE),
+          uselen(false),
           fileName(NULL), sourceDir("."),
-          lines(NULL), numLines(0), line_mode(TRUE),
+          lines(NULL), numLines(0), line_mode(true),
           buffer(NULL), bufferLen(0),
-          verbose(FALSE), bulk_mode(FALSE),
+          verbose(false), bulk_mode(false),
           passes(1), iterations(0), time(0),
           locale(NULL) {
     init(NULL, 0, status);
@@ -99,11 +99,11 @@ UPerfTest::UPerfTest(int32_t argc, const char* argv[],
                      UErrorCode& status)
         : _argc(argc), _argv(argv), _addUsage(addUsage),
           ucharBuf(NULL), encoding(""),
-          uselen(FALSE),
+          uselen(false),
           fileName(NULL), sourceDir("."),
-          lines(NULL), numLines(0), line_mode(TRUE),
+          lines(NULL), numLines(0), line_mode(true),
           buffer(NULL), bufferLen(0),
-          verbose(FALSE), bulk_mode(FALSE),
+          verbose(false), bulk_mode(false),
           passes(1), iterations(0), time(0),
           locale(NULL) {
     init(addOptions, addOptionsCount, status);
@@ -138,7 +138,7 @@ void UPerfTest::init(UOption addOptions[], int32_t addOptionsCount,
     }
 
     if(options[VERBOSE].doesOccur) {
-        verbose = TRUE;
+        verbose = true;
     }
 
     if(options[SOURCEDIR].doesOccur) {
@@ -150,7 +150,7 @@ void UPerfTest::init(UOption addOptions[], int32_t addOptionsCount,
     }
 
     if(options[USELEN].doesOccur) {
-        uselen = TRUE;
+        uselen = true;
     }
 
     if(options[FILE_NAME].doesOccur){
@@ -173,13 +173,13 @@ void UPerfTest::init(UOption addOptions[], int32_t addOptionsCount,
     }
 
     if(options[LINE_MODE].doesOccur) {
-        line_mode = TRUE;
-        bulk_mode = FALSE;
+        line_mode = true;
+        bulk_mode = false;
     }
 
     if(options[BULK_MODE].doesOccur) {
-        bulk_mode = TRUE;
-        line_mode = FALSE;
+        bulk_mode = true;
+        line_mode = false;
     }
     
     if(options[LOCALE].doesOccur) {
@@ -199,7 +199,7 @@ void UPerfTest::init(UOption addOptions[], int32_t addOptionsCount,
             status = U_ZERO_ERROR;
         }
         ucbuf_resolveFileName(sourceDir, fileName, resolvedFileName, &len, &status);
-        ucharBuf = ucbuf_open(resolvedFileName,&encoding,TRUE,FALSE,&status);
+        ucharBuf = ucbuf_open(resolvedFileName,&encoding,true,false,&status);
 
         if(U_FAILURE(status)){
             printf("Could not open the input file %s. Error: %s\n", fileName, u_errorName(status));
@@ -264,12 +264,12 @@ UBool UPerfTest::run(){
         // Testing all methods
         return runTest();
     }
-    UBool res=FALSE;
+    UBool res=false;
     // Test only the specified function
     for (int i = 1; i < _remainingArgc; ++i) {
         if (_argv[i][0] != '-') {
             char* name = (char*) _argv[i];
-            if(verbose==TRUE){
+            if(verbose==true){
                 //fprintf(stdout, "\n=== Handling test: %s: ===\n", name);
                 //fprintf(stdout, "\n%s:\n", name);
             }
@@ -282,7 +282,7 @@ UBool UPerfTest::run(){
             res = runTest( name, parameter );
             if (!res || (execCount <= 0)) {
                 fprintf(stdout, "\n---ERROR: Test doesn't exist: %s!\n", name);
-                return FALSE;
+                return false;
             }
         }
     }
@@ -306,7 +306,7 @@ UBool UPerfTest::runTest(char* name, char* par ){
 
     }else if (strcmp( name, "LIST" ) == 0) {
         this->usage();
-        rval = TRUE;
+        rval = true;
 
     }else{
         rval = runTestLoop( name, par );
@@ -344,7 +344,7 @@ UBool UPerfTest::runTestLoop( char* testname, char* par )
     int32_t    index = 0;
     const char*   name;
     UBool  run_this_test;
-    UBool  rval = FALSE;
+    UBool  rval = false;
     UErrorCode status = U_ZERO_ERROR;
     UPerfTest* saveTest = gTest;
     gTest = this;
@@ -353,31 +353,31 @@ UBool UPerfTest::runTestLoop( char* testname, char* par )
     int32_t n = 1;
     long ops;
     do {
-        this->runIndexedTest( index, FALSE, name );
+        this->runIndexedTest( index, false, name );
         if (!name || (name[0] == 0))
             break;
         if (!testname) {
-            run_this_test = TRUE;
+            run_this_test = true;
         }else{
             run_this_test = (UBool) (strcmp( name, testname ) == 0);
         }
         if (run_this_test) {
-            UPerfFunction* testFunction = this->runIndexedTest( index, TRUE, name, par );
+            UPerfFunction* testFunction = this->runIndexedTest( index, true, name, par );
             execCount++;
-            rval=TRUE;
+            rval=true;
             if(testFunction==NULL){
                 fprintf(stderr,"%s function returned NULL", name);
-                return FALSE;
+                return false;
             }
             ops = testFunction->getOperationsPerIteration();
             if (ops < 1) {
                 fprintf(stderr, "%s returned an illegal operations/iteration()\n", name);
-                return FALSE;
+                return false;
             }
             if(iterations == 0) {
                 n = time;
                 // Run for specified duration in seconds
-                if(verbose==TRUE){
+                if(verbose==true){
                     fprintf(stdout,"= %s calibrating %i seconds \n", name, (int)n);
                 }
 
@@ -394,7 +394,7 @@ UBool UPerfTest::runTestLoop( char* testname, char* par )
                         loops = (int)((double)n / t * loops + 0.5);
                         if (loops == 0) {
                             fprintf(stderr,"Unable to converge on desired duration");
-                            return FALSE;
+                            return false;
                         }
                     }
                     //System.out.println("# " + meth.getName() + " x " + loops);
@@ -412,7 +412,7 @@ UBool UPerfTest::runTestLoop( char* testname, char* par )
             long events = -1;
 
             for(int32_t ps =0; ps < passes; ps++){
-                if(verbose==TRUE){
+                if(verbose==true){
                     fprintf(stdout,"= %s begin " ,name);
                     if(iterations > 0) {
                         fprintf(stdout, "%i\n", (int)loops);
@@ -431,7 +431,7 @@ UBool UPerfTest::runTestLoop( char* testname, char* par )
                 }
                 events = testFunction->getEventsPerIteration();
                 //print info only in verbose mode
-                if(verbose==TRUE){
+                if(verbose==true){
                     if(events == -1){
                         fprintf(stdout, "= %s end: %f loops: %i operations: %li \n", name, t, (int)loops, ops);
                     }else{
@@ -483,14 +483,14 @@ void UPerfTest::usage( void )
     }
 
     UBool save_verbose = verbose;
-    verbose = TRUE;
+    verbose = true;
     fprintf(stdout,"Test names:\n");
     fprintf(stdout,"-----------\n");
 
     int32_t index = 0;
     const char* name = NULL;
     do{
-        this->runIndexedTest( index, FALSE, name );
+        this->runIndexedTest( index, false, name );
         if (!name)
             break;
         fprintf(stdout, "%s\n", name);
diff --git a/icu4c/source/tools/genccode/genccode.c b/icu4c/source/tools/genccode/genccode.c
index c5bbdf60d7d..219335f183c 100644
--- a/icu4c/source/tools/genccode/genccode.c
+++ b/icu4c/source/tools/genccode/genccode.c
@@ -48,6 +48,7 @@
 #   define ICU_ENTRY_OFFSET 0
 #endif
 
+#include 
 #include 
 #include 
 #include "unicode/putil.h"
@@ -96,7 +97,7 @@ static UOption options[]={
 #define CALL_WRITEOBJECT    'o'
 extern int
 main(int argc, char* argv[]) {
-    UBool verbose = TRUE;
+    UBool verbose = true;
     char writeCode;
 
     U_MAIN_INIT_ARGS(argc, argv);
@@ -166,7 +167,7 @@ main(int argc, char* argv[]) {
             /* TODO: remove writeCode=&writeCCode; */
         }
         if (options[kOptQuiet].doesOccur) {
-            verbose = FALSE;
+            verbose = false;
         }
         while(--argc) {
             filename=getLongPathname(argv[argc]);
diff --git a/icu4c/source/tools/gencnval/gencnval.c b/icu4c/source/tools/gencnval/gencnval.c
index 0a0890e9e5c..54b41fb57da 100644
--- a/icu4c/source/tools/gencnval/gencnval.c
+++ b/icu4c/source/tools/gencnval/gencnval.c
@@ -37,9 +37,10 @@
 #include "unewdata.h"
 #include "uoptions.h"
 
+#include 
+#include 
 #include 
 #include 
-#include 
 
 /* TODO: Need to check alias name length is less than UCNV_MAX_CONVERTER_NAME_LENGTH */
 
@@ -136,9 +137,9 @@ static uint16_t aliasLists[MAX_LIST_SIZE];
 static uint16_t aliasListsSize = 0;
 
 /* Were the standard tags declared before the aliases. */
-static UBool standardTagsUsed = FALSE;
-static UBool verbose = FALSE;
-static UBool quiet = FALSE;
+static UBool standardTagsUsed = false;
+static UBool verbose = false;
+static UBool quiet = false;
 static int lineNum = 1;
 
 static UConverterAliasOptions tableOptions = {
@@ -257,11 +258,11 @@ main(int argc, char* argv[]) {
     }
 
     if(options[VERBOSE].doesOccur) {
-        verbose = TRUE;
+        verbose = true;
     }
 
     if(options[QUIET].doesOccur) {
-        quiet = TRUE;
+        quiet = true;
     }
 
     if (argc >= 2) {
@@ -334,7 +335,7 @@ parseFile(FileStream *in) {
     char lastLine[MAX_LINE_SIZE];
     int32_t lineSize = 0;
     int32_t lastLineSize = 0;
-    UBool validParse = TRUE;
+    UBool validParse = true;
 
     lineNum = 0;
 
@@ -345,7 +346,7 @@ parseFile(FileStream *in) {
 
     /* read the list of aliases */
     while (validParse) {
-        validParse = FALSE;
+        validParse = false;
 
         /* Read non-empty lines that don't start with a space character. */
         while (T_FileStream_readLine(in, lastLine, MAX_LINE_SIZE) != NULL) {
@@ -354,7 +355,7 @@ parseFile(FileStream *in) {
                 uprv_strcpy(line + lineSize, lastLine);
                 lineSize += lastLineSize;
             } else if (lineSize > 0) {
-                validParse = TRUE;
+                validParse = true;
                 break;
             }
             lineNum++;
@@ -370,7 +371,7 @@ parseFile(FileStream *in) {
                     exit(U_PARSE_ERROR);
                 }
                 addOfficialTaggedStandards(line, lineSize);
-                standardTagsUsed = TRUE;
+                standardTagsUsed = true;
             } else {
                 if (standardTagsUsed) {
                     parseLine(line);
@@ -477,16 +478,16 @@ parseLine(const char *line) {
         if (start == 0) {
             /* add the converter as its own alias to the alias table */
             alias = converter;
-            addAlias(alias, ALL_TAG_NUM, cnv, TRUE);
+            addAlias(alias, ALL_TAG_NUM, cnv, true);
         }
         else {
             alias=allocString(&stringBlock, line+start, length);
-            addAlias(alias, ALL_TAG_NUM, cnv, FALSE);
+            addAlias(alias, ALL_TAG_NUM, cnv, false);
         }
         addToKnownAliases(alias);
 
         /* add the alias/converter pair to the alias table */
-        /* addAlias(alias, 0, cnv, FALSE);*/
+        /* addAlias(alias, 0, cnv, false);*/
 
         /* skip whitespace */
         while (line[pos] && isspace((int)line[pos])) {
@@ -530,7 +531,7 @@ static uint16_t
 getTagNumber(const char *tag, uint16_t tagLen) {
     char *atag;
     uint16_t t;
-    UBool preferredName = ((tagLen > 0) ? (tag[tagLen - 1] == '*') : (FALSE));
+    UBool preferredName = ((tagLen > 0) ? (tag[tagLen - 1] == '*') : (false));
 
     if (tagCount >= MAX_TAG_COUNT) {
         fprintf(stderr, "%s:%d: too many tags\n", path, lineNum);
@@ -665,7 +666,7 @@ addToKnownAliases(const char *alias) {
 static uint16_t
 addAlias(const char *alias, uint16_t standard, uint16_t converter, UBool defaultName) {
     uint32_t idx, idx2;
-    UBool startEmptyWithoutDefault = FALSE;
+    UBool startEmptyWithoutDefault = false;
     AliasList *aliasList;
 
     if(standard>=MAX_TAG_COUNT) {
@@ -758,7 +759,7 @@ addAlias(const char *alias, uint16_t standard, uint16_t converter, UBool default
 
     if (aliasList->aliasCount <= 0) {
         aliasList->aliasCount++;
-        startEmptyWithoutDefault = TRUE;
+        startEmptyWithoutDefault = true;
     }
     aliasList->aliases = (uint16_t *)uprv_realloc(aliasList->aliases, (aliasList->aliasCount + 1) * sizeof(aliasList->aliases[0]));
     if (startEmptyWithoutDefault) {
diff --git a/icu4c/source/tools/gencolusb/extract_unsafe_backwards.cpp b/icu4c/source/tools/gencolusb/extract_unsafe_backwards.cpp
index c5302e059d6..0a0830169f1 100644
--- a/icu4c/source/tools/gencolusb/extract_unsafe_backwards.cpp
+++ b/icu4c/source/tools/gencolusb/extract_unsafe_backwards.cpp
@@ -65,7 +65,7 @@ int main(int argc, const char *argv[]) {
     UnicodeString pattern;
     UnicodeSet set(*unsafeBackwardSet);
     set.compact();
-    set.toPattern(pattern, FALSE);
+    set.toPattern(pattern, false);
 
     if(U_SUCCESS(errorCode)) {
       // This fails (bug# ?) - which is why this method was abandoned.
@@ -87,7 +87,7 @@ int main(int argc, const char *argv[]) {
       fprintf(stderr,"===\n%s\n===\n", buf2);
     }
 
-    const UnicodeString unsafeBackwardPattern(FALSE, buf, needed);
+    const UnicodeString unsafeBackwardPattern(false, buf, needed);
   if(U_SUCCESS(errorCode)) {
     //UnicodeSet us(unsafeBackwardPattern, errorCode);
     //    fprintf(stderr, "\n%s:%d: err creating set %s\n", __FILE__, __LINE__, u_errorName(errorCode));
diff --git a/icu4c/source/tools/gencolusb/verify_uset.cpp b/icu4c/source/tools/gencolusb/verify_uset.cpp
index d0435322fd8..fe2093c056a 100644
--- a/icu4c/source/tools/gencolusb/verify_uset.cpp
+++ b/icu4c/source/tools/gencolusb/verify_uset.cpp
@@ -21,7 +21,7 @@ int main(int argc, const char *argv[]) {
   UErrorCode errorCode = U_ZERO_ERROR;
 #if defined (COLLUNSAFE_PATTERN)
   puts("verify pattern");
-  const UnicodeString unsafeBackwardPattern(FALSE, collunsafe_pattern, collunsafe_len);
+  const UnicodeString unsafeBackwardPattern(false, collunsafe_pattern, collunsafe_len);
   fprintf(stderr, "\n -- pat '%c%c%c%c%c'\n",
           collunsafe_pattern[0],
           collunsafe_pattern[1],
diff --git a/icu4c/source/tools/gendict/gendict.cpp b/icu4c/source/tools/gendict/gendict.cpp
index b712640091e..7e6c7db615a 100644
--- a/icu4c/source/tools/gendict/gendict.cpp
+++ b/icu4c/source/tools/gendict/gendict.cpp
@@ -223,7 +223,7 @@ static const UChar CARRIAGE_RETURN_CHARACTER = 0x000D;
 static UBool readLine(UCHARBUF *f, UnicodeString &fileLine, IcuToolErrorCode &errorCode) {
     int32_t lineLength;
     const UChar *line = ucbuf_readline(f, &lineLength, errorCode);
-    if(line == NULL || errorCode.isFailure()) { return FALSE; }
+    if(line == NULL || errorCode.isFailure()) { return false; }
     // Strip trailing CR/LF, comments, and spaces.
     const UChar *comment = u_memchr(line, 0x23, lineLength);  // '#'
     if(comment != NULL) {
@@ -232,8 +232,8 @@ static UBool readLine(UCHARBUF *f, UnicodeString &fileLine, IcuToolErrorCode &er
         while(lineLength > 0 && (line[lineLength - 1] == CARRIAGE_RETURN_CHARACTER || line[lineLength - 1] == LINEFEED_CHARACTER)) { --lineLength; }
     }
     while(lineLength > 0 && u_isspace(line[lineLength - 1])) { --lineLength; }
-    fileLine.setTo(FALSE, line, lineLength);
-    return TRUE;
+    fileLine.setTo(false, line, lineLength);
+    return true;
 }
 
 //----------------------------------------------------------------------------
@@ -314,7 +314,7 @@ int  main(int argc, char **argv) {
     //  Read in the dictionary source file
     if (verbose) { printf("Opening file %s...\n", wordFileName); }
     const char *codepage = "UTF-8";
-    LocalUCHARBUFPointer f(ucbuf_open(wordFileName, &codepage, TRUE, FALSE, status));
+    LocalUCHARBUFPointer f(ucbuf_open(wordFileName, &codepage, true, false, status));
     if (status.isFailure()) {
         fprintf(stderr, "error opening input file: ICU Error \"%s\"\n", status.errorName());
         exit(status.reset());
@@ -331,13 +331,13 @@ int  main(int argc, char **argv) {
 
     UnicodeString fileLine;
     if (verbose) { puts("Adding words to dictionary..."); }
-    UBool hasValues = FALSE;
-    UBool hasValuelessContents = FALSE;
+    UBool hasValues = false;
+    UBool hasValuelessContents = false;
     int lineCount = 0;
     int wordCount = 0;
     int minlen = 255;
     int maxlen = 0;
-    UBool isOk = TRUE;
+    UBool isOk = true;
     while (readLine(f.getAlias(), fileLine, status)) {
         lineCount++;
         if (fileLine.isEmpty()) continue;
@@ -347,7 +347,7 @@ int  main(int argc, char **argv) {
         for (keyLen = 0; keyLen < fileLine.length() && !u_isspace(fileLine[keyLen]); ++keyLen) {}
         if (keyLen == 0) {
             fprintf(stderr, "Error: no word on line %i!\n", lineCount);
-            isOk = FALSE;
+            isOk = false;
             continue;
         }
         int32_t valueStart;
@@ -359,7 +359,7 @@ int  main(int argc, char **argv) {
             int32_t valueLength = fileLine.length() - valueStart;
             if (valueLength > 15) {
                 fprintf(stderr, "Error: value too long on line %i!\n", lineCount);
-                isOk = FALSE;
+                isOk = false;
                 continue;
             }
             char s[16];
@@ -368,17 +368,17 @@ int  main(int argc, char **argv) {
             unsigned long value = uprv_strtoul(s, &end, 0);
             if (end == s || *end != 0 || (int32_t)uprv_strlen(s) != valueLength || value > 0xffffffff) {
                 fprintf(stderr, "Error: value syntax error or value too large on line %i!\n", lineCount);
-                isOk = FALSE;
+                isOk = false;
                 continue;
             }
             dict.addWord(fileLine.tempSubString(0, keyLen), (int32_t)value, status);
-            hasValues = TRUE;
+            hasValues = true;
             wordCount++;
             if (keyLen < minlen) minlen = keyLen;
             if (keyLen > maxlen) maxlen = keyLen;
         } else {
             dict.addWord(fileLine.tempSubString(0, keyLen), 0, status);
-            hasValuelessContents = TRUE;
+            hasValuelessContents = true;
             wordCount++;
             if (keyLen < minlen) minlen = keyLen;
             if (keyLen > maxlen) maxlen = keyLen;
diff --git a/icu4c/source/tools/gennorm2/extradata.cpp b/icu4c/source/tools/gennorm2/extradata.cpp
index bb5512a8b16..8c6d023acbb 100644
--- a/icu4c/source/tools/gennorm2/extradata.cpp
+++ b/icu4c/source/tools/gennorm2/extradata.cpp
@@ -118,10 +118,10 @@ UBool ExtraData::setNoNoDelta(UChar32 c, Norm &norm) const {
         if(-Normalizer2Impl::MAX_DELTA<=delta && delta<=Normalizer2Impl::MAX_DELTA) {
             norm.type=Norm::NO_NO_DELTA;
             norm.offset=delta;
-            return TRUE;
+            return true;
         }
     }
-    return FALSE;
+    return false;
 }
 
 void ExtraData::writeCompositions(UChar32 c, const Norm &norm, UnicodeString &dataString) {
diff --git a/icu4c/source/tools/gennorm2/gennorm2.cpp b/icu4c/source/tools/gennorm2/gennorm2.cpp
index 723e912b916..84461f281d2 100644
--- a/icu4c/source/tools/gennorm2/gennorm2.cpp
+++ b/icu4c/source/tools/gennorm2/gennorm2.cpp
@@ -44,7 +44,7 @@
 
 U_NAMESPACE_BEGIN
 
-UBool beVerbose=FALSE, haveCopyright=TRUE;
+UBool beVerbose=false, haveCopyright=true;
 
 #if !UCONFIG_NO_NORMALIZATION
 void parseFile(std::ifstream &f, Normalizer2DataBuilder &builder);
@@ -302,7 +302,7 @@ void parseFile(std::ifstream &f, Normalizer2DataBuilder &builder) {
                 fprintf(stderr, "gennorm2 error: parsing mapping string from %s\n", line);
                 exit(errorCode.reset());
             }
-            UnicodeString mapping(FALSE, uchars, length);
+            UnicodeString mapping(false, uchars, length);
             if(*delimiter=='=') {
                 if(rangeLength!=1) {
                     fprintf(stderr,
diff --git a/icu4c/source/tools/gennorm2/n2builder.cpp b/icu4c/source/tools/gennorm2/n2builder.cpp
index 194cffa4328..4ebfae8ebe1 100644
--- a/icu4c/source/tools/gennorm2/n2builder.cpp
+++ b/icu4c/source/tools/gennorm2/n2builder.cpp
@@ -213,11 +213,11 @@ void Normalizer2DataBuilder::removeMapping(UChar32 c) {
 UBool Normalizer2DataBuilder::mappingHasCompBoundaryAfter(const BuilderReorderingBuffer &buffer,
                                                           Norm::MappingType mappingType) const {
     if(buffer.isEmpty()) {
-        return FALSE;  // Maps-to-empty-string is no boundary of any kind.
+        return false;  // Maps-to-empty-string is no boundary of any kind.
     }
     int32_t lastStarterIndex=buffer.lastStarterIndex();
     if(lastStarterIndex<0) {
-        return FALSE;  // no starter
+        return false;  // no starter
     }
     const int32_t lastIndex=buffer.length()-1;
     if(mappingType==Norm::ONE_WAY && lastStarterIndex1) {
@@ -226,12 +226,12 @@ UBool Normalizer2DataBuilder::mappingHasCompBoundaryAfter(const BuilderReorderin
         // which means that another combining mark can reorder before it.
         // By contrast, in a round-trip mapping this does not prevent a boundary as long as
         // the starter or composite does not combine-forward with a following combining mark.
-        return FALSE;
+        return false;
     }
     UChar32 starter=buffer.charAt(lastStarterIndex);
     if(lastStarterIndex==0 && norms.combinesBack(starter)) {
         // The last starter is at the beginning of the mapping and combines backward.
-        return FALSE;
+        return false;
     }
     if(Hangul::isJamoL(starter) ||
             (Hangul::isJamoV(starter) &&
@@ -255,14 +255,14 @@ UBool Normalizer2DataBuilder::mappingHasCompBoundaryAfter(const BuilderReorderin
     const Norm *starterNorm=norms.getNorm(starter);
     if(i==lastStarterIndex &&
             (starterNorm==nullptr || starterNorm->compositions==nullptr)) {
-        return TRUE;  // The last starter does not combine forward.
+        return true;  // The last starter does not combine forward.
     }
     uint8_t prevCC=0;
     while(++ilastStarterIndex && norms.combinesWithCCBetween(*starterNorm, prevCC, cc)) {
             // The starter combines with a mark that reorders before the current one.
-            return FALSE;
+            return false;
         }
         UChar32 c=buffer.charAt(i);
         if(starterNorm!=nullptr && (prevCC=lastStarterIndex &&
                     (starterNorm==nullptr || starterNorm->compositions==nullptr)) {
-                return TRUE;  // The composite does not combine further.
+                return true;  // The composite does not combine further.
             }
             // Keep prevCC because we "removed" the combining mark.
         } else if(cc==0) {
             starterNorm=norms.getNorm(c);
             if(i==lastStarterIndex &&
                     (starterNorm==nullptr || starterNorm->compositions==nullptr)) {
-                return TRUE;  // The new starter does not combine forward.
+                return true;  // The new starter does not combine forward.
             }
             prevCC=0;
         } else {
@@ -286,18 +286,18 @@ UBool Normalizer2DataBuilder::mappingHasCompBoundaryAfter(const BuilderReorderin
         }
     }
     if(prevCC==0) {
-        return FALSE;  // forward-combining starter at the very end
+        return false;  // forward-combining starter at the very end
     }
     if(norms.combinesWithCCBetween(*starterNorm, prevCC, 256)) {
         // The starter combines with another mark.
-        return FALSE;
+        return false;
     }
-    return TRUE;
+    return true;
 }
 
 UBool Normalizer2DataBuilder::mappingRecomposes(const BuilderReorderingBuffer &buffer) const {
     if(buffer.lastStarterIndex()<0) {
-        return FALSE;  // no starter
+        return false;  // no starter
     }
     const Norm *starterNorm=nullptr;
     uint8_t prevCC=0;
@@ -306,11 +306,11 @@ UBool Normalizer2DataBuilder::mappingRecomposes(const BuilderReorderingBuffer &b
         uint8_t cc=buffer.ccAt(i);
         if(starterNorm!=nullptr && (prevCCcombine(c)>=0) {
-            return TRUE;  // normal composite
+            return true;  // normal composite
         } else if(cc==0) {
             if(Hangul::isJamoL(c)) {
                 if((i+1)combinesBack=TRUE;
+    norms.createNorm(trail)->combinesBack=true;
     // Insert (trail, composite) pair into compositions list for the lead character.
     IcuToolErrorCode errorCode("gennorm2/addComposition()");
     Norm *leadNorm=norms.createNorm(lead);
@@ -315,7 +315,7 @@ void Decomposer::rangeHandler(UChar32 start, UChar32 end, Norm &norm) {
         norm.mapping=decomposed;
         // Not  norm.setMappingCP();  because the original mapping
         // is most likely to be encodable as a delta.
-        didDecompose|=TRUE;
+        didDecompose|=true;
     }
 }
 
diff --git a/icu4c/source/tools/gennorm2/norms.h b/icu4c/source/tools/gennorm2/norms.h
index 34efd4ba013..e1c17b0999f 100644
--- a/icu4c/source/tools/gennorm2/norms.h
+++ b/icu4c/source/tools/gennorm2/norms.h
@@ -27,11 +27,11 @@ U_NAMESPACE_BEGIN
 
 class BuilderReorderingBuffer {
 public:
-    BuilderReorderingBuffer() : fLength(0), fLastStarterIndex(-1), fDidReorder(FALSE) {}
+    BuilderReorderingBuffer() : fLength(0), fLastStarterIndex(-1), fDidReorder(false) {}
     void reset() {
         fLength=0;
         fLastStarterIndex=-1;
-        fDidReorder=FALSE;
+        fDidReorder=false;
     }
     int32_t length() const { return fLength; }
     UBool isEmpty() const { return fLength==0; }
@@ -202,7 +202,7 @@ public:
 
 class Decomposer : public Norms::Enumerator {
 public:
-    Decomposer(Norms &n) : Norms::Enumerator(n), didDecompose(FALSE) {}
+    Decomposer(Norms &n) : Norms::Enumerator(n), didDecompose(false) {}
     /** Decomposes each character of the current mapping. Sets didDecompose if any. */
     void rangeHandler(UChar32 start, UChar32 end, Norm &norm) U_OVERRIDE;
     UBool didDecompose;
diff --git a/icu4c/source/tools/genrb/derb.cpp b/icu4c/source/tools/genrb/derb.cpp
index 70546e1915b..aba5c595296 100644
--- a/icu4c/source/tools/genrb/derb.cpp
+++ b/icu4c/source/tools/genrb/derb.cpp
@@ -40,7 +40,7 @@
 
 static const int32_t indentsize = 4;
 static int32_t truncsize = DERB_DEFAULT_TRUNC;
-static UBool opt_truncate = FALSE;
+static UBool opt_truncate = false;
 
 static const char *getEncodingName(const char *encoding);
 static void reportError(const char *pname, UErrorCode *status, const char *when);
@@ -66,8 +66,8 @@ static UOption options[]={
 /* 11 */   { "suppressAliases", NULL, NULL, NULL, 'A', UOPT_NO_ARG, 0 },
 };
 
-static UBool verbose = FALSE;
-static UBool suppressAliases = FALSE;
+static UBool verbose = false;
+static UBool suppressAliases = false;
 static UFILE *ustderr = NULL;
 
 extern int
@@ -140,18 +140,18 @@ main(int argc, char* argv[]) {
     }
 
     if(options[4].doesOccur) {
-        opt_truncate = TRUE;
+        opt_truncate = true;
         if(options[4].value != NULL) {
             truncsize = atoi(options[4].value); /* user defined printable size */
         } else {
             truncsize = DERB_DEFAULT_TRUNC; /* we'll use default omitting size */
         }
     } else {
-        opt_truncate = FALSE;
+        opt_truncate = false;
     }
 
     if(options[5].doesOccur) {
-        verbose = TRUE;
+        verbose = true;
     }
 
     if (options[6].doesOccur) {
@@ -171,7 +171,7 @@ main(int argc, char* argv[]) {
     }
 
     if (options[11].doesOccur) {
-      suppressAliases = TRUE;
+      suppressAliases = true;
     }
 
     fflush(stderr); // use ustderr now.
@@ -577,7 +577,7 @@ static void printOutBundle(UFILE *out, UResourceBundle *resource, int32_t indent
             }
             printString(out, cr, UPRV_LENGTHOF(cr));
 
-            if(suppressAliases == FALSE) {
+            if(suppressAliases == false) {
               while(U_SUCCESS(*status) && ures_hasNext(resource)) {
                   t = ures_getNextResource(resource, t, status);
                   if(U_SUCCESS(*status)) {
diff --git a/icu4c/source/tools/genrb/errmsg.c b/icu4c/source/tools/genrb/errmsg.c
index 91dfd3265e1..a99d797ec5c 100644
--- a/icu4c/source/tools/genrb/errmsg.c
+++ b/icu4c/source/tools/genrb/errmsg.c
@@ -18,6 +18,7 @@
 */
 
 #include 
+#include 
 #include 
 #include "cstring.h"
 #include "errmsg.h"
@@ -34,7 +35,7 @@ U_CFUNC void error(uint32_t linenumber, const char *msg, ...)
     va_end(va);
 }
 
-static UBool gShowWarning = TRUE;
+static UBool gShowWarning = true;
 
 U_CFUNC void setShowWarning(UBool val)
 {
@@ -45,14 +46,14 @@ U_CFUNC UBool getShowWarning(){
     return gShowWarning;
 }
 
-static UBool gStrict =FALSE;
+static UBool gStrict =false;
 U_CFUNC UBool isStrict(){
     return gStrict;
 }
 U_CFUNC void setStrict(UBool val){
     gStrict = val;
 }
-static UBool gVerbose =FALSE;
+static UBool gVerbose =false;
 U_CFUNC UBool isVerbose(){
     return gVerbose;
 }
diff --git a/icu4c/source/tools/genrb/genrb.cpp b/icu4c/source/tools/genrb/genrb.cpp
index 319484213ee..9deca097e94 100644
--- a/icu4c/source/tools/genrb/genrb.cpp
+++ b/icu4c/source/tools/genrb/genrb.cpp
@@ -118,8 +118,8 @@ UOption options[]={
                       UOPTION_DEF("ucadata", '\x01', UOPT_REQUIRES_ARG),/* 24 */
                   };
 
-static     UBool       write_java = FALSE;
-static     UBool       write_xliff = FALSE;
+static     UBool       write_java = false;
+static     UBool       write_xliff = false;
 static     const char* outputEnc ="";
 
 static ResFile poolBundle;
@@ -138,7 +138,7 @@ main(int argc,
     const char *filterDir = NULL;
     const char *encoding  = "";
     int         i;
-    UBool illegalArg = FALSE;
+    UBool illegalArg = false;
 
     U_MAIN_INIT_ARGS(argc, argv);
 
@@ -149,28 +149,28 @@ main(int argc,
     /* error handling, printing usage message */
     if(argc<0) {
         fprintf(stderr, "%s: error in command line argument \"%s\"\n", argv[0], argv[-argc]);
-        illegalArg = TRUE;
+        illegalArg = true;
     } else if(argc<2) {
-        illegalArg = TRUE;
+        illegalArg = true;
     }
     if(options[WRITE_POOL_BUNDLE].doesOccur && options[USE_POOL_BUNDLE].doesOccur) {
         fprintf(stderr, "%s: cannot combine --writePoolBundle and --usePoolBundle\n", argv[0]);
-        illegalArg = TRUE;
+        illegalArg = true;
     }
     if (options[ICU4X_MODE].doesOccur && !options[UCADATA].doesOccur) {
         fprintf(stderr, "%s: --icu4xMode requires --ucadata\n", argv[0]);
-        illegalArg = TRUE;
+        illegalArg = true;
     }
     if(options[FORMAT_VERSION].doesOccur) {
         const char *s = options[FORMAT_VERSION].value;
         if(uprv_strlen(s) != 1 || (s[0] < '1' && '3' < s[0])) {
             fprintf(stderr, "%s: unsupported --formatVersion %s\n", argv[0], s);
-            illegalArg = TRUE;
+            illegalArg = true;
         } else if(s[0] == '1' &&
                   (options[WRITE_POOL_BUNDLE].doesOccur || options[USE_POOL_BUNDLE].doesOccur)
         ) {
             fprintf(stderr, "%s: cannot combine --formatVersion 1 with --writePoolBundle or --usePoolBundle\n", argv[0]);
-            illegalArg = TRUE;
+            illegalArg = true;
         } else {
             setFormatVersion(s[0] - '0');
         }
@@ -182,7 +182,7 @@ main(int argc,
                 "%s error: command line argument --java-package or --bundle-name "
                 "without --write-java\n",
                 argv[0]);
-        illegalArg = TRUE;
+        illegalArg = true;
     }
 
     if(options[VERSION].doesOccur) {
@@ -255,17 +255,17 @@ main(int argc,
     }
 
     if(options[VERBOSE].doesOccur) {
-        setVerbose(TRUE);
+        setVerbose(true);
     }
 
     if(options[QUIET].doesOccur) {
-        setShowWarning(FALSE);
+        setShowWarning(false);
     }
     if(options[STRICT].doesOccur) {
-        setStrict(TRUE);
+        setStrict(true);
     }
     if(options[COPYRIGHT].doesOccur){
-        setIncludeCopyright(TRUE);
+        setIncludeCopyright(true);
     }
 
     if(options[SOURCEDIR].doesOccur) {
@@ -300,12 +300,12 @@ main(int argc,
     }
     status = U_ZERO_ERROR;
     if(options[WRITE_JAVA].doesOccur) {
-        write_java = TRUE;
+        write_java = true;
         outputEnc = options[WRITE_JAVA].value;
     }
 
     if(options[WRITE_XLIFF].doesOccur) {
-        write_xliff = TRUE;
+        write_xliff = true;
         if(options[WRITE_XLIFF].value != NULL){
             xliffOutputFileName = options[WRITE_XLIFF].value;
         }
@@ -329,7 +329,7 @@ main(int argc,
 
     LocalPointer newPoolBundle;
     if(options[WRITE_POOL_BUNDLE].doesOccur) {
-        newPoolBundle.adoptInsteadAndCheckErrorCode(new SRBRoot(NULL, TRUE, status), status);
+        newPoolBundle.adoptInsteadAndCheckErrorCode(new SRBRoot(NULL, true, status), status);
         if(U_FAILURE(status)) {
             fprintf(stderr, "unable to create an empty bundle for the pool keys: %s\n", u_errorName(status));
             return status;
@@ -512,7 +512,7 @@ main(int argc,
         }
 
         T_FileStream_close(poolFile);
-        setUsePoolBundle(TRUE);
+        setUsePoolBundle(true);
         if (isVerbose() && poolBundle.fStrings != NULL) {
             printf("number of shared strings: %d\n", (int)poolBundle.fStrings->fCount);
             int32_t length = poolBundle.fStringIndexLimit + 1;  // incl. last NUL
@@ -657,7 +657,7 @@ processFile(const char *filename, const char *cp,
         return;
     }
 
-    ucbuf.adoptInstead(ucbuf_open(openFileName.data(), &cp,getShowWarning(),TRUE, &status));
+    ucbuf.adoptInstead(ucbuf_open(openFileName.data(), &cp,getShowWarning(),true, &status));
     if(status == U_FILE_ACCESS_ERROR) {
 
         fprintf(stderr, "couldn't open file %s\n", openFileName.data());
@@ -748,11 +748,11 @@ processFile(const char *filename, const char *cp,
                 filename, u_errorName(status));
         return;
     }
-    if(write_java== TRUE){
+    if(write_java== true){
         bundle_write_java(data.getAlias(), outputDir, outputEnc,
                           outputFileName, sizeof(outputFileName),
                           options[JAVA_PACKAGE].value, options[BUNDLE_NAME].value, &status);
-    }else if(write_xliff ==TRUE){
+    }else if(write_xliff ==true){
         bundle_write_xml(data.getAlias(), outputDir, outputEnc,
                          filename, outputFileName, sizeof(outputFileName),
                          language, xliffOutputFileName, &status);
diff --git a/icu4c/source/tools/genrb/parse.cpp b/icu4c/source/tools/genrb/parse.cpp
index a66f8ef914a..9747c57cfd9 100644
--- a/icu4c/source/tools/genrb/parse.cpp
+++ b/icu4c/source/tools/genrb/parse.cpp
@@ -323,7 +323,7 @@ parseUCARules(ParseState* state, char *tag, uint32_t startline, const struct USt
     char              filename[256] = { '\0' };
     char              cs[128]       = { '\0' };
     uint32_t          line;
-    UBool quoted = FALSE;
+    UBool quoted = false;
     UCHARBUF *ucbuf=NULL;
     UChar32   c     = 0;
     const char* cp  = NULL;
@@ -367,7 +367,7 @@ parseUCARules(ParseState* state, char *tag, uint32_t startline, const struct USt
         return res_none();
     }
 
-    ucbuf = ucbuf_open(filename, &cp, getShowWarning(),FALSE, status);
+    ucbuf = ucbuf_open(filename, &cp, getShowWarning(),false, status);
 
     if (U_FAILURE(*status)) {
         error(line, "An error occurred while opening the input file %s\n", filename);
@@ -505,7 +505,7 @@ parseTransliterator(ParseState* state, char *tag, uint32_t startline, const stru
     uprv_strcat(filename, cs);
 
 
-    ucbuf = ucbuf_open(filename, &cp, getShowWarning(),FALSE, status);
+    ucbuf = ucbuf_open(filename, &cp, getShowWarning(),false, status);
 
     if (U_FAILURE(*status)) {
         error(line, "An error occurred while opening the input file %s\n", filename);
@@ -760,7 +760,7 @@ GenrbImporter::getRules(
     // printf("GenrbImporter::getRules(%s, %s) reads %s\n", localeID, collationType, openFileName.data());
     const char* cp = "";
     LocalUCHARBUFPointer ucbuf(
-            ucbuf_open(openFileName.data(), &cp, getShowWarning(), TRUE, &errorCode));
+            ucbuf_open(openFileName.data(), &cp, getShowWarning(), true, &errorCode));
     if(errorCode == U_FILE_ACCESS_ERROR) {
         fprintf(stderr, "couldn't open file %s\n", openFileName.data());
         return;
@@ -772,7 +772,7 @@ GenrbImporter::getRules(
 
     /* Parse the data into an SRBRoot */
     LocalPointer data(
-            parse(ucbuf.getAlias(), inputDir, outputDir, filename.data(), FALSE, FALSE, FALSE, &errorCode));
+            parse(ucbuf.getAlias(), inputDir, outputDir, filename.data(), false, false, false, &errorCode));
     if (U_FAILURE(errorCode)) {
         return;
     }
@@ -943,7 +943,7 @@ static UBool
 convertTrie(const void *context, UChar32 start, UChar32 end, uint32_t value) {
     if (start >= 0x1100 && start < 0x1200 && end >= 0x1100 && end < 0x1200) {
         // Range entirely in conjoining jamo block.
-        return TRUE;
+        return true;
     }
     icu::IcuToolErrorCode status("genrb: convertTrie");
     umutablecptrie_setRange((UMutableCPTrie*)context, start, end, value, status);
@@ -1040,10 +1040,10 @@ writeCollationSpecialPrimariesTOML(const char* outputdir, const char* name, cons
 
 static void
 writeCollationTOML(const char* outputdir, const char* name, const char* collationType, const icu::CollationData* data, const icu::CollationSettings* settings, UErrorCode *status) {
-    UBool tailored = FALSE;
-    UBool tailoredDiacritics = FALSE;
+    UBool tailored = false;
+    UBool tailoredDiacritics = false;
     UBool lithuanianDotAbove = (uprv_strcmp(name, "lt") == 0);
-    UBool reordering = FALSE;
+    UBool reordering = false;
     UBool isRoot = uprv_strcmp(name, "root") == 0;
     UChar32 diacriticLimit = ICU4X_DIACRITIC_LIMIT;
     if (!data->base && isRoot) {
@@ -1067,7 +1067,7 @@ writeCollationTOML(const char* outputdir, const char* name, const char* collatio
             }
             uint32_t ce32 = data->getCE32(c);
             if ((ce32 != icu::Collation::FALLBACK_CE32) && (ce32 != data->base->getCE32(c))) {
-                tailoredDiacritics = TRUE;
+                tailoredDiacritics = true;
                 diacriticLimit = writeCollationDiacriticsTOML(outputdir, name, collationType, data, status);
                 if (U_FAILURE(*status)) {
                     return;
@@ -1078,7 +1078,7 @@ writeCollationTOML(const char* outputdir, const char* name, const char* collatio
     }
 
     if (settings->hasReordering()) {
-        reordering = TRUE;
+        reordering = true;
         // Note: There are duplicate reorderings. Expecting the ICU4X provider
         // to take care of deduplication.
         writeCollationReorderingTOML(outputdir, name, collationType, settings, status);
@@ -1155,7 +1155,7 @@ addCollation(ParseState* state, TableResource  *result, const char *collationTyp
     enum   ETokenType  token;
     char               subtag[1024];
     UnicodeString      rules;
-    UBool              haveRules = FALSE;
+    UBool              haveRules = false;
     UVersionInfo       version;
     uint32_t           line;
 
@@ -1233,7 +1233,7 @@ addCollation(ParseState* state, TableResource  *result, const char *collationTyp
         {
             StringResource *sr = static_cast(member);
             rules = sr->fString;
-            haveRules = TRUE;
+            haveRules = true;
             // Defer building the collator until we have seen
             // all sub-elements of the collation table, including the Version.
             /* in order to achieve smaller data files, we can direct genrb */
@@ -1384,7 +1384,7 @@ addCollation(ParseState* state, TableResource  *result, const char *collationTyp
 
 static UBool
 keepCollationType(const char * /*type*/) {
-    return TRUE;
+    return true;
 }
 
 static struct SResource *
@@ -1525,7 +1525,7 @@ realParseTable(ParseState* state, TableResource *table, char *tag, uint32_t star
     enum   ETokenType token;
     char              subtag[1024];
     uint32_t          line;
-    UBool             readToken = FALSE;
+    UBool             readToken = false;
 
     /* '{' . (name resource)* '}' */
 
@@ -1590,7 +1590,7 @@ realParseTable(ParseState* state, TableResource *table, char *tag, uint32_t star
             error(line, "parse error. Stopped parsing table with %s", u_errorName(*status));
             return NULL;
         }
-        readToken = TRUE;
+        readToken = true;
         ustr_deinit(&comment);
    }
 
@@ -1605,11 +1605,11 @@ parseTable(ParseState* state, char *tag, uint32_t startline, const struct UStrin
 {
     if (tag != NULL && uprv_strcmp(tag, "CollationElements") == 0)
     {
-        return parseCollationElements(state, tag, startline, FALSE, status);
+        return parseCollationElements(state, tag, startline, false, status);
     }
     if (tag != NULL && uprv_strcmp(tag, "collations") == 0)
     {
-        return parseCollationElements(state, tag, startline, TRUE, status);
+        return parseCollationElements(state, tag, startline, true, status);
     }
     if(isVerbose()){
         printf(" table %s at line %i \n",  (tag == NULL) ? "(null)" : tag, (int)startline);
@@ -1631,7 +1631,7 @@ parseArray(ParseState* state, char *tag, uint32_t startline, const struct UStrin
     struct UString    *tokenValue;
     struct UString    memberComments;
     enum   ETokenType token;
-    UBool             readToken = FALSE;
+    UBool             readToken = false;
 
     ArrayResource  *result = array_open(state->bundle, tag, comment, status);
 
@@ -1704,7 +1704,7 @@ parseArray(ParseState* state, char *tag, uint32_t startline, const struct UStrin
             res_close(result);
             return NULL;
         }
-        readToken = TRUE;
+        readToken = true;
     }
 
     ustr_deinit(&memberComments);
@@ -1717,7 +1717,7 @@ parseIntVector(ParseState* state, char *tag, uint32_t startline, const struct US
     enum   ETokenType  token;
     char              *string;
     int32_t            value;
-    UBool              readToken = FALSE;
+    UBool              readToken = false;
     char              *stopstring;
     struct UString     memberComments;
 
@@ -1788,7 +1788,7 @@ parseIntVector(ParseState* state, char *tag, uint32_t startline, const struct US
         {
             getToken(state, NULL, NULL, NULL, status);
         }
-        readToken = TRUE;
+        readToken = true;
     }
 
     /* not reached */
@@ -2029,7 +2029,7 @@ parseInclude(ParseState* state, char *tag, uint32_t startline, const struct UStr
         uprv_strcpy(fullname,filename);
     }
 
-    ucbuf = ucbuf_open(fullname, &cp,getShowWarning(),FALSE,status);
+    ucbuf = ucbuf_open(fullname, &cp,getShowWarning(),false,status);
 
     if (U_FAILURE(*status)) {
         error(line, "couldn't open input file %s\n", filename);
@@ -2345,7 +2345,7 @@ parse(UCHARBUF *buf, const char *inputDir, const char *outputDir, const char *fi
     ustr_init(&comment);
     expect(&state, TOK_STRING, &tokenValue, &comment, NULL, status);
 
-    state.bundle = new SRBRoot(&comment, FALSE, *status);
+    state.bundle = new SRBRoot(&comment, false, *status);
 
     if (state.bundle == NULL || U_FAILURE(*status))
     {
@@ -2402,7 +2402,7 @@ parse(UCHARBUF *buf, const char *inputDir, const char *outputDir, const char *fi
          * This is the same as a regular table, but also sets the
          * URES_ATT_NO_FALLBACK flag in indexes[URES_INDEX_ATTRIBUTES] .
          */
-        state.bundle->fNoFallback=TRUE;
+        state.bundle->fNoFallback=true;
     }
     /* top-level tables need not handle special table names like "collations" */
     assert(!state.bundle->fIsPoolBundle);
diff --git a/icu4c/source/tools/genrb/read.c b/icu4c/source/tools/genrb/read.c
index 7314f6b742f..0d4a318a898 100644
--- a/icu4c/source/tools/genrb/read.c
+++ b/icu4c/source/tools/genrb/read.c
@@ -18,6 +18,8 @@
 *******************************************************************************
 */
 
+#include 
+
 #include "read.h"
 #include "errmsg.h"
 #include "toolutil.h"
@@ -77,7 +79,7 @@ getNextToken(UCHARBUF* buf,
     }
 
     /* Skip whitespace */
-    c = getNextChar(buf, TRUE, comment, status);
+    c = getNextChar(buf, true, comment, status);
 
     if (U_FAILURE(*status)) {
         return TOK_ERROR;
@@ -127,8 +129,8 @@ static enum ETokenType getStringToken(UCHARBUF* buf,
     UChar    target[3] = { '\0' };
     UChar    *pTarget   = target;
     int      len=0;
-    UBool    isFollowingCharEscaped=FALSE;
-    UBool    isNLUnescaped = FALSE;
+    UBool    isFollowingCharEscaped=false;
+    UBool    isNLUnescaped = false;
     UChar32  prevC=0;
 
     /* We are guaranteed on entry that initialChar is not a whitespace
@@ -141,7 +143,7 @@ static enum ETokenType getStringToken(UCHARBUF* buf,
     }
 
     /* setup */
-    lastStringWasQuoted = FALSE;
+    lastStringWasQuoted = false;
     c = initialChar;
     ustr_setlen(token, 0, status);
 
@@ -159,7 +161,7 @@ static enum ETokenType getStringToken(UCHARBUF* buf,
                 }
             }
 
-            lastStringWasQuoted = TRUE;
+            lastStringWasQuoted = true;
 
             for (;;) {
                 c = ucbuf_getc(buf,status);
@@ -186,23 +188,23 @@ static enum ETokenType getStringToken(UCHARBUF* buf,
                         return TOK_ERROR;
                     }
                     if(c == CR || c == LF){
-                        isNLUnescaped = TRUE;
+                        isNLUnescaped = true;
                     }
                 }               
 
                 if(c==ESCAPE && !isFollowingCharEscaped){
-                    isFollowingCharEscaped = TRUE;
+                    isFollowingCharEscaped = true;
                 }else{
                     U_APPEND_CHAR32(c, pTarget,len);
                     pTarget = target;
                     ustr_uscat(token, pTarget,len, status);
-                    isFollowingCharEscaped = FALSE;
+                    isFollowingCharEscaped = false;
                     len=0;
                     if(c == CR || c == LF){
-                        if(isNLUnescaped == FALSE && prevC!=CR){
+                        if(isNLUnescaped == false && prevC!=CR){
                             lineCount++;
                         }
-                        isNLUnescaped = FALSE;
+                        isNLUnescaped = false;
                     }
                 }
                 
@@ -230,7 +232,7 @@ static enum ETokenType getStringToken(UCHARBUF* buf,
 
             }
 
-            lastStringWasQuoted = FALSE;
+            lastStringWasQuoted = false;
             
             /* if we reach here we are mixing 
              * quoted and unquoted strings
@@ -259,7 +261,7 @@ static enum ETokenType getStringToken(UCHARBUF* buf,
 
             for (;;) {
                 /* DON'T skip whitespace */
-                c = getNextChar(buf, FALSE, NULL, status);
+                c = getNextChar(buf, false, NULL, status);
 
                 /* EOF reached */
                 if (c == U_EOF) {
@@ -304,7 +306,7 @@ static enum ETokenType getStringToken(UCHARBUF* buf,
         }
 
         /* DO skip whitespace */
-        c = getNextChar(buf, TRUE, NULL, status);
+        c = getNextChar(buf, true, NULL, status);
 
         if (U_FAILURE(*status)) {
             return TOK_STRING;
@@ -455,10 +457,10 @@ static UBool isWhitespace(UChar32 c) {
     case 0x0020:
     case 0x0009:
     case 0xFEFF:
-        return TRUE;
+        return true;
 
     default:
-        return FALSE;
+        return false;
     }
 }
 
@@ -469,9 +471,9 @@ static UBool isNewline(UChar32 c) {
     case 0x2029:
         lineCount++;
     case 0x000D:
-        return TRUE;
+        return true;
 
     default:
-        return FALSE;
+        return false;
     }
 }
diff --git a/icu4c/source/tools/genrb/reslist.cpp b/icu4c/source/tools/genrb/reslist.cpp
index b9e0d7d8c43..4c854bd55b1 100644
--- a/icu4c/source/tools/genrb/reslist.cpp
+++ b/icu4c/source/tools/genrb/reslist.cpp
@@ -71,9 +71,9 @@
 
 U_NAMESPACE_USE
 
-static UBool gIncludeCopyright = FALSE;
-static UBool gUsePoolBundle = FALSE;
-static UBool gIsDefaultFormatVersion = TRUE;
+static UBool gIncludeCopyright = false;
+static UBool gUsePoolBundle = false;
+static UBool gIsDefaultFormatVersion = true;
 static int32_t gFormatVersion = 3;
 
 /* How do we store string values? */
@@ -131,7 +131,7 @@ UBool getIncludeCopyright(void){
 }
 
 void setFormatVersion(int32_t formatVersion) {
-    gIsDefaultFormatVersion = FALSE;
+    gIsDefaultFormatVersion = false;
     gFormatVersion = formatVersion;
 }
 
@@ -149,14 +149,14 @@ struct SResource* res_none() {
 }
 
 SResource::SResource()
-        : fType(URES_NONE), fWritten(FALSE), fRes(RES_BOGUS), fRes16(-1), fKey(-1), fKey16(-1),
+        : fType(URES_NONE), fWritten(false), fRes(RES_BOGUS), fRes16(-1), fKey(-1), fKey16(-1),
           line(0), fNext(NULL) {
     ustr_init(&fComment);
 }
 
 SResource::SResource(SRBRoot *bundle, const char *tag, int8_t type, const UString* comment,
                      UErrorCode &errorCode)
-        : fType(type), fWritten(FALSE), fRes(RES_BOGUS), fRes16(-1),
+        : fType(type), fWritten(false), fRes(RES_BOGUS), fRes16(-1),
           fKey(bundle != NULL ? bundle->addTag(tag, errorCode) : -1), fKey16(-1),
           line(0), fNext(NULL) {
     ustr_init(&fComment);
@@ -274,7 +274,7 @@ StringBaseResource::StringBaseResource(SRBRoot *bundle, const char *tag, int8_t
         : SResource(bundle, tag, type, comment, errorCode) {
     if (len == 0 && gFormatVersion > 1) {
         fRes = URES_MAKE_EMPTY_RESOURCE(type);
-        fWritten = TRUE;
+        fWritten = true;
         return;
     }
 
@@ -290,7 +290,7 @@ StringBaseResource::StringBaseResource(SRBRoot *bundle, int8_t type,
         : SResource(bundle, NULL, type, NULL, errorCode), fString(value) {
     if (value.isEmpty() && gFormatVersion > 1) {
         fRes = URES_MAKE_EMPTY_RESOURCE(type);
-        fWritten = TRUE;
+        fWritten = true;
         return;
     }
 
@@ -303,7 +303,7 @@ StringBaseResource::StringBaseResource(SRBRoot *bundle, int8_t type,
 // Pool bundle string, alias the buffer. Guaranteed NUL-terminated and not empty.
 StringBaseResource::StringBaseResource(int8_t type, const UChar *value, int32_t len,
                                        UErrorCode &errorCode)
-        : SResource(NULL, NULL, type, NULL, errorCode), fString(TRUE, value, len) {
+        : SResource(NULL, NULL, type, NULL, errorCode), fString(true, value, len) {
     assert(len > 0);
     assert(!fString.isBogus());
 }
@@ -332,7 +332,7 @@ IntResource::IntResource(SRBRoot *bundle, const char *tag, int32_t value,
         : SResource(bundle, tag, URES_INT, comment, errorCode) {
     fValue = value;
     fRes = URES_MAKE_RESOURCE(URES_INT, value & RES_MAX_OFFSET);
-    fWritten = TRUE;
+    fWritten = true;
 }
 
 IntResource::~IntResource() {}
@@ -395,7 +395,7 @@ BinaryResource::BinaryResource(SRBRoot *bundle, const char *tag,
     } else {
         if (gFormatVersion > 1) {
             fRes = URES_MAKE_EMPTY_RESOURCE(URES_BINARY);
-            fWritten = TRUE;
+            fWritten = true;
         }
     }
 }
@@ -544,14 +544,14 @@ ContainerResource::writeAllRes16(SRBRoot *bundle) {
     for (SResource *current = fFirst; current != NULL; current = current->fNext) {
         bundle->f16BitUnits.append((UChar)current->fRes16);
     }
-    fWritten = TRUE;
+    fWritten = true;
 }
 
 void
 ArrayResource::handleWrite16(SRBRoot *bundle) {
     if (fCount == 0 && gFormatVersion > 1) {
         fRes = URES_MAKE_EMPTY_RESOURCE(URES_ARRAY);
-        fWritten = TRUE;
+        fWritten = true;
         return;
     }
 
@@ -571,7 +571,7 @@ void
 TableResource::handleWrite16(SRBRoot *bundle) {
     if (fCount == 0 && gFormatVersion > 1) {
         fRes = URES_MAKE_EMPTY_RESOURCE(URES_TABLE);
-        fWritten = TRUE;
+        fWritten = true;
         return;
     }
     /* Find the smallest table type that fits the data. */
@@ -607,7 +607,7 @@ TableResource::handleWrite16(SRBRoot *bundle) {
 void
 PseudoListResource::handleWrite16(SRBRoot * /*bundle*/) {
     fRes = URES_MAKE_EMPTY_RESOURCE(URES_TABLE);
-    fWritten = TRUE;
+    fWritten = true;
 }
 
 void
@@ -669,7 +669,7 @@ void
 IntVectorResource::handlePreWrite(uint32_t *byteOffset) {
     if (fCount == 0 && gFormatVersion > 1) {
         fRes = URES_MAKE_EMPTY_RESOURCE(URES_INT_VECTOR);
-        fWritten = TRUE;
+        fWritten = true;
     } else {
         fRes = URES_MAKE_RESOURCE(URES_INT_VECTOR, *byteOffset >> 2);
         *byteOffset += (1 + fCount) * 4;
@@ -734,7 +734,7 @@ SResource::preWrite(uint32_t *byteOffset) {
 
 void
 SResource::handlePreWrite(uint32_t * /*byteOffset*/) {
-    assert(FALSE);
+    assert(false);
 }
 
 /*
@@ -748,7 +748,7 @@ StringBaseResource::handleWrite(UNewDataMemory *mem, uint32_t *byteOffset) {
     udata_write32(mem, len);
     udata_writeUString(mem, getBuffer(), len + 1);
     *byteOffset += 4 + (len + 1) * U_SIZEOF_UCHAR;
-    fWritten = TRUE;
+    fWritten = true;
 }
 
 void
@@ -839,12 +839,12 @@ SResource::write(UNewDataMemory *mem, uint32_t *byteOffset) {
         udata_writePadding(mem, paddingSize);
         *byteOffset += paddingSize;
     }
-    fWritten = TRUE;
+    fWritten = true;
 }
 
 void
 SResource::handleWrite(UNewDataMemory * /*mem*/, uint32_t * /*byteOffset*/) {
-    assert(FALSE);
+    assert(false);
 }
 
 void SRBRoot::write(const char *outputDir, const char *outputPkg,
@@ -996,7 +996,7 @@ void SRBRoot::write(const char *outputDir, const char *outputPkg,
     uprv_memcpy(dataInfo.formatVersion, gFormatVersions + formatVersion, sizeof(UVersionInfo));
 
     mem = udata_create(outputDir, "res", dataName,
-                       &dataInfo, (gIncludeCopyright==TRUE)? U_COPYRIGHT_STRING:NULL, &errorCode);
+                       &dataInfo, (gIncludeCopyright==true)? U_COPYRIGHT_STRING:NULL, &errorCode);
     if(U_FAILURE(errorCode)){
         return;
     }
@@ -1133,7 +1133,7 @@ struct SResource *bin_open(struct SRBRoot *bundle, const char *tag, uint32_t len
 }
 
 SRBRoot::SRBRoot(const UString *comment, UBool isPoolBundle, UErrorCode &errorCode)
-        : fRoot(NULL), fLocale(NULL), fIndexLength(0), fMaxTableLength(0), fNoFallback(FALSE),
+        : fRoot(NULL), fLocale(NULL), fIndexLength(0), fMaxTableLength(0), fNoFallback(false),
           fStringsForm(STRINGS_UTF16_V1), fIsPoolBundle(isPoolBundle),
           fKeys(NULL), fKeyMap(NULL),
           fKeysBottom(0), fKeysTop(0), fKeysCapacity(0),
@@ -1413,7 +1413,7 @@ SRBRoot::compactKeys(UErrorCode &errorCode) {
     }
     /* Sort the keys so that each one is immediately followed by all of its suffixes. */
     uprv_sortArray(map, keysCount, (int32_t)sizeof(KeyMapEntry),
-                   compareKeySuffixes, this, FALSE, &errorCode);
+                   compareKeySuffixes, this, false, &errorCode);
     /*
      * Make suffixes point into earlier, longer strings that contain them
      * and mark the old, now unused suffix bytes as deleted.
@@ -1466,7 +1466,7 @@ SRBRoot::compactKeys(UErrorCode &errorCode) {
          * to squeeze out unused bytes, and readjust the newpos offsets.
          */
         uprv_sortArray(map, keysCount, (int32_t)sizeof(KeyMapEntry),
-                       compareKeyNewpos, NULL, FALSE, &errorCode);
+                       compareKeyNewpos, NULL, false, &errorCode);
         if (U_SUCCESS(errorCode)) {
             int32_t oldpos, newpos, limit;
             oldpos = newpos = fKeysBottom;
@@ -1491,7 +1491,7 @@ SRBRoot::compactKeys(UErrorCode &errorCode) {
             fKeysTop = newpos;
             /* Re-sort once more, by old offsets for binary searching. */
             uprv_sortArray(map, keysCount, (int32_t)sizeof(KeyMapEntry),
-                           compareKeyOldpos, NULL, FALSE, &errorCode);
+                           compareKeyOldpos, NULL, false, &errorCode);
             if (U_SUCCESS(errorCode)) {
                 /* key size reduction by limit - newpos */
                 fKeyMap = map;
@@ -1550,7 +1550,7 @@ void
 StringResource::writeUTF16v2(int32_t base, UnicodeString &dest) {
     int32_t len = length();
     fRes = URES_MAKE_RESOURCE(URES_STRING_V2, base + dest.length());
-    fWritten = TRUE;
+    fWritten = true;
     switch(fNumCharsForLength) {
     case 0:
         break;
@@ -1591,7 +1591,7 @@ SRBRoot::compactStringsV2(UHashtable *stringSet, UErrorCode &errorCode) {
     }
     /* Sort the strings so that each one is immediately followed by all of its suffixes. */
     uprv_sortArray(array.getAlias(), count, (int32_t)sizeof(struct SResource **),
-                   compareStringSuffixes, NULL, FALSE, &errorCode);
+                   compareStringSuffixes, NULL, false, &errorCode);
     if (U_FAILURE(errorCode)) {
         return;
     }
@@ -1631,7 +1631,7 @@ SRBRoot::compactStringsV2(UHashtable *stringSet, UErrorCode &errorCode) {
                         if (poolStringIndex >= fPoolStringIndexLimit) {
                             fPoolStringIndexLimit = poolStringIndex + 1;
                         }
-                        suffixRes->fWritten = TRUE;
+                        suffixRes->fWritten = true;
                     }
                     res->fNumUnitsSaved += suffixRes->fNumCopies * suffixRes->get16BitStringsLength();
                 } else {
@@ -1649,7 +1649,7 @@ SRBRoot::compactStringsV2(UHashtable *stringSet, UErrorCode &errorCode) {
      * Keep as many as possible within reach of 16-bit offsets.
      */
     uprv_sortArray(array.getAlias(), count, (int32_t)sizeof(struct SResource **),
-                   compareStringLengths, NULL, FALSE, &errorCode);
+                   compareStringLengths, NULL, false, &errorCode);
     if (U_FAILURE(errorCode)) {
         return;
     }
@@ -1672,7 +1672,7 @@ SRBRoot::compactStringsV2(UHashtable *stringSet, UErrorCode &errorCode) {
             } else {
                 numUnitsNotSaved += res->fNumUnitsSaved;
                 res->fRes = URES_MAKE_EMPTY_RESOURCE(URES_STRING);
-                res->fWritten = TRUE;
+                res->fWritten = true;
             }
         }
         if (f16BitUnits.isBogus()) {
@@ -1734,7 +1734,7 @@ SRBRoot::compactStringsV2(UHashtable *stringSet, UErrorCode &errorCode) {
             if (localStringIndex >= fLocalStringIndexLimit) {
                 fLocalStringIndexLimit = localStringIndex + 1;
             }
-            res->fWritten = TRUE;
+            res->fWritten = true;
         }
     }
     // +1 to account for the initial zero in f16BitUnits
diff --git a/icu4c/source/tools/genrb/wrtjava.cpp b/icu4c/source/tools/genrb/wrtjava.cpp
index 3ad0a94cf3d..0d2ddcd25ad 100644
--- a/icu4c/source/tools/genrb/wrtjava.cpp
+++ b/icu4c/source/tools/genrb/wrtjava.cpp
@@ -324,7 +324,7 @@ static void
 string_write_java(const StringResource *res,UErrorCode *status) {
     (void)res->getKeyString(srBundle);
 
-    str_write_java(res->getBuffer(), res->length(), TRUE, status);
+    str_write_java(res->getBuffer(), res->length(), true, status);
 }
 
 static void
@@ -333,7 +333,7 @@ array_write_java(const ArrayResource *res, UErrorCode *status) {
     uint32_t  i         = 0;
     const char* arr ="new String[] { \n";
     struct SResource *current = NULL;
-    UBool allStrings    = TRUE;
+    UBool allStrings    = true;
 
     if (U_FAILURE(*status)) {
         return;
@@ -345,14 +345,14 @@ array_write_java(const ArrayResource *res, UErrorCode *status) {
         i = 0;
         while(current != NULL){
             if(!current->isString()){
-                allStrings = FALSE;
+                allStrings = false;
                 break;
             }
             current= current->fNext;
         }
 
         current = res->fFirst;
-        if(allStrings==FALSE){
+        if(allStrings==false){
             const char* object = "new Object[]{\n";
             write_tabs(out);
             T_FileStream_write(out, object, (int32_t)uprv_strlen(object));
@@ -506,7 +506,7 @@ bytes_write_java(const BinaryResource *res, UErrorCode * /*status*/) {
 
 }
 
-static UBool start = TRUE;
+static UBool start = true;
 
 static void
 table_write_java(const TableResource *res, UErrorCode *status) {
@@ -519,12 +519,12 @@ table_write_java(const TableResource *res, UErrorCode *status) {
     }
 
     if (res->fCount > 0) {
-        if(start==FALSE){
+        if(start==false){
             write_tabs(out);
             T_FileStream_write(out, obj, (int32_t)uprv_strlen(obj));
             tabCount++;
         }
-        start = FALSE;
+        start = false;
         current = res->fFirst;
         i       = 0;
 
@@ -624,10 +624,10 @@ bundle_write_java(struct SRBRoot *bundle, const char *outputDir,const char* outp
     char fileName[256] = {'\0'};
     char className[256]={'\0'};
     /*char constructor[1000] = { 0 };*/
-    /*UBool j1 =FALSE;*/
+    /*UBool j1 =false;*/
     /*outDir = outputDir;*/
 
-    start = TRUE;                        /* Reset the start indicator*/
+    start = true;                        /* Reset the start indicator*/
 
     bName = (bundleName==NULL) ? "LocaleElements" : bundleName;
     pName = (packageName==NULL)? "com.ibm.icu.impl.data" : packageName;
diff --git a/icu4c/source/tools/genrb/wrtxml.cpp b/icu4c/source/tools/genrb/wrtxml.cpp
index fa2105d908e..069f0916567 100644
--- a/icu4c/source/tools/genrb/wrtxml.cpp
+++ b/icu4c/source/tools/genrb/wrtxml.cpp
@@ -332,7 +332,7 @@ static char* convertAndEscape(char** pDest, int32_t destCap, int32_t* destLength
                     dest[destLen++]=(char)c;
                 }
             }else{
-                UBool isError = FALSE;
+                UBool isError = false;
                 U8_APPEND((unsigned char*)dest,destLen,destCap,c,isError);
                 if(isError){
                     *status = U_ILLEGAL_CHAR_FOUND;
@@ -584,7 +584,7 @@ static char *printContainer(SResource *res, const char *container, const char *r
     tabCount += 1;
     if (res->fComment.fLength > 0) {
         /* printComments will print the closing ">\n" */
-        printComments(&res->fComment, resname, TRUE, status);
+        printComments(&res->fComment, resname, true, status);
     } else {
         write_utf8_file(out, UnicodeString(">\n"));
     }
@@ -706,7 +706,7 @@ array_write_xml(ArrayResource *res, const char* id, const char* language, UError
         index += 1;
         subId = getID(sid, c, subId);
 
-        res_write_xml(current, subId, language, FALSE, status);
+        res_write_xml(current, subId, language, false, status);
         uprv_free(subId);
         subId = NULL;
 
@@ -940,7 +940,7 @@ table_write_xml(TableResource *res, const char* id, const char* language, UBool
     current = res->fFirst;
 
     while (current != NULL) {
-        res_write_xml(current, sid, language, FALSE, status);
+        res_write_xml(current, sid, language, false, status);
 
         if(U_FAILURE(*status)){
             return;
@@ -1185,7 +1185,7 @@ bundle_write_xml(struct SRBRoot *bundle, const char *outputDir,const char* outpu
     write_utf8_file(out, UnicodeString(bodyStart));
 
 
-    res_write_xml(bundle->fRoot, bundle->fLocale, lang, TRUE, status);
+    res_write_xml(bundle->fRoot, bundle->fLocale, lang, true, status);
 
     tabCount -= 1;
     write_tabs(out);
diff --git a/icu4c/source/tools/gensprep/gensprep.c b/icu4c/source/tools/gensprep/gensprep.c
index ec931c86d9e..10b0e453905 100644
--- a/icu4c/source/tools/gensprep/gensprep.c
+++ b/icu4c/source/tools/gensprep/gensprep.c
@@ -23,6 +23,7 @@
 
 #define USPREP_TYPE_NAMES_ARRAY 1
 
+#include 
 #include 
 #include 
 
@@ -44,7 +45,7 @@ U_CDECL_BEGIN
 #include "gensprep.h"
 U_CDECL_END
 
-UBool beVerbose=FALSE, haveCopyright=TRUE;
+UBool beVerbose=false, haveCopyright=true;
 
 #define NORM_CORRECTIONS_FILE_NAME "NormalizationCorrections.txt"
 
@@ -225,7 +226,7 @@ main(int argc, char* argv[]) {
 
     /* process the file */
     uprv_strcpy(basename,inputFileName);
-    parseMappings(filename,FALSE, &errorCode);
+    parseMappings(filename,false, &errorCode);
     if(U_FAILURE(errorCode)) {
         fprintf(stderr, "Could not open file %s for reading. Error: %s \n", filename, u_errorName(errorCode));
         return errorCode;
@@ -362,12 +363,12 @@ strprepProfileLineFn(void *context,
         length = (int32_t)(fields[0][1] - s);
         if (length >= NORMALIZE_DIRECTIVE_LEN
             && uprv_strncmp(s, NORMALIZE_DIRECTIVE, NORMALIZE_DIRECTIVE_LEN) == 0) {
-            options[NORMALIZE].doesOccur = TRUE;
+            options[NORMALIZE].doesOccur = true;
             return;
         }
         else if (length >= CHECK_BIDI_DIRECTIVE_LEN
             && uprv_strncmp(s, CHECK_BIDI_DIRECTIVE, CHECK_BIDI_DIRECTIVE_LEN) == 0) {
-            options[CHECK_BIDI].doesOccur = TRUE;
+            options[CHECK_BIDI].doesOccur = true;
             return;
         }
         else {
diff --git a/icu4c/source/tools/gensprep/store.c b/icu4c/source/tools/gensprep/store.c
index dadd4a87650..c3712febb4c 100644
--- a/icu4c/source/tools/gensprep/store.c
+++ b/icu4c/source/tools/gensprep/store.c
@@ -17,6 +17,7 @@
 *
 */
 
+#include 
 #include 
 #include 
 #include "unicode/utypes.h"
@@ -203,7 +204,7 @@ init() {
     sprepTrie = (UNewTrie *)uprv_calloc(1, sizeof(UNewTrie));
 
     /* initialize the two tries */
-    if(NULL==utrie_open(sprepTrie, NULL, MAX_DATA_LENGTH, 0, 0, FALSE)) {
+    if(NULL==utrie_open(sprepTrie, NULL, MAX_DATA_LENGTH, 0, 0, false)) {
         fprintf(stderr, "error: failed to initialize tries\n");
         exit(U_MEMORY_ALLOCATION_ERROR);
     }
@@ -517,7 +518,7 @@ storeRange(uint32_t start, uint32_t end, UStringPrepType type, UErrorCode* statu
             exit(U_ILLEGAL_ARGUMENT_ERROR);
         }
     }else{
-        if(!utrie_setRange32(sprepTrie, start, end+1, trieWord, FALSE)){
+        if(!utrie_setRange32(sprepTrie, start, end+1, trieWord, false)){
             fprintf(stderr,"Value for certain codepoint already set.\n");
             exit(U_ILLEGAL_CHAR_FOUND);
         }
@@ -569,7 +570,7 @@ generateData(const char *dataDir, const char* bundleName) {
     /* sort and add mapping data */
     storeMappingData();
 
-    sprepTrieSize=utrie_serialize(sprepTrie, sprepTrieBlock, sizeof(sprepTrieBlock), getFoldedValue, TRUE, &errorCode);
+    sprepTrieSize=utrie_serialize(sprepTrie, sprepTrieBlock, sizeof(sprepTrieBlock), getFoldedValue, true, &errorCode);
     if(U_FAILURE(errorCode)) {
         fprintf(stderr, "error: utrie_serialize(sprep trie) failed, %s\n", u_errorName(errorCode));
         exit(errorCode);
diff --git a/icu4c/source/tools/icuexportdata/icuexportdata.cpp b/icu4c/source/tools/icuexportdata/icuexportdata.cpp
index a167b277f40..cafdfb8847c 100644
--- a/icu4c/source/tools/icuexportdata/icuexportdata.cpp
+++ b/icu4c/source/tools/icuexportdata/icuexportdata.cpp
@@ -34,10 +34,10 @@ U_NAMESPACE_USE
 /*
  * Global - verbosity
  */
-UBool VERBOSE = FALSE;
-UBool QUIET = FALSE;
+UBool VERBOSE = false;
+UBool QUIET = false;
 
-UBool haveCopyright = TRUE;
+UBool haveCopyright = true;
 UCPTrieType trieType = UCPTRIE_TYPE_SMALL;
 const char* destdir = "";
 
@@ -506,21 +506,21 @@ const uint32_t NON_ROUND_TRIP_MARKER = 1;
 
 UBool permissibleBmpPair(UBool knownToRoundTrip, UChar32 c, UChar32 second) {
     if (knownToRoundTrip) {
-        return TRUE;
+        return true;
     }
     // Nuktas, Hebrew presentation forms and polytonic Greek with oxia
     // are special-cased in ICU4X.
     if (c >= 0xFB1D && c <= 0xFB4E) {
         // Hebrew presentation forms
-        return TRUE;
+        return true;
     }
     if (c >= 0x1F71 && c <= 0x1FFB) {
         // Polytonic Greek with oxia
-        return TRUE;
+        return true;
     }
     if ((second & 0x7F) == 0x3C && second >= 0x0900 && second <= 0x0BFF) {
         // Nukta
-        return TRUE;
+        return true;
     }
     // To avoid more branchiness, 4 characters that decompose to
     // a BMP starter followed by a BMP non-starter are excluded
@@ -530,7 +530,7 @@ UBool permissibleBmpPair(UBool knownToRoundTrip, UChar32 c, UChar32 second) {
     // U+0F78 TIBETAN VOWEL SIGN VOCALIC L
     // U+212B ANGSTROM SIGN
     // U+2ADC FORKING
-    return FALSE;
+    return false;
 }
 
 // Computes data for canonical decompositions
@@ -601,7 +601,7 @@ void computeDecompositions(const char* basename,
         // True if we're building non-NFD or we're building NFD but
         // the `c` round trips to NFC.
         // False if we're building NFD and `c` does not round trip to NFC.
-        UBool nonNfdOrRoundTrips = TRUE;
+        UBool nonNfdOrRoundTrips = true;
         src.append(c);
         if (mainNormalizer != nfdNormalizer) {
             UnicodeString inter;
@@ -690,7 +690,7 @@ void computeDecompositions(const char* basename,
         } else {
             if (src == dst) {
                 if (startsWithBackwardCombiningStarter) {
-                    pendingTrieInsertions.push_back({c, BACKWARD_COMBINING_STARTER_MARKER << 16, FALSE});
+                    pendingTrieInsertions.push_back({c, BACKWARD_COMBINING_STARTER_MARKER << 16, false});
                 }
                 continue;
             }
@@ -760,7 +760,7 @@ void computeDecompositions(const char* basename,
                     handleError(status, basename);
                 }
             }
-            pendingTrieInsertions.push_back({c, uint32_t(utf32[0]) << 16, FALSE});
+            pendingTrieInsertions.push_back({c, uint32_t(utf32[0]) << 16, false});
         } else if (len == 2 &&
                    utf32[0] <= 0xFFFF &&
                    utf32[1] <= 0xFFFF &&
@@ -779,15 +779,15 @@ void computeDecompositions(const char* basename,
                 status.set(U_INTERNAL_PROGRAM_ERROR);
                 handleError(status, basename);
             }
-            pendingTrieInsertions.push_back({c, (uint32_t(utf32[0]) << 16) | uint32_t(utf32[1]), FALSE});
+            pendingTrieInsertions.push_back({c, (uint32_t(utf32[0]) << 16) | uint32_t(utf32[1]), false});
         } else {
             if (startsWithBackwardCombiningStarter) {
                 status.set(U_INTERNAL_PROGRAM_ERROR);
                 handleError(status, basename);
             }
 
-            UBool supplementary = FALSE;
-            UBool nonInitialStarter = FALSE;
+            UBool supplementary = false;
+            UBool nonInitialStarter = false;
             for (int32_t i = 0; i < len; ++i) {
                 if (((utf32[i] == 0x0345) && (uprv_strcmp(basename, "uts46d") == 0)) || utf32[i] == 0xFF9E || utf32[i] == 0xFF9F) {
                     // Assert that iota subscript and half-width voicing marks never occur in these
@@ -797,14 +797,14 @@ void computeDecompositions(const char* basename,
                 }
 
                 if (utf32[i] > 0xFFFF) {
-                    supplementary = TRUE;
+                    supplementary = true;
                 }
                 if (utf32[i] == 0) {
                     status.set(U_INTERNAL_PROGRAM_ERROR);
                     handleError(status, basename);
                 }
                 if (i != 0 && !u_getCombiningClass(utf32[i])) {
-                    nonInitialStarter = TRUE;
+                    nonInitialStarter = true;
                 }
             }
             if (!supplementary) {
@@ -850,13 +850,13 @@ void computeDecompositions(const char* basename,
                 handleError(status, basename);
             }
             size_t index = 0;
-            bool writeToStorage = FALSE;
+            bool writeToStorage = false;
             // Sadly, C++ lacks break and continue by label, so using goto in the
             // inner loops to break or continue the outer loop.
             if (!supplementary) {
                 outer16: for (;;) {
                     if (index == storage16.size()) {
-                        writeToStorage = TRUE;
+                        writeToStorage = true;
                         break;
                     }
                     if (storage16[index] == utf32[0]) {
@@ -875,7 +875,7 @@ void computeDecompositions(const char* basename,
             } else {
                 outer32: for (;;) {
                     if (index == storage32.size()) {
-                        writeToStorage = TRUE;
+                        writeToStorage = true;
                         break;
                     }
                     if (storage32[index] == uint32_t(utf32[0])) {
@@ -1130,7 +1130,7 @@ addRangeToUCPTrie(const void* context, UChar32 start, UChar32 end, uint32_t valu
     umutablecptrie_setRange(ucptrie, start, end, value, status);
     handleError(status, "setRange");
 
-    return TRUE;
+    return true;
 }
 
 int exportCase(int argc, char* argv[]) {
diff --git a/icu4c/source/tools/icuinfo/icuinfo.cpp b/icu4c/source/tools/icuinfo/icuinfo.cpp
index 517c977e1e4..a3c1f5513d8 100644
--- a/icu4c/source/tools/icuinfo/icuinfo.cpp
+++ b/icu4c/source/tools/icuinfo/icuinfo.cpp
@@ -49,19 +49,19 @@ static UOption options[]={
 };
 
 static UErrorCode initStatus = U_ZERO_ERROR;
-static UBool icuInitted = FALSE;
+static UBool icuInitted = false;
 
 static void do_init() {
     if(!icuInitted) {
       u_init(&initStatus);
-      icuInitted = TRUE;
+      icuInitted = true;
     }
 }
 
 static void do_cleanup() {
   if (icuInitted) {
     u_cleanup();
-    icuInitted = FALSE;
+    icuInitted = false;
   }
 }
 
@@ -232,7 +232,7 @@ void cmd_listplugins() {
 extern int
 main(int argc, char* argv[]) {
     UErrorCode errorCode = U_ZERO_ERROR;
-    UBool didSomething = FALSE;
+    UBool didSomething = false;
     
     /* preset then read command line options */
     argc=u_parseArgs(argc, argv, UPRV_LENGTHOF(options), options);
@@ -267,16 +267,16 @@ main(int argc, char* argv[]) {
 
     if(options[5].doesOccur) {
       cmd_millis();
-      didSomething=TRUE;
+      didSomething=true;
     } 
     if(options[4].doesOccur) {
       cmd_listplugins();
-      didSomething = TRUE;
+      didSomething = true;
     }
 
     if(options[3].doesOccur) {
-      cmd_version(FALSE, errorCode);
-      didSomething = TRUE;
+      cmd_version(false, errorCode);
+      didSomething = true;
     }
 
     if(options[7].doesOccur) {  /* 2nd part of version: cleanup */
@@ -289,16 +289,16 @@ main(int argc, char* argv[]) {
       fprintf(out, "\n");
       udbg_writeIcuInfo(out);
       fclose(out);
-      didSomething = TRUE;
+      didSomething = true;
     }
 
     if(options[6].doesOccur) {  /* 2nd part of version: cleanup */
       cmd_cleanup();
-      didSomething = TRUE;
+      didSomething = true;
     }
 
     if(!didSomething) {
-      cmd_version(FALSE, errorCode);  /* at least print the version # */
+      cmd_version(false, errorCode);  /* at least print the version # */
     }
 
     do_cleanup();
diff --git a/icu4c/source/tools/icuinfo/testplug.c b/icu4c/source/tools/icuinfo/testplug.c
index 011a2b2159b..8b48bc66d46 100644
--- a/icu4c/source/tools/icuinfo/testplug.c
+++ b/icu4c/source/tools/icuinfo/testplug.c
@@ -24,6 +24,7 @@
 #if UCONFIG_ENABLE_PLUGINS
 /* This file isn't usually compiled except on Windows. Guard it. */
 
+#include 
 #include  /* for fprintf */
 #include  /* for malloc */
 #include "udbgutil.h"
@@ -202,7 +203,7 @@ UPlugTokenReturn U_EXPORT2 debugMemoryPlugin (
         fprintf(stderr, "MEM: status now %s\n", u_errorName(*status));
     } else if(reason==UPLUG_REASON_UNLOAD) {
         fprintf(stderr, "MEM: not possible to unload this plugin (no way to reset memory functions)...\n");
-        uplug_setPlugNoUnload(data, TRUE);
+        uplug_setPlugNoUnload(data, true);
     }
 
     return UPLUG_TOKEN;
diff --git a/icu4c/source/tools/icupkg/icupkg.cpp b/icu4c/source/tools/icupkg/icupkg.cpp
index 39707946b09..a12e956d199 100644
--- a/icu4c/source/tools/icupkg/icupkg.cpp
+++ b/icu4c/source/tools/icupkg/icupkg.cpp
@@ -278,7 +278,7 @@ main(int argc, char *argv[]) {
     argc=u_parseArgs(argc, argv, UPRV_LENGTHOF(options), options);
     isHelp=options[OPT_HELP_H].doesOccur || options[OPT_HELP_QUESTION_MARK].doesOccur;
     if(isHelp) {
-        printUsage(pname, TRUE);
+        printUsage(pname, true);
         return U_ZERO_ERROR;
     }
 
@@ -287,7 +287,7 @@ main(int argc, char *argv[]) {
         fprintf(stderr, "icupkg: not enough memory\n");
         return U_MEMORY_ALLOCATION_ERROR;
     }
-    isModified=FALSE;
+    isModified=false;
 
     int autoPrefix=0;
     if(options[OPT_AUTO_TOC_PREFIX].doesOccur) {
@@ -297,14 +297,14 @@ main(int argc, char *argv[]) {
     if(options[OPT_AUTO_TOC_PREFIX_WITH_TYPE].doesOccur) {
         if(options[OPT_TOC_PREFIX].doesOccur) {
             fprintf(stderr, "icupkg: --auto_toc_prefix_with_type and also --toc_prefix\n");
-            printUsage(pname, FALSE);
+            printUsage(pname, false);
             return U_ILLEGAL_ARGUMENT_ERROR;
         }
         pkg->setAutoPrefixWithType();
         ++autoPrefix;
     }
     if(argc<2 || 31) {
-        printUsage(pname, FALSE);
+        printUsage(pname, false);
         return U_ILLEGAL_ARGUMENT_ERROR;
     }
 
@@ -324,27 +324,27 @@ main(int argc, char *argv[]) {
     if(0==strcmp(argv[1], "new")) {
         if(autoPrefix) {
             fprintf(stderr, "icupkg: --auto_toc_prefix[_with_type] but no input package\n");
-            printUsage(pname, FALSE);
+            printUsage(pname, false);
             return U_ILLEGAL_ARGUMENT_ERROR;
         }
         inFilename=NULL;
-        isPackage=TRUE;
+        isPackage=true;
     } else {
         inFilename=argv[1];
         if(isPackageName(inFilename)) {
             pkg->readPackage(inFilename);
-            isPackage=TRUE;
+            isPackage=true;
         } else {
             /* swap a single file (icuswap replacement) rather than work on a package */
             pkg->addFile(sourcePath, inFilename);
-            isPackage=FALSE;
+            isPackage=false;
         }
     }
 
     if(argc>=3) {
         outFilename=argv[2];
         if(0!=strcmp(argv[1], argv[2])) {
-            isModified=TRUE;
+            isModified=true;
         }
     } else if(isPackage) {
         outFilename=NULL;
@@ -358,7 +358,7 @@ main(int argc, char *argv[]) {
         const char *type=options[OPT_OUT_TYPE].value;
         if(type[0]==0 || type[1]!=0) {
             /* the type must be exactly one letter */
-            printUsage(pname, FALSE);
+            printUsage(pname, false);
             return U_ILLEGAL_ARGUMENT_ERROR;
         }
         outType=type[0];
@@ -368,7 +368,7 @@ main(int argc, char *argv[]) {
         case 'e':
             break;
         default:
-            printUsage(pname, FALSE);
+            printUsage(pname, false);
             return U_ILLEGAL_ARGUMENT_ERROR;
         }
 
@@ -386,7 +386,7 @@ main(int argc, char *argv[]) {
     }
 
     if(options[OPT_WRITEPKG].doesOccur) {
-        isModified=TRUE;
+        isModified=true;
     }
 
     if(!isPackage) {
@@ -402,7 +402,7 @@ main(int argc, char *argv[]) {
             options[OPT_EXTRACT_LIST].doesOccur ||
             options[OPT_LIST_ITEMS].doesOccur
         ) {
-            printUsage(pname, FALSE);
+            printUsage(pname, false);
             return U_ILLEGAL_ARGUMENT_ERROR;
         }
         if(isModified) {
@@ -427,7 +427,7 @@ main(int argc, char *argv[]) {
         if(0==strcmp(options[OPT_MATCHMODE].value, "noslash")) {
             pkg->setMatchMode(Package::MATCH_NOSLASH);
         } else {
-            printUsage(pname, FALSE);
+            printUsage(pname, false);
             return U_ILLEGAL_ARGUMENT_ERROR;
         }
     }
@@ -439,12 +439,12 @@ main(int argc, char *argv[]) {
             fprintf(stderr, "icupkg: not enough memory\n");
             exit(U_MEMORY_ALLOCATION_ERROR);
         }
-        if(readList(NULL, options[OPT_REMOVE_LIST].value, FALSE, listPkg)) {
+        if(readList(NULL, options[OPT_REMOVE_LIST].value, false, listPkg)) {
             pkg->removeItems(*listPkg);
             delete listPkg;
-            isModified=TRUE;
+            isModified=true;
         } else {
-            printUsage(pname, FALSE);
+            printUsage(pname, false);
             return U_ILLEGAL_ARGUMENT_ERROR;
         }
     }
@@ -461,12 +461,12 @@ main(int argc, char *argv[]) {
             fprintf(stderr, "icupkg: not enough memory\n");
             exit(U_MEMORY_ALLOCATION_ERROR);
         }
-        if(readList(sourcePath, options[OPT_ADD_LIST].value, TRUE, addListPkg)) {
+        if(readList(sourcePath, options[OPT_ADD_LIST].value, true, addListPkg)) {
             pkg->addItems(*addListPkg);
             // delete addListPkg; deferred until after writePackage()
-            isModified=TRUE;
+            isModified=true;
         } else {
-            printUsage(pname, FALSE);
+            printUsage(pname, false);
             return U_ILLEGAL_ARGUMENT_ERROR;
         }
     }
@@ -478,11 +478,11 @@ main(int argc, char *argv[]) {
             fprintf(stderr, "icupkg: not enough memory\n");
             exit(U_MEMORY_ALLOCATION_ERROR);
         }
-        if(readList(NULL, options[OPT_EXTRACT_LIST].value, FALSE, listPkg)) {
+        if(readList(NULL, options[OPT_EXTRACT_LIST].value, false, listPkg)) {
             pkg->extractItems(destPath, *listPkg, outType);
             delete listPkg;
         } else {
-            printUsage(pname, FALSE);
+            printUsage(pname, false);
             return U_ILLEGAL_ARGUMENT_ERROR;
         }
     }
diff --git a/icu4c/source/tools/icuswap/icuswap.cpp b/icu4c/source/tools/icuswap/icuswap.cpp
index 228554c8167..92c2d603d24 100644
--- a/icu4c/source/tools/icuswap/icuswap.cpp
+++ b/icu4c/source/tools/icuswap/icuswap.cpp
@@ -141,23 +141,23 @@ main(int argc, char *argv[]) {
     data=(char *)options[OPT_OUT_TYPE].value;
     if(data[0]==0 || data[1]!=0) {
         /* the type must be exactly one letter */
-        return printUsage(pname, FALSE);
+        return printUsage(pname, false);
     }
     switch(data[0]) {
     case 'l':
-        outIsBigEndian=FALSE;
+        outIsBigEndian=false;
         outCharset=U_ASCII_FAMILY;
         break;
     case 'b':
-        outIsBigEndian=TRUE;
+        outIsBigEndian=true;
         outCharset=U_ASCII_FAMILY;
         break;
     case 'e':
-        outIsBigEndian=TRUE;
+        outIsBigEndian=true;
         outCharset=U_EBCDIC_FAMILY;
         break;
     default:
-        return printUsage(pname, FALSE);
+        return printUsage(pname, false);
     }
 
     in=out=NULL;
@@ -475,7 +475,7 @@ udata_swapPackage(const char *inFilename, const char *outFilename,
         /* swap the package names into the output charset */
         if(ds->outCharset!=U_CHARSET_FAMILY) {
             UDataSwapper *ds2;
-            ds2=udata_openSwapper(TRUE, U_CHARSET_FAMILY, TRUE, ds->outCharset, pErrorCode);
+            ds2=udata_openSwapper(true, U_CHARSET_FAMILY, true, ds->outCharset, pErrorCode);
             ds2->swapInvChars(ds2, inPkgName, inPkgNameLength, inPkgName, pErrorCode);
             ds2->swapInvChars(ds2, outPkgName, outPkgNameLength, outPkgName, pErrorCode);
             udata_closeSwapper(ds2);
@@ -581,7 +581,7 @@ udata_swapPackage(const char *inFilename, const char *outFilename,
             offset=table[0].inOffset;
             /* sort the TOC entries */
             uprv_sortArray(table, (int32_t)itemCount, (int32_t)sizeof(ToCEntry),
-                           compareToCEntries, outBytes, FALSE, pErrorCode);
+                           compareToCEntries, outBytes, false, pErrorCode);
 
             /*
              * Note: Before sorting, the inOffset values were in order.
diff --git a/icu4c/source/tools/makeconv/gencnvex.c b/icu4c/source/tools/makeconv/gencnvex.c
index 726a1e5a86d..837a2d2c50b 100644
--- a/icu4c/source/tools/makeconv/gencnvex.c
+++ b/icu4c/source/tools/makeconv/gencnvex.c
@@ -16,6 +16,7 @@
 *   created by: Markus W. Scherer
 */
 
+#include 
 #include 
 #include "unicode/utypes.h"
 #include "unicode/ustring.h"
@@ -111,7 +112,7 @@ CnvExtIsValid(NewConverter *cnvData,
     (void)cnvData;
     (void)bytes;
     (void)length;
-    return FALSE;
+    return false;
 }
 
 static uint32_t
@@ -463,7 +464,7 @@ generateToUTable(CnvExtData *extData, UCMTable *table,
 
     if(count>=0x100) {
         fprintf(stderr, "error: toUnicode extension table section overflow: %ld section entries\n", (long)count);
-        return FALSE;
+        return false;
     }
 
     /* allocate the section: 1 entry for the header + count for the items */
@@ -523,7 +524,7 @@ generateToUTable(CnvExtData *extData, UCMTable *table,
                 fprintf(stderr, "error: multiple mappings from same bytes\n");
                 ucm_printMapping(table, m, stderr);
                 ucm_printMapping(table, mappings+map[subStart], stderr);
-                return FALSE;
+                return false;
             }
 
             defaultValue=getToUnicodeValue(extData, table, m);
@@ -538,11 +539,11 @@ generateToUTable(CnvExtData *extData, UCMTable *table,
 
             /* recurse */
             if(!generateToUTable(extData, table, subStart, subLimit, unitIndex+1, defaultValue)) {
-                return FALSE;
+                return false;
             }
         }
     }
-    return TRUE;
+    return true;
 }
 
 /*
@@ -796,7 +797,7 @@ generateFromUTable(CnvExtData *extData, UCMTable *table,
                 fprintf(stderr, "error: multiple mappings from same Unicode code points\n");
                 ucm_printMapping(table, m, stderr);
                 ucm_printMapping(table, mappings+map[subStart], stderr);
-                return FALSE;
+                return false;
             }
 
             defaultValue=getFromUBytesValue(extData, table, m);
@@ -811,11 +812,11 @@ generateFromUTable(CnvExtData *extData, UCMTable *table,
 
             /* recurse */
             if(!generateFromUTable(extData, table, subStart, subLimit, unitIndex+1, defaultValue)) {
-                return FALSE;
+                return false;
             }
         }
     }
-    return TRUE;
+    return true;
 }
 
 /*
@@ -941,7 +942,7 @@ generateFromUTrie(CnvExtData *extData, UCMTable *table, int32_t mapLength) {
     UChar32 c, next;
 
     if(mapLength==0) {
-        return TRUE;
+        return true;
     }
 
     mappings=table->mappings;
@@ -984,7 +985,7 @@ generateFromUTrie(CnvExtData *extData, UCMTable *table, int32_t mapLength) {
                 fprintf(stderr, "error: multiple mappings from same Unicode code points\n");
                 ucm_printMapping(table, m, stderr);
                 ucm_printMapping(table, mappings+map[subStart], stderr);
-                return FALSE;
+                return false;
             }
 
             value=getFromUBytesValue(extData, table, m);
@@ -999,11 +1000,11 @@ generateFromUTrie(CnvExtData *extData, UCMTable *table, int32_t mapLength) {
 
             /* recurse, starting from 16-bit-unit index 2, the first 16-bit unit after c */
             if(!generateFromUTable(extData, table, subStart, subLimit, 2, value)) {
-                return FALSE;
+                return false;
             }
         }
     }
-    return TRUE;
+    return true;
 }
 
 /*
@@ -1039,7 +1040,7 @@ makeFromUTable(CnvExtData *extData, UCMTable *table) {
     utm_alloc(extData->fromUTableValues);
 
     if(!generateFromUTrie(extData, table, fromUCount)) {
-        return FALSE;
+        return false;
     }
 
     /*
@@ -1052,7 +1053,7 @@ makeFromUTable(CnvExtData *extData, UCMTable *table) {
         stage1[i]=(uint16_t)(stage1[i]+stage1Top);
     }
 
-    return TRUE;
+    return true;
 }
 
 /* -------------------------------------------------------------------------- */
@@ -1063,7 +1064,7 @@ CnvExtAddTable(NewConverter *cnvData, UCMTable *table, UConverterStaticData *sta
 
     if(table->unicodeMask&UCNV_HAS_SURROGATES) {
         fprintf(stderr, "error: contains mappings for surrogate code points\n");
-        return FALSE;
+        return false;
     }
 
     staticData->conversionType=UCNV_MBCS;
diff --git a/icu4c/source/tools/makeconv/genmbcs.cpp b/icu4c/source/tools/makeconv/genmbcs.cpp
index 488af477da0..138d254d291 100644
--- a/icu4c/source/tools/makeconv/genmbcs.cpp
+++ b/icu4c/source/tools/makeconv/genmbcs.cpp
@@ -138,14 +138,14 @@ MBCSGetDummy() {
     /*
      * Set "pessimistic" values which may sometimes move too many
      * mappings to the extension table (but never too few).
-     * These values cause MBCSOkForBaseFromUnicode() to return FALSE for the
+     * These values cause MBCSOkForBaseFromUnicode() to return false for the
      * largest set of mappings.
      * Assume maxCharLength>1.
      */
-    gDummy.utf8Friendly=TRUE;
+    gDummy.utf8Friendly=true;
     if(SMALL) {
         gDummy.utf8Max=0xffff;
-        gDummy.omitFromU=TRUE;
+        gDummy.omitFromU=true;
     } else {
         gDummy.utf8Max=MBCS_UTF8_MAX;
     }
@@ -212,7 +212,7 @@ MBCSStartMappings(MBCSData *mbcsData) {
         if(mbcsData->unicodeCodeUnits==NULL) {
             fprintf(stderr, "error: out of memory allocating %ld 16-bit code units\n",
                 (long)sum);
-            return FALSE;
+            return false;
         }
         for(i=0; iunicodeCodeUnits[i]=0xfffe;
@@ -233,7 +233,7 @@ MBCSStartMappings(MBCSData *mbcsData) {
     mbcsData->fromUBytes=(uint8_t *)uprv_malloc(sum);
     if(mbcsData->fromUBytes==NULL) {
         fprintf(stderr, "error: out of memory allocating %ld B for target mappings\n", (long)sum);
-        return FALSE;
+        return false;
     }
     uprv_memset(mbcsData->fromUBytes, 0, sum);
 
@@ -316,28 +316,28 @@ MBCSStartMappings(MBCSData *mbcsData) {
      */
     mbcsData->stage3Top=(stage3NullLength+stage3AllocLength)*maxCharLength; /* ==sum*maxCharLength */
 
-    return TRUE;
+    return true;
 }
 
-/* return TRUE for success */
+/* return true for success */
 static UBool
 setFallback(MBCSData *mbcsData, uint32_t offset, UChar32 c) {
     int32_t i=ucm_findFallback(mbcsData->toUFallbacks, mbcsData->countToUFallbacks, offset);
     if(i>=0) {
         /* if there is already a fallback for this offset, then overwrite it */
         mbcsData->toUFallbacks[i].codePoint=c;
-        return TRUE;
+        return true;
     } else {
         /* if there is no fallback for this offset, then add one */
         i=mbcsData->countToUFallbacks;
         if(i>=MBCS_MAX_FALLBACK_COUNT) {
             fprintf(stderr, "error: too many toUnicode fallbacks, currently at: U+%x\n", (int)c);
-            return FALSE;
+            return false;
         } else {
             mbcsData->toUFallbacks[i].offset=offset;
             mbcsData->toUFallbacks[i].codePoint=c;
             mbcsData->countToUFallbacks=i+1;
-            return TRUE;
+            return true;
         }
     }
 }
@@ -366,8 +366,8 @@ removeFallback(MBCSData *mbcsData, uint32_t offset) {
 
 /*
  * isFallback is almost a boolean:
- * 1 (TRUE)  this is a fallback mapping
- * 0 (FALSE) this is a precise mapping
+ * 1 (true)  this is a fallback mapping
+ * 0 (false) this is a precise mapping
  * -1        the precision of this mapping is not specified
  */
 static UBool
@@ -382,7 +382,7 @@ MBCSAddToUnicode(MBCSData *mbcsData,
 
     if(mbcsData->ucm->states.countStates==0) {
         fprintf(stderr, "error: there is no state information!\n");
-        return FALSE;
+        return false;
     }
 
     /* for SI/SO (like EBCDIC-stateful), double-byte sequences start in state 1 */
@@ -401,7 +401,7 @@ MBCSAddToUnicode(MBCSData *mbcsData,
             if(i==length) {
                 fprintf(stderr, "error: byte sequence too short, ends in non-final state %hu: 0x%s (U+%x)\n",
                     (short)state, printBytes(buffer, bytes, length), (int)c);
-                return FALSE;
+                return false;
             }
             state=(uint8_t)MBCS_ENTRY_TRANSITION_STATE(entry);
             offset+=MBCS_ENTRY_TRANSITION_OFFSET(entry);
@@ -409,21 +409,21 @@ MBCSAddToUnicode(MBCSData *mbcsData,
             if(i0x%s\n",
                     (int)c, printBytes(buffer, bytes, length));
-                return FALSE;
+                return false;
             case MBCS_STATE_CHANGE_ONLY:
                 fprintf(stderr, "error: byte sequence ends in state-change-only at U+%04x<->0x%s\n",
                     (int)c, printBytes(buffer, bytes, length));
-                return FALSE;
+                return false;
             case MBCS_STATE_UNASSIGNED:
                 fprintf(stderr, "error: byte sequence ends in unassigned state at U+%04x<->0x%s\n",
                     (int)c, printBytes(buffer, bytes, length));
-                return FALSE;
+                return false;
             case MBCS_STATE_FALLBACK_DIRECT_16:
             case MBCS_STATE_VALID_DIRECT_16:
             case MBCS_STATE_FALLBACK_DIRECT_20:
@@ -438,7 +438,7 @@ MBCSAddToUnicode(MBCSData *mbcsData,
                     if(flag>=0) {
                         fprintf(stderr, "error: duplicate codepage byte sequence at U+%04x<->0x%s see U+%04x\n",
                             (int)c, printBytes(buffer, bytes, length), (int)old);
-                        return FALSE;
+                        return false;
                     } else if(VERBOSE) {
                         fprintf(stderr, "duplicate codepage byte sequence at U+%04x<->0x%s see U+%04x\n",
                             (int)c, printBytes(buffer, bytes, length), (int)old);
@@ -468,7 +468,7 @@ MBCSAddToUnicode(MBCSData *mbcsData,
                     if(flag>=0) {
                         fprintf(stderr, "error: duplicate codepage byte sequence at U+%04x<->0x%s see U+%04x\n",
                             (int)c, printBytes(buffer, bytes, length), (int)old);
-                        return FALSE;
+                        return false;
                     } else if(VERBOSE) {
                         fprintf(stderr, "duplicate codepage byte sequence at U+%04x<->0x%s see U+%04x\n",
                             (int)c, printBytes(buffer, bytes, length), (int)old);
@@ -477,7 +477,7 @@ MBCSAddToUnicode(MBCSData *mbcsData,
                 if(c>=0x10000) {
                     fprintf(stderr, "error: code point does not fit into valid-16-bit state at U+%04x<->0x%s\n",
                         (int)c, printBytes(buffer, bytes, length));
-                    return FALSE;
+                    return false;
                 }
                 if(flag>0) {
                     /* assign only if there is no precise mapping */
@@ -506,7 +506,7 @@ MBCSAddToUnicode(MBCSData *mbcsData,
                     if(flag>=0) {
                         fprintf(stderr, "error: duplicate codepage byte sequence at U+%04x<->0x%s see U+%04x\n",
                             (int)c, printBytes(buffer, bytes, length), (int)real);
-                        return FALSE;
+                        return false;
                     } else if(VERBOSE) {
                         fprintf(stderr, "duplicate codepage byte sequence at U+%04x<->0x%s see U+%04x\n",
                             (int)c, printBytes(buffer, bytes, length), (int)real);
@@ -544,10 +544,10 @@ MBCSAddToUnicode(MBCSData *mbcsData,
                 /* reserved, must never occur */
                 fprintf(stderr, "internal error: byte sequence reached reserved action code, entry 0x%02x: 0x%s (U+%x)\n",
                     (int)entry, printBytes(buffer, bytes, length), (int)c);
-                return FALSE;
+                return false;
             }
 
-            return TRUE;
+            return true;
         }
     }
 }
@@ -576,7 +576,7 @@ MBCSSingleAddFromUnicode(MBCSData *mbcsData,
 
     /* ignore |2 SUB mappings */
     if(flag==2) {
-        return TRUE;
+        return true;
     }
 
     /*
@@ -608,7 +608,7 @@ MBCSSingleAddFromUnicode(MBCSData *mbcsData,
 
         if(newTop>MBCS_MAX_STAGE_2_TOP) {
             fprintf(stderr, "error: too many stage 2 entries at U+%04x<->0x%02x\n", (int)c, b);
-            return FALSE;
+            return false;
         }
 
         /*
@@ -642,7 +642,7 @@ MBCSSingleAddFromUnicode(MBCSData *mbcsData,
 
         if(newTop>MBCS_STAGE_3_SBCS_SIZE) {
             fprintf(stderr, "error: too many code points at U+%04x<->0x%02x\n", (int)c, b);
-            return FALSE;
+            return false;
         }
         /* each block has 16 uint16_t entries */
         i=idx;
@@ -669,7 +669,7 @@ MBCSSingleAddFromUnicode(MBCSData *mbcsData,
         if(flag>=0) {
             fprintf(stderr, "error: duplicate Unicode code point at U+%04x<->0x%02x see 0x%02x\n",
                 (int)c, b, old&0xff);
-            return FALSE;
+            return false;
         } else if(VERBOSE) {
             fprintf(stderr, "duplicate Unicode code point at U+%04x<->0x%02x see 0x%02x\n",
                 (int)c, b, old&0xff);
@@ -677,7 +677,7 @@ MBCSSingleAddFromUnicode(MBCSData *mbcsData,
         /* continue after the above warning if the precision of the mapping is unspecified */
     }
 
-    return TRUE;
+    return true;
 }
 
 static UBool
@@ -700,13 +700,13 @@ MBCSAddFromUnicode(MBCSData *mbcsData,
     ) {
         fprintf(stderr, "error: illegal mapping to SI or SO for SI/SO codepage: U+%04x<->0x%s\n",
             (int)c, printBytes(buffer, bytes, length));
-        return FALSE;
+        return false;
     }
 
     if(flag==1 && length==1 && *bytes==0) {
         fprintf(stderr, "error: unable to encode a |1 fallback from U+%04x to 0x%02x\n",
             (int)c, *bytes);
-        return FALSE;
+        return false;
     }
 
     /*
@@ -739,7 +739,7 @@ MBCSAddFromUnicode(MBCSData *mbcsData,
         if(newTop>MBCS_MAX_STAGE_2_TOP) {
             fprintf(stderr, "error: too many stage 2 entries at U+%04x<->0x%s\n",
                 (int)c, printBytes(buffer, bytes, length));
-            return FALSE;
+            return false;
         }
 
         /*
@@ -787,7 +787,7 @@ MBCSAddFromUnicode(MBCSData *mbcsData,
         if(newTop>MBCS_STAGE_3_MBCS_SIZE*(uint32_t)maxCharLength) {
             fprintf(stderr, "error: too many code points at U+%04x<->0x%s\n",
                 (int)c, printBytes(buffer, bytes, length));
-            return FALSE;
+            return false;
         }
         /* each block has 16*maxCharLength bytes */
         i=idx;
@@ -882,7 +882,7 @@ MBCSAddFromUnicode(MBCSData *mbcsData,
         if(flag>=0) {
             fprintf(stderr, "error: duplicate Unicode code point at U+%04x<->0x%s see 0x%02x\n",
                 (int)c, printBytes(buffer, bytes, length), (int)old);
-            return FALSE;
+            return false;
         } else if(VERBOSE) {
             fprintf(stderr, "duplicate Unicode code point at U+%04x<->0x%s see 0x%02x\n",
                 (int)c, printBytes(buffer, bytes, length), (int)old);
@@ -895,7 +895,7 @@ MBCSAddFromUnicode(MBCSData *mbcsData,
         mbcsData->stage2[idx+(nextOffset>>4)]|=(1UL<<(16+(c&0xf)));
     }
 
-    return TRUE;
+    return true;
 }
 
 U_CFUNC UBool
@@ -916,7 +916,7 @@ MBCSOkForBaseFromUnicode(const MBCSData *mbcsData,
         (flag==1 && bytes[0]==0) || /* testing length==1 would be redundant with the next test */
         (flag<=1 && length>1 && bytes[0]==0)
     ) {
-        return FALSE;
+        return false;
     }
 
     /*
@@ -927,7 +927,7 @@ MBCSOkForBaseFromUnicode(const MBCSData *mbcsData,
      * - any |1 fallback (no roundtrip flags in the optimized table)
      */
     if(mbcsData->utf8Friendly && flag<=1 && c<=mbcsData->utf8Max && (bytes[0]==0 || flag==1)) {
-        return FALSE;
+        return false;
     }
 
     /*
@@ -936,11 +936,11 @@ MBCSOkForBaseFromUnicode(const MBCSData *mbcsData,
      * Fallbacks must go into the extension table.
      */
     if(mbcsData->omitFromU && flag!=0) {
-        return FALSE;
+        return false;
     }
 
     /* All other mappings do fit into the base table. */
-    return TRUE;
+    return true;
 }
 
 U_CDECL_BEGIN
@@ -957,7 +957,7 @@ MBCSAddTable(NewConverter *cnvData, UCMTable *table, UConverterStaticData *stati
     staticData->unicodeMask=table->unicodeMask;
     if(staticData->unicodeMask==3) {
         fprintf(stderr, "error: contains mappings for both supplementary and surrogate code points\n");
-        return FALSE;
+        return false;
     }
 
     staticData->conversionType=UCNV_MBCS;
@@ -974,7 +974,7 @@ MBCSAddTable(NewConverter *cnvData, UCMTable *table, UConverterStaticData *stati
     if(utf8Friendly) {
         mbcsData->utf8Max=MBCS_UTF8_MAX;
         if(SMALL && maxCharLength>1) {
-            mbcsData->omitFromU=TRUE;
+            mbcsData->omitFromU=true;
         }
     } else {
         mbcsData->utf8Max=0;
@@ -985,13 +985,13 @@ MBCSAddTable(NewConverter *cnvData, UCMTable *table, UConverterStaticData *stati
     }
 
     if(!MBCSStartMappings(mbcsData)) {
-        return FALSE;
+        return false;
     }
 
-    staticData->hasFromUnicodeFallback=FALSE;
-    staticData->hasToUnicodeFallback=FALSE;
+    staticData->hasFromUnicodeFallback=false;
+    staticData->hasToUnicodeFallback=false;
 
-    isOK=TRUE;
+    isOK=true;
 
     m=table->mappings;
     for(i=0; imappingsLength; ++m, ++i) {
@@ -1041,10 +1041,10 @@ MBCSAddTable(NewConverter *cnvData, UCMTable *table, UConverterStaticData *stati
         case 1:
             /* set only a fallback mapping from Unicode to codepage */
             if(maxCharLength==1) {
-                staticData->hasFromUnicodeFallback=TRUE;
+                staticData->hasFromUnicodeFallback=true;
                 isOK&=MBCSSingleAddFromUnicode(mbcsData, m->b.bytes, m->bLen, c, f);
             } else if(MBCSOkForBaseFromUnicode(mbcsData, m->b.bytes, m->bLen, c, f)) {
-                staticData->hasFromUnicodeFallback=TRUE;
+                staticData->hasFromUnicodeFallback=true;
                 isOK&=MBCSAddFromUnicode(mbcsData, m->b.bytes, m->bLen, c, f);
             } else {
                 m->f|=MBCS_FROM_U_EXT_FLAG;
@@ -1060,7 +1060,7 @@ MBCSAddTable(NewConverter *cnvData, UCMTable *table, UConverterStaticData *stati
             break;
         case 3:
             /* set only a fallback mapping from codepage to Unicode */
-            staticData->hasToUnicodeFallback=TRUE;
+            staticData->hasToUnicodeFallback=true;
             isOK&=MBCSAddToUnicode(mbcsData, m->b.bytes, m->bLen, c, f);
             break;
         case 4:
@@ -1071,7 +1071,7 @@ MBCSAddTable(NewConverter *cnvData, UCMTable *table, UConverterStaticData *stati
         default:
             /* will not occur because the parser checked it already */
             fprintf(stderr, "error: illegal fallback indicator %d\n", f);
-            return FALSE;
+            return false;
         }
     }
 
@@ -1088,7 +1088,7 @@ transformEUC(MBCSData *mbcsData) {
 
     oldLength=mbcsData->ucm->states.maxCharLength;
     if(oldLength<3) {
-        return FALSE;
+        return false;
     }
 
     old3Top=mbcsData->stage3Top;
@@ -1108,7 +1108,7 @@ transformEUC(MBCSData *mbcsData) {
         b=p8[i];
         if(b!=0 && b!=0x8e && b!=0x8f) {
             /* some first byte does not fit the EUC pattern, nothing to be done */
-            return FALSE;
+            return false;
         }
     }
     /* restore p if it was modified above */
@@ -1167,7 +1167,7 @@ transformEUC(MBCSData *mbcsData) {
         }
     }
 
-    return TRUE;
+    return true;
 }
 
 /*
diff --git a/icu4c/source/tools/makeconv/makeconv.cpp b/icu4c/source/tools/makeconv/makeconv.cpp
index 1e9209d2bca..f007b80c7db 100644
--- a/icu4c/source/tools/makeconv/makeconv.cpp
+++ b/icu4c/source/tools/makeconv/makeconv.cpp
@@ -78,10 +78,10 @@ U_CAPI const UConverterStaticData * ucnv_converterStaticData[UCNV_NUMBER_OF_SUPP
 /*
  * Global - verbosity
  */
-UBool VERBOSE = FALSE;
-UBool QUIET = FALSE;
-UBool SMALL = FALSE;
-UBool IGNORE_SISO_CHECK = FALSE;
+UBool VERBOSE = false;
+UBool QUIET = false;
+UBool SMALL = false;
+UBool IGNORE_SISO_CHECK = false;
 
 static void
 createConverter(ConvData *data, const char* converterName, UErrorCode *pErrorCode);
@@ -92,7 +92,7 @@ createConverter(ConvData *data, const char* converterName, UErrorCode *pErrorCod
 static void
 writeConverterData(ConvData *data, const char *cnvName, const char *cnvDir, UErrorCode *status);
 
-UBool haveCopyright=TRUE;
+UBool haveCopyright=true;
 
 static UDataInfo dataInfo={
     sizeof(UDataInfo),
@@ -259,7 +259,7 @@ int main(int argc, char* argv[])
     SMALL = options[OPT_SMALL].doesOccur;
 
     if (options[OPT_IGNORE_SISO_CHECK].doesOccur) {
-        IGNORE_SISO_CHECK = TRUE;
+        IGNORE_SISO_CHECK = true;
     }
 
     icu::CharString outFileName;
@@ -560,7 +560,7 @@ readHeader(ConvData *data,
     }
 }
 
-/* return TRUE if a base table was read, FALSE for an extension table */
+/* return true if a base table was read, false for an extension table */
 static UBool
 readFile(ConvData *data, const char* converterName,
          UErrorCode *pErrorCode) {
@@ -572,7 +572,7 @@ readFile(ConvData *data, const char* converterName,
     UBool dataIsBase;
 
     if(U_FAILURE(*pErrorCode)) {
-        return FALSE;
+        return false;
     }
 
     data->ucm=ucm_open();
@@ -580,27 +580,27 @@ readFile(ConvData *data, const char* converterName,
     convFile=T_FileStream_open(converterName, "r");
     if(convFile==NULL) {
         *pErrorCode=U_FILE_ACCESS_ERROR;
-        return FALSE;
+        return false;
     }
 
     readHeader(data, convFile, pErrorCode);
     if(U_FAILURE(*pErrorCode)) {
-        return FALSE;
+        return false;
     }
 
     if(data->ucm->baseName[0]==0) {
-        dataIsBase=TRUE;
+        dataIsBase=true;
         baseStates=&data->ucm->states;
         ucm_processStates(baseStates, IGNORE_SISO_CHECK);
     } else {
-        dataIsBase=FALSE;
+        dataIsBase=false;
         baseStates=NULL;
     }
 
     /* read the base table */
     ucm_readTable(data->ucm, convFile, dataIsBase, baseStates, pErrorCode);
     if(U_FAILURE(*pErrorCode)) {
-        return FALSE;
+        return false;
     }
 
     /* read an extension table if there is one */
@@ -618,7 +618,7 @@ readFile(ConvData *data, const char* converterName,
 
         if(0==uprv_strcmp(line, "CHARMAP")) {
             /* read the extension table */
-            ucm_readTable(data->ucm, convFile, FALSE, baseStates, pErrorCode);
+            ucm_readTable(data->ucm, convFile, false, baseStates, pErrorCode);
         } else {
             fprintf(stderr, "unexpected text after the base mapping table\n");
         }
@@ -680,7 +680,7 @@ createConverter(ConvData *data, const char *converterName, UErrorCode *pErrorCod
 
         } else if(
             data->ucm->ext->mappingsLength>0 &&
-            !ucm_checkBaseExt(states, data->ucm->base, data->ucm->ext, data->ucm->ext, FALSE)
+            !ucm_checkBaseExt(states, data->ucm->base, data->ucm->ext, data->ucm->ext, false)
         ) {
             *pErrorCode=U_INVALID_TABLE_FORMAT;
         } else if(data->ucm->base->flagsType&UCM_FLAGS_EXPLICIT) {
@@ -784,10 +784,10 @@ createConverter(ConvData *data, const char *converterName, UErrorCode *pErrorCod
                 }
 
                 if(fallbackFlags&1) {
-                    staticData->hasFromUnicodeFallback=TRUE;
+                    staticData->hasFromUnicodeFallback=true;
                 }
                 if(fallbackFlags&2) {
-                    staticData->hasToUnicodeFallback=TRUE;
+                    staticData->hasToUnicodeFallback=true;
                 }
 
                 if(1!=ucm_countChars(baseStates, staticData->subChar, staticData->subCharLen)) {
@@ -800,7 +800,7 @@ createConverter(ConvData *data, const char *converterName, UErrorCode *pErrorCod
 
                 } else if(
                     !ucm_checkValidity(data->ucm->ext, baseStates) ||
-                    !ucm_checkBaseExt(baseStates, baseData.ucm->base, data->ucm->ext, data->ucm->ext, FALSE)
+                    !ucm_checkBaseExt(baseStates, baseData.ucm->base, data->ucm->ext, data->ucm->ext, false)
                 ) {
                     *pErrorCode=U_INVALID_TABLE_FORMAT;
                 } else {
diff --git a/icu4c/source/tools/makeconv/ucnvstat.c b/icu4c/source/tools/makeconv/ucnvstat.c
index 05d8bffc8f6..2140bc263f2 100644
--- a/icu4c/source/tools/makeconv/ucnvstat.c
+++ b/icu4c/source/tools/makeconv/ucnvstat.c
@@ -13,6 +13,8 @@
  *  UConverterStaticData prototypes for data based converters
  */
 
+#include 
+
 #include "unicode/utypes.h"
 #include "unicode/ucnv.h"
 #include "toolutil.h"
@@ -23,7 +25,7 @@ static const UConverterStaticData _SBCSStaticData={
     sizeof(UConverterStaticData),
     "SBCS",
     0, UCNV_IBM, UCNV_SBCS, 1, 1,
-    { 0x1a, 0, 0, 0 }, 1, FALSE, FALSE,
+    { 0x1a, 0, 0, 0 }, 1, false, false,
     0,
     0,
     { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */
@@ -34,7 +36,7 @@ static const UConverterStaticData _DBCSStaticData={
     sizeof(UConverterStaticData),
     "DBCS",
     0, UCNV_IBM, UCNV_DBCS, 2, 2,
-    { 0, 0, 0, 0 },0, FALSE, FALSE, /* subchar */
+    { 0, 0, 0, 0 },0, false, false, /* subchar */
     0,
     0,
     { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */
@@ -44,7 +46,7 @@ static const UConverterStaticData _MBCSStaticData={
     sizeof(UConverterStaticData),
     "MBCS",
     0, UCNV_IBM, UCNV_MBCS, 1, 1,
-    { 0x1a, 0, 0, 0 }, 1, FALSE, FALSE,
+    { 0x1a, 0, 0, 0 }, 1, false, false,
     0,
     0,
     { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */
@@ -54,7 +56,7 @@ static const UConverterStaticData _EBCDICStatefulStaticData={
     sizeof(UConverterStaticData),
     "EBCDICStateful",
     0, UCNV_IBM, UCNV_EBCDIC_STATEFUL, 1, 1,
-    { 0, 0, 0, 0 },0, FALSE, FALSE,
+    { 0, 0, 0, 0 },0, false, false,
     0,
     0,
     { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } /* reserved */
diff --git a/icu4c/source/tools/pkgdata/pkgdata.cpp b/icu4c/source/tools/pkgdata/pkgdata.cpp
index 8de99cb9cea..e1edcd3cac3 100644
--- a/icu4c/source/tools/pkgdata/pkgdata.cpp
+++ b/icu4c/source/tools/pkgdata/pkgdata.cpp
@@ -76,7 +76,7 @@ static int32_t pkg_executeOptions(UPKGOptions *o);
 #ifdef WINDOWS_WITH_MSVC
 static int32_t pkg_createWindowsDLL(const char mode, const char *gencFilePath, UPKGOptions *o);
 #endif
-static int32_t pkg_createSymLinks(const char *targetDir, UBool specialHandling=FALSE);
+static int32_t pkg_createSymLinks(const char *targetDir, UBool specialHandling=false);
 static int32_t pkg_installLibrary(const char *installDir, const char *dir, UBool noVersion);
 static int32_t pkg_installFileMode(const char *installDir, const char *srcDir, const char *fileListName);
 static int32_t pkg_installCommonMode(const char *installDir, const char *fileName);
@@ -91,13 +91,13 @@ static void pkg_destroyOptMatchArch(char *optMatchArch);
 #endif
 
 static int32_t pkg_createWithAssemblyCode(const char *targetDir, const char mode, const char *gencFilePath);
-static int32_t pkg_generateLibraryFile(const char *targetDir, const char mode, const char *objectFile, char *command = NULL, UBool specialHandling=FALSE);
+static int32_t pkg_generateLibraryFile(const char *targetDir, const char mode, const char *objectFile, char *command = NULL, UBool specialHandling=false);
 static int32_t pkg_archiveLibrary(const char *targetDir, const char *version, UBool reverseExt);
 static void createFileNames(UPKGOptions *o, const char mode, const char *version_major, const char *version, const char *libName, const UBool reverseExt, UBool noVersion);
 static int32_t initializePkgDataFlags(UPKGOptions *o);
 
 static int32_t pkg_getPkgDataPath(UBool verbose, UOption *option);
-static int runCommand(const char* command, UBool specialHandling=FALSE);
+static int runCommand(const char* command, UBool specialHandling=false);
 
 #define IN_COMMON_MODE(mode) (mode == 'a' || mode == 'c')
 #define IN_DLL_MODE(mode)    (mode == 'd' || mode == 'l')
@@ -275,7 +275,7 @@ main(int argc, char* argv[]) {
     /* FileStream  *out; */
     UPKGOptions  o;
     CharList    *tail;
-    UBool        needsHelp = FALSE;
+    UBool        needsHelp = false;
     UErrorCode   status = U_ZERO_ERROR;
     /* char         tmp[1024]; */
     uint32_t i;
@@ -295,7 +295,7 @@ main(int argc, char* argv[]) {
     many options to just display them all of the time. */
 
     if(options[HELP].doesOccur || options[HELP_QUESTION_MARK].doesOccur) {
-        needsHelp = TRUE;
+        needsHelp = true;
     }
     else {
         if(!needsHelp && argc<0) {
@@ -399,21 +399,21 @@ main(int argc, char* argv[]) {
     }
 
     if(options[QUIET].doesOccur) {
-      o.quiet = TRUE;
+      o.quiet = true;
     } else {
-      o.quiet = FALSE;
+      o.quiet = false;
     }
 
     if(options[PDS_BUILD].doesOccur) {
 #if U_PLATFORM == U_PF_OS390
-      o.pdsbuild = TRUE;
+      o.pdsbuild = true;
 #else
-      o.pdsbuild = FALSE;
+      o.pdsbuild = false;
       fprintf(stdout, "Warning: You are using the -z option which only works on z/OS.\n");
 
 #endif
     } else {
-      o.pdsbuild = FALSE;
+      o.pdsbuild = false;
     }
 
     o.verbose   = options[VERBOSE].doesOccur;
@@ -464,13 +464,13 @@ main(int argc, char* argv[]) {
         o.entryName = o.cShortName;
     }
 
-    o.withoutAssembly = FALSE;
+    o.withoutAssembly = false;
     if (options[WITHOUT_ASSEMBLY].doesOccur) {
 #ifndef BUILD_DATA_WITHOUT_ASSEMBLY
         fprintf(stdout, "Warning: You are using the option to build without assembly code which is not supported on this platform.\n");
         fprintf(stdout, "Warning: This option will be ignored.\n");
 #else
-        o.withoutAssembly = TRUE;
+        o.withoutAssembly = true;
 #endif
     }
 
@@ -594,7 +594,7 @@ static int32_t pkg_executeOptions(UPKGOptions *o) {
         }
         return result;
     } else /* if (IN_COMMON_MODE(mode) || IN_DLL_MODE(mode) || IN_STATIC_MODE(mode)) */ {
-        UBool noVersion = FALSE;
+        UBool noVersion = false;
 
         uprv_strcpy(targetDir, o->targetDir);
         uprv_strcat(targetDir, PKGDATA_FILE_SEP_STRING);
@@ -657,7 +657,7 @@ static int32_t pkg_executeOptions(UPKGOptions *o) {
         } else /* if (IN_STATIC_MODE(mode) || IN_DLL_MODE(mode)) */ {
             char gencFilePath[SMALL_BUFFER_MAX_SIZE] = "";
             char version_major[10] = "";
-            UBool reverseExt = FALSE;
+            UBool reverseExt = false;
 
 #if !defined(WINDOWS_WITH_MSVC) || defined(USING_CYGWIN)
             /* Get the version major number. */
@@ -670,7 +670,7 @@ static int32_t pkg_executeOptions(UPKGOptions *o) {
                     version_major[i] = o->version[i];
                 }
             } else {
-                noVersion = TRUE;
+                noVersion = true;
                 if (IN_DLL_MODE(mode)) {
                     fprintf(stdout, "Warning: Providing a revision number with the -r option is recommended when packaging data in the current mode.\n");
                 }
@@ -678,20 +678,20 @@ static int32_t pkg_executeOptions(UPKGOptions *o) {
 
 #if U_PLATFORM != U_PF_OS400
             /* Certain platforms have different library extension ordering. (e.g. libicudata.##.so vs libicudata.so.##)
-             * reverseExt is FALSE if the suffix should be the version number.
+             * reverseExt is false if the suffix should be the version number.
              */
             if (pkgDataFlags[LIB_EXT_ORDER][uprv_strlen(pkgDataFlags[LIB_EXT_ORDER])-1] == pkgDataFlags[SO_EXT][uprv_strlen(pkgDataFlags[SO_EXT])-1]) {
-                reverseExt = TRUE;
+                reverseExt = true;
             }
 #endif
             /* Using the base libName and version number, generate the library file names. */
             createFileNames(o, mode, version_major, o->version == NULL ? "" : o->version, o->libName, reverseExt, noVersion);
 
-            if ((o->version!=NULL || IN_STATIC_MODE(mode)) && o->rebuild == FALSE && o->pdsbuild == FALSE) {
+            if ((o->version!=NULL || IN_STATIC_MODE(mode)) && o->rebuild == false && o->pdsbuild == false) {
                 /* Check to see if a previous built data library file exists and check if it is the latest. */
                 sprintf(checkLibFile, "%s%s", targetDir, libFileNames[LIB_FILE_VERSION]);
                 if (T_FileStream_file_exists(checkLibFile)) {
-                    if (isFileModTimeLater(checkLibFile, o->srcDir, TRUE) && isFileModTimeLater(checkLibFile, o->options)) {
+                    if (isFileModTimeLater(checkLibFile, o->srcDir, true) && isFileModTimeLater(checkLibFile, o->options)) {
                         if (o->install != NULL) {
                           if(o->verbose) {
                             fprintf(stdout, "# Installing already-built library into %s\n", o->install);
@@ -777,7 +777,7 @@ static int32_t pkg_executeOptions(UPKGOptions *o) {
                         NULL,
                         gencFilePath,
                         sizeof(gencFilePath),
-                        TRUE);
+                        true);
                     pkg_destroyOptMatchArch(optMatchArch);
 #if U_PLATFORM_IS_LINUX_BASED
                     result = pkg_generateLibraryFile(targetDir, mode, gencFilePath);
@@ -1196,7 +1196,7 @@ static int32_t pkg_installLibrary(const char *installDir, const char *targetDir,
     if (noVersion) {
         return result;
     } else {
-        return pkg_createSymLinks(installDir, TRUE);
+        return pkg_createSymLinks(installDir, true);
     }
 }
 
@@ -1365,7 +1365,7 @@ static int32_t pkg_archiveLibrary(const char *targetDir, const char *version, UB
 static int32_t pkg_generateLibraryFile(const char *targetDir, const char mode, const char *objectFile, char *command, UBool specialHandling) {
     int32_t result = 0;
     char *cmd = NULL;
-    UBool freeCmd = FALSE;
+    UBool freeCmd = false;
     int32_t length = 0;
 
     (void)specialHandling;  // Suppress unused variable compiler warnings on platforms where all usage
@@ -1387,7 +1387,7 @@ static int32_t pkg_generateLibraryFile(const char *targetDir, const char mode, c
                 fprintf(stderr, "Unable to allocate memory for command.\n");
                 return -1;
             }
-            freeCmd = TRUE;
+            freeCmd = true;
         }
         sprintf(cmd, "%s %s %s%s %s",
                 pkgDataFlags[AR],
@@ -1421,7 +1421,7 @@ static int32_t pkg_generateLibraryFile(const char *targetDir, const char mode, c
                 fprintf(stderr, "Unable to allocate memory for command.\n");
                 return -1;
             }
-            freeCmd = TRUE;
+            freeCmd = true;
         }
 #if U_PLATFORM == U_PF_MINGW
         sprintf(cmd, "%s%s%s %s -o %s%s %s %s%s %s %s",
@@ -1652,7 +1652,7 @@ static int32_t pkg_createWithoutAssemblyCode(UPKGOptions *o, const char *targetD
 
         if (i == 0) {
             /* The first iteration calls the gencmn function and initializes the buffer. */
-            createCommonDataFile(o->tmpDir, o->shortName, o->entryName, NULL, o->srcDir, o->comment, o->fileListFiles->str, 0, TRUE, o->verbose, gencmnFile);
+            createCommonDataFile(o->tmpDir, o->shortName, o->entryName, NULL, o->srcDir, o->comment, o->fileListFiles->str, 0, true, o->verbose, gencmnFile);
             buffer[0] = 0;
 #ifdef USE_SINGLE_CCODE_FILE
             uprv_strcpy(tempObjectFile, gencmnFile);
@@ -1915,7 +1915,7 @@ static int32_t pkg_createWindowsDLL(const char mode, const char *gencFilePath, U
         );
     }
 
-    result = runCommand(cmd, TRUE);
+    result = runCommand(cmd, true);
     if (result != 0) {
         fprintf(stderr, "Error creating Windows DLL library. Failed command: %s\n", cmd);
     }
@@ -2192,10 +2192,10 @@ static UBool getPkgDataPath(const char *cmd, UBool verbose, char *buf, size_t it
     if (p.isNull() || (n = fread(buf, 1, items-1, p.getAlias())) <= 0) {
         fprintf(stderr, "%s: Error calling '%s'\n", progname, cmd);
         *buf = 0;
-        return FALSE;
+        return false;
     }
 
-    return TRUE;
+    return true;
 }
 #endif
 
@@ -2203,7 +2203,7 @@ static UBool getPkgDataPath(const char *cmd, UBool verbose, char *buf, size_t it
 static int32_t pkg_getPkgDataPath(UBool verbose, UOption *option) {
 #if U_HAVE_POPEN
     static char buf[512] = "";
-    UBool pkgconfigIsValid = TRUE;
+    UBool pkgconfigIsValid = true;
     const char *pkgconfigCmd = "pkg-config --variable=pkglibdir icu-uc";
     const char *icuconfigCmd = "icu-config --incpkgdatafile";
     const char *pkgdata = "pkgdata.inc";
@@ -2214,7 +2214,7 @@ static int32_t pkg_getPkgDataPath(UBool verbose, UOption *option) {
             return -1;
         }
 
-        pkgconfigIsValid = FALSE;
+        pkgconfigIsValid = false;
     }
 
     for (int32_t length = strlen(buf) - 1; length >= 0; length--) {
@@ -2238,7 +2238,7 @@ static int32_t pkg_getPkgDataPath(UBool verbose, UOption *option) {
     buf[strlen(buf)] = 0;
 
     option->value = buf;
-    option->doesOccur = TRUE;
+    option->doesOccur = true;
 
     return 0;
 #else
diff --git a/icu4c/source/tools/toolutil/dbgutil.cpp b/icu4c/source/tools/toolutil/dbgutil.cpp
index 399ec6d16c0..7b72d424850 100644
--- a/icu4c/source/tools/toolutil/dbgutil.cpp
+++ b/icu4c/source/tools/toolutil/dbgutil.cpp
@@ -47,7 +47,7 @@ static void udbg_cleanup(void) {
 static UBool tu_cleanup(void)
 {
     udbg_cleanup();
-    return TRUE;
+    return true;
 }
 
 static void udbg_register_cleanup(void) {
diff --git a/icu4c/source/tools/toolutil/filestrm.cpp b/icu4c/source/tools/toolutil/filestrm.cpp
index a926848985a..d4bb448a799 100644
--- a/icu4c/source/tools/toolutil/filestrm.cpp
+++ b/icu4c/source/tools/toolutil/filestrm.cpp
@@ -84,9 +84,9 @@ T_FileStream_file_exists(const char* filename)
     FILE* temp = fopen(filename, "r");
     if (temp) {
         fclose(temp);
-        return TRUE;
+        return true;
     } else
-        return FALSE;
+        return false;
 }
 
 /*static const int32_t kEOF;
diff --git a/icu4c/source/tools/toolutil/filetools.cpp b/icu4c/source/tools/toolutil/filetools.cpp
index 0f0e9c59846..08bb9a4aef7 100644
--- a/icu4c/source/tools/toolutil/filetools.cpp
+++ b/icu4c/source/tools/toolutil/filetools.cpp
@@ -39,17 +39,17 @@ static int32_t whichFileModTimeIsLater(const char *file1, const char *file2);
 
 /*
  * Goes through the given directory recursive to compare each file's modification time with that of the file given.
- * Also can be given just one file to check against. Default value for isDir is FALSE.
+ * Also can be given just one file to check against. Default value for isDir is false.
  */
 U_CAPI UBool U_EXPORT2
 isFileModTimeLater(const char *filePath, const char *checkAgainst, UBool isDir) {
-    UBool isLatest = TRUE;
+    UBool isLatest = true;
 
     if (filePath == NULL || checkAgainst == NULL) {
-        return FALSE;
+        return false;
     }
 
-    if (isDir == TRUE) {
+    if (isDir == true) {
 #if U_HAVE_DIRENT_H
         DIR *pDir = NULL;
         if ((pDir= opendir(checkAgainst)) != NULL) {
@@ -64,7 +64,7 @@ isFileModTimeLater(const char *filePath, const char *checkAgainst, UBool isDir)
                     newpath.append(dirEntry->d_name, -1, status);
                     if (U_FAILURE(status)) {
                         fprintf(stderr, "%s:%d: %s\n", __FILE__, __LINE__, u_errorName(status));
-                        return FALSE;
+                        return false;
                     }
 
                     if ((subDirp = opendir(newpath.data())) != NULL) {
@@ -77,7 +77,7 @@ isFileModTimeLater(const char *filePath, const char *checkAgainst, UBool isDir)
                     } else {
                         int32_t latest = whichFileModTimeIsLater(filePath, newpath.data());
                         if (latest < 0 || latest == 2) {
-                            isLatest = FALSE;
+                            isLatest = false;
                             break;
                         }
                     }
@@ -87,17 +87,17 @@ isFileModTimeLater(const char *filePath, const char *checkAgainst, UBool isDir)
             closedir(pDir);
         } else {
             fprintf(stderr, "Unable to open directory: %s\n", checkAgainst);
-            return FALSE;
+            return false;
         }
 #endif
     } else {
         if (T_FileStream_file_exists(checkAgainst)) {
             int32_t latest = whichFileModTimeIsLater(filePath, checkAgainst);
             if (latest < 0 || latest == 2) {
-                isLatest = FALSE;
+                isLatest = false;
             }
         } else {
-            isLatest = FALSE;
+            isLatest = false;
         }
     }
 
diff --git a/icu4c/source/tools/toolutil/flagparser.cpp b/icu4c/source/tools/toolutil/flagparser.cpp
index 65513f3611f..3fca179db47 100644
--- a/icu4c/source/tools/toolutil/flagparser.cpp
+++ b/icu4c/source/tools/toolutil/flagparser.cpp
@@ -25,7 +25,7 @@ U_CAPI int32_t U_EXPORT2
 parseFlagsFile(const char *fileName, char **flagBuffer, int32_t flagBufferSize, const char ** flagNames, int32_t numOfFlags, UErrorCode *status) {
     char* buffer = NULL;
     char* tmpFlagBuffer = NULL;
-    UBool allocateMoreSpace = FALSE;
+    UBool allocateMoreSpace = false;
     int32_t idx, i;
     int32_t result = 0;
 
@@ -45,7 +45,7 @@ parseFlagsFile(const char *fileName, char **flagBuffer, int32_t flagBufferSize,
 
     do {
         if (allocateMoreSpace) {
-            allocateMoreSpace = FALSE;
+            allocateMoreSpace = false;
             currentBufferSize *= 2;
             uprv_free(buffer);
             buffer = (char *)uprv_malloc(sizeof(char) * currentBufferSize);
@@ -65,7 +65,7 @@ parseFlagsFile(const char *fileName, char **flagBuffer, int32_t flagBufferSize,
 
             if ((int32_t)uprv_strlen(buffer) == (currentBufferSize - 1) && buffer[currentBufferSize-2] != '\n') {
                 /* Allocate more space for buffer if it did not read the entire line */
-                allocateMoreSpace = TRUE;
+                allocateMoreSpace = true;
                 T_FileStream_rewind(f);
                 break;
             } else {
@@ -118,7 +118,7 @@ static int32_t extractFlag(char* buffer, int32_t bufferSize, char* flag, int32_t
     int32_t i, idx = -1;
     char *pBuffer;
     int32_t offset=0;
-    UBool bufferWritten = FALSE;
+    UBool bufferWritten = false;
 
     if (buffer[0] != 0) {
         /* Get the offset (i.e. position after the '=') */
@@ -137,7 +137,7 @@ static int32_t extractFlag(char* buffer, int32_t bufferSize, char* flag, int32_t
 
             flag[i] = pBuffer[i];
             if (i == 0) {
-                bufferWritten = TRUE;
+                bufferWritten = true;
             }
         }
     }
diff --git a/icu4c/source/tools/toolutil/package.cpp b/icu4c/source/tools/toolutil/package.cpp
index f4e428a37e7..2e8b5037c03 100644
--- a/icu4c/source/tools/toolutil/package.cpp
+++ b/icu4c/source/tools/toolutil/package.cpp
@@ -382,7 +382,7 @@ U_CDECL_END
 U_NAMESPACE_BEGIN
 
 Package::Package()
-        : doAutoPrefix(FALSE), prefixEndsWithType(FALSE) {
+        : doAutoPrefix(false), prefixEndsWithType(false) {
     inPkgName[0]=0;
     pkgPrefix[0]=0;
     inData=NULL;
@@ -655,7 +655,7 @@ Package::readPackage(const char *filename) {
                 }
                 items[i-1].type=makeTypeLetter(typeEnum);
             }
-            items[i].isDataOwned=FALSE;
+            items[i].isDataOwned=false;
         }
         // set the last item's length
         items[itemCount-1].length=length-ds->readUInt32(inEntries[itemCount-1].dataOffset);
@@ -728,10 +728,10 @@ Package::writePackage(const char *filename, char outType, const char *comment) {
     // one type (TYPE_LE) is bogus
     errorCode=U_ZERO_ERROR;
     i=makeTypeEnum(outType);
-    ds[TYPE_B]= i==TYPE_B ? NULL : udata_openSwapper(TRUE, U_ASCII_FAMILY, outIsBigEndian, outCharset, &errorCode);
-    ds[TYPE_L]= i==TYPE_L ? NULL : udata_openSwapper(FALSE, U_ASCII_FAMILY, outIsBigEndian, outCharset, &errorCode);
+    ds[TYPE_B]= i==TYPE_B ? NULL : udata_openSwapper(true, U_ASCII_FAMILY, outIsBigEndian, outCharset, &errorCode);
+    ds[TYPE_L]= i==TYPE_L ? NULL : udata_openSwapper(false, U_ASCII_FAMILY, outIsBigEndian, outCharset, &errorCode);
     ds[TYPE_LE]=NULL;
-    ds[TYPE_E]= i==TYPE_E ? NULL : udata_openSwapper(TRUE, U_EBCDIC_FAMILY, outIsBigEndian, outCharset, &errorCode);
+    ds[TYPE_E]= i==TYPE_E ? NULL : udata_openSwapper(true, U_EBCDIC_FAMILY, outIsBigEndian, outCharset, &errorCode);
     if(U_FAILURE(errorCode)) {
         fprintf(stderr, "icupkg: udata_openSwapper() failed - %s\n", u_errorName(errorCode));
         exit(errorCode);
@@ -798,7 +798,7 @@ Package::writePackage(const char *filename, char outType, const char *comment) {
     // create the output item names in sorted order, with the package name prepended to each
     for(i=0; i(strlen(name)));
+        items[idx].name=allocString(true, static_cast(strlen(name)));
         strcpy(items[idx].name, name);
         pathToTree(items[idx].name);
     } else {
@@ -1070,7 +1070,7 @@ Package::addFile(const char *filesPath, const char *name) {
 
     data=readFile(filesPath, name, length, type);
     // readFile() exits the tool if it fails
-    addItem(name, data, length, TRUE, type);
+    addItem(name, data, length, true, type);
 }
 
 void
@@ -1079,7 +1079,7 @@ Package::addItems(const Package &listPkg) {
     int32_t i;
 
     for(pItem=listPkg.items, i=0; iname, pItem->data, pItem->length, FALSE, pItem->type);
+        addItem(pItem->name, pItem->data, pItem->length, false, pItem->type);
     }
 }
 
@@ -1224,14 +1224,14 @@ Package::checkDependency(void *context, const char *itemName, const char *target
     // check dependency: make sure the target item is in the package
     Package *me=(Package *)context;
     if(me->findItem(targetName)<0) {
-        me->isMissingItems=TRUE;
+        me->isMissingItems=true;
         fprintf(stderr, "Item %s depends on missing item %s\n", itemName, targetName);
     }
 }
 
 UBool
 Package::checkDependencies() {
-    isMissingItems=FALSE;
+    isMissingItems=false;
     enumDependencies(this, checkDependency);
     return (UBool)!isMissingItems;
 }
@@ -1274,7 +1274,7 @@ Package::allocString(UBool in, int32_t length) {
 void
 Package::sortItems() {
     UErrorCode errorCode=U_ZERO_ERROR;
-    uprv_sortArray(items, itemCount, (int32_t)sizeof(Item), compareItems, NULL, FALSE, &errorCode);
+    uprv_sortArray(items, itemCount, (int32_t)sizeof(Item), compareItems, NULL, false, &errorCode);
     if(U_FAILURE(errorCode)) {
         fprintf(stderr, "icupkg: sorting item names failed - %s\n", u_errorName(errorCode));
         exit(errorCode);
diff --git a/icu4c/source/tools/toolutil/pkg_genc.cpp b/icu4c/source/tools/toolutil/pkg_genc.cpp
index 17347bac5d7..1f81bf94a42 100644
--- a/icu4c/source/tools/toolutil/pkg_genc.cpp
+++ b/icu4c/source/tools/toolutil/pkg_genc.cpp
@@ -252,11 +252,11 @@ checkAssemblyHeaderName(const char* optAssembly) {
         if (uprv_strcmp(optAssembly, assemblyHeader[idx].name) == 0) {
             assemblyHeaderIndex = idx;
             hexType = assemblyHeader[idx].hexType; /* set the hex type */
-            return TRUE;
+            return true;
         }
     }
 
-    return FALSE;
+    return false;
 }
 
 
@@ -778,7 +778,7 @@ getArchitecture(uint16_t *pCPU, uint16_t *pBits, UBool *pIsBigEndian, const char
         *pIsBigEndian=(UBool)(U_IS_BIG_ENDIAN ? ELFDATA2MSB : ELFDATA2LSB);
 #elif U_PLATFORM_HAS_WIN32_API
         // Windows always runs in little-endian mode.
-        *pIsBigEndian = FALSE;
+        *pIsBigEndian = false;
 
         // Note: The various _M_ macros are predefined by the MSVC compiler based
         // on the target compilation architecture.
@@ -865,7 +865,7 @@ getArchitecture(uint16_t *pCPU, uint16_t *pBits, UBool *pIsBigEndian, const char
      */
     *pBits= *pCPU==IMAGE_FILE_MACHINE_I386 ? 32 : 64;
     /* Windows always runs on little-endian CPUs. */
-    *pIsBigEndian=FALSE;
+    *pIsBigEndian=false;
 #else
 #   error "Unknown platform for CAN_GENERATE_OBJECTS."
 #endif
diff --git a/icu4c/source/tools/toolutil/pkg_icu.cpp b/icu4c/source/tools/toolutil/pkg_icu.cpp
index ce0bfc215b7..06ddbb89b89 100644
--- a/icu4c/source/tools/toolutil/pkg_icu.cpp
+++ b/icu4c/source/tools/toolutil/pkg_icu.cpp
@@ -42,10 +42,10 @@ isListTextFile(const char *listname) {
         suffix=listFileSuffixes[i].suffix;
         length=listFileSuffixes[i].length;
         if((listNameEnd-listname)>length && 0==memcmp(listNameEnd-length, suffix, length)) {
-            return TRUE;
+            return true;
         }
     }
-    return FALSE;
+    return false;
 }
 
 /*
@@ -163,7 +163,7 @@ writePackageDatFile(const char *outFilename, const char *outComment, const char
         }
         pkg = ownedPkg.getAlias();
 
-        addListPkg.adoptInstead(readList(sourcePath, addList, TRUE, NULL));
+        addListPkg.adoptInstead(readList(sourcePath, addList, true, NULL));
         if(addListPkg.isValid()) {
             pkg->addItems(*addListPkg);
         } else {
diff --git a/icu4c/source/tools/toolutil/pkgitems.cpp b/icu4c/source/tools/toolutil/pkgitems.cpp
index 11e50fbd8ac..79e076c0c23 100644
--- a/icu4c/source/tools/toolutil/pkgitems.cpp
+++ b/icu4c/source/tools/toolutil/pkgitems.cpp
@@ -284,7 +284,7 @@ ures_enumDependencies(const char *itemName,
                       CheckDependency check, void *context,
                       Package *pkg,
                       UErrorCode *pErrorCode) {
-    UBool doCheckParent = TRUE;  // always remains TRUE if depth>1
+    UBool doCheckParent = true;  // always remains true if depth>1
     switch(res_getPublicType(res)) {
     case URES_STRING:
         if(depth==1 && inKey!=NULL &&
@@ -294,11 +294,11 @@ ures_enumDependencies(const char *itemName,
             // Top-level %%Parent string:
             //   We use this bundle as well as the explicit parent bundle.
             // Either way, the truncation parent is ignored.
-            doCheckParent = FALSE;
+            doCheckParent = false;
             // No tracing: build tool
             int32_t length;
             const UChar *alias=res_getStringNoTrace(pResData, res, &length);
-            checkAlias(itemName, res, alias, length, /*useResSuffix=*/ TRUE,
+            checkAlias(itemName, res, alias, length, /*useResSuffix=*/ true,
                        check, context, pErrorCode);
             // If there is a %%ALIAS, then there should be nothing else in this resource bundle.
         } else if(depth==2 && parentKey!=NULL && 0==strcmp(parentKey, "%%DEPENDENCY")) {
@@ -307,7 +307,7 @@ ures_enumDependencies(const char *itemName,
             // No tracing: build tool
             int32_t length;
             const UChar *alias=res_getStringNoTrace(pResData, res, &length);
-            checkAlias(itemName, res, alias, length, /*useResSuffix=*/ FALSE,
+            checkAlias(itemName, res, alias, length, /*useResSuffix=*/ false,
                        check, context, pErrorCode);
         }
         // we ignore all other strings
@@ -316,7 +316,7 @@ ures_enumDependencies(const char *itemName,
         {
             int32_t length;
             const UChar *alias=res_getAlias(pResData, res, &length);
-            checkAlias(itemName, res, alias, length, TRUE, check, context, pErrorCode);
+            checkAlias(itemName, res, alias, length, true, check, context, pErrorCode);
         }
         break;
     case URES_TABLE:
@@ -327,7 +327,7 @@ ures_enumDependencies(const char *itemName,
                 const char *itemKey;
                 Resource item=res_getTableItemByIndex(pResData, res, i, &itemKey);
                 // This doCheckParent return value is needed to
-                // propagate the possible FALSE value from depth=1 to depth=0.
+                // propagate the possible false value from depth=1 to depth=0.
                 doCheckParent &= ures_enumDependencies(
                         itemName, pResData,
                         item, itemKey,
diff --git a/icu4c/source/tools/toolutil/ppucd.cpp b/icu4c/source/tools/toolutil/ppucd.cpp
index bf905884074..b31755947d0 100644
--- a/icu4c/source/tools/toolutil/ppucd.cpp
+++ b/icu4c/source/tools/toolutil/ppucd.cpp
@@ -211,7 +211,7 @@ PreparsedUCD::getProps(UnicodeSet &newValues, UErrorCode &errorCode) {
     UChar32 start, end;
     if(!parseCodePointRange(field, start, end, errorCode)) { return NULL; }
     UniProps *props;
-    UBool insideBlock=FALSE;  // TRUE if cp or unassigned range inside the block range.
+    UBool insideBlock=false;  // true if cp or unassigned range inside the block range.
     switch(lineType) {
     case DEFAULTS_LINE:
         // Should occur before any block/cp/unassigned line.
@@ -247,7 +247,7 @@ PreparsedUCD::getProps(UnicodeSet &newValues, UErrorCode &errorCode) {
     case CP_LINE:
     case UNASSIGNED_LINE:
         if(blockProps.start<=start && end<=blockProps.end) {
-            insideBlock=TRUE;
+            insideBlock=true;
             if(lineType==CP_LINE) {
                 // Code point range fully inside the last block inherits the block properties.
                 cpProps=blockProps;
@@ -313,7 +313,7 @@ static const struct {
     { "Turkic_Case_Folding", PPUCD_TURKIC_CASE_FOLDING }
 };
 
-// Returns TRUE for "ok to continue parsing fields".
+// Returns true for "ok to continue parsing fields".
 UBool
 PreparsedUCD::parseProperty(UniProps &props, const char *field, UnicodeSet &newValues,
                             UErrorCode &errorCode) {
@@ -328,7 +328,7 @@ PreparsedUCD::parseProperty(UniProps &props, const char *field, UnicodeSet &newV
                     "enum-property syntax '%s' on line %ld\n",
                     field, (long)lineNumber);
             errorCode=U_PARSE_ERROR;
-            return FALSE;
+            return false;
         }
         binaryValue=0;
         ++p;
@@ -346,7 +346,7 @@ PreparsedUCD::parseProperty(UniProps &props, const char *field, UnicodeSet &newV
         for(int32_t i=0;; ++i) {
             if(i==UPRV_LENGTHOF(ppucdProperties)) {
                 // Ignore unknown property names.
-                return TRUE;
+                return true;
             }
             if(0==uprv_stricmp(p, ppucdProperties[i].name)) {
                 prop=ppucdProperties[i].prop;
@@ -498,23 +498,23 @@ PreparsedUCD::parseProperty(UniProps &props, const char *field, UnicodeSet &newV
             break;
         default:
             // Ignore unhandled properties.
-            return TRUE;
+            return true;
         }
     }
     if(U_SUCCESS(errorCode)) {
         newValues.add((UChar32)prop);
-        return TRUE;
+        return true;
     } else {
-        return FALSE;
+        return false;
     }
 }
 
 UBool
 PreparsedUCD::getRangeForAlgNames(UChar32 &start, UChar32 &end, UErrorCode &errorCode) {
-    if(U_FAILURE(errorCode)) { return FALSE; }
+    if(U_FAILURE(errorCode)) { return false; }
     if(lineType!=ALG_NAMES_RANGE_LINE) {
         errorCode=U_ILLEGAL_ARGUMENT_ERROR;
-        return FALSE;
+        return false;
     }
     firstField();
     const char *field=nextField();
@@ -525,7 +525,7 @@ PreparsedUCD::getRangeForAlgNames(UChar32 &start, UChar32 &end, UErrorCode &erro
                 "(no second field) on line %ld\n",
                 (long)lineNumber);
         errorCode=U_PARSE_ERROR;
-        return FALSE;
+        return false;
     }
     return parseCodePointRange(field, start, end, errorCode);
 }
@@ -552,11 +552,11 @@ PreparsedUCD::parseCodePointRange(const char *s, UChar32 &start, UChar32 &end, U
         fprintf(stderr,
                 "error in preparsed UCD: '%s' is not a valid code point range on line %ld\n",
                 s, (long)lineNumber);
-        return FALSE;
+        return false;
     }
     start=(UChar32)st;
     end=(UChar32)e;
-    return TRUE;
+    return true;
 }
 
 void
diff --git a/icu4c/source/tools/toolutil/ppucd.h b/icu4c/source/tools/toolutil/ppucd.h
index 7c9c34af6fb..bf455d0e142 100644
--- a/icu4c/source/tools/toolutil/ppucd.h
+++ b/icu4c/source/tools/toolutil/ppucd.h
@@ -120,7 +120,7 @@ public:
     /** Returns the Unicode version when or after the UNICODE_VERSION_LINE has been read. */
     const UVersionInfo &getUnicodeVersion() const { return ucdVersion; }
 
-    /** Returns TRUE if the current line has property values. */
+    /** Returns true if the current line has property values. */
     UBool lineHasPropertyValues() const {
         return DEFAULTS_LINE<=lineType && lineType<=UNASSIGNED_LINE;
     }
diff --git a/icu4c/source/tools/toolutil/toolutil.cpp b/icu4c/source/tools/toolutil/toolutil.cpp
index a9dc37377a8..070c6034afa 100644
--- a/icu4c/source/tools/toolutil/toolutil.cpp
+++ b/icu4c/source/tools/toolutil/toolutil.cpp
@@ -204,9 +204,9 @@ U_CAPI UBool U_EXPORT2
 uprv_fileExists(const char *file) {
   struct stat stat_buf;
   if (stat(file, &stat_buf) == 0) {
-    return TRUE;
+    return true;
   } else {
-    return FALSE;
+    return false;
   }
 }
 #endif
@@ -351,7 +351,7 @@ utm_hasCapacity(UToolMemory *mem, int32_t capacity) {
         mem->capacity=newCapacity;
     }
 
-    return TRUE;
+    return true;
 }
 
 U_CAPI void * U_EXPORT2
diff --git a/icu4c/source/tools/toolutil/toolutil.h b/icu4c/source/tools/toolutil/toolutil.h
index 1c9f06758ff..98b2155551e 100644
--- a/icu4c/source/tools/toolutil/toolutil.h
+++ b/icu4c/source/tools/toolutil/toolutil.h
@@ -23,13 +23,6 @@
 
 #include "unicode/utypes.h"
 
-#ifndef TRUE
-#   define TRUE  1
-#endif
-#ifndef FALSE
-#   define FALSE 0
-#endif
-
 #ifdef __cplusplus
 
 #include "unicode/errorcode.h"
@@ -118,9 +111,9 @@ uprv_mkdir(const char *pathname, UErrorCode *status);
 
 #if !UCONFIG_NO_FILE_IO
 /**
- * Return TRUE if the named item exists
+ * Return true if the named item exists
  * @param file filename
- * @return TRUE if named item (file, dir, etc) exists, FALSE otherwise
+ * @return true if named item (file, dir, etc) exists, false otherwise
  */
 U_CAPI UBool U_EXPORT2
 uprv_fileExists(const char *file);
diff --git a/icu4c/source/tools/toolutil/ucbuf.cpp b/icu4c/source/tools/toolutil/ucbuf.cpp
index c8e906f2d55..f269748205e 100644
--- a/icu4c/source/tools/toolutil/ucbuf.cpp
+++ b/icu4c/source/tools/toolutil/ucbuf.cpp
@@ -73,7 +73,7 @@ ucbuf_autodetect_fs(FileStream* in, const char** cp, UConverter** conv, int32_t*
 
     if(*cp==NULL){
         *conv =NULL;
-        return FALSE;
+        return false;
     }
 
     /* open the converter for the detected Unicode charset */
@@ -82,7 +82,7 @@ ucbuf_autodetect_fs(FileStream* in, const char** cp, UConverter** conv, int32_t*
     /* convert and ignore initial U+FEFF, and the buffer overflow */
     pTarget = target;
     pStart = start;
-    ucnv_toUnicode(*conv, &pTarget, target+1, &pStart, start+*signatureLength, NULL, FALSE, error);
+    ucnv_toUnicode(*conv, &pTarget, target+1, &pStart, start+*signatureLength, NULL, false, error);
     *signatureLength = (int32_t)(pStart - start);
     if(*error==U_BUFFER_OVERFLOW_ERROR) {
         *error=U_ZERO_ERROR;
@@ -94,40 +94,40 @@ ucbuf_autodetect_fs(FileStream* in, const char** cp, UConverter** conv, int32_t*
     }
 
 
-    return TRUE; 
+    return true; 
 }
 static UBool ucbuf_isCPKnown(const char* cp){
     if(ucnv_compareNames("UTF-8",cp)==0){
-        return TRUE;
+        return true;
     }
     if(ucnv_compareNames("UTF-16BE",cp)==0){
-        return TRUE;
+        return true;
     }
     if(ucnv_compareNames("UTF-16LE",cp)==0){
-        return TRUE;
+        return true;
     }
     if(ucnv_compareNames("UTF-16",cp)==0){
-        return TRUE;
+        return true;
     }
     if(ucnv_compareNames("UTF-32",cp)==0){
-        return TRUE;
+        return true;
     }
     if(ucnv_compareNames("UTF-32BE",cp)==0){
-        return TRUE;
+        return true;
     }
     if(ucnv_compareNames("UTF-32LE",cp)==0){
-        return TRUE;
+        return true;
     }
     if(ucnv_compareNames("SCSU",cp)==0){
-        return TRUE;
+        return true;
     }
     if(ucnv_compareNames("BOCU-1",cp)==0){
-        return TRUE;
+        return true;
     }
     if(ucnv_compareNames("UTF-7",cp)==0){
-        return TRUE;
+        return true;
     }
-    return FALSE;
+    return false;
 }
 
 U_CAPI FileStream * U_EXPORT2
@@ -234,7 +234,7 @@ ucbuf_fillucbuf( UCHARBUF* buf,UErrorCode* error){
             /* use erro1 to preserve the error code */
             UErrorCode error1 =U_ZERO_ERROR;
             
-            if( buf->showWarning==TRUE){
+            if( buf->showWarning==true){
                 fprintf(stderr,"\n###WARNING: Encountered abnormal bytes while"
                                " converting input stream to target encoding: %s\n",
                                u_errorName(*error));
@@ -263,7 +263,7 @@ ucbuf_fillucbuf( UCHARBUF* buf,UErrorCode* error){
             /* null terminate the buffer */
             postContext[stop-start] = 0;
 
-            if(buf->showWarning ==TRUE){
+            if(buf->showWarning ==true){
                 /* print out the context */
                 fprintf(stderr,"\tPre-context: %s\n",preContext);
                 fprintf(stderr,"\tContext: %s\n",context);
@@ -324,7 +324,7 @@ ucbuf_fillucbuf( UCHARBUF* buf,UErrorCode* error){
 U_CAPI int32_t U_EXPORT2
 ucbuf_getc(UCHARBUF* buf,UErrorCode* error){
     if(error==NULL || U_FAILURE(*error)){
-        return FALSE;
+        return false;
     }
     if(buf->currentPos>=buf->bufLimit){
         if(buf->remaining==0){
@@ -344,7 +344,7 @@ U_CAPI int32_t U_EXPORT2
 ucbuf_getc32(UCHARBUF* buf,UErrorCode* error){
     int32_t retVal = (int32_t)U_EOF;
     if(error==NULL || U_FAILURE(*error)){
-        return FALSE;
+        return false;
     }
     if(buf->currentPos+1>=buf->bufLimit){
         if(buf->remaining==0){
@@ -377,7 +377,7 @@ ucbuf_getcx32(UCHARBUF* buf,UErrorCode* error) {
     int32_t offset;
     UChar32 c32,c1,c2;
     if(error==NULL || U_FAILURE(*error)){
-        return FALSE;
+        return false;
     }
     /* Fill the buffer if it is empty */
     if (buf->currentPos >=buf->bufLimit-2) {
@@ -457,7 +457,7 @@ ucbuf_open(const char* fileName,const char** cp,UBool showWarning, UBool buffere
     }
     if(cp==NULL || fileName==NULL){
         *error = U_ILLEGAL_ARGUMENT_ERROR;
-        return FALSE;
+        return NULL;
     }
     if (!uprv_strcmp(fileName, "-")) {
         in = T_FileStream_stdin();
@@ -495,7 +495,7 @@ ucbuf_open(const char* fileName,const char** cp,UBool showWarning, UBool buffere
             return NULL;
         }
         
-        if((buf->conv==NULL) && (buf->showWarning==TRUE)){
+        if((buf->conv==NULL) && (buf->showWarning==true)){
             fprintf(stderr,"###WARNING: No converter defined. Using codepage of system.\n");
         }
         buf->remaining=fileSize-buf->signatureLength;
@@ -597,7 +597,7 @@ ucbuf_rewind(UCHARBUF* buf,UErrorCode* error){
             /* convert and ignore initial U+FEFF, and the buffer overflow */
             pTarget = target;
             pStart = start;
-            ucnv_toUnicode(buf->conv, &pTarget, target+1, &pStart, start+numRead, NULL, FALSE, error);
+            ucnv_toUnicode(buf->conv, &pTarget, target+1, &pStart, start+numRead, NULL, false, error);
             if(*error==U_BUFFER_OVERFLOW_ERROR) {
                 *error=U_ZERO_ERROR;
             }
@@ -706,9 +706,9 @@ static UBool ucbuf_isCharNewLine(UChar c){
     case 0x0085: /* NEL */
     case 0x2028: /* LS  */
     case 0x2029: /* PS  */
-        return TRUE;
+        return true;
     default:
-        return FALSE;
+        return false;
     }
 }
 
diff --git a/icu4c/source/tools/toolutil/ucbuf.h b/icu4c/source/tools/toolutil/ucbuf.h
index 9214d419711..117920b7946 100644
--- a/icu4c/source/tools/toolutil/ucbuf.h
+++ b/icu4c/source/tools/toolutil/ucbuf.h
@@ -52,7 +52,7 @@ struct  ULine {
  *                  If *codepage is NULL on input the API will try to autodetect
  *                  popular Unicode encodings
  * @param showWarning Flag to print out warnings to STDOUT
- * @param buffered  If TRUE performs a buffered read of the input file. If FALSE reads
+ * @param buffered  If true performs a buffered read of the input file. If false reads
  *                  the whole file into memory and converts it.
  * @param err is a pointer to a valid UErrorCode value. If this value
  *        indicates a failure on entry, the function will immediately return.
diff --git a/icu4c/source/tools/toolutil/ucm.cpp b/icu4c/source/tools/toolutil/ucm.cpp
index 28c3f3f4f89..f2f3a66e70e 100644
--- a/icu4c/source/tools/toolutil/ucm.cpp
+++ b/icu4c/source/tools/toolutil/ucm.cpp
@@ -182,11 +182,11 @@ compareMappings(UCMTable *lTable, const UCMapping *l,
         /* Unicode then bytes */
         result=compareUnicode(lTable, l, rTable, r);
         if(result==0) {
-            result=compareBytes(lTable, l, rTable, r, FALSE); /* not lexically, like canonucm */
+            result=compareBytes(lTable, l, rTable, r, false); /* not lexically, like canonucm */
         }
     } else {
         /* bytes then Unicode */
-        result=compareBytes(lTable, l, rTable, r, TRUE); /* lexically, for builder */
+        result=compareBytes(lTable, l, rTable, r, true); /* lexically, for builder */
         if(result==0) {
             result=compareUnicode(lTable, l, rTable, r);
         }
@@ -205,7 +205,7 @@ static int32_t  U_CALLCONV
 compareMappingsUnicodeFirst(const void *context, const void *left, const void *right) {
     return compareMappings(
         (UCMTable *)context, (const UCMapping *)left,
-        (UCMTable *)context, (const UCMapping *)right, TRUE);
+        (UCMTable *)context, (const UCMapping *)right, true);
 }
 
 /* sorting by bytes first sorts the reverseMap; use indirection to mappings */
@@ -215,7 +215,7 @@ compareMappingsBytesFirst(const void *context, const void *left, const void *rig
     int32_t l=*(const int32_t *)left, r=*(const int32_t *)right;
     return compareMappings(
         table, table->mappings+l,
-        table, table->mappings+r, FALSE);
+        table, table->mappings+r, false);
 }
 U_CDECL_END
 
@@ -233,7 +233,7 @@ ucm_sortTable(UCMTable *t) {
     /* 1. sort by Unicode first */
     uprv_sortArray(t->mappings, t->mappingsLength, sizeof(UCMapping),
                    compareMappingsUnicodeFirst, t,
-                   FALSE, &errorCode);
+                   false, &errorCode);
 
     /* build the reverseMap */
     if(t->reverseMap==NULL) {
@@ -256,7 +256,7 @@ ucm_sortTable(UCMTable *t) {
     /* 2. sort reverseMap by mappings bytes first */
     uprv_sortArray(t->reverseMap, t->mappingsLength, sizeof(int32_t),
                    compareMappingsBytesFirst, t,
-                   FALSE, &errorCode);
+                   false, &errorCode);
 
     if(U_FAILURE(errorCode)) {
         fprintf(stderr, "ucm error: sortTable()/uprv_sortArray() fails - %s\n",
@@ -264,7 +264,7 @@ ucm_sortTable(UCMTable *t) {
         exit(errorCode);
     }
 
-    t->isSorted=TRUE;
+    t->isSorted=true;
 }
 
 /*
@@ -296,7 +296,7 @@ ucm_moveMappings(UCMTable *base, UCMTable *ext) {
             }
             --mbLimit;
             --base->mappingsLength;
-            base->isSorted=FALSE;
+            base->isSorted=false;
         } else {
             ++mb;
         }
@@ -469,7 +469,7 @@ checkBaseExtBytes(UCMStates *baseStates, UCMTable *base, UCMTable *ext,
         }
 
         /* compare the base and extension mappings */
-        cmp=compareBytes(base, mb, ext, me, TRUE);
+        cmp=compareBytes(base, mb, ext, me, true);
         if(cmp<0) {
             if(intersectBase) {
                 /* mapping in base but not in ext, move it */
@@ -539,13 +539,13 @@ ucm_checkValidity(UCMTable *table, UCMStates *baseStates) {
 
     m=table->mappings;
     mLimit=m+table->mappingsLength;
-    isOK=TRUE;
+    isOK=true;
 
     while(mbLen);
         if(count<1) {
             ucm_printMapping(table, m, stderr);
-            isOK=FALSE;
+            isOK=false;
         }
         ++m;
     }
@@ -562,11 +562,11 @@ ucm_checkBaseExt(UCMStates *baseStates,
     /* if we have an extension table, we must always use precision flags */
     if(base->flagsType&UCM_FLAGS_IMPLICIT) {
         fprintf(stderr, "ucm error: the base table contains mappings without precision flags\n");
-        return FALSE;
+        return false;
     }
     if(ext->flagsType&UCM_FLAGS_IMPLICIT) {
         fprintf(stderr, "ucm error: extension table contains mappings without precision flags\n");
-        return FALSE;
+        return false;
     }
 
     /* checking requires both tables to be sorted */
@@ -579,7 +579,7 @@ ucm_checkBaseExt(UCMStates *baseStates,
         checkBaseExtBytes(baseStates, base, ext, (UBool)(moveTarget!=NULL), intersectBase);
 
     if(result&HAS_ERRORS) {
-        return FALSE;
+        return false;
     }
 
     if(result&NEEDS_MOVE) {
@@ -592,7 +592,7 @@ ucm_checkBaseExt(UCMStates *baseStates,
         }
     }
 
-    return TRUE;
+    return true;
 }
 
 /* merge tables for rptp2ucm ------------------------------------------------ */
@@ -616,7 +616,7 @@ ucm_mergeTables(UCMTable *fromUTable, UCMTable *toUTable,
     fromUIndex=toUIndex=0;
 
     while(fromUIndexisSorted=FALSE;
+    fromUTable->isSorted=false;
 }
 
 /* separate extension mappings out of base table for rptp2ucm --------------- */
@@ -705,15 +705,15 @@ ucm_separateMappings(UCMFile *ucm, UBool isSISO) {
     m=table->mappings;
     mLimit=m+table->mappingsLength;
 
-    needsMove=FALSE;
-    isOK=TRUE;
+    needsMove=false;
+    isOK=true;
 
     for(; mbLen==1 && (m->b.bytes[0]==0xe || m->b.bytes[0]==0xf)) {
             fprintf(stderr, "warning: removing illegal mapping from an SI/SO-stateful table\n");
             ucm_printMapping(table, m, stderr);
             m->moveFlag|=UCM_REMOVE_MAPPING;
-            needsMove=TRUE;
+            needsMove=true;
             continue;
         }
 
@@ -723,22 +723,22 @@ ucm_separateMappings(UCMFile *ucm, UBool isSISO) {
         if(type<0) {
             /* illegal byte sequence */
             printMapping(m, UCM_GET_CODE_POINTS(table, m), UCM_GET_BYTES(table, m), stderr);
-            isOK=FALSE;
+            isOK=false;
         } else if(type>0) {
             m->moveFlag|=UCM_MOVE_TO_EXT;
-            needsMove=TRUE;
+            needsMove=true;
         }
     }
 
     if(!isOK) {
-        return FALSE;
+        return false;
     }
     if(needsMove) {
         ucm_moveMappings(ucm->base, ucm->ext);
-        return ucm_checkBaseExt(&ucm->states, ucm->base, ucm->ext, ucm->ext, FALSE);
+        return ucm_checkBaseExt(&ucm->states, ucm->base, ucm->ext, ucm->ext, false);
     } else {
         ucm_sortTable(ucm->base);
-        return TRUE;
+        return true;
     }
 }
 
@@ -810,16 +810,16 @@ ucm_parseMappingLine(UCMapping *m,
             *end!='>'
         ) {
             fprintf(stderr, "ucm error: Unicode code point must be formatted as  (1..6 hex digits) - \"%s\"\n", line);
-            return FALSE;
+            return false;
         }
         if((uint32_t)cp>0x10ffff || U_IS_SURROGATE(cp)) {
             fprintf(stderr, "ucm error: Unicode code point must be 0..d7ff or e000..10ffff - \"%s\"\n", line);
-            return FALSE;
+            return false;
         }
 
         if(uLen==UCNV_EXT_MAX_UCHARS) {
             fprintf(stderr, "ucm error: too many code points on \"%s\"\n", line);
-            return FALSE;
+            return false;
         }
         codePoints[uLen++]=cp;
         s=end+1;
@@ -827,7 +827,7 @@ ucm_parseMappingLine(UCMapping *m,
 
     if(uLen==0) {
         fprintf(stderr, "ucm error: no Unicode code points on \"%s\"\n", line);
-        return FALSE;
+        return false;
     } else if(uLen==1) {
         m->u=codePoints[0];
     } else {
@@ -837,7 +837,7 @@ ucm_parseMappingLine(UCMapping *m,
             u16Length>UCNV_EXT_MAX_UCHARS
         ) {
             fprintf(stderr, "ucm error: too many UChars on \"%s\"\n", line);
-            return FALSE;
+            return false;
         }
     }
 
@@ -847,10 +847,10 @@ ucm_parseMappingLine(UCMapping *m,
     bLen=ucm_parseBytes(bytes, line, &s);
 
     if(bLen<0) {
-        return FALSE;
+        return false;
     } else if(bLen==0) {
         fprintf(stderr, "ucm error: no bytes on \"%s\"\n", line);
-        return FALSE;
+        return false;
     } else if(bLen<=4) {
         uprv_memcpy(m->b.bytes, bytes, bLen);
     }
@@ -864,7 +864,7 @@ ucm_parseMappingLine(UCMapping *m,
             f=(int8_t)(s[1]-'0');
             if((uint8_t)f>4) {
                 fprintf(stderr, "ucm error: fallback indicator must be |0..|4 - \"%s\"\n", line);
-                return FALSE;
+                return false;
             }
             break;
         }
@@ -874,7 +874,7 @@ ucm_parseMappingLine(UCMapping *m,
     m->uLen=uLen;
     m->bLen=bLen;
     m->f=f;
-    return TRUE;
+    return true;
 }
 
 /* general APIs ------------------------------------------------------------- */
@@ -909,7 +909,7 @@ ucm_resetTable(UCMTable *table) {
         table->flagsType=0;
         table->unicodeMask=0;
         table->bytesLength=table->codePointsLength=0;
-        table->isSorted=FALSE;
+        table->isSorted=false;
     }
 }
 
@@ -1008,7 +1008,7 @@ ucm_addMapping(UCMTable *table,
     tm=table->mappings+table->mappingsLength++;
     uprv_memcpy(tm, m, sizeof(UCMapping));
 
-    table->isSorted=FALSE;
+    table->isSorted=false;
 }
 
 U_CAPI UCMFile * U_EXPORT2
@@ -1099,7 +1099,7 @@ ucm_addMappingAuto(UCMFile *ucm, UBool forBase, UCMStates *baseStates,
     if(m->f==2 && m->uLen>1) {
         fprintf(stderr, "ucm error: illegal  |2 mapping from multiple code points\n");
         printMapping(m, codePoints, bytes, stderr);
-        return FALSE;
+        return false;
     }
 
     if(baseStates!=NULL) {
@@ -1108,7 +1108,7 @@ ucm_addMappingAuto(UCMFile *ucm, UBool forBase, UCMStates *baseStates,
         if(type<0) {
             /* illegal byte sequence */
             printMapping(m, codePoints, bytes, stderr);
-            return FALSE;
+            return false;
         }
     } else {
         /* not used - adding a mapping for an extension-only table before its base table is read */
@@ -1125,7 +1125,7 @@ ucm_addMappingAuto(UCMFile *ucm, UBool forBase, UCMStates *baseStates,
         ucm_addMapping(ucm->ext, m, codePoints, bytes);
     }
 
-    return TRUE;
+    return true;
 }
 
 U_CAPI UBool U_EXPORT2
@@ -1138,7 +1138,7 @@ ucm_addMappingFromLine(UCMFile *ucm, const char *line, UBool forBase, UCMStates
 
     /* ignore empty and comment lines */
     if(line[0]=='#' || *(s=u_skipWhitespace(line))==0 || *s=='\n' || *s=='\r') {
-        return TRUE;
+        return true;
     }
 
     return
@@ -1158,13 +1158,13 @@ ucm_readTable(UCMFile *ucm, FileStream* convFile,
         return;
     }
 
-    isOK=TRUE;
+    isOK=true;
 
     for(;;) {
         /* read the next line */
         if(!T_FileStream_readLine(convFile, line, sizeof(line))) {
             fprintf(stderr, "incomplete charmap section\n");
-            isOK=FALSE;
+            isOK=false;
             break;
         }
 
diff --git a/icu4c/source/tools/toolutil/ucm.h b/icu4c/source/tools/toolutil/ucm.h
index 04e6b2030de..8ea90604d47 100644
--- a/icu4c/source/tools/toolutil/ucm.h
+++ b/icu4c/source/tools/toolutil/ucm.h
@@ -207,7 +207,7 @@ ucm_checkValidity(UCMTable *ext, UCMStates *baseStates);
  *
  * Sort both tables, and then for each mapping direction:
  *
- * If intersectBase is TRUE and the base table contains a mapping
+ * If intersectBase is true and the base table contains a mapping
  * that does not exist in the extension table, then this mapping is moved
  * to moveTarget.
  *
@@ -223,7 +223,7 @@ ucm_checkValidity(UCMTable *ext, UCMStates *baseStates);
  * - if moveTarget!=NULL: move the base mapping to the moveTarget table
  * - else: error
  *
- * @return FALSE in case of an irreparable error
+ * @return false in case of an irreparable error
  */
 U_CAPI UBool U_EXPORT2
 ucm_checkBaseExt(UCMStates *baseStates, UCMTable *base, UCMTable *ext,
diff --git a/icu4c/source/tools/toolutil/ucmstate.cpp b/icu4c/source/tools/toolutil/ucmstate.cpp
index 1ff2d7d1932..d46b73ed30c 100644
--- a/icu4c/source/tools/toolutil/ucmstate.cpp
+++ b/icu4c/source/tools/toolutil/ucmstate.cpp
@@ -226,12 +226,12 @@ ucm_parseHeaderLine(UCMFile *ucm,
     /* skip leading white space and ignore empty lines */
     s=(char *)u_skipWhitespace(line);
     if(*s==0) {
-        return TRUE;
+        return true;
     }
 
     /* stop at the beginning of the mapping section */
     if(uprv_memcmp(s, "CHARMAP", 7)==0) {
-        return FALSE;
+        return false;
     }
 
     /* get the key name, bracketed in <> */
@@ -275,7 +275,7 @@ ucm_parseHeaderLine(UCMFile *ucm,
             fprintf(stderr, "ucm error: unknown  %s\n", *pValue);
             exit(U_INVALID_TABLE_FORMAT);
         }
-        return TRUE;
+        return true;
     } else if(uprv_strcmp(*pKey, "mb_cur_max")==0) {
         c=**pValue;
         if('1'<=c && c<='4' && (*pValue)[1]==0) {
@@ -285,7 +285,7 @@ ucm_parseHeaderLine(UCMFile *ucm,
             fprintf(stderr, "ucm error: illegal  %s\n", *pValue);
             exit(U_INVALID_TABLE_FORMAT);
         }
-        return TRUE;
+        return true;
     } else if(uprv_strcmp(*pKey, "mb_cur_min")==0) {
         c=**pValue;
         if('1'<=c && c<='4' && (*pValue)[1]==0) {
@@ -294,7 +294,7 @@ ucm_parseHeaderLine(UCMFile *ucm,
             fprintf(stderr, "ucm error: illegal  %s\n", *pValue);
             exit(U_INVALID_TABLE_FORMAT);
         }
-        return TRUE;
+        return true;
     } else if(uprv_strcmp(*pKey, "icu:state")==0) {
         /* if an SBCS/DBCS/EBCDIC_STATEFUL converter has icu:state, then turn it into MBCS */
         switch(states->conversionType) {
@@ -315,17 +315,17 @@ ucm_parseHeaderLine(UCMFile *ucm,
             exit(U_INVALID_TABLE_FORMAT);
         }
         ucm_addState(states, *pValue);
-        return TRUE;
+        return true;
     } else if(uprv_strcmp(*pKey, "icu:base")==0) {
         if(**pValue==0) {
             fprintf(stderr, "ucm error:  without a base table name\n");
             exit(U_INVALID_TABLE_FORMAT);
         }
         uprv_strcpy(ucm->baseName, *pValue);
-        return TRUE;
+        return true;
     }
 
-    return FALSE;
+    return false;
 }
 
 /* post-processing ---------------------------------------------------------- */
@@ -343,12 +343,12 @@ sumUpStates(UCMStates *states) {
      * the offsets sum of that state needs to be added.
      * This is achieved in at most countStates iterations.
      */
-    allStatesReady=FALSE;
+    allStatesReady=false;
     for(count=states->countStates; !allStatesReady && count>=0; --count) {
-        allStatesReady=TRUE;
+        allStatesReady=true;
         for(state=states->countStates-1; state>=0; --state) {
             if(!(states->stateFlags[state]&MBCS_STATE_FLAG_READY)) {
-                allStatesReady=FALSE;
+                allStatesReady=false;
                 sum=0;
 
                 /* at first, add up only the final delta offsets to keep them <512 */
@@ -848,7 +848,7 @@ findUnassigned(UCMStates *states,
     UBool haveAssigned;
 
     localSavings=belowSavings=0;
-    haveAssigned=FALSE;
+    haveAssigned=false;
     for(i=0; i<256; ++i) {
         entry=states->stateTable[state][i];
         if(MBCS_ENTRY_IS_TRANSITION(entry)) {
@@ -859,7 +859,7 @@ findUnassigned(UCMStates *states,
                         offset+MBCS_ENTRY_TRANSITION_OFFSET(entry),
                         (b<<8)|(uint32_t)i);
             if(savings<0) {
-                haveAssigned=TRUE;
+                haveAssigned=true;
             } else if(savings>0) {
                 printf("    all-unassigned sequences from prefix 0x%02lx state %ld use %ld bytes\n",
                     (unsigned long)((b<<8)|i), (long)state, (long)savings);
@@ -872,7 +872,7 @@ findUnassigned(UCMStates *states,
                 if(unicodeCodeUnits[entry]==0xfffe && ucm_findFallback(toUFallbacks, countToUFallbacks, entry)<0) {
                     localSavings+=2;
                 } else {
-                    haveAssigned=TRUE;
+                    haveAssigned=true;
                 }
                 break;
             case MBCS_STATE_VALID_16_PAIR:
@@ -880,7 +880,7 @@ findUnassigned(UCMStates *states,
                 if(unicodeCodeUnits[entry]==0xfffe) {
                     localSavings+=4;
                 } else {
-                    haveAssigned=TRUE;
+                    haveAssigned=true;
                 }
                 break;
             default:
@@ -968,7 +968,7 @@ ucm_optimizeStates(UCMStates *states,
         errorCode=U_ZERO_ERROR; /* nothing bad will happen... */
         uprv_sortArray(toUFallbacks, countToUFallbacks,
                        sizeof(_MBCSToUFallback),
-                       compareFallbacks, NULL, FALSE, &errorCode);
+                       compareFallbacks, NULL, false, &errorCode);
     }
 }
 
diff --git a/icu4c/source/tools/toolutil/udbgutil.cpp b/icu4c/source/tools/toolutil/udbgutil.cpp
index 993694546f4..dcf71b28872 100644
--- a/icu4c/source/tools/toolutil/udbgutil.cpp
+++ b/icu4c/source/tools/toolutil/udbgutil.cpp
@@ -239,7 +239,7 @@ static const Field names_UDebugEnumType[] =
 
 /**
  * @param type type of item
- * @param actual TRUE: for the actual enum's type (UCAL_FIELD_COUNT, etc), or FALSE for the string count
+ * @param actual true: for the actual enum's type (UCAL_FIELD_COUNT, etc), or false for the string count
  */
 static int32_t _udbg_enumCount(UDebugEnumType type, UBool actual) {
 	switch(type) {
@@ -288,16 +288,16 @@ static const Field* _udbg_enumFields(UDebugEnumType type) {
 // implementation
 
 int32_t  udbg_enumCount(UDebugEnumType type) {
-	return _udbg_enumCount(type, FALSE);
+	return _udbg_enumCount(type, false);
 }
 
 int32_t  udbg_enumExpectedCount(UDebugEnumType type) {
-	return _udbg_enumCount(type, TRUE);
+	return _udbg_enumCount(type, true);
 }
 
 const char *  udbg_enumName(UDebugEnumType type, int32_t field) {
 	if(field<0 ||
-				field>=_udbg_enumCount(type,FALSE)) { // also will catch unsupported items
+				field>=_udbg_enumCount(type,false)) { // also will catch unsupported items
 		return NULL;
 	} else {
 		const Field *fields = _udbg_enumFields(type);
@@ -311,7 +311,7 @@ const char *  udbg_enumName(UDebugEnumType type, int32_t field) {
 
 int32_t  udbg_enumArrayValue(UDebugEnumType type, int32_t field) {
 	if(field<0 ||
-				field>=_udbg_enumCount(type,FALSE)) { // also will catch unsupported items
+				field>=_udbg_enumCount(type,false)) { // also will catch unsupported items
 		return -1;
 	} else {
 		const Field *fields = _udbg_enumFields(type);
@@ -324,18 +324,18 @@ int32_t  udbg_enumArrayValue(UDebugEnumType type, int32_t field) {
 }
 
 int32_t udbg_enumByName(UDebugEnumType type, const char *value) {
-    if(type<0||type>=_udbg_enumCount(UDBG_UDebugEnumType, TRUE)) {
+    if(type<0||type>=_udbg_enumCount(UDBG_UDebugEnumType, true)) {
         return -1; // type out of range
     }
 	const Field *fields = _udbg_enumFields(type);
     if (fields != NULL) {
-        for(int32_t field = 0;field<_udbg_enumCount(type, FALSE);field++) {
+        for(int32_t field = 0;field<_udbg_enumCount(type, false);field++) {
             if(!strcmp(value, fields[field].str + fields[field].prefix)) {
                 return fields[field].num;
             }
         }
         // try with the prefix
-        for(int32_t field = 0;field<_udbg_enumCount(type, FALSE);field++) {
+        for(int32_t field = 0;field<_udbg_enumCount(type, false);field++) {
             if(!strcmp(value, fields[field].str)) {
                 return fields[field].num;
             }
@@ -490,7 +490,7 @@ U_CAPI  int32_t
 paramLocaleDefaultBcp47(const USystemParams * /* param */, char *target, int32_t targetCapacity, UErrorCode *status) {
   if(U_FAILURE(*status))return 0;
   const char *def = uloc_getDefault();
-  return uloc_toLanguageTag(def,target,targetCapacity,FALSE,status);
+  return uloc_toLanguageTag(def,target,targetCapacity,false,status);
 }
 
 
@@ -650,18 +650,18 @@ void KnownIssues::add(const char *ticketStr, const char *where, const UChar *msg
 {
   const std::string ticket = mapTicketId(ticketStr);
   if(fTable.find(ticket) == fTable.end()) {
-    if(firstForTicket!=NULL) *firstForTicket = TRUE;
+    if(firstForTicket!=NULL) *firstForTicket = true;
     fTable[ticket] = std::map < std::string, std::set < std::string > >();
   } else {
-    if(firstForTicket!=NULL) *firstForTicket = FALSE;
+    if(firstForTicket!=NULL) *firstForTicket = false;
   }
   if(where==NULL) return;
 
   if(fTable[ticket].find(where) == fTable[ticket].end()) {
-    if(firstForWhere!=NULL) *firstForWhere = TRUE;
+    if(firstForWhere!=NULL) *firstForWhere = true;
     fTable[ticket][where] = std::set < std::string >();
   } else {
-    if(firstForWhere!=NULL) *firstForWhere = FALSE;
+    if(firstForWhere!=NULL) *firstForWhere = false;
   }
   if(msg==NULL || !*msg) return;
 
@@ -674,18 +674,18 @@ void KnownIssues::add(const char *ticketStr, const char *where, const char *msg,
 {
   const std::string ticket = mapTicketId(ticketStr);
   if(fTable.find(ticket) == fTable.end()) {
-    if(firstForTicket!=NULL) *firstForTicket = TRUE;
+    if(firstForTicket!=NULL) *firstForTicket = true;
     fTable[ticket] = std::map < std::string, std::set < std::string > >();
   } else {
-    if(firstForTicket!=NULL) *firstForTicket = FALSE;
+    if(firstForTicket!=NULL) *firstForTicket = false;
   }
   if(where==NULL) return;
 
   if(fTable[ticket].find(where) == fTable[ticket].end()) {
-    if(firstForWhere!=NULL) *firstForWhere = TRUE;
+    if(firstForWhere!=NULL) *firstForWhere = true;
     fTable[ticket][where] = std::set < std::string >();
   } else {
-    if(firstForWhere!=NULL) *firstForWhere = FALSE;
+    if(firstForWhere!=NULL) *firstForWhere = false;
   }
   if(msg==NULL || !*msg) return;
 
@@ -696,7 +696,7 @@ void KnownIssues::add(const char *ticketStr, const char *where, const char *msg,
 UBool KnownIssues::print()
 {
   if(fTable.empty()) {
-    return FALSE;
+    return false;
   }
 
   std::cout << "KNOWN ISSUES" << std::endl;
@@ -723,7 +723,7 @@ UBool KnownIssues::print()
       }
     }
   }
-  return TRUE;
+  return true;
 }
 
 U_CAPI void *udbg_knownIssue_openU(void *ptr, const char *ticket, char *where, const UChar *msg, UBool *firstForTicket,
@@ -753,10 +753,10 @@ U_CAPI void *udbg_knownIssue_open(void *ptr, const char *ticket, char *where, co
 U_CAPI UBool udbg_knownIssue_print(void *ptr) {
   KnownIssues *t = static_cast(ptr);
   if(t==NULL) {
-    return FALSE;
+    return false;
   } else {
     t->print();
-    return TRUE;
+    return true;
   }
 }
 
diff --git a/icu4c/source/tools/toolutil/udbgutil.h b/icu4c/source/tools/toolutil/udbgutil.h
index b9af132da5b..e3ed513839c 100644
--- a/icu4c/source/tools/toolutil/udbgutil.h
+++ b/icu4c/source/tools/toolutil/udbgutil.h
@@ -133,7 +133,7 @@ U_CAPI void *udbg_knownIssue_open(void *ptr, const char *ticket, char *where, co
 /**
  * Print 'known issue' table, to std::cout.
  * @param ptr pointer from udbg_knownIssue
- * @return TRUE if there were any issues.
+ * @return true if there were any issues.
  */
 U_CAPI UBool udbg_knownIssue_print(void *ptr);
 
diff --git a/icu4c/source/tools/toolutil/writesrc.cpp b/icu4c/source/tools/toolutil/writesrc.cpp
index 4e8989a02c2..0bd8b85bb8a 100644
--- a/icu4c/source/tools/toolutil/writesrc.cpp
+++ b/icu4c/source/tools/toolutil/writesrc.cpp
@@ -260,7 +260,7 @@ usrc_writeUTrie2Struct(FILE *f,
         "    0x%lx,\n"          /* errorValue */
         "    0x%lx,\n"          /* highStart */
         "    0x%lx,\n"          /* highValueIndex */
-        "    NULL, 0, FALSE, FALSE, 0, NULL\n",
+        "    NULL, 0, false, false, 0, NULL\n",
         (long)pTrie->indexLength, (long)pTrie->dataLength,
         (short)pTrie->index2NullOffset, (short)pTrie->dataNullOffset,
         (long)pTrie->initialValue, (long)pTrie->errorValue,
diff --git a/icu4c/source/tools/toolutil/xmlparser.cpp b/icu4c/source/tools/toolutil/xmlparser.cpp
index a6569903bcd..104a99c93e7 100644
--- a/icu4c/source/tools/toolutil/xmlparser.cpp
+++ b/icu4c/source/tools/toolutil/xmlparser.cpp
@@ -221,7 +221,7 @@ UXMLParser::parseFile(const char *filename, UErrorCode &errorCode) {
             cnv,
             &pu, buffer+src.getCapacity(),
             &pb, bytes+bytesLength,
-            NULL, TRUE, &errorCode);
+            NULL, true, &errorCode);
         src.releaseBuffer(U_SUCCESS(errorCode) ? (int32_t)(pu-buffer) : 0);
         ucnv_close(cnv);
         cnv=NULL;
@@ -272,7 +272,7 @@ UXMLParser::parseFile(const char *filename, UErrorCode &errorCode) {
     capacity=fileLength;        // estimated capacity
     src.getBuffer(capacity);
     src.releaseBuffer(0);       // zero length
-    flush=FALSE;
+    flush=false;
     for(;;) {
         // convert contents of bytes[bytesLength]
         pb=bytes;
@@ -289,7 +289,7 @@ UXMLParser::parseFile(const char *filename, UErrorCode &errorCode) {
             ucnv_toUnicode(
                 cnv, &pu, buffer+src.getCapacity(),
                 &pb, bytes+bytesLength,
-                NULL, FALSE, &errorCode);
+                NULL, false, &errorCode);
             src.releaseBuffer(U_SUCCESS(errorCode) ? (int32_t)(pu-buffer) : 0);
             if(errorCode==U_BUFFER_OVERFLOW_ERROR) {
                 errorCode=U_ZERO_ERROR;
@@ -311,7 +311,7 @@ UXMLParser::parseFile(const char *filename, UErrorCode &errorCode) {
         bytesLength=T_FileStream_read(f, bytes, (int32_t)sizeof(bytes));
         if(bytesLength==0) {
             // reached end of file, convert once more to flush the converter
-            flush=TRUE;
+            flush=true;
         }
     }
 
@@ -373,7 +373,7 @@ UXMLParser::parse(const UnicodeString &src, UErrorCode &status) {
         root = createElement(mXMLElemEmpty, status);
         fPos = mXMLElemEmpty.end(status);
     } else {
-        if (mXMLElemStart.lookingAt(fPos, status) == FALSE) {
+        if (mXMLElemStart.lookingAt(fPos, status) == false) {
             error("Root Element expected", status);
             goto errorExit;
         }
@@ -403,7 +403,7 @@ UXMLParser::parse(const UnicodeString &src, UErrorCode &status) {
             UnicodeString s = scanContent(status);
             if (s.length() > 0) {
                 mXMLSP.reset(s);
-                if (mXMLSP.matches(status) == FALSE) {
+                if (mXMLSP.matches(status) == false) {
                     // This chunk of text contains something other than just
                     //  white space. Make a child node for it.
                     replaceCharRefs(s, status);
diff --git a/icu4c/source/tools/toolutil/xmlparser.h b/icu4c/source/tools/toolutil/xmlparser.h
index 5a3a24c5ed9..7f798f66f77 100644
--- a/icu4c/source/tools/toolutil/xmlparser.h
+++ b/icu4c/source/tools/toolutil/xmlparser.h
@@ -61,7 +61,7 @@ public:
     /**
      * Get the text contents of the element.
      * Append the contents of all text child nodes.
-     * @param recurse If TRUE, also recursively appends the contents of all
+     * @param recurse If true, also recursively appends the contents of all
      *        text child nodes of element children.
      * @return The text contents.
      */
diff --git a/icu4c/source/tools/tzcode/localtime.c b/icu4c/source/tools/tzcode/localtime.c
index 0d33856647e..8d84a92ddd2 100644
--- a/icu4c/source/tools/tzcode/localtime.c
+++ b/icu4c/source/tools/tzcode/localtime.c
@@ -10,6 +10,8 @@
 
 /*LINTLIBRARY*/
 
+#include 
+
 #include "private.h"
 #include "tzfile.h"
 #include "fcntl.h"
@@ -80,8 +82,8 @@ struct ttinfo {				/* time type information */
 	int_fast32_t	tt_gmtoff;	/* UT offset in seconds */
 	int		tt_isdst;	/* used to set tm_isdst */
 	int		tt_abbrind;	/* abbreviation list index */
-	int		tt_ttisstd;	/* TRUE if transition is std time */
-	int		tt_ttisgmt;	/* TRUE if transition is UT */
+	int		tt_ttisstd;	/* true if transition is std time */
+	int		tt_ttisgmt;	/* true if transition is UT */
 };
 
 struct lsinfo {				/* leap second information */
@@ -342,7 +344,7 @@ tzload(register const char *name, register struct state *const sp,
 	register u_t * const		up = &u;
 #endif /* !defined ALL_STATE */
 
-	sp->goback = sp->goahead = FALSE;
+	sp->goback = sp->goahead = false;
 
 	if (up == NULL)
 		return -1;
@@ -375,7 +377,7 @@ tzload(register const char *name, register struct state *const sp,
 			** Set doaccess if '.' (as in "../") shows up in name.
 			*/
 			if (strchr(name, '.') != NULL)
-				doaccess = TRUE;
+				doaccess = true;
 			name = fullname;
 		}
 		if (doaccess && access(name, R_OK) != 0)
@@ -477,11 +479,11 @@ tzload(register const char *name, register struct state *const sp,
 
 			ttisp = &sp->ttis[i];
 			if (ttisstdcnt == 0)
-				ttisp->tt_ttisstd = FALSE;
+				ttisp->tt_ttisstd = false;
 			else {
 				ttisp->tt_ttisstd = *p++;
-				if (ttisp->tt_ttisstd != TRUE &&
-					ttisp->tt_ttisstd != FALSE)
+				if (ttisp->tt_ttisstd != true &&
+					ttisp->tt_ttisstd != false)
 						goto oops;
 			}
 		}
@@ -490,11 +492,11 @@ tzload(register const char *name, register struct state *const sp,
 
 			ttisp = &sp->ttis[i];
 			if (ttisgmtcnt == 0)
-				ttisp->tt_ttisgmt = FALSE;
+				ttisp->tt_ttisgmt = false;
 			else {
 				ttisp->tt_ttisgmt = *p++;
-				if (ttisp->tt_ttisgmt != TRUE &&
-					ttisp->tt_ttisgmt != FALSE)
+				if (ttisp->tt_ttisgmt != true &&
+					ttisp->tt_ttisgmt != false)
 						goto oops;
 			}
 		}
@@ -519,7 +521,7 @@ tzload(register const char *name, register struct state *const sp,
 			register int	result;
 
 			up->buf[nread - 1] = '\0';
-			result = tzparse(&up->buf[1], &ts, FALSE);
+			result = tzparse(&up->buf[1], &ts, false);
 			if (result == 0 && ts.typecnt == 2 &&
 				sp->charcnt + ts.charcnt <= TZ_MAX_CHARS) {
 					for (i = 0; i < 2; ++i)
@@ -551,7 +553,7 @@ tzload(register const char *name, register struct state *const sp,
 		for (i = 1; i < sp->timecnt; ++i)
 			if (typesequiv(sp, sp->types[i], sp->types[0]) &&
 				differ_by_repeat(sp->ats[i], sp->ats[0])) {
-					sp->goback = TRUE;
+					sp->goback = true;
 					break;
 				}
 		for (i = sp->timecnt - 2; i >= 0; --i)
@@ -559,7 +561,7 @@ tzload(register const char *name, register struct state *const sp,
 				sp->types[i]) &&
 				differ_by_repeat(sp->ats[sp->timecnt - 1],
 				sp->ats[i])) {
-					sp->goahead = TRUE;
+					sp->goahead = true;
 					break;
 		}
 	}
@@ -616,7 +618,7 @@ typesequiv(const struct state *const sp, const int a, const int b)
 	if (sp == NULL ||
 		a < 0 || a >= sp->typecnt ||
 		b < 0 || b >= sp->typecnt)
-			result = FALSE;
+			result = false;
 	else {
 		register const struct ttinfo *	ap = &sp->ttis[a];
 		register const struct ttinfo *	bp = &sp->ttis[b];
@@ -959,7 +961,7 @@ tzparse(const char *name, register struct state *const sp,
 		if (name == NULL)
 			return -1;
 	}
-	load_result = tzload(TZDEFRULES, sp, FALSE);
+	load_result = tzload(TZDEFRULES, sp, false);
 	if (load_result != 0)
 		sp->leapcnt = 0;		/* so, we're off a little */
 	if (*name != '\0') {
@@ -1086,7 +1088,7 @@ tzparse(const char *name, register struct state *const sp,
 			/*
 			** Initially we're assumed to be in standard time.
 			*/
-			isdst = FALSE;
+			isdst = false;
 			theiroffset = theirstdoffset;
 			/*
 			** Now juggle transition times and types
@@ -1130,10 +1132,10 @@ tzparse(const char *name, register struct state *const sp,
 			*/
 			sp->ttis[0] = sp->ttis[1] = zttinfo;
 			sp->ttis[0].tt_gmtoff = -stdoffset;
-			sp->ttis[0].tt_isdst = FALSE;
+			sp->ttis[0].tt_isdst = false;
 			sp->ttis[0].tt_abbrind = 0;
 			sp->ttis[1].tt_gmtoff = -dstoffset;
-			sp->ttis[1].tt_isdst = TRUE;
+			sp->ttis[1].tt_isdst = true;
 			sp->ttis[1].tt_abbrind = stdlen + 1;
 			sp->typecnt = 2;
 			sp->defaulttype = 0;
@@ -1167,8 +1169,8 @@ tzparse(const char *name, register struct state *const sp,
 static void
 gmtload(struct state *const sp)
 {
-	if (tzload(gmt, sp, TRUE) != 0)
-		(void) tzparse(gmt, sp, TRUE);
+	if (tzload(gmt, sp, true) != 0)
+		(void) tzparse(gmt, sp, true);
 }
 
 #ifndef STD_INSPIRED
@@ -1194,7 +1196,7 @@ tzsetwall(void)
 		}
 	}
 #endif /* defined ALL_STATE */
-	if (tzload(NULL, lclptr, TRUE) != 0)
+	if (tzload(NULL, lclptr, true) != 0)
 		gmtload(lclptr);
 	settzname();
 }
@@ -1236,8 +1238,8 @@ tzset(void)
 		lclptr->ttis[0].tt_gmtoff = 0;
 		lclptr->ttis[0].tt_abbrind = 0;
 		(void) strcpy(lclptr->chars, gmt);
-	} else if (tzload(name, lclptr, TRUE) != 0)
-		if (name[0] == ':' || tzparse(name, lclptr, FALSE) != 0)
+	} else if (tzload(name, lclptr, true) != 0)
+		if (name[0] == ':' || tzparse(name, lclptr, false) != 0)
 			(void) gmtload(lclptr);
 	settzname();
 }
@@ -1356,7 +1358,7 @@ gmtsub(const time_t *const timep, const int_fast32_t offset,
 	register struct tm *	result;
 
 	if (!gmt_is_set) {
-		gmt_is_set = TRUE;
+		gmt_is_set = true;
 #ifdef ALL_STATE
 		gmtptr = malloc(sizeof *gmtptr);
 #endif /* defined ALL_STATE */
@@ -1590,9 +1592,9 @@ increment_overflow(int *const ip, int j)
 	** or if j < INT_MIN - i; given i < 0, INT_MIN - i cannot overflow.
 	*/
 	if ((i >= 0) ? (j > INT_MAX - i) : (j < INT_MIN - i))
-		return TRUE;
+		return true;
 	*ip += j;
-	return FALSE;
+	return false;
 }
 
 static int
@@ -1601,9 +1603,9 @@ increment_overflow32(int_fast32_t *const lp, int const m)
 	register int_fast32_t const	l = *lp;
 
 	if ((l >= 0) ? (m > INT_FAST32_MAX - l) : (m < INT_FAST32_MIN - l))
-		return TRUE;
+		return true;
 	*lp += m;
-	return FALSE;
+	return false;
 }
 
 static int
@@ -1617,9 +1619,9 @@ increment_overflow_time(time_t *tp, int_fast32_t j)
 	if (! (j < 0
 	       ? (TYPE_SIGNED(time_t) ? time_t_min - j <= *tp : -1 - j < *tp)
 	       : *tp <= time_t_max - j))
-		return TRUE;
+		return true;
 	*tp += j;
-	return FALSE;
+	return false;
 }
 
 static int
@@ -1682,7 +1684,7 @@ time2sub(struct tm *const tmp,
 	time_t				t;
 	struct tm			yourtm, mytm;
 
-	*okayp = FALSE;
+	*okayp = false;
 	yourtm = *tmp;
 	if (do_norm_secs) {
 		if (normalize_overflow(&yourtm.tm_min, &yourtm.tm_sec,
@@ -1835,7 +1837,7 @@ label:
 		return WRONG;
 	t = newt;
 	if ((*funcp)(&t, offset, tmp))
-		*okayp = TRUE;
+		*okayp = true;
 	return t;
 }
 
@@ -1852,8 +1854,8 @@ time2(struct tm * const	tmp,
 	** (in case tm_sec contains a value associated with a leap second).
 	** If that fails, try with normalization of seconds.
 	*/
-	t = time2sub(tmp, funcp, offset, okayp, FALSE);
-	return *okayp ? t : time2sub(tmp, funcp, offset, okayp, TRUE);
+	t = time2sub(tmp, funcp, offset, okayp, false);
+	return *okayp ? t : time2sub(tmp, funcp, offset, okayp, true);
 }
 
 static time_t
@@ -1899,11 +1901,11 @@ time1(struct tm *const tmp,
 	if (sp == NULL)
 		return WRONG;
 	for (i = 0; i < sp->typecnt; ++i)
-		seen[i] = FALSE;
+		seen[i] = false;
 	nseen = 0;
 	for (i = sp->timecnt - 1; i >= 0; --i)
 		if (!seen[sp->types[i]]) {
-			seen[sp->types[i]] = TRUE;
+			seen[sp->types[i]] = true;
 			types[nseen++] = sp->types[i];
 		}
 	for (sameind = 0; sameind < nseen; ++sameind) {
diff --git a/icu4c/source/tools/tzcode/private.h b/icu4c/source/tools/tzcode/private.h
index 1a85c889fa0..1f35483dc48 100644
--- a/icu4c/source/tools/tzcode/private.h
+++ b/icu4c/source/tools/tzcode/private.h
@@ -309,14 +309,6 @@ const char *	scheck(const char * string, const char * format);
 ** Finally, some convenience items.
 */
 
-#ifndef TRUE
-#define TRUE	1
-#endif /* !defined TRUE */
-
-#ifndef FALSE
-#define FALSE	0
-#endif /* !defined FALSE */
-
 #ifndef TYPE_BIT
 #define TYPE_BIT(type)	(sizeof (type) * CHAR_BIT)
 #endif /* !defined TYPE_BIT */
diff --git a/icu4c/source/tools/tzcode/tz2icu.cpp b/icu4c/source/tools/tzcode/tz2icu.cpp
index b3c9f99c30e..fada95d79ac 100644
--- a/icu4c/source/tools/tzcode/tz2icu.cpp
+++ b/icu4c/source/tools/tzcode/tz2icu.cpp
@@ -774,16 +774,16 @@ struct FinalRulePart {
     // wall time, local standard time, and GMT standard time.
     // Here is how the isstd & isgmt flags are set by zic:
     //| case 's':       /* Standard */
-    //|         rp->r_todisstd = TRUE;
-    //|         rp->r_todisgmt = FALSE;
+    //|         rp->r_todisstd = true;
+    //|         rp->r_todisgmt = false;
     //| case 'w':       /* Wall */
-    //|         rp->r_todisstd = FALSE;
-    //|         rp->r_todisgmt = FALSE;
+    //|         rp->r_todisstd = false;
+    //|         rp->r_todisgmt = false;
     //| case 'g':       /* Greenwich */
     //| case 'u':       /* Universal */
     //| case 'z':       /* Zulu */
-    //|         rp->r_todisstd = TRUE;
-    //|         rp->r_todisgmt = TRUE;
+    //|         rp->r_todisstd = true;
+    //|         rp->r_todisgmt = true;
     bool isstd;
     bool isgmt;
 
diff --git a/icu4c/source/tools/tzcode/tzfile.h b/icu4c/source/tools/tzcode/tzfile.h
index 911130eb939..8fa197529e2 100644
--- a/icu4c/source/tools/tzcode/tzfile.h
+++ b/icu4c/source/tools/tzcode/tzfile.h
@@ -62,13 +62,13 @@ struct tzhead {
 **	tzh_leapcnt repetitions of
 **		one (char [4])		coded leap second transition times
 **		one (char [4])		total correction after above
-**	tzh_ttisstdcnt (char)s		indexed by type; if TRUE, transition
-**					time is standard time, if FALSE,
+**	tzh_ttisstdcnt (char)s		indexed by type; if true, transition
+**					time is standard time, if false,
 **					transition time is wall clock time
 **					if absent, transition times are
 **					assumed to be wall clock time
-**	tzh_ttisgmtcnt (char)s		indexed by type; if TRUE, transition
-**					time is UT, if FALSE,
+**	tzh_ttisgmtcnt (char)s		indexed by type; if true, transition
+**					time is UT, if false,
 **					transition time is local time
 **					if absent, transition times are
 **					assumed to be local time
diff --git a/icu4c/source/tools/tzcode/zdump.c b/icu4c/source/tools/tzcode/zdump.c
index 0a299ef6f63..ebd7a5ce324 100644
--- a/icu4c/source/tools/tzcode/zdump.c
+++ b/icu4c/source/tools/tzcode/zdump.c
@@ -18,6 +18,8 @@
 # include "private.h"
 #endif
 
+#include 
+
 #include "stdio.h"	/* for stdout, stderr, perror */
 #include "string.h"	/* for strcpy */
 #include "sys/types.h"	/* for time_t */
@@ -96,14 +98,6 @@ typedef long intmax_t;
 #define MAX_STRING_LENGTH	1024
 #endif /* !defined MAX_STRING_LENGTH */
 
-#ifndef TRUE
-#define TRUE		1
-#endif /* !defined TRUE */
-
-#ifndef FALSE
-#define FALSE		0
-#endif /* !defined FALSE */
-
 #ifndef EXIT_SUCCESS
 #define EXIT_SUCCESS	0
 #endif /* !defined EXIT_SUCCESS */
@@ -318,7 +312,7 @@ abbrok(const char *const abbrp, const char *const zone)
 	(void) fprintf(stderr,
 		_("%s: warning: zone \"%s\" abbreviation \"%s\" %s\n"),
 		progname, zone, abbrp, wp);
-	warned = TRUE;
+	warned = true;
 }
 
 static void
@@ -543,7 +537,7 @@ main(int argc, char *argv[])
 
 		(void) strcpy(&fakeenv[0][3], argv[i]);
 		if (! (vflag | Vflag)) {
-			show(argv[i], now, FALSE);
+			show(argv[i], now, false);
 			continue;
 		}
 #ifdef ICU
@@ -575,7 +569,7 @@ main(int argc, char *argv[])
 			}
 		}
 #endif
-		warned = FALSE;
+		warned = false;
 		t = absolute_min_time;
 #ifdef ICU
 		/* skip displaying info for the lowest time, which is actually not
@@ -583,9 +577,9 @@ main(int argc, char *argv[])
 		if (!iflag) {
 #endif
 		if (!Vflag) {
-			show(argv[i], t, TRUE);
+			show(argv[i], t, true);
 			t += SECSPERDAY;
-			show(argv[i], t, TRUE);
+			show(argv[i], t, true);
 		}
 #ifdef ICU
 		}
@@ -652,9 +646,9 @@ main(int argc, char *argv[])
 		if (!Vflag) {
 			t = absolute_max_time;
 			t -= SECSPERDAY;
-			show(argv[i], t, TRUE);
+			show(argv[i], t, true);
 			t += SECSPERDAY;
-			show(argv[i], t, TRUE);
+			show(argv[i], t, true);
 		}
 #ifdef ICU
 		}
@@ -766,8 +760,8 @@ hunt(char *name, time_t lot, time_t hit)
 				lotmp = tmp;
 		} else	hit = t;
 	}
-	show(name, lot, TRUE);
-	show(name, hit, TRUE);
+	show(name, lot, true);
+	show(name, hit, true);
 	return hit;
 }
 
diff --git a/icu4c/source/tools/tzcode/zic.c b/icu4c/source/tools/tzcode/zic.c
index e1b9b54c284..54576780d5f 100644
--- a/icu4c/source/tools/tzcode/zic.c
+++ b/icu4c/source/tools/tzcode/zic.c
@@ -29,6 +29,7 @@ static char const REPORT_BUGS_TO[]="N/A";
 #include "tzfile.h"
 
 #include 
+#include 
 
 #define	ZIC_VERSION_PRE_2013 '2'
 #define	ZIC_VERSION	'3'
@@ -88,10 +89,10 @@ struct rule {
 	int		r_wday;
 
 	zic_t		r_tod;		/* time from midnight */
-	int		r_todisstd;	/* above is standard time if TRUE */
-					/* or wall clock time if FALSE */
-	int		r_todisgmt;	/* above is GMT if TRUE */
-					/* or local time if FALSE */
+	int		r_todisstd;	/* above is standard time if true */
+					/* or wall clock time if false */
+	int		r_todisgmt;	/* above is GMT if true */
+					/* or local time if false */
 	zic_t		r_stdoff;	/* offset from standard time */
 	const char *	r_abbrvar;	/* variable part of abbreviation */
 
@@ -380,8 +381,8 @@ static struct lookup const	end_years[] = {
 };
 
 static struct lookup const	leap_types[] = {
-	{ "Rolling",	TRUE },
-	{ "Stationary",	FALSE },
+	{ "Rolling",	true },
+	{ "Stationary",	false },
 	{ NULL,		0 }
 };
 
@@ -691,7 +692,7 @@ _("%s: More than one -L option specified\n"),
 				}
 				break;
 			case 'v':
-				noise = TRUE;
+				noise = true;
 				break;
 			case 's':
 				(void) printf("%s: -s ignored\n", progname);
@@ -956,7 +957,7 @@ associate(void)
 			*/
 			eat(zp->z_filename, zp->z_linenum);
 			zp->z_stdoff = gethms(zp->z_rule, _("unruly zone"),
-				TRUE);
+				true);
 			/*
 			** Note, though, that if there's no rule,
 			** a '%s' in the format is a bad thing.
@@ -991,7 +992,7 @@ infile(const char *name)
 			progname, name, e);
 		exit(EXIT_FAILURE);
 	}
-	wantcont = FALSE;
+	wantcont = false;
 	for (num = 1; ; ++num) {
 		eat(name, num);
 		if (fgets(buf, sizeof buf, fp) != buf)
@@ -1022,14 +1023,14 @@ infile(const char *name)
 			else switch ((int) (lp->l_value)) {
 				case LC_RULE:
 					inrule(fields, nfields);
-					wantcont = FALSE;
+					wantcont = false;
 					break;
 				case LC_ZONE:
 					wantcont = inzone(fields, nfields);
 					break;
 				case LC_LINK:
 					inlink(fields, nfields);
-					wantcont = FALSE;
+					wantcont = false;
 					break;
 				case LC_LEAP:
 					if (name != leapsec)
@@ -1037,7 +1038,7 @@ infile(const char *name)
 _("%s: Leap line in non leap seconds file %s\n"),
 							progname, name);
 					else	inleap(fields, nfields);
-					wantcont = FALSE;
+					wantcont = false;
 					break;
 				default:	/* "cannot happen" */
 					(void) fprintf(stderr,
@@ -1129,7 +1130,7 @@ inrule(register char **const fields, const int nfields)
 	}
 	r.r_filename = filename;
 	r.r_linenum = linenum;
-	r.r_stdoff = gethms(fields[RF_STDOFF], _("invalid saved time"), TRUE);
+	r.r_stdoff = gethms(fields[RF_STDOFF], _("invalid saved time"), true);
 	rulesub(&r, fields[RF_LOYEAR], fields[RF_HIYEAR], fields[RF_COMMAND],
 		fields[RF_MONTH], fields[RF_DAY], fields[RF_TOD]);
 	r.r_name = ecpyalloc(fields[RF_NAME]);
@@ -1147,19 +1148,19 @@ inzone(register char **const fields, const int nfields)
 
 	if (nfields < ZONE_MINFIELDS || nfields > ZONE_MAXFIELDS) {
 		error(_("wrong number of fields on Zone line"));
-		return FALSE;
+		return false;
 	}
 	if (strcmp(fields[ZF_NAME], TZDEFAULT) == 0 && lcltime != NULL) {
 		error(
 _("\"Zone %s\" line and -l option are mutually exclusive"),
 			TZDEFAULT);
-		return FALSE;
+		return false;
 	}
 	if (strcmp(fields[ZF_NAME], TZDEFRULES) == 0 && psxrules != NULL) {
 		error(
 _("\"Zone %s\" line and -p option are mutually exclusive"),
 			TZDEFRULES);
-		return FALSE;
+		return false;
 	}
 	for (i = 0; i < nzones; ++i)
 		if (zones[i].z_name != NULL &&
@@ -1169,9 +1170,9 @@ _("duplicate zone name %s (file \"%s\", line %d)"),
 					fields[ZF_NAME],
 					zones[i].z_filename,
 					zones[i].z_linenum);
-				return FALSE;
+				return false;
 		}
-	return inzsub(fields, nfields, FALSE);
+	return inzsub(fields, nfields, false);
 }
 
 static int
@@ -1179,9 +1180,9 @@ inzcont(register char **const fields, const int nfields)
 {
 	if (nfields < ZONEC_MINFIELDS || nfields > ZONEC_MAXFIELDS) {
 		error(_("wrong number of fields on Zone continuation line"));
-		return FALSE;
+		return false;
 	}
-	return inzsub(fields, nfields, TRUE);
+	return inzsub(fields, nfields, true);
 }
 
 static int
@@ -1215,11 +1216,11 @@ inzsub(register char **const fields, const int nfields, const int iscont)
 	}
 	z.z_filename = filename;
 	z.z_linenum = linenum;
-	z.z_gmtoff = gethms(fields[i_gmtoff], _("invalid UT offset"), TRUE);
+	z.z_gmtoff = gethms(fields[i_gmtoff], _("invalid UT offset"), true);
 	if ((cp = strchr(fields[i_format], '%')) != 0) {
 		if (*++cp != 's' || strchr(cp, '%') != 0) {
 			error(_("invalid abbreviation format"));
-			return FALSE;
+			return false;
 		}
 	}
 	z.z_rule = ecpyalloc(fields[i_rule]);
@@ -1249,7 +1250,7 @@ inzsub(register char **const fields, const int nfields, const int iscont)
 				error(_(
 "Zone continuation line end time is not after end time of previous line"
 					));
-				return FALSE;
+				return false;
 		}
 	}
 	zones = growalloc(zones, sizeof *zones, nzones, &nzones_alloc);
@@ -1289,7 +1290,7 @@ inleap(register char ** const fields, const int nfields)
 		leapmaxyear = year;
 	if (!leapseen || leapminyear > year)
 		leapminyear = year;
-	leapseen = TRUE;
+	leapseen = true;
 	j = EPOCH_YEAR;
 	while (j != year) {
 		if (year > j) {
@@ -1332,23 +1333,23 @@ inleap(register char ** const fields, const int nfields)
 		return;
 	}
 	t = (zic_t) dayoff * SECSPERDAY;
-	tod = gethms(fields[LP_TIME], _("invalid time of day"), FALSE);
+	tod = gethms(fields[LP_TIME], _("invalid time of day"), false);
 	cp = fields[LP_CORR];
 	{
 		register int	positive;
 		int		count;
 
 		if (strcmp(cp, "") == 0) { /* infile() turns "-" into "" */
-			positive = FALSE;
+			positive = false;
 			count = 1;
 		} else if (strcmp(cp, "--") == 0) {
-			positive = FALSE;
+			positive = false;
 			count = 2;
 		} else if (strcmp(cp, "+") == 0) {
-			positive = TRUE;
+			positive = true;
 			count = 1;
 		} else if (strcmp(cp, "++") == 0) {
-			positive = TRUE;
+			positive = true;
 			count = 2;
 		} else {
 			error(_("illegal CORRECTION field on Leap line"));
@@ -1408,32 +1409,32 @@ rulesub(register struct rule *const rp,
 		return;
 	}
 	rp->r_month = lp->l_value;
-	rp->r_todisstd = FALSE;
-	rp->r_todisgmt = FALSE;
+	rp->r_todisstd = false;
+	rp->r_todisgmt = false;
 	dp = ecpyalloc(timep);
 	if (*dp != '\0') {
 		ep = dp + strlen(dp) - 1;
 		switch (lowerit(*ep)) {
 			case 's':	/* Standard */
-				rp->r_todisstd = TRUE;
-				rp->r_todisgmt = FALSE;
+				rp->r_todisstd = true;
+				rp->r_todisgmt = false;
 				*ep = '\0';
 				break;
 			case 'w':	/* Wall */
-				rp->r_todisstd = FALSE;
-				rp->r_todisgmt = FALSE;
+				rp->r_todisstd = false;
+				rp->r_todisgmt = false;
 				*ep = '\0';
 				break;
 			case 'g':	/* Greenwich */
 			case 'u':	/* Universal */
 			case 'z':	/* Zulu */
-				rp->r_todisstd = TRUE;
-				rp->r_todisgmt = TRUE;
+				rp->r_todisstd = true;
+				rp->r_todisgmt = true;
 				*ep = '\0';
 				break;
 		}
 	}
-	rp->r_tod = gethms(dp, _("invalid time of day"), FALSE);
+	rp->r_tod = gethms(dp, _("invalid time of day"), false);
 	free(dp);
 	/*
 	** Year work.
@@ -1734,7 +1735,7 @@ writezone(const char *const name, const char *const string, char version)
 		/*
 		** Remember that type 0 is reserved.
 		*/
-		writetype[0] = FALSE;
+		writetype[0] = false;
 		for (i = 1; i < typecnt; ++i)
 			writetype[i] = thistimecnt == timecnt;
 		if (thistimecnt == 0) {
@@ -1743,11 +1744,11 @@ writezone(const char *const name, const char *const string, char version)
 			** (32- or 64-bit) window.
 			*/
 			if (typecnt != 0)
-				writetype[typecnt - 1] = TRUE;
+				writetype[typecnt - 1] = true;
 		} else {
 			for (i = thistimei - 1; i < thistimelim; ++i)
 				if (i >= 0)
-					writetype[types[i]] = TRUE;
+					writetype[types[i]] = true;
 			/*
 			** For America/Godthab and Antarctica/Palmer
 			*/
@@ -1755,7 +1756,7 @@ writezone(const char *const name, const char *const string, char version)
 			** Remember that type 0 is reserved.
 			*/
 			if (thistimei == 0)
-				writetype[1] = TRUE;
+				writetype[1] = true;
 		}
 #ifndef LEAVE_SOME_PRE_2011_SYSTEMS_IN_THE_LURCH
 		/*
@@ -1788,11 +1789,11 @@ writezone(const char *const name, const char *const string, char version)
 						rawoffs[mrudst], dstoffs[mrudst],
 #endif
 						&chars[abbrinds[mrudst]],
-						TRUE,
+						true,
 						ttisstds[mrudst],
 						ttisgmts[mrudst]);
-					isdsts[mrudst] = TRUE;
-					writetype[type] = TRUE;
+					isdsts[mrudst] = true;
+					writetype[type] = true;
 			}
 			if (histd >= 0 && mrustd >= 0 && histd != mrustd &&
 				gmtoffs[histd] != gmtoffs[mrustd]) {
@@ -1802,11 +1803,11 @@ writezone(const char *const name, const char *const string, char version)
 						rawoffs[mrudst], dstoffs[mrudst],
 #endif
 						&chars[abbrinds[mrustd]],
-						FALSE,
+						false,
 						ttisstds[mrustd],
 						ttisgmts[mrustd]);
-					isdsts[mrustd] = FALSE;
-					writetype[type] = TRUE;
+					isdsts[mrustd] = false;
+					writetype[type] = true;
 			}
 		}
 #endif /* !defined LEAVE_SOME_PRE_2011_SYSTEMS_IN_THE_LURCH */
@@ -1825,8 +1826,8 @@ writezone(const char *const name, const char *const string, char version)
 				ttisstds[0] = ttisstds[i];
 				ttisgmts[0] = ttisgmts[i];
 				abbrinds[0] = abbrinds[i];
-				writetype[0] = TRUE;
-				writetype[i] = FALSE;
+				writetype[0] = true;
+				writetype[i] = false;
 			}
 		}
 		for (i = 0; i < typecnt; ++i)
@@ -2162,14 +2163,14 @@ stringzone(char *result, const struct zone *const zpfirst, const int zonecount)
 			dstr.r_dycode = DC_DOM;
 			dstr.r_dayofmonth = 1;
 			dstr.r_tod = 0;
-			dstr.r_todisstd = dstr.r_todisgmt = FALSE;
+			dstr.r_todisstd = dstr.r_todisgmt = false;
 			dstr.r_stdoff = stdrp->r_stdoff;
 			dstr.r_abbrvar = stdrp->r_abbrvar;
 			stdr.r_month = TM_DECEMBER;
 			stdr.r_dycode = DC_DOM;
 			stdr.r_dayofmonth = 31;
 			stdr.r_tod = SECSPERDAY + stdrp->r_stdoff;
-			stdr.r_todisstd = stdr.r_todisgmt = FALSE;
+			stdr.r_todisstd = stdr.r_todisgmt = false;
 			stdr.r_stdoff = 0;
 			stdr.r_abbrvar
 			  = (stdabbrrp ? stdabbrrp->r_abbrvar : "");
@@ -2180,14 +2181,14 @@ stringzone(char *result, const struct zone *const zpfirst, const int zonecount)
 	if (stdrp == NULL && (zp->z_nrules != 0 || zp->z_stdoff != 0))
 		return -1;
 	abbrvar = (stdrp == NULL) ? "" : stdrp->r_abbrvar;
-	doabbr(result, zp->z_format, abbrvar, FALSE, TRUE);
+	doabbr(result, zp->z_format, abbrvar, false, true);
 	if (stringoffset(end(result), -zp->z_gmtoff) != 0) {
 		result[0] = '\0';
 		return -1;
 	}
 	if (dstrp == NULL)
 		return compat;
-	doabbr(end(result), zp->z_format, dstrp->r_abbrvar, TRUE, TRUE);
+	doabbr(end(result), zp->z_format, dstrp->r_abbrvar, true, true);
 	if (dstrp->r_stdoff != SECSPERMIN * MINSPERHOUR)
 		if (stringoffset(end(result),
 			-(zp->z_gmtoff + dstrp->r_stdoff)) != 0) {
@@ -2261,8 +2262,8 @@ outzone(const struct zone * const zpfirst, const int zonecount)
 	** Thanks to Earl Chew
 	** for noting the need to unconditionally initialize startttisstd.
 	*/
-	startttisstd = FALSE;
-	startttisgmt = FALSE;
+	startttisstd = false;
+	startttisgmt = false;
 	min_year = max_year = EPOCH_YEAR;
 	if (leapseen) {
 		updateminmax(leapminyear);
@@ -2284,7 +2285,7 @@ outzone(const struct zone * const zpfirst, const int zonecount)
 			if (rp->r_hiwasnum)
 				updateminmax(rp->r_hiyear);
 			if (rp->r_lowasnum || rp->r_hiwasnum)
-				prodstic = FALSE;
+				prodstic = false;
 		}
 	}
 	/*
@@ -2454,7 +2455,7 @@ outzone(const struct zone * const zpfirst, const int zonecount)
 		if (zp->z_nrules == 0) {
 			stdoff = zp->z_stdoff;
 			doabbr(startbuf, zp->z_format,
-			       NULL, stdoff != 0, FALSE);
+			       NULL, stdoff != 0, false);
 			type = addtype(oadd(zp->z_gmtoff, stdoff),
 #ifdef ICU
 				zp->z_gmtoff, stdoff,
@@ -2463,7 +2464,7 @@ outzone(const struct zone * const zpfirst, const int zonecount)
 				startttisgmt);
 			if (usestart) {
 				addtt(starttime, type);
-				usestart = FALSE;
+				usestart = false;
 			} else if (stdoff != 0)
 				addtt(min_time, type);
 		} else for (year = min_year; year <= max_year; ++year) {
@@ -2530,12 +2531,12 @@ outzone(const struct zone * const zpfirst, const int zonecount)
 				if (k < 0)
 					break;	/* go on to next year */
 				rp = &zp->z_rules[k];
-				rp->r_todo = FALSE;
+				rp->r_todo = false;
 				if (useuntil && ktime >= untiltime)
 					break;
 				stdoff = rp->r_stdoff;
 				if (usestart && ktime == starttime)
-					usestart = FALSE;
+					usestart = false;
 				if (usestart) {
 					if (ktime < starttime) {
 						startoff = oadd(zp->z_gmtoff,
@@ -2543,7 +2544,7 @@ outzone(const struct zone * const zpfirst, const int zonecount)
 						doabbr(startbuf, zp->z_format,
 							rp->r_abbrvar,
 							rp->r_stdoff != 0,
-							FALSE);
+							false);
 						continue;
 					}
 					if (*startbuf == '\0' &&
@@ -2554,7 +2555,7 @@ outzone(const struct zone * const zpfirst, const int zonecount)
 								rp->r_abbrvar,
 								rp->r_stdoff !=
 								0,
-								FALSE);
+								false);
 					}
 				}
 #ifdef ICU
@@ -2581,7 +2582,7 @@ outzone(const struct zone * const zpfirst, const int zonecount)
 				eats(zp->z_filename, zp->z_linenum,
 					rp->r_filename, rp->r_linenum);
 				doabbr(ab, zp->z_format, rp->r_abbrvar,
-					rp->r_stdoff != 0, FALSE);
+					rp->r_stdoff != 0, false);
 				offset = oadd(zp->z_gmtoff, rp->r_stdoff);
 #ifdef ICU
 				type = addtype(offset, zp->z_gmtoff, rp->r_stdoff,
@@ -2713,15 +2714,15 @@ addtype(const zic_t gmtoff, const char *const abbr, const int isdst,
 {
 	register int	i, j;
 
-	if (isdst != TRUE && isdst != FALSE) {
+	if (isdst != true && isdst != false) {
 		error(_("internal error - addtype called with bad isdst"));
 		exit(EXIT_FAILURE);
 	}
-	if (ttisstd != TRUE && ttisstd != FALSE) {
+	if (ttisstd != true && ttisstd != false) {
 		error(_("internal error - addtype called with bad ttisstd"));
 		exit(EXIT_FAILURE);
 	}
-	if (ttisgmt != TRUE && ttisgmt != FALSE) {
+	if (ttisgmt != true && ttisgmt != false) {
 		error(_("internal error - addtype called with bad ttisgmt"));
 		exit(EXIT_FAILURE);
 	}
@@ -2832,15 +2833,15 @@ yearistype(const int year, const char *const type)
 	int		result;
 
 	if (type == NULL || *type == '\0')
-		return TRUE;
+		return true;
 	buf = erealloc(buf, 132 + strlen(yitcommand) + strlen(type));
 	(void) sprintf(buf, "%s %d %s", yitcommand, year, type);
 	result = system(buf);
 	if (WIFEXITED(result)) switch (WEXITSTATUS(result)) {
 		case 0:
-			return TRUE;
+			return true;
 		case 1:
-			return FALSE;
+			return false;
 	}
 	error(_("Wild result from command execution"));
 	(void) fprintf(stderr, _("%s: command was '%s', result was %d\n"),
@@ -2862,22 +2863,22 @@ ciequal(register const char *ap, register const char *bp)
 {
 	while (lowerit(*ap) == lowerit(*bp++))
 		if (*ap++ == '\0')
-			return TRUE;
-	return FALSE;
+			return true;
+	return false;
 }
 
 static ATTRIBUTE_PURE int
 itsabbr(register const char *abbr, register const char *word)
 {
 	if (lowerit(*abbr) != lowerit(*word))
-		return FALSE;
+		return false;
 	++word;
 	while (*++abbr != '\0')
 		do {
 			if (*word == '\0')
-				return FALSE;
+				return false;
 		} while (lowerit(*word++) != lowerit(*abbr));
-	return TRUE;
+	return true;
 }
 
 static ATTRIBUTE_PURE const struct lookup *
diff --git a/icu4j/main/classes/charset/src/com/ibm/icu/charset/CharsetBOCU1.java b/icu4j/main/classes/charset/src/com/ibm/icu/charset/CharsetBOCU1.java
index 044d6a3b9a8..05731d0dc64 100644
--- a/icu4j/main/classes/charset/src/com/ibm/icu/charset/CharsetBOCU1.java
+++ b/icu4j/main/classes/charset/src/com/ibm/icu/charset/CharsetBOCU1.java
@@ -254,7 +254,7 @@ class CharsetBOCU1 extends CharsetICU {
          * what we need here.
          * This macro adjust the results so that the modulo-value m is always >=0.
          *
-         * For positive n, the if() condition is always FALSE.
+         * For positive n, the if() condition is always false.
          *
          * @param n Number to be split into quotient and rest.
          *          Will be modified to contain the quotient.
diff --git a/icu4j/main/classes/charset/src/com/ibm/icu/charset/CharsetMBCS.java b/icu4j/main/classes/charset/src/com/ibm/icu/charset/CharsetMBCS.java
index 6bf5a41ca53..55a10babd6f 100644
--- a/icu4j/main/classes/charset/src/com/ibm/icu/charset/CharsetMBCS.java
+++ b/icu4j/main/classes/charset/src/com/ibm/icu/charset/CharsetMBCS.java
@@ -1604,7 +1604,7 @@ class CharsetMBCS extends CharsetICU {
     }
 
     /*
-     * TRUE if not an SI/SO stateful converter, or if the match length fits with the current converter state
+     * true if not an SI/SO stateful converter, or if the match length fits with the current converter state
      */
     static boolean TO_U_VERIFY_SISO_MATCH(byte sisoState, int match) {
         return sisoState < 0 || (sisoState == 0) == (match == 1);
@@ -1994,7 +1994,7 @@ class CharsetMBCS extends CharsetICU {
              * return no match because - match>0 && value points to string: simple conversion cannot handle multiple
              * code points - match>0 && match!=length: not all input consumed, forbidden for this function - match==0:
              * no match found in the first place - match<0: partial match, not supported for simple conversion (and
-             * flush==TRUE)
+             * flush==true)
              */
             return 0xfffe;
         }
@@ -3612,10 +3612,10 @@ class CharsetMBCS extends CharsetICU {
          * @param useFallback
          *            "use fallback" flag, usually from cnv->useFallback
          * @param flush
-         *            TRUE if the end of the input stream is reached
+         *            true if the end of the input stream is reached
          * @return >1: matched, return value=total match length (number of input units matched) 1: matched, no mapping
          *         but request for  (only for the first code point) 0: no match <0: partial match, return
-         *         value=negative total match length (partial matches are never returned for flush==TRUE) (partial
+         *         value=negative total match length (partial matches are never returned for flush==true) (partial
          *         matches are never returned as being longer than UCNV_EXT_MAX_UCHARS) the matchLength is 2 if only
          *         firstCP matched, and >2 if firstCP and further code units matched
          */
@@ -3793,7 +3793,7 @@ class CharsetMBCS extends CharsetICU {
             /*
              * return no match because - match>1 && resultLength>4: result too long for simple conversion - match==1: no
              * match found,  preferred - match==0: no match found in the first place - match<0: partial
-             * match, not supported for simple conversion (and flush==TRUE)
+             * match, not supported for simple conversion (and flush==true)
              */
             return 0;
         }
diff --git a/icu4j/main/classes/charset/src/com/ibm/icu/charset/CharsetUTF7.java b/icu4j/main/classes/charset/src/com/ibm/icu/charset/CharsetUTF7.java
index 50e021866b6..ee75573f139 100644
--- a/icu4j/main/classes/charset/src/com/ibm/icu/charset/CharsetUTF7.java
+++ b/icu4j/main/classes/charset/src/com/ibm/icu/charset/CharsetUTF7.java
@@ -757,7 +757,7 @@ class CharsetUTF7 extends CharsetICU {
                     }
                 }
                 /*reset the state for the next conversion */
-                fromUnicodeStatus=((status&0xf0000000) | 0x1000000); /* keep version, inDirectMode=TRUE */
+                fromUnicodeStatus=((status&0xf0000000) | 0x1000000); /* keep version, inDirectMode=true */
             } else {
                 /* set the converter state back */
                 fromUnicodeStatus=((status&0xf0000000) | (inDirectMode<<24) | ((base64Counter & UConverterConstants.UNSIGNED_BYTE_MASK)<<16) | (bits));
diff --git a/icu4j/main/classes/collate/src/com/ibm/icu/text/StringSearch.java b/icu4j/main/classes/collate/src/com/ibm/icu/text/StringSearch.java
index 92306a1cd58..8e6e959929d 100644
--- a/icu4j/main/classes/collate/src/com/ibm/icu/text/StringSearch.java
+++ b/icu4j/main/classes/collate/src/com/ibm/icu/text/StringSearch.java
@@ -866,7 +866,7 @@ public final class StringSearch extends SearchIterator {
      * Checks for identical match
      * @param start offset of possible match
      * @param end offset of possible match
-     * @return TRUE if identical match is found
+     * @return true if identical match is found
      */
     private boolean checkIdentical(int start, int end) {
         if (strength_ != Collator.IDENTICAL) {
@@ -914,7 +914,7 @@ public final class StringSearch extends SearchIterator {
     }
 
     /*
-     * Returns TRUE if index is on a break boundary. If the UStringSearch
+     * Returns true if index is on a break boundary. If the UStringSearch
      * has an external break iterator, test using that, otherwise test
      * using the internal character break iterator.
      */
diff --git a/icu4j/main/classes/core/src/com/ibm/icu/impl/Normalizer2Impl.java b/icu4j/main/classes/core/src/com/ibm/icu/impl/Normalizer2Impl.java
index 38f24dc04a9..cfa66582d9f 100644
--- a/icu4j/main/classes/core/src/com/ibm/icu/impl/Normalizer2Impl.java
+++ b/icu4j/main/classes/core/src/com/ibm/icu/impl/Normalizer2Impl.java
@@ -906,8 +906,8 @@ public final class Normalizer2Impl {
     public static final int MIN_YES_YES_WITH_CC=0xfe02;
     public static final int JAMO_VT=0xfe00;
     public static final int MIN_NORMAL_MAYBE_YES=0xfc00;
-    public static final int JAMO_L=2;  // offset=1 hasCompBoundaryAfter=FALSE
-    public static final int INERT=1;  // offset=0 hasCompBoundaryAfter=TRUE
+    public static final int JAMO_L=2;  // offset=1 hasCompBoundaryAfter=false
+    public static final int INERT=1;  // offset=0 hasCompBoundaryAfter=true
 
     // norm16 bit 0 is comp-boundary-after.
     public static final int HAS_COMP_BOUNDARY_AFTER=1;
diff --git a/icu4j/main/classes/core/src/com/ibm/icu/impl/OlsonTimeZone.java b/icu4j/main/classes/core/src/com/ibm/icu/impl/OlsonTimeZone.java
index d514966b609..b47f3186cce 100644
--- a/icu4j/main/classes/core/src/com/ibm/icu/impl/OlsonTimeZone.java
+++ b/icu4j/main/classes/core/src/com/ibm/icu/impl/OlsonTimeZone.java
@@ -305,9 +305,9 @@ public class OlsonTimeZone extends BasicTimeZone {
     public boolean useDaylightTime() {
         // If DST was observed in 1942 (for example) but has never been
         // observed from 1943 to the present, most clients will expect
-        // this method to return FALSE.  This method determines whether
+        // this method to return false.  This method determines whether
         // DST is in use in the current year (at any point in the year)
-        // and returns TRUE if so.
+        // and returns true if so.
         long current = System.currentTimeMillis();
 
         if (finalZone != null && current >= finalStartMillis) {
@@ -320,7 +320,7 @@ public class OlsonTimeZone extends BasicTimeZone {
         long start = Grego.fieldsToDay(fields[0], 0, 1) * SECONDS_PER_DAY;
         long limit = Grego.fieldsToDay(fields[0] + 1, 0, 1) * SECONDS_PER_DAY;
 
-        // Return TRUE if DST is observed at any time during the current
+        // Return true if DST is observed at any time during the current
         // year.
         for (int i = 0; i < transitionCount; ++i) {
             if (transitionTimes64[i] >= limit) {
@@ -349,7 +349,7 @@ public class OlsonTimeZone extends BasicTimeZone {
             }
         }
 
-        // Return TRUE if DST is observed at any future time
+        // Return true if DST is observed at any future time
         long currentSec = Grego.floorDivide(current, Grego.MILLIS_PER_SECOND);
         int trsIdx = transitionCount - 1;
         if (dstOffsetAt(trsIdx) != 0) {
diff --git a/icu4j/main/classes/core/src/com/ibm/icu/impl/Trie2.java b/icu4j/main/classes/core/src/com/ibm/icu/impl/Trie2.java
index 62fe218626e..74f9dfbd78e 100644
--- a/icu4j/main/classes/core/src/com/ibm/icu/impl/Trie2.java
+++ b/icu4j/main/classes/core/src/com/ibm/icu/impl/Trie2.java
@@ -194,8 +194,8 @@ public abstract class Trie2 implements Iterable {
      * @param is   an InputStream containing the serialized form
      *             of a UTrie, version 1 or 2.  The stream must support mark() and reset().
      *             The position of the input stream will be left unchanged.
-     * @param littleEndianOk If FALSE, only big-endian (Java native) serialized forms are recognized.
-     *                    If TRUE, little-endian serialized forms are recognized as well.
+     * @param littleEndianOk If false, only big-endian (Java native) serialized forms are recognized.
+     *                    If true, little-endian serialized forms are recognized as well.
      * @return     the Trie version of the serialized form, or 0 if it is not
      *             recognized as a serialized UTrie
      * @throws     IOException on errors in reading from the input stream.
diff --git a/icu4j/main/classes/core/src/com/ibm/icu/impl/Trie2Writable.java b/icu4j/main/classes/core/src/com/ibm/icu/impl/Trie2Writable.java
index b7d2c499bf5..57a799bd6a2 100644
--- a/icu4j/main/classes/core/src/com/ibm/icu/impl/Trie2Writable.java
+++ b/icu4j/main/classes/core/src/com/ibm/icu/impl/Trie2Writable.java
@@ -356,7 +356,7 @@ public class Trie2Writable extends Trie2 {
     }
 
     /**
-     * initialValue is ignored if overwrite=TRUE
+     * initialValue is ignored if overwrite=true
      * @internal
      */
     private void fillBlock(int block, /*UChar32*/ int start, /*UChar32*/ int limit,
@@ -379,7 +379,7 @@ public class Trie2Writable extends Trie2 {
     /**
      * Set a value in a range of code points [start..end].
      * All code points c with start<=c<=end will get the value if
-     * overwrite is TRUE or if the old value is the initial value.
+     * overwrite is true or if the old value is the initial value.
      *
      * @param start the first code point to get the value
      * @param end the last code point to get the value (inclusive)
@@ -512,7 +512,7 @@ public class Trie2Writable extends Trie2 {
       * Set the values from a Trie2.Range.
       * 
       * All code points within the range will get the value if
-      * overwrite is TRUE or if the old value is the initial value.
+      * overwrite is true or if the old value is the initial value.
       *
       * Ranges with the lead surrogate flag set will set the alternate
       * lead-surrogate values in the Trie, rather than the code point values.
@@ -729,7 +729,7 @@ public class Trie2Writable extends Trie2 {
      *
      * The compaction
      * - removes blocks that are identical with earlier ones
-     * - overlaps adjacent blocks as much as possible (if overlap==TRUE)
+     * - overlaps adjacent blocks as much as possible (if overlap==true)
      * - moves blocks in steps of the data granularity
      * - moves and overlaps blocks that overlap with multiple values in the overlap region
      *
diff --git a/icu4j/main/classes/core/src/com/ibm/icu/impl/UCharacterProperty.java b/icu4j/main/classes/core/src/com/ibm/icu/impl/UCharacterProperty.java
index a40f99f3884..53d5c38393a 100644
--- a/icu4j/main/classes/core/src/com/ibm/icu/impl/UCharacterProperty.java
+++ b/icu4j/main/classes/core/src/com/ibm/icu/impl/UCharacterProperty.java
@@ -313,7 +313,7 @@ public final class UCharacterProperty
      */
     private static final boolean isgraphPOSIX(int c) {
         /* \p{space}\p{gc=Control} == \p{gc=Z}\p{Control} */
-        /* comparing ==0 returns FALSE for the categories mentioned */
+        /* comparing ==0 returns false for the categories mentioned */
         return (getMask(UCharacter.getType(c))&
                 (GC_CC_MASK|GC_CS_MASK|GC_CN_MASK|GC_Z_MASK))
                ==0;
@@ -823,7 +823,7 @@ public final class UCharacterProperty
     public int getIntPropertyMaxValue(int which) {
         if(whichuxxxx notation
      * for U+0000 to U+FFFF and Uxxxxxxxx for U+10000 and
      * above.  If the character is printable ASCII, then do nothing
-     * and return FALSE.  Otherwise, append the escaped notation and
-     * return TRUE.
+     * and return false.  Otherwise, append the escaped notation and
+     * return true.
      */
     public static  boolean escapeUnprintable(T result, int c) {
         if (isUnprintable(c)) {
diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/BidiLine.java b/icu4j/main/classes/core/src/com/ibm/icu/text/BidiLine.java
index 20806ea1f37..9e3d3bcc373 100644
--- a/icu4j/main/classes/core/src/com/ibm/icu/text/BidiLine.java
+++ b/icu4j/main/classes/core/src/com/ibm/icu/text/BidiLine.java
@@ -93,7 +93,7 @@ final class BidiLine {
            are already set to paragraph level.
            Setting trailingWSStart to pBidi->length will avoid changing the
            level of B chars from 0 to paraLevel in getLevels when
-           orderParagraphsLTR==TRUE
+           orderParagraphsLTR==true
         */
         if (dirProps[start - 1] == Bidi.B) {
             bidi.trailingWSStart = start;   /* currently == bidi.length */
diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/ConstrainedFieldPosition.java b/icu4j/main/classes/core/src/com/ibm/icu/text/ConstrainedFieldPosition.java
index fac9453d617..ea6da282f9d 100644
--- a/icu4j/main/classes/core/src/com/ibm/icu/text/ConstrainedFieldPosition.java
+++ b/icu4j/main/classes/core/src/com/ibm/icu/text/ConstrainedFieldPosition.java
@@ -203,7 +203,7 @@ public class ConstrainedFieldPosition {
      * Gets the field for the current position.
      *
      * The return value is well-defined and non-null only after
-     * FormattedValue#nextPosition returns TRUE.
+     * FormattedValue#nextPosition returns true.
      *
      * @return The field saved in the instance. See above for null conditions.
      * @stable ICU 64
@@ -215,7 +215,7 @@ public class ConstrainedFieldPosition {
     /**
      * Gets the INCLUSIVE start index for the current position.
      *
-     * The return value is well-defined only after FormattedValue#nextPosition returns TRUE.
+     * The return value is well-defined only after FormattedValue#nextPosition returns true.
      *
      * @return The start index saved in the instance.
      * @stable ICU 64
@@ -227,7 +227,7 @@ public class ConstrainedFieldPosition {
     /**
      * Gets the EXCLUSIVE end index stored for the current position.
      *
-     * The return value is well-defined only after FormattedValue#nextPosition returns TRUE.
+     * The return value is well-defined only after FormattedValue#nextPosition returns true.
      *
      * @return The end index saved in the instance.
      * @stable ICU 64
@@ -239,7 +239,7 @@ public class ConstrainedFieldPosition {
     /**
      * Gets the value associated with the current field position. The field value is often not set.
      *
-     * The return value is well-defined only after FormattedValue#nextPosition returns TRUE.
+     * The return value is well-defined only after FormattedValue#nextPosition returns true.
      *
      * @return The value for the current position. Might be null.
      * @stable ICU 64
diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/DateIntervalInfo.java b/icu4j/main/classes/core/src/com/ibm/icu/text/DateIntervalInfo.java
index 56e16d1fa36..79372384cce 100644
--- a/icu4j/main/classes/core/src/com/ibm/icu/text/DateIntervalInfo.java
+++ b/icu4j/main/classes/core/src/com/ibm/icu/text/DateIntervalInfo.java
@@ -920,8 +920,8 @@ public class DateIntervalInfo implements Cloneable, Freezable,
      * Get default order -- whether the first date in pattern is later date
      *                      or not.
      *
-     * return default date ordering in interval pattern. TRUE if the first date
-     *        in pattern is later date, FALSE otherwise.
+     * return default date ordering in interval pattern. true if the first date
+     *        in pattern is later date, false otherwise.
      * @stable ICU 4.0
      */
     public boolean getDefaultOrder()
diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/DateTimePatternGenerator.java b/icu4j/main/classes/core/src/com/ibm/icu/text/DateTimePatternGenerator.java
index c649964488d..904e7a1677b 100644
--- a/icu4j/main/classes/core/src/com/ibm/icu/text/DateTimePatternGenerator.java
+++ b/icu4j/main/classes/core/src/com/ibm/icu/text/DateTimePatternGenerator.java
@@ -1507,7 +1507,7 @@ public class DateTimePatternGenerator implements FreezableRuleBasedTransliterator for
      * indexing.
diff --git a/icu4j/main/classes/core/src/com/ibm/icu/text/UnicodeReplacer.java b/icu4j/main/classes/core/src/com/ibm/icu/text/UnicodeReplacer.java
index 7d62c714ee8..5b4460399f7 100644
--- a/icu4j/main/classes/core/src/com/ibm/icu/text/UnicodeReplacer.java
+++ b/icu4j/main/classes/core/src/com/ibm/icu/text/UnicodeReplacer.java
@@ -48,7 +48,7 @@ interface UnicodeReplacer {
      * result of calling this function is passed to the appropriate
      * parser, typically TransliteratorParser, it will produce another
      * replacer that is equal to this one.
-     * @param escapeUnprintable if TRUE then convert unprintable
+     * @param escapeUnprintable if true then convert unprintable
      * character to their hex escape representations, \\uxxxx or
      * \\Uxxxxxxxx.  Unprintable characters are defined by
      * Utility.isUnprintable().
diff --git a/icu4j/main/classes/core/src/com/ibm/icu/util/LocaleData.java b/icu4j/main/classes/core/src/com/ibm/icu/util/LocaleData.java
index 99f066dc7ab..604b3be2cb6 100644
--- a/icu4j/main/classes/core/src/com/ibm/icu/util/LocaleData.java
+++ b/icu4j/main/classes/core/src/com/ibm/icu/util/LocaleData.java
@@ -244,7 +244,7 @@ public final class LocaleData {
     /**
      * Sets the "no substitute" behavior of this locale data object.
      *
-     * @param setting   Value for the no substitute behavior.  If TRUE,
+     * @param setting   Value for the no substitute behavior.  If true,
      *                  methods of this locale data object will return
      *                  an error when no data is available for that method,
      *                  given the locale ID supplied to the constructor.
@@ -257,7 +257,7 @@ public final class LocaleData {
     /**
      * Gets the "no substitute" behavior of this locale data object.
      *
-     * @return          Value for the no substitute behavior.  If TRUE,
+     * @return          Value for the no substitute behavior.  If true,
      *                  methods of this locale data object will return
      *                  an error when no data is available for that method,
      *                  given the locale ID supplied to the constructor.
diff --git a/icu4j/main/classes/core/src/com/ibm/icu/util/ULocale.java b/icu4j/main/classes/core/src/com/ibm/icu/util/ULocale.java
index b5ea89712ee..89d1baa452a 100644
--- a/icu4j/main/classes/core/src/com/ibm/icu/util/ULocale.java
+++ b/icu4j/main/classes/core/src/com/ibm/icu/util/ULocale.java
@@ -960,7 +960,7 @@ public final class ULocale implements Serializable, Comparable {
      * Uses
      * (1) any region specified by locale tag "rg"; if none then
      * (2) any unicode_region_tag in the locale ID; if none then
-     * (3) if inferRegion is TRUE, the region suggested by
+     * (3) if inferRegion is true, the region suggested by
      *     getLikelySubtags on the localeID.
      * If no region is found, returns empty string ""
      *
@@ -968,7 +968,7 @@ public final class ULocale implements Serializable, Comparable {
      *     The locale (includes any keywords) from which
      *     to get the region to use for supplemental data.
      * @param inferRegion
-     *     If TRUE, will try to infer region from other
+     *     If true, will try to infer region from other
      *     locale elements if not found any other way.
      * @return
      *     String with region to use ("" if none found).
diff --git a/icu4j/main/classes/core/src/com/ibm/icu/util/UResourceBundleIterator.java b/icu4j/main/classes/core/src/com/ibm/icu/util/UResourceBundleIterator.java
index a0b4c8c212d..dd930b1bafb 100644
--- a/icu4j/main/classes/core/src/com/ibm/icu/util/UResourceBundleIterator.java
+++ b/icu4j/main/classes/core/src/com/ibm/icu/util/UResourceBundleIterator.java
@@ -88,7 +88,7 @@ public class UResourceBundleIterator{
     
     /**
      * Checks whether the given resource has another element to iterate over.
-     * @return TRUE if there are more elements, FALSE if there is no more elements
+     * @return true if there are more elements, false if there is no more elements
      * @stable ICU 3.8
      */
     public boolean hasNext(){
diff --git a/icu4j/main/classes/translit/src/com/ibm/icu/text/AnyTransliterator.java b/icu4j/main/classes/translit/src/com/ibm/icu/text/AnyTransliterator.java
index fcca7e2c1c7..d7fbcb3b3f9 100644
--- a/icu4j/main/classes/translit/src/com/ibm/icu/text/AnyTransliterator.java
+++ b/icu4j/main/classes/translit/src/com/ibm/icu/text/AnyTransliterator.java
@@ -342,7 +342,7 @@ class AnyTransliterator extends Transliterator {
 
 
         /**
-         * Returns TRUE if there are any more runs.  TRUE is always
+         * Returns true if there are any more runs.  true is always
          * returned at least once.  Upon return, the caller should
          * examine scriptCode, start, and limit.
          */
@@ -385,7 +385,7 @@ class AnyTransliterator extends Transliterator {
                 ++limit;
             }
 
-            // Return TRUE even if the entire text is COMMON / INHERITED, in
+            // Return true even if the entire text is COMMON / INHERITED, in
             // which case scriptCode will be UScript.INVALID_CODE.
             return true;
         }
diff --git a/icu4j/main/classes/translit/src/com/ibm/icu/text/CompoundTransliterator.java b/icu4j/main/classes/translit/src/com/ibm/icu/text/CompoundTransliterator.java
index 3defa7e1fab..9d75c0a138e 100644
--- a/icu4j/main/classes/translit/src/com/ibm/icu/text/CompoundTransliterator.java
+++ b/icu4j/main/classes/translit/src/com/ibm/icu/text/CompoundTransliterator.java
@@ -138,7 +138,7 @@ class CompoundTransliterator extends Transliterator {
      * @param splitTrans a transliterator to be inserted
      * before the entry at offset idSplitPoint in the id string.  May be
      * NULL to insert no entry.
-     * @param fixReverseID if TRUE, then reconstruct the ID of reverse
+     * @param fixReverseID if true, then reconstruct the ID of reverse
      * entries by calling getID() of component entries.  Some constructors
      * do not require this because they apply a facade ID anyway.
      */
@@ -173,7 +173,7 @@ class CompoundTransliterator extends Transliterator {
      * is, it should be in the FORWARD order; if direction is REVERSE then
      * the list order will be reversed.
      * @param direction either FORWARD or REVERSE
-     * @param fixReverseID if TRUE, then reconstruct the ID of reverse
+     * @param fixReverseID if true, then reconstruct the ID of reverse
      * entries by calling getID() of component entries.  Some constructors
      * do not require this because they apply a facade ID anyway.
      */
@@ -257,7 +257,7 @@ class CompoundTransliterator extends Transliterator {
      * Override Transliterator:
      * Create a rule string that can be passed to createFromRules()
      * to recreate this transliterator.
-     * @param escapeUnprintable if TRUE then convert unprintable
+     * @param escapeUnprintable if true then convert unprintable
      * character to their hex escape representations, \\uxxxx or
      * \\Uxxxxxxxx.  Unprintable characters are those other than
      * U+000A, U+0020..U+007E.
diff --git a/icu4j/main/classes/translit/src/com/ibm/icu/text/RuleBasedTransliterator.java b/icu4j/main/classes/translit/src/com/ibm/icu/text/RuleBasedTransliterator.java
index 33c9588e65f..a80b697607d 100644
--- a/icu4j/main/classes/translit/src/com/ibm/icu/text/RuleBasedTransliterator.java
+++ b/icu4j/main/classes/translit/src/com/ibm/icu/text/RuleBasedTransliterator.java
@@ -183,7 +183,7 @@ public class RuleBasedTransliterator extends Transliterator {
      * Return a representation of this transliterator as source rules.
      * These rules will produce an equivalent transliterator if used
      * to construct a new transliterator.
-     * @param escapeUnprintable if TRUE then convert unprintable
+     * @param escapeUnprintable if true then convert unprintable
      * character to their hex escape representations, \\uxxxx or
      * \\Uxxxxxxxx.  Unprintable characters are those other than
      * U+000A, U+0020..U+007E.
diff --git a/icu4j/main/classes/translit/src/com/ibm/icu/text/TransliterationRule.java b/icu4j/main/classes/translit/src/com/ibm/icu/text/TransliterationRule.java
index 33821d74bfc..2b7f0da9802 100644
--- a/icu4j/main/classes/translit/src/com/ibm/icu/text/TransliterationRule.java
+++ b/icu4j/main/classes/translit/src/com/ibm/icu/text/TransliterationRule.java
@@ -360,11 +360,11 @@ class TransliterationRule {
      *
      * @param text the text
      * @param pos the position indices
-     * @param incremental if TRUE, test for partial matches that may
+     * @param incremental if true, test for partial matches that may
      * be completed by additional text inserted at pos.limit.
      * @return one of U_MISMATCH,
      * U_PARTIAL_MATCH, or U_MATCH.  If
-     * incremental is FALSE then U_PARTIAL_MATCH will not be returned.
+     * incremental is false then U_PARTIAL_MATCH will not be returned.
      */
     public int matchAndReplace(Replaceable text,
                                Transliterator.Position pos,
diff --git a/icu4j/main/classes/translit/src/com/ibm/icu/text/TransliterationRuleSet.java b/icu4j/main/classes/translit/src/com/ibm/icu/text/TransliterationRuleSet.java
index 73c50b93a09..3c2b6a3c33d 100644
--- a/icu4j/main/classes/translit/src/com/ibm/icu/text/TransliterationRuleSet.java
+++ b/icu4j/main/classes/translit/src/com/ibm/icu/text/TransliterationRuleSet.java
@@ -176,14 +176,14 @@ class TransliterationRuleSet {
 
     /**
      * Transliterate the given text with the given UTransPosition
-     * indices.  Return TRUE if the transliteration should continue
-     * or FALSE if it should halt (because of a U_PARTIAL_MATCH match).
-     * Note that FALSE is only ever returned if isIncremental is TRUE.
+     * indices.  Return true if the transliteration should continue
+     * or false if it should halt (because of a U_PARTIAL_MATCH match).
+     * Note that false is only ever returned if isIncremental is true.
      * @param text the text to be transliterated
      * @param pos the position indices, which will be updated
-     * @param incremental if TRUE, assume new text may be inserted
-     * at index.limit, and return FALSE if there is a partial match.
-     * @return TRUE unless a U_PARTIAL_MATCH has been obtained,
+     * @param incremental if true, assume new text may be inserted
+     * at index.limit, and return false if there is a partial match.
+     * @return true unless a U_PARTIAL_MATCH has been obtained,
      * indicating that transliteration should stop until more text
      * arrives.
      */
diff --git a/icu4j/main/classes/translit/src/com/ibm/icu/text/Transliterator.java b/icu4j/main/classes/translit/src/com/ibm/icu/text/Transliterator.java
index 810d7c2edfa..8a561dd26a6 100644
--- a/icu4j/main/classes/translit/src/com/ibm/icu/text/Transliterator.java
+++ b/icu4j/main/classes/translit/src/com/ibm/icu/text/Transliterator.java
@@ -1022,14 +1022,14 @@ public abstract class Transliterator implements StringTransform  {
      * Top-level transliteration method, handling filtering, incremental and
      * non-incremental transliteration, and rollback.  All transliteration
      * public API methods eventually call this method with a rollback argument
-     * of TRUE.  Other entities may call this method but rollback should be
-     * FALSE.
+     * of true.  Other entities may call this method but rollback should be
+     * false.
      *
      * 

If this transliterator has a filter, break up the input text into runs * of unfiltered characters. Pass each run to * .handleTransliterate(). * - *

In incremental mode, if rollback is TRUE, perform a special + *

In incremental mode, if rollback is true, perform a special * incremental procedure in which several passes are made over the input * text, adding one character at a time, and committing successful * transliterations as they occur. Unsuccessful transliterations are rolled @@ -1037,12 +1037,12 @@ public abstract class Transliterator implements StringTransform { * * @param text the text to be transliterated * @param index the position indices - * @param incremental if TRUE, then assume more characters may be inserted + * @param incremental if true, then assume more characters may be inserted * at index.limit, and postpone processing to accommodate future incoming * characters - * @param rollback if TRUE and if incremental is TRUE, then perform special + * @param rollback if true and if incremental is true, then perform special * incremental processing, as described above, and undo partial - * transliterations where necessary. If incremental is FALSE then this + * transliterations where necessary. If incremental is false then this * parameter is ignored. */ private void filteredTransliterate(Replaceable text, @@ -1127,7 +1127,7 @@ public abstract class Transliterator implements StringTransform { // Is this run incremental? If there is additional // filtered text (if limit < globalLimit) then we pass in - // an incremental value of FALSE to force the subclass to + // an incremental value of false to force the subclass to // complete the transliteration for this run. boolean isIncrementalRun = (index.limit < globalLimit ? false : incremental); @@ -1354,7 +1354,7 @@ public abstract class Transliterator implements StringTransform { * another transliterator. * @param text the text to be transliterated * @param index the position indices - * @param incremental if TRUE, then assume more characters may be inserted + * @param incremental if true, then assume more characters may be inserted * at index.limit, and postpone processing to accommodate future incoming * characters * @stable ICU 2.0 diff --git a/icu4j/main/classes/translit/src/com/ibm/icu/text/TransliteratorRegistry.java b/icu4j/main/classes/translit/src/com/ibm/icu/text/TransliteratorRegistry.java index 9d5ae197305..b39d8353c97 100644 --- a/icu4j/main/classes/translit/src/com/ibm/icu/text/TransliteratorRegistry.java +++ b/icu4j/main/classes/translit/src/com/ibm/icu/text/TransliteratorRegistry.java @@ -96,8 +96,8 @@ class TransliteratorRegistry { private String spec; // current spec private String nextSpec; // next spec private String scriptName; // script name equivalent of top, if != top - private boolean isSpecLocale; // TRUE if spec is a locale - private boolean isNextLocale; // TRUE if nextSpec is a locale + private boolean isSpecLocale; // true if spec is a locale + private boolean isNextLocale; // true if nextSpec is a locale private ICUResourceBundle res; public Spec(String theSpec) { diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/bidi/TestMultipleParagraphs.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/bidi/TestMultipleParagraphs.java index 3a2acb93edb..7ba0fee9713 100644 --- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/bidi/TestMultipleParagraphs.java +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/bidi/TestMultipleParagraphs.java @@ -202,7 +202,7 @@ public class TestMultipleParagraphs extends BidiFmwk { errln("For line limits " + i + "-" + k + " got failure"); } - /* check level of block separator at end of paragraph when orderParagraphsLTR==FALSE */ + /* check level of block separator at end of paragraph when orderParagraphsLTR==false */ try { bidi.setPara(src, Bidi.RTL, null); } catch (IllegalArgumentException e) { @@ -256,7 +256,7 @@ public class TestMultipleParagraphs extends BidiFmwk { orderParagraphsLTR = bidi.isOrderParagraphsLTR(); assertTrue("orderParagraphsLTR is false", orderParagraphsLTR); - /* check level of block separator at end of paragraph when orderParagraphsLTR==TRUE */ + /* check level of block separator at end of paragraph when orderParagraphsLTR==true */ try { bidi.setPara(src, Bidi.RTL, null); } catch (IllegalArgumentException e) { @@ -376,7 +376,7 @@ public class TestMultipleParagraphs extends BidiFmwk { } /* check handling of whitespace before end of paragraph separator when - * orderParagraphsLTR==TRUE, when last paragraph has, and lacks, a terminating B + * orderParagraphsLTR==true, when last paragraph has, and lacks, a terminating B */ chars = src.toCharArray(); Arrays.fill(chars, '\u0020'); diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/calendar/CompatibilityTest.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/calendar/CompatibilityTest.java index 418f017dae2..696d8c24bec 100644 --- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/calendar/CompatibilityTest.java +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/calendar/CompatibilityTest.java @@ -510,7 +510,7 @@ public class CompatibilityTest extends TestFmwk { GregorianCalendar c = new GregorianCalendar(); logln("With cutoff " + c.getGregorianChange()); logln(" isLeapYear(1800) = " + (b=c.isLeapYear(1800))); - logln(" (should be FALSE)"); + logln(" (should be false)"); if (b != false) errln("FAIL"); java.util.Calendar tempcal = java.util.Calendar.getInstance(); tempcal.clear(); @@ -518,7 +518,7 @@ public class CompatibilityTest extends TestFmwk { c.setGregorianChange(tempcal.getTime()); // Jan 1 1900 logln("With cutoff " + c.getGregorianChange()); logln(" isLeapYear(1800) = " + (b=c.isLeapYear(1800))); - logln(" (should be TRUE)"); + logln(" (should be true)"); if (b != true) errln("FAIL"); } diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/DateFormatTest.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/DateFormatTest.java index 86fb24051c2..627aedf65e1 100644 --- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/DateFormatTest.java +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/DateFormatTest.java @@ -4996,37 +4996,37 @@ public class DateFormatTest extends TestFmwk { // Set calendar to strict fmt.setCalendarLenient(false); - assertFalse("isLenient after setCalendarLenient(FALSE)", fmt.isLenient()); - assertFalse("isCalendarLenient after setCalendarLenient(FALSE)", fmt.isCalendarLenient()); - assertTrue("ALLOW_WHITESPACE after setCalendarLenient(FALSE)", fmt.getBooleanAttribute(BooleanAttribute.PARSE_ALLOW_WHITESPACE)); - assertTrue("ALLOW_NUMERIC after setCalendarLenient(FALSE)", fmt.getBooleanAttribute(BooleanAttribute.PARSE_ALLOW_NUMERIC)); + assertFalse("isLenient after setCalendarLenient(false)", fmt.isLenient()); + assertFalse("isCalendarLenient after setCalendarLenient(false)", fmt.isCalendarLenient()); + assertTrue("ALLOW_WHITESPACE after setCalendarLenient(false)", fmt.getBooleanAttribute(BooleanAttribute.PARSE_ALLOW_WHITESPACE)); + assertTrue("ALLOW_NUMERIC after setCalendarLenient(false)", fmt.getBooleanAttribute(BooleanAttribute.PARSE_ALLOW_NUMERIC)); // Set to strict fmt.setLenient(false); - assertFalse("isLenient after setLenient(FALSE)", fmt.isLenient()); - assertFalse("isCalendarLenient after setLenient(FALSE)", fmt.isCalendarLenient()); - assertFalse("ALLOW_WHITESPACE after setLenient(FALSE)", fmt.getBooleanAttribute(BooleanAttribute.PARSE_ALLOW_WHITESPACE)); - assertFalse("ALLOW_NUMERIC after setLenient(FALSE)", fmt.getBooleanAttribute(BooleanAttribute.PARSE_ALLOW_NUMERIC)); + assertFalse("isLenient after setLenient(false)", fmt.isLenient()); + assertFalse("isCalendarLenient after setLenient(false)", fmt.isCalendarLenient()); + assertFalse("ALLOW_WHITESPACE after setLenient(false)", fmt.getBooleanAttribute(BooleanAttribute.PARSE_ALLOW_WHITESPACE)); + assertFalse("ALLOW_NUMERIC after setLenient(false)", fmt.getBooleanAttribute(BooleanAttribute.PARSE_ALLOW_NUMERIC)); // These two boolean attributes are NOT affected according to the API specification - assertTrue("PARTIAL_MATCH after setLenient(FALSE)", fmt.getBooleanAttribute(BooleanAttribute.PARSE_PARTIAL_LITERAL_MATCH)); - assertTrue("MULTIPLE_PATTERNS after setLenient(FALSE)", fmt.getBooleanAttribute(BooleanAttribute.PARSE_MULTIPLE_PATTERNS_FOR_MATCH)); + assertTrue("PARTIAL_MATCH after setLenient(false)", fmt.getBooleanAttribute(BooleanAttribute.PARSE_PARTIAL_LITERAL_MATCH)); + assertTrue("MULTIPLE_PATTERNS after setLenient(false)", fmt.getBooleanAttribute(BooleanAttribute.PARSE_MULTIPLE_PATTERNS_FOR_MATCH)); // Allow white space leniency fmt.setBooleanAttribute(BooleanAttribute.PARSE_ALLOW_WHITESPACE, true); - assertFalse("isLenient after ALLOW_WHITESPACE/TRUE", fmt.isLenient()); - assertFalse("isCalendarLenient after ALLOW_WHITESPACE/TRUE", fmt.isCalendarLenient()); - assertTrue("ALLOW_WHITESPACE after ALLOW_WHITESPACE/TRUE", fmt.getBooleanAttribute(BooleanAttribute.PARSE_ALLOW_WHITESPACE)); - assertFalse("ALLOW_NUMERIC after ALLOW_WHITESPACE/TRUE", fmt.getBooleanAttribute(BooleanAttribute.PARSE_ALLOW_NUMERIC)); + assertFalse("isLenient after ALLOW_WHITESPACE/true", fmt.isLenient()); + assertFalse("isCalendarLenient after ALLOW_WHITESPACE/true", fmt.isCalendarLenient()); + assertTrue("ALLOW_WHITESPACE after ALLOW_WHITESPACE/true", fmt.getBooleanAttribute(BooleanAttribute.PARSE_ALLOW_WHITESPACE)); + assertFalse("ALLOW_NUMERIC after ALLOW_WHITESPACE/true", fmt.getBooleanAttribute(BooleanAttribute.PARSE_ALLOW_NUMERIC)); // Set to lenient fmt.setLenient(true); - assertTrue("isLenient after setLenient(TRUE)", fmt.isLenient()); - assertTrue("isCalendarLenient after setLenient(TRUE)", fmt.isCalendarLenient()); - assertTrue("ALLOW_WHITESPACE after setLenient(TRUE)", fmt.getBooleanAttribute(BooleanAttribute.PARSE_ALLOW_WHITESPACE)); - assertTrue("ALLOW_NUMERIC after setLenient(TRUE)", fmt.getBooleanAttribute(BooleanAttribute.PARSE_ALLOW_NUMERIC)); + assertTrue("isLenient after setLenient(true)", fmt.isLenient()); + assertTrue("isCalendarLenient after setLenient(true)", fmt.isCalendarLenient()); + assertTrue("ALLOW_WHITESPACE after setLenient(true)", fmt.getBooleanAttribute(BooleanAttribute.PARSE_ALLOW_WHITESPACE)); + assertTrue("ALLOW_NUMERIC after setLenient(true)", fmt.getBooleanAttribute(BooleanAttribute.PARSE_ALLOW_NUMERIC)); } diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/IntlTestDecimalFormatAPIC.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/IntlTestDecimalFormatAPIC.java index f2cc1d01ccc..1b62ddf9473 100644 --- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/IntlTestDecimalFormatAPIC.java +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/IntlTestDecimalFormatAPIC.java @@ -285,7 +285,7 @@ public class IntlTestDecimalFormatAPIC extends TestFmwk { pat.setRoundingIncrement(java.math.BigDecimal.ONE); resultStr = pat.format(Roundingnumber); message = "round(" + Roundingnumber - + "," + mode + ",FALSE) with RoundingIncrement=1.0==>"; + + "," + mode + ",false) with RoundingIncrement=1.0==>"; verify(message, resultStr, result[i++]); message = ""; resultStr = ""; @@ -293,7 +293,7 @@ public class IntlTestDecimalFormatAPIC extends TestFmwk { //for -2.55 with RoundingIncrement=1.0 resultStr = pat.format(Roundingnumber1); message = "round(" + Roundingnumber1 - + "," + mode + ",FALSE) with RoundingIncrement=1.0==>"; + + "," + mode + ",false) with RoundingIncrement=1.0==>"; verify(message, resultStr, result[i++]); message = ""; resultStr = ""; diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/MessageRegressionTest.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/MessageRegressionTest.java index ecd2978078c..7be9c872e56 100644 --- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/MessageRegressionTest.java +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/MessageRegressionTest.java @@ -212,7 +212,7 @@ public class MessageRegressionTest extends TestFmwk { ChoiceFormat cf = new ChoiceFormat(limits, formats); try { log("Compares to null is always false, returned : "); - logln(cf.equals(null) ? "TRUE" : "FALSE"); + logln(cf.equals(null) ? "true" : "false"); } catch (Exception foo) { errln("ChoiceFormat.equals(null) throws exception."); } diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/NumberFormatRegressionTest.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/NumberFormatRegressionTest.java index e8b64183864..2f02149f1d3 100644 --- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/NumberFormatRegressionTest.java +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/NumberFormatRegressionTest.java @@ -57,7 +57,7 @@ public class NumberFormatRegressionTest extends TestFmwk { } /** - * DateFormat should call setIntegerParseOnly(TRUE) on adopted + * DateFormat should call setIntegerParseOnly(true) on adopted * NumberFormat objects. */ @Test diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/TestMessageFormat.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/TestMessageFormat.java index 8b568e1ea1f..75ae49f6438 100644 --- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/TestMessageFormat.java +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/TestMessageFormat.java @@ -237,12 +237,12 @@ public class TestMessageFormat extends TestFmwk { // } else if (parseCount != count) { // errln("MSG count not %d as expected. Got %d", count, parseCount); // } - // UBool failed = FALSE; + // UBool failed = false; // for (int j = 0; j < parseCount; ++j) { // if (values == 0 || testArgs[j] != values[j]) { // errln(((String)"MSG testargs[") + j + "]: " + toString(testArgs[j])); // errln(((String)"MSG values[") + j + "] : " + toString(values[j])); - // failed = TRUE; + // failed = true; // } // } // if (failed) diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/lang/UnicodeSetStringSpanTest.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/lang/UnicodeSetStringSpanTest.java index 8605e311715..a2e254c01f9 100644 --- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/lang/UnicodeSetStringSpanTest.java +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/lang/UnicodeSetStringSpanTest.java @@ -88,13 +88,13 @@ public class UnicodeSetStringSpanTest extends TestFmwk { UnicodeSet set = new UnicodeSet(pattern); if (set.containsAll(string)) { - errln("FAIL: UnicodeSet(" + pattern + ").containsAll(" + string + ") should be FALSE"); + errln("FAIL: UnicodeSet(" + pattern + ").containsAll(" + string + ") should be false"); } // Remove trailing "aaaa". String string16 = string.substring(0, string.length() - 4); if (!set.containsAll(string16)) { - errln("FAIL: UnicodeSet(" + pattern + ").containsAll(" + string + "[:-4]) should be TRUE"); + errln("FAIL: UnicodeSet(" + pattern + ").containsAll(" + string + "[:-4]) should be true"); } String s16 = "byayaxya"; diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/normalizer/BasicTest.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/normalizer/BasicTest.java index 310bc1f2c89..929865bec1c 100644 --- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/normalizer/BasicTest.java +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/normalizer/BasicTest.java @@ -2118,7 +2118,7 @@ public class BasicTest extends TestFmwk { nfcNorm2.getDecomposition(0x4e00)!=null || nfcNorm2.getDecomposition(0x20002)!=null ) { - errln("NFC.getDecomposition() returns TRUE for characters which do not have decompositions"); + errln("NFC.getDecomposition() returns true for characters which do not have decompositions"); } // test getRawDecomposition() for some characters that do not decompose @@ -2126,7 +2126,7 @@ public class BasicTest extends TestFmwk { nfcNorm2.getRawDecomposition(0x4e00)!=null || nfcNorm2.getRawDecomposition(0x20002)!=null ) { - errln("getRawDecomposition() returns TRUE for characters which do not have decompositions"); + errln("getRawDecomposition() returns true for characters which do not have decompositions"); } // test composePair() for some pairs of characters that do not compose diff --git a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/normalizer/ConformanceTest.java b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/normalizer/ConformanceTest.java index 01fc682efc8..ee484bfe21a 100644 --- a/icu4j/main/tests/core/src/com/ibm/icu/dev/test/normalizer/ConformanceTest.java +++ b/icu4j/main/tests/core/src/com/ibm/icu/dev/test/normalizer/ConformanceTest.java @@ -194,7 +194,7 @@ public class ConformanceTest extends TestFmwk { pass = false; } if(!field[0].equals(field[1]) && Normalizer.isNormalized(field[0], Normalizer.NFC, options)) { - errln("Normalizer error: isNormalized(s, Normalizer.NFC) is TRUE"); + errln("Normalizer error: isNormalized(s, Normalizer.NFC) is true"); pass = false; } if(!Normalizer.isNormalized(field[3], Normalizer.NFKC, options)) { @@ -202,7 +202,7 @@ public class ConformanceTest extends TestFmwk { pass = false; } if(!field[0].equals(field[3]) && Normalizer.isNormalized(field[0], Normalizer.NFKC, options)) { - errln("Normalizer error: isNormalized(s, Normalizer.NFKC) is TRUE"); + errln("Normalizer error: isNormalized(s, Normalizer.NFKC) is true"); pass = false; } // test api that takes a char[] diff --git a/icu4j/main/tests/framework/src/com/ibm/icu/dev/test/TestUtil.java b/icu4j/main/tests/framework/src/com/ibm/icu/dev/test/TestUtil.java index d09dacbf0ef..59e4dcbe7d7 100644 --- a/icu4j/main/tests/framework/src/com/ibm/icu/dev/test/TestUtil.java +++ b/icu4j/main/tests/framework/src/com/ibm/icu/dev/test/TestUtil.java @@ -116,8 +116,8 @@ public final class TestUtil { * Escape unprintable characters using uxxxx notation * for U+0000 to U+FFFF and Uxxxxxxxx for U+10000 and * above. If the character is printable ASCII, then do nothing - * and return FALSE. Otherwise, append the escaped notation and - * return TRUE. + * and return false. Otherwise, append the escaped notation and + * return true. */ public static boolean escapeUnprintable(StringBuffer result, int c) { if (isUnprintable(c)) { diff --git a/icu4j/main/tests/translit/src/com/ibm/icu/dev/test/translit/RoundTripTest.java b/icu4j/main/tests/translit/src/com/ibm/icu/dev/test/translit/RoundTripTest.java index 79efba4a0fd..5884ace56aa 100644 --- a/icu4j/main/tests/translit/src/com/ibm/icu/dev/test/translit/RoundTripTest.java +++ b/icu4j/main/tests/translit/src/com/ibm/icu/dev/test/translit/RoundTripTest.java @@ -1162,7 +1162,7 @@ public class RoundTripTest extends TestFmwk { break; } } - //System.out.println("FALSE"); + //System.out.println("false"); return false; } diff --git a/icu4j/main/tests/translit/src/com/ibm/icu/dev/test/translit/TransliteratorTest.java b/icu4j/main/tests/translit/src/com/ibm/icu/dev/test/translit/TransliteratorTest.java index 2bc5388e9e2..bad8781ef24 100644 --- a/icu4j/main/tests/translit/src/com/ibm/icu/dev/test/translit/TransliteratorTest.java +++ b/icu4j/main/tests/translit/src/com/ibm/icu/dev/test/translit/TransliteratorTest.java @@ -596,11 +596,11 @@ public class TransliteratorTest extends TestFmwk { //| } //| UnicodeString out(data[i]); //| gl->transliterate(out); - //| bool_t ok = TRUE; + //| bool_t ok = true; //| if (data[i].length() >= 2 && out.length() >= 2 && //| u_isupper(data[i].charAt(0)) && u_islower(data[i].charAt(1))) { //| if (!(u_isupper(out.charAt(0)) && u_islower(out.charAt(1)))) { - //| ok = FALSE; + //| ok = false; //| } //| } //| if (ok) { diff --git a/tools/colprobe/colprobe.cpp b/tools/colprobe/colprobe.cpp index 91165f151cd..635ef748221 100644 --- a/tools/colprobe/colprobe.cpp +++ b/tools/colprobe/colprobe.cpp @@ -66,10 +66,10 @@ const int SORT_DEFAULT = 0; #include "line.h" -static UBool gVerbose = FALSE; -static UBool gDebug = FALSE; -static UBool gQuiet = FALSE; -static UBool gExemplar = FALSE; +static UBool gVerbose = false; +static UBool gDebug = false; +static UBool gQuiet = false; +static UBool gExemplar = false; DWORD gWinLCID; int gCount; @@ -80,8 +80,8 @@ Line source; Line target; Line *gSource = &source; Line *gTarget = ⌖ -Hashtable gElements(FALSE); -Hashtable gExpansions(FALSE); +Hashtable gElements(false); +Hashtable gExpansions(false); CompareFn gComparer; const UChar separatorChar = 0x0030; @@ -99,7 +99,7 @@ int32_t gPlatformNo = 0; int32_t gPlatformIndexes[10]; int32_t gLocaleNo = 0; const char* gLocales[100]; -UBool gRulesStdin = FALSE; +UBool gRulesStdin = false; enum { HELP1, @@ -217,17 +217,17 @@ void processArgs(int argc, char* argv[], UErrorCode &status) return; } if(options[VERBOSE].doesOccur) { - gVerbose = TRUE; + gVerbose = true; } if(options[DEBUG].doesOccur) { - gDebug = TRUE; - gVerbose = TRUE; + gDebug = true; + gVerbose = true; } if(options[EXEMPLAR].doesOccur) { - gExemplar = TRUE; + gExemplar = true; } if(options[QUIET].doesOccur) { - gQuiet = TRUE; + gQuiet = true; } /* for(i = 8; i < 9; i++) { @@ -249,7 +249,7 @@ void processArgs(int argc, char* argv[], UErrorCode &status) // In that case, we test only ICU and don't need // a locale. if(options[RULESSTDIN].doesOccur) { - gRulesStdin = TRUE; + gRulesStdin = true; addPlatform("icu"); return; } @@ -379,9 +379,9 @@ UBool trySwamped(Line **smaller, Line **greater, UChar chars[2], CompareFn compa gTarget->len = (*greater)->len+2; if(comparer(&gSource, &gTarget) > 0) { - return TRUE; + return true; } else { - return FALSE; + return false; } } @@ -397,9 +397,9 @@ UBool trySwamps(Line **smaller, Line **greater, UChar chars[2], CompareFn compar gTarget->len = (*greater)->len+2; if(comparer(&gSource, &gTarget) < 0) { - return TRUE; + return true; } else { - return FALSE; + return false; } } @@ -523,7 +523,7 @@ void printLine(Line *line, UFILE *file) { } } -void printOrdering(Line **lines, int32_t size, UFILE *file, UBool useLinks = FALSE) { +void printOrdering(Line **lines, int32_t size, UFILE *file, UBool useLinks = false) { int32_t i = 0; //printLine(*lines); @@ -586,7 +586,7 @@ noteExpansion(Line **gLines, Line *line, int32_t size, CompareFn comparer) { //Line *toInsert = (Line *)gElements.get(key); Line *toInsert = (Line *)gExpansions.get(key); if(toInsert != NULL) { - toInsert->isExpansion = TRUE; + toInsert->isExpansion = true; u_strcpy(toInsert->expansionString, line->expansionString); toInsert->expLen = line->expLen; toInsert->previous->next = toInsert->next; @@ -594,7 +594,7 @@ noteExpansion(Line **gLines, Line *line, int32_t size, CompareFn comparer) { gElements.remove(key); } else { toInsert = new Line(*line); - toInsert->isExpansion = TRUE; + toInsert->isExpansion = true; gElements.put(UnicodeString(toInsert->name, toInsert->len), toInsert, status); } @@ -657,7 +657,7 @@ positionExpansions(Line **gLines, int32_t size, CompareFn comparer) { u_fprintf(log, "Positioned expansion without moving "); printLine(toMove, log); u_fprintf(log, " new ordering: \n"); - printOrdering(gLines, size, log, TRUE); + printOrdering(gLines, size, log, true); } break; } else { @@ -693,7 +693,7 @@ positionExpansions(Line **gLines, int32_t size, CompareFn comparer) { u_fprintf(log, "Positioned expansion "); printLine(toMove, log); u_fprintf(log, " new ordering: \n"); - printOrdering(gLines, size, log, TRUE); + printOrdering(gLines, size, log, true); } if(toMove->strength == UCOL_IDENTICAL) { // check for craziness such as s = ss/s @@ -705,7 +705,7 @@ positionExpansions(Line **gLines, int32_t size, CompareFn comparer) { if(u_strcmp(fullString, toMove->name) == 0) { toMove->previous->next = toMove->next; toMove->next->previous = toMove->previous; - toMove->isRemoved = TRUE; + toMove->isRemoved = true; u_fprintf(log, "Removed: "); printLine(toMove, log); u_fprintf(log, "\n"); @@ -718,7 +718,7 @@ positionExpansions(Line **gLines, int32_t size, CompareFn comparer) { toMove->next->strength = toMove->strength; toMove->previous->next = toMove->next; toMove->next->previous = toMove->previous; - toMove->isRemoved = TRUE; + toMove->isRemoved = true; u_fprintf(log, "Removed because of back: "); printLine(toMove, log); u_fprintf(log, "\n"); @@ -741,17 +741,17 @@ noteExpansion(Line *line) { UnicodeString key(line->name, line->len); Line *el = (Line *)gElements.get(key); if(el != NULL) { - el->isExpansion = TRUE; + el->isExpansion = true; u_strcpy(el->expansionString, line->expansionString); el->expLen = line->expLen; } else { Line *toInsert = new Line(*line); - toInsert->isExpansion = TRUE; + toInsert->isExpansion = true; gElements.put(UnicodeString(line->name, line->len), toInsert, status); } Line *el2 = (Line *)gExpansions.get(key); - el2->isExpansion = TRUE; + el2->isExpansion = true; u_strcpy(el2->expansionString, line->expansionString); el2->expLen = line->expLen; @@ -766,7 +766,7 @@ void noteContraction(Line *line) { UErrorCode status = U_ZERO_ERROR; Line *toInsert = new Line(*line); - toInsert->isContraction = TRUE; + toInsert->isContraction = true; gElements.put(UnicodeString(line->name, line->len), toInsert, status); if(gVerbose) { u_fprintf(log, "Adding contraction\n"); @@ -802,14 +802,14 @@ analyzeContractions(Line** lines, int32_t size, CompareFn comparer) { Line **prevLine = lines; Line **currLine = NULL; Line **backupLine = NULL; - UBool prevIsContraction = FALSE, currIsContraction = FALSE; + UBool prevIsContraction = false, currIsContraction = false; // Problem here is detecting a contraction that is at the very end of the sorted list for(i = 1; i < size; i++) { currLine = lines+i; strength = probeStrength(prevLine, currLine, comparer); if(strength == UCOL_OFF || strength != (*currLine)->strength) { - prevIsContraction = FALSE; - currIsContraction = FALSE; + prevIsContraction = false; + currIsContraction = false; if(!outOfOrder) { if(gVerbose) { u_fprintf(log, "Possible contractions: "); @@ -832,7 +832,7 @@ analyzeContractions(Line** lines, int32_t size, CompareFn comparer) { (strength = probeStrength(prevLine, (backupLine = lines+j), comparer)) == UCOL_OFF) { j++; // if we skipped more than one, it might be in fact a contraction - prevIsContraction = TRUE; + prevIsContraction = true; } if(prevIsContraction) { noteContraction(*prevLine); @@ -857,7 +857,7 @@ analyzeContractions(Line** lines, int32_t size, CompareFn comparer) { while(j >= 0 && (strength = probeStrength((backupLine = lines+j), currLine, comparer)) == UCOL_OFF) { j--; - currIsContraction = TRUE; + currIsContraction = true; } if(currIsContraction) { if(gVerbose) { @@ -1002,7 +1002,7 @@ detectExpansions(Line **gLines, int32_t size, CompareFn comparer) { // check whether it is a contraction that is the same as an expansion // or a multi character that doesn't do anything current->addExpansionHit(i, j); - current->isExpansion = TRUE; + current->isExpansion = true; current->expIndex = k; // cache expansion gExpansions.put(UnicodeString(current->name, current->len), current, status); //new Line(*current) @@ -1124,7 +1124,7 @@ detectExpansions(Line **gLines, int32_t size, CompareFn comparer) { UBool isTailored(Line *line, UErrorCode &status) { - UBool result = FALSE; + UBool result = false; UCollationElements *tailoring = ucol_openElements(gCol, line->name, line->len, &status); UCollationElements *uca = ucol_openElements(gUCA, line->name, line->len, &status); @@ -1139,7 +1139,7 @@ isTailored(Line *line, UErrorCode &status) { ucaElement = ucol_next(uca, &status); } while(ucaElement == 0); if(tailElement != ucaElement) { - result = TRUE; + result = true; break; } } while (tailElement != UCOL_NULLORDER && ucaElement != UCOL_NULLORDER); @@ -1158,10 +1158,10 @@ reduceUntailored(Line **gLines, int32_t size){ // if the current line is not tailored according to the UCA if(!isTailored(current, status)) { // we remove it - current->isRemoved = TRUE; + current->isRemoved = true; } else { // if it's tailored - if(current->previous && current->previous->isRemoved == TRUE) { + if(current->previous && current->previous->isRemoved == true) { previous = current->previous; while(previous && (previous->strength > current->strength || previous->isExpansion || previous->isContraction) && previous->isRemoved) { if(previous->previous && previous->previous->isRemoved) { @@ -1171,9 +1171,9 @@ reduceUntailored(Line **gLines, int32_t size){ } } if(previous) { - previous->isReset = TRUE; + previous->isReset = true; } else { - (*(gLines))->isReset = TRUE; + (*(gLines))->isReset = true; } } } @@ -1231,14 +1231,14 @@ constructAndAnalyze(Line **gLines, Line *lines, int32_t size, CompareFn comparer if(gVerbose) { u_fprintf(log, "After positioning expansions:\n"); - printOrdering(gLines, size, log, TRUE); + printOrdering(gLines, size, log, true); } //reduceUntailored(gLines, size); if(!gQuiet) { u_fprintf(out, "Final result\n"); } - printOrdering(gLines, size, out, TRUE); - printOrdering(gLines, size, log, TRUE); + printOrdering(gLines, size, out, true); + printOrdering(gLines, size, log, true); } // Check whether upper case comes before lower case or vice-versa @@ -1351,7 +1351,7 @@ void removeIgnorableChars(UnicodeSet &exemplarUSet, CompareFn comparer, UErrorCo primaryIgnorables.add(exemplarUSetIter.getString()); } } else { // process code point - UBool isError = FALSE; + UBool isError = false; UChar32 codePoint = exemplarUSetIter.getCodepoint(); currLine->len = 0; U16_APPEND(currLine->name, currLine->len, 25, codePoint, isError); @@ -1372,14 +1372,14 @@ void removeIgnorableChars(UnicodeSet &exemplarUSet, CompareFn comparer, UErrorCo UnicodeString removedPattern; if(ignorables.size()) { u_fprintf(log, "Ignorables:\n"); - ignorables.toPattern(removedPattern, TRUE); + ignorables.toPattern(removedPattern, true); removedPattern.setCharAt(removedPattern.length(), 0); escapeString(removedPattern.getBuffer(), removedPattern.length(), log); u_fprintf(log, "\n"); } if(primaryIgnorables.size()) { u_fprintf(log, "Primary ignorables:\n"); - primaryIgnorables.toPattern(removedPattern, TRUE); + primaryIgnorables.toPattern(removedPattern, true); removedPattern.setCharAt(removedPattern.length(), 0); escapeString(removedPattern.getBuffer(), removedPattern.length(), log); u_fprintf(log, "\n"); @@ -1443,7 +1443,7 @@ prepareStartingSet(UnicodeSet &exemplarUSet, CompareFn comparer, UErrorCode &sta numberOfUsedScripts++; UnicodeSet scriptSet(UnicodeString(scriptSetPattern, ""), status); exemplarUSet.removeAll(scriptSet); - exemplarUSet.toPattern(pattern, TRUE); + exemplarUSet.toPattern(pattern, true); } exemplarUSet.clear(); @@ -1484,7 +1484,7 @@ prepareStartingSet(UnicodeSet &exemplarUSet, CompareFn comparer, UErrorCode &sta if(!tailoredContained) { ((UnicodeSet *)tailored)->removeAll(exemplarUSet); UnicodeString pattern; - ((UnicodeSet *)tailored)->toPattern(pattern, TRUE); + ((UnicodeSet *)tailored)->toPattern(pattern, true); } uset_close(tailored); */ @@ -1583,7 +1583,7 @@ processCollator(UCollator *col, UErrorCode &status) { u_memcpy(currLine->name, exemplarUSetIter.getString().getBuffer(), exemplarUSetIter.getString().length()); currLine->len = exemplarUSetIter.getString().length(); } else { // process code point - UBool isError = FALSE; + UBool isError = false; currLine->len = 0; U16_APPEND(currLine->name, currLine->len, 25, exemplarUSetIter.getCodepoint(), isError); } @@ -1632,12 +1632,12 @@ hasCollationElements(const char *locName) { if(status == U_ZERO_ERROR) { /* do the test - there are real elements */ ures_close(ColEl); ures_close(loc); - return TRUE; + return true; } ures_close(ColEl); ures_close(loc); } - return FALSE; + return false; } int @@ -1653,7 +1653,7 @@ main(int argc, uset_add(wsp, 0x0041); uset_remove(wsp, 0x0041); UnicodeString pat; - ((UnicodeSet *)wsp)->toPattern(pat, TRUE); + ((UnicodeSet *)wsp)->toPattern(pat, true); pat.setCharAt(pat.length(), 0); escapeString(pat.getBuffer(), pat.length(), log); u_fflush(log); diff --git a/tools/colprobe/colprobeNew.cpp b/tools/colprobe/colprobeNew.cpp index 39557766772..3905a0916c9 100644 --- a/tools/colprobe/colprobeNew.cpp +++ b/tools/colprobe/colprobeNew.cpp @@ -103,10 +103,10 @@ inline int CompareStringW(DWORD, DWORD, UChar *, int, UChar *, int) {return 0;}; #include "line.h" -static UBool gVerbose = FALSE; -static UBool gDebug = FALSE; -static UBool gQuiet = FALSE; -static UBool gExemplar = FALSE; +static UBool gVerbose = false; +static UBool gDebug = false; +static UBool gQuiet = false; +static UBool gExemplar = false; DWORD gWinLCID; int gCount; @@ -136,7 +136,7 @@ int32_t gPlatformNo = 0; int32_t gPlatformIndexes[10]; int32_t gLocaleNo = 0; const char* gLocales[100]; -UBool gRulesStdin = FALSE; +UBool gRulesStdin = false; const char *outputFormat = "HTML"; const char *outExtension = "html"; @@ -221,8 +221,8 @@ int Winstrcmp(const void *a, const void *b) { UErrorCode status = U_ZERO_ERROR; gCount++; int t; - //compALen = unorm_compose(compA, 256, (*(Line **)a)->name, (*(Line **)a)->len, FALSE, 0, &status); - //compBLen = unorm_compose(compB, 256, (*(Line **)b)->name, (*(Line **)b)->len, FALSE, 0, &status); + //compALen = unorm_compose(compA, 256, (*(Line **)a)->name, (*(Line **)a)->len, false, 0, &status); + //compBLen = unorm_compose(compB, 256, (*(Line **)b)->name, (*(Line **)b)->len, false, 0, &status); compALen = unorm_normalize((*(Line **)a)->name, (*(Line **)a)->len, UNORM_NFC, 0, compA, 256, &status); compBLen = unorm_normalize((*(Line **)b)->name, (*(Line **)b)->len, UNORM_NFC, 0, compB, 256, &status); t = CompareStringW(gWinLCID, SORT_STRINGSORT, //0, @@ -349,17 +349,17 @@ void processArgs(int argc, char* argv[], UErrorCode &status) return; } if(options[VERBOSE].doesOccur) { - gVerbose = TRUE; + gVerbose = true; } if(options[DEBUG].doesOccur) { - gDebug = TRUE; - gVerbose = TRUE; + gDebug = true; + gVerbose = true; } if(options[EXEMPLAR].doesOccur) { - gExemplar = TRUE; + gExemplar = true; } if(options[QUIET].doesOccur) { - gQuiet = TRUE; + gQuiet = true; } // ASCII based options specified on the command line @@ -368,7 +368,7 @@ void processArgs(int argc, char* argv[], UErrorCode &status) // In that case, we test only ICU and don't need // a locale. if(options[RULESSTDIN].doesOccur) { - gRulesStdin = TRUE; + gRulesStdin = true; addPlatform("icu"); return; } @@ -411,7 +411,7 @@ void processArgs(int argc, char* argv[], UErrorCode &status) return; } else { UnicodeString pattern; - logger->log(gExcludeSet.toPattern(pattern, TRUE), TRUE); + logger->log(gExcludeSet.toPattern(pattern, true), true); } } @@ -545,7 +545,7 @@ setFiles(const char *name, UErrorCode &status) { getFileNames(name, tailoringName, tailoringDumpName, defaultName, defaultDumpName, diffName); if(options[PLATFORM].doesOccur && !options[DIFF].doesOccur) { if(createDir(platforms[gPlatformIndexes[0]].name) == 0) { - tailoringBundle = new UPrinter(tailoringName, "en", "utf-8", NULL, FALSE); + tailoringBundle = new UPrinter(tailoringName, "en", "utf-8", NULL, false); fTailoringDump = fopen(tailoringDumpName, "wb"); } else { status = U_FILE_ACCESS_ERROR; @@ -555,7 +555,7 @@ setFiles(const char *name, UErrorCode &status) { if(options[REFERENCE].doesOccur && !options[DIFF].doesOccur) { if(createDir(platforms[gRefNum].name) == 0) { - referenceBundle = new UPrinter(defaultName, "en", "utf-8", NULL, FALSE); + referenceBundle = new UPrinter(defaultName, "en", "utf-8", NULL, false); fDefaultDump = fopen(defaultDumpName, "wb"); } else { status = U_FILE_ACCESS_ERROR; @@ -565,7 +565,7 @@ setFiles(const char *name, UErrorCode &status) { if((options[PLATFORM].doesOccur && options[REFERENCE].doesOccur) || options[DIFF].doesOccur) { if(createDir(platforms[gPlatformIndexes[0]].name) == 0) { - bundle = new UPrinter(diffName, "en", "utf-8", NULL, FALSE); + bundle = new UPrinter(diffName, "en", "utf-8", NULL, false); } } if(options[DIFF].doesOccur) { @@ -646,7 +646,7 @@ processCollator(UCollator *col, UErrorCode &status) { char myLoc[256]; int32_t ruleStringLength = ucol_getRulesEx(gCol, UCOL_TAILORING_ONLY, ruleString, 16384); - logger->log(UnicodeString(ruleString, ruleStringLength), TRUE); + logger->log(UnicodeString(ruleString, ruleStringLength), true); const char *locale = ucol_getLocale(gCol, ULOC_REQUESTED_LOCALE, &status); if(locale == NULL) { locale = "en"; @@ -665,7 +665,7 @@ processCollator(UCollator *col, UErrorCode &status) { int sanityResult; UnicodeSet hanSet; - UBool hanAppears = FALSE; + UBool hanAppears = false; debug->log("\nGenerating order for platform: %s\n", platforms[gPlatformIndexes[0]].name); gComparer = platforms[gPlatformIndexes[0]].comparer; @@ -694,10 +694,10 @@ processCollator(UCollator *col, UErrorCode &status) { hanSet.applyIntPropertyValue(UCHAR_SCRIPT, USCRIPT_HAN, status); exemplarUSet.removeAll(hanSet); - logger->log(exemplarUSet.toPattern(pattern, TRUE), TRUE); + logger->log(exemplarUSet.toPattern(pattern, true), true); exemplarUSet = flatten(exemplarUSet, status); - logger->log(exemplarUSet.toPattern(pattern, TRUE), TRUE); + logger->log(exemplarUSet.toPattern(pattern, true), true); if(!options[PRINTREF].doesOccur) { @@ -708,9 +708,9 @@ processCollator(UCollator *col, UErrorCode &status) { lines.analyse(status); lines.calculateSortKeys(); debug->log("\n*** Final order\n\n"); - debug->log(lines.toPrettyString(TRUE, TRUE), TRUE); - lines.toFile(fTailoringDump, TRUE, status); - tailoringBundle->log(lines.toOutput(outputFormat, myLoc, platforms[gPlatformIndexes[0]].name, NULL, TRUE, TRUE, hanAppears), TRUE); + debug->log(lines.toPrettyString(true, true), true); + lines.toFile(fTailoringDump, true, status); + tailoringBundle->log(lines.toOutput(outputFormat, myLoc, platforms[gPlatformIndexes[0]].name, NULL, true, true, hanAppears), true); //debug->off(); if(options[REFERENCE].doesOccur) { @@ -718,20 +718,20 @@ processCollator(UCollator *col, UErrorCode &status) { lines.getRepertoire(RefRepertoire); setReference(status); - logger->log(exemplarUSet.toPattern(pattern, TRUE), TRUE); - logger->log(RefRepertoire.toPattern(pattern, TRUE), TRUE); + logger->log(exemplarUSet.toPattern(pattern, true), true); + logger->log(RefRepertoire.toPattern(pattern, true), true); StrengthProbe RefProbe(platforms[gRefNum].comparer, platforms[gRefNum].skgetter); logger->log("\n*** Detecting ordering for reference\n\n"); SortedLines RefLines(exemplarUSet, gExcludeSet, RefProbe, logger, debug); RefLines.analyse(status); - referenceBundle->log(RefLines.toOutput(outputFormat, myLoc, platforms[gRefNum].name, NULL, TRUE, TRUE, FALSE), TRUE); - RefLines.toFile(fDefaultDump, TRUE, status); + referenceBundle->log(RefLines.toOutput(outputFormat, myLoc, platforms[gRefNum].name, NULL, true, true, false), true); + RefLines.toFile(fDefaultDump, true, status); lines.reduceDifference(RefLines); logger->log("\n*** Final rules\n\n"); - logger->log(lines.toPrettyString(TRUE), TRUE); - bundle->log(lines.toOutput(outputFormat, myLoc, platforms[gPlatformIndexes[0]].name, platforms[gRefNum].name, TRUE, TRUE, hanAppears), TRUE); + logger->log(lines.toPrettyString(true), true); + bundle->log(lines.toOutput(outputFormat, myLoc, platforms[gPlatformIndexes[0]].name, platforms[gRefNum].name, true, true, hanAppears), true); } } else { setReference(status); @@ -739,8 +739,8 @@ processCollator(UCollator *col, UErrorCode &status) { logger->log("\n*** Detecting ordering for reference\n\n"); SortedLines RefLines(exemplarUSet, gExcludeSet, RefProbe, logger, debug); RefLines.analyse(status); - logger->log(RefLines.toPrettyString(TRUE), TRUE); - referenceBundle->log(RefLines.toOutput(outputFormat, myLoc, platforms[gRefNum].name, NULL, TRUE, TRUE, FALSE), TRUE); + logger->log(RefLines.toPrettyString(true), true); + referenceBundle->log(RefLines.toOutput(outputFormat, myLoc, platforms[gRefNum].name, NULL, true, true, false), true); } if(hanAppears) { // there are Han characters. This is a huge block. The best we can do is to just sort it, compare to empty @@ -752,12 +752,12 @@ processCollator(UCollator *col, UErrorCode &status) { exemplarUSet.applyIntPropertyValue(UCHAR_SCRIPT, USCRIPT_HAN, status); exemplarUSet = flatten(exemplarUSet, status); SortedLines han(exemplarUSet, gExcludeSet, probe, logger, debug); - han.sort(TRUE, TRUE); + han.sort(true, true); han.classifyRepertoire(); han.getBounds(status); tailoringBundle->log("Han ordering:
\n"); - tailoringBundle->log(han.toOutput(outputFormat, myLoc, platforms[gPlatformIndexes[0]].name, NULL, TRUE, FALSE, FALSE), TRUE); - bundle->log(han.toOutput(outputFormat, myLoc, platforms[gPlatformIndexes[0]].name, NULL, TRUE, FALSE, FALSE), TRUE); + tailoringBundle->log(han.toOutput(outputFormat, myLoc, platforms[gPlatformIndexes[0]].name, NULL, true, false, false), true); + bundle->log(han.toOutput(outputFormat, myLoc, platforms[gPlatformIndexes[0]].name, NULL, true, false, false), true); } ucol_close(gCol); } @@ -800,12 +800,12 @@ hasCollationElements(const char *locName) { if(status == U_ZERO_ERROR) { /* do the test - there are real elements */ ures_close(ColEl); ures_close(loc); - return TRUE; + return true; } ures_close(ColEl); ures_close(loc); } - return FALSE; + return false; } int @@ -821,7 +821,7 @@ main(int argc, uset_add(wsp, 0x0041); uset_remove(wsp, 0x0041); UnicodeString pat; - ((UnicodeSet *)wsp)->toPattern(pat, TRUE); + ((UnicodeSet *)wsp)->toPattern(pat, true); pat.setCharAt(pat.length(), 0); escapeString(pat.getBuffer(), pat.length(), log); u_fflush(log); @@ -874,14 +874,14 @@ main(int argc, if(fTailoringDump && fDefaultDump) { SortedLines tailoring(fTailoringDump, logger, debug, status); - logger->log(tailoring.toString(TRUE), TRUE); + logger->log(tailoring.toString(true), true); SortedLines reference(fDefaultDump, logger, debug, status); - logger->log(reference.toString(TRUE), TRUE); + logger->log(reference.toString(true), true); tailoring.reduceDifference(reference); logger->log("\n*** Final rules\n\n"); - logger->log(tailoring.toPrettyString(TRUE), TRUE); - //result->log(lines.toPrettyString(TRUE), TRUE); - bundle->log(tailoring.toOutput(outputFormat, gLocale, platforms[gPlatformIndexes[0]].name, platforms[gRefNum].name, TRUE, TRUE, FALSE), TRUE); + logger->log(tailoring.toPrettyString(true), true); + //result->log(lines.toPrettyString(true), true); + bundle->log(tailoring.toOutput(outputFormat, gLocale, platforms[gPlatformIndexes[0]].name, platforms[gRefNum].name, true, true, false), true); } } else { @@ -959,17 +959,17 @@ void generateRepertoire(const char *locale, UnicodeSet &rep, UBool &hanAppears, if(scriptLength) { for (i = 0; i < scriptLength; ++i) { if(script[i] == USCRIPT_HAN) { - hanAppears = TRUE; + hanAppears = true; continue; } delta.applyIntPropertyValue(prop, script[i], status); debug->log("Adding "); - debug->log(propertyAndValueName(prop, script[i]), TRUE); + debug->log(propertyAndValueName(prop, script[i]), true); tailoringBundle->log("// "); - tailoringBundle->log(propertyAndValueName(prop, script[i]), TRUE); + tailoringBundle->log(propertyAndValueName(prop, script[i]), true); if(options[REFERENCE].doesOccur) { referenceBundle->log("// "); - referenceBundle->log(propertyAndValueName(prop, script[i]), TRUE); + referenceBundle->log(propertyAndValueName(prop, script[i]), true); } rep.addAll(delta); } @@ -995,12 +995,12 @@ void generateRepertoire(const char *locale, UnicodeSet &rep, UBool &hanAppears, if (!rep.containsSome(delta)) continue; if (rep.containsAll(delta)) continue; // just to see what we are adding debug->log("Adding "); - debug->log(propertyAndValueName(prop, i), TRUE); + debug->log(propertyAndValueName(prop, i), true); tailoringBundle->log("// "); - tailoringBundle->log(propertyAndValueName(prop, i), TRUE); + tailoringBundle->log(propertyAndValueName(prop, i), true); if(options[REFERENCE].doesOccur) { referenceBundle->log("// "); - referenceBundle->log(propertyAndValueName(prop, i), TRUE); + referenceBundle->log(propertyAndValueName(prop, i), true); } rep.addAll(delta); } @@ -1052,14 +1052,14 @@ void testWin(StrengthProbe &probe, UErrorCode &status) Line myCh, combo, trial, inter, kLine; for(i = 0; i < intLen; i++) { inter.setTo(interesting[i]); - logger->log(inter.toString(TRUE), TRUE); + logger->log(inter.toString(true), true); logger->log("----------------------\n"); for(j = 0; j < 0xFFFF; j++) { myCh.setTo(j); if(probe.distanceFromEmptyString(myCh) == UCOL_IDENTICAL) { continue; } - logger->log(myCh.toString(TRUE)); + logger->log(myCh.toString(true)); combo.setTo(j); combo.append(interesting[i]); count = 0; diff --git a/tools/colprobe/line.cpp b/tools/colprobe/line.cpp index d3d503e9dbd..da335ef4ee4 100644 --- a/tools/colprobe/line.cpp +++ b/tools/colprobe/line.cpp @@ -35,10 +35,10 @@ Line::init() next = NULL; left = NULL; right = NULL; - isContraction = FALSE; - isExpansion = FALSE; - isRemoved = FALSE; - isReset = FALSE; + isContraction = false; + isExpansion = false; + isRemoved = false; + isReset = false; expIndex = 0; firstCC = 0; lastCC = 0; @@ -126,38 +126,38 @@ Line::operator=(const Line &other) { UBool Line::operator==(const Line &other) const { if(this == &other) { - return TRUE; + return true; } if(len != other.len) { - return FALSE; + return false; } if(u_strcmp(name, other.name) != 0) { - return FALSE; + return false; } - return TRUE; + return true; } UBool Line::equals(const Line &other) const { if(this == &other) { - return TRUE; + return true; } if(len != other.len) { - return FALSE; + return false; } if(u_strcmp(name, other.name) != 0) { - return FALSE; + return false; } if(strength != other.strength) { - return FALSE; + return false; } if(expLen != other.expLen) { - return FALSE; + return false; } if(u_strcmp(expansionString, other.expansionString)) { - return FALSE; + return false; } - return TRUE; + return true; } UBool @@ -251,7 +251,7 @@ Line::toBundleString() if(isReset) { result.append("&"); } else { - result.append(strengthToString(strength, FALSE, FALSE)); + result.append(strengthToString(strength, false, false)); } UBool quote = needsQuoting->containsSome(name) || needsQuoting->containsSome(NFC); if(quote) { @@ -304,7 +304,7 @@ Line::toHTMLString() if(isReset) { result.append("&"); } else { - result.append(strengthToString(strength, FALSE, TRUE)); + result.append(strengthToString(strength, false, true)); } result.append(NFC, NFCLen); if(expLen && !isReset) { @@ -367,7 +367,7 @@ Line::setTo(const UnicodeString &string) { void Line::setTo(const UChar32 n) { - UBool isError = FALSE; + UBool isError = false; len = 0; // we are setting the line to char, not appending U16_APPEND(name, len, 25, n, isError); name[len] = 0; @@ -604,13 +604,13 @@ Line::initFromString(const char *buff, int32_t, UErrorCode &) bufIndex++; if(i > 1) { - isContraction = TRUE; + isContraction = true; } else { - isContraction = FALSE; + isContraction = false; } if(buff[bufIndex] == ';') { - isExpansion = FALSE; + isExpansion = false; bufIndex += 2; expansionString[0] = 0; expLen = 0; @@ -657,7 +657,7 @@ Line::swapCase(UChar *string, int32_t &sLen) UChar32 c = 0; int32_t i = 0, j = 0; UChar buff[256]; - UBool isError = FALSE; + UBool isError = false; while(i < sLen) { U16_NEXT(string, i, sLen, c); if(u_isUUppercase(c)) { diff --git a/tools/colprobe/line.h b/tools/colprobe/line.h index 7bca836faa5..f702c51c74b 100644 --- a/tools/colprobe/line.h +++ b/tools/colprobe/line.h @@ -54,7 +54,7 @@ public: UBool operator!=(const Line &other) const; void setToConcat(const Line *first, const Line *second); void setName(const UChar* name, int32_t len); - UnicodeString toString(UBool pretty = FALSE); + UnicodeString toString(UBool pretty = false); UnicodeString toBundleString(); UnicodeString toHTMLString(); int32_t write(char *buff, int32_t buffLen, UErrorCode &status); @@ -62,7 +62,7 @@ public: UnicodeString strengthIndent(UColAttributeValue strength, int indentSize, UnicodeString &result); - UnicodeString strengthToString(UColAttributeValue strength, UBool pretty, UBool html = FALSE); + UnicodeString strengthToString(UColAttributeValue strength, UBool pretty, UBool html = false); UnicodeString stringToName(UChar *string, int32_t len); void setTo(const UnicodeString &string); void setTo(const UChar32 n); diff --git a/tools/colprobe/sortedlines.cpp b/tools/colprobe/sortedlines.cpp index 67990397dd3..ffbb70e60fa 100644 --- a/tools/colprobe/sortedlines.cpp +++ b/tools/colprobe/sortedlines.cpp @@ -23,9 +23,9 @@ debug(debug), contractionsTable(NULL), duplicators(NULL), maxExpansionPrefixSize(0), -wordSort(FALSE), -frenchSecondary(FALSE), -upperFirst(FALSE), +wordSort(false), +frenchSecondary(false), +upperFirst(false), sortkeys(NULL), sortkeyOffset(0) { @@ -57,7 +57,7 @@ SortedLines::~SortedLines() void SortedLines::getBounds(UErrorCode &status) { // first sort through the set - debug->log(toString(), TRUE); + debug->log(toString(), true); int32_t i = 0, j = 0; UColAttributeValue strength = UCOL_OFF; for(i = 0; i < size; i++) { @@ -122,8 +122,8 @@ SortedLines::getBounds(UErrorCode &status) { UB[strength] = toSort[size-j]; for(i = 0; i < UCOL_OFF; i++) { if(UB[i]) { - //debug->log(UB[i], TRUE); - debug->log(UB[i]->toString(TRUE), TRUE); + //debug->log(UB[i], true); + debug->log(UB[i]->toString(true), true); } } } @@ -149,13 +149,13 @@ SortedLines::classifyRepertoire() { UColAttributeValue st = UCOL_OFF; logger->log("Interpolating to get the distance from empty for Line "); - logger->log(toSort[i]->toString(TRUE), TRUE); + logger->log(toSort[i]->toString(true), true); if(i) { st = probe.getStrength(*toSort[i-1], *toSort[i]); if(st == UCOL_OFF) { logger->log("Cannot deduce distance from empty using previous element. Something is very wrong! Line:"); - logger->log(toSort[i]->toString(TRUE), TRUE); + logger->log(toSort[i]->toString(true), true); } else if(st == UCOL_IDENTICAL || st >= toSort[i-1]->strengthFromEmpty) { prevStrength = toSort[i-1]->strengthFromEmpty; } else if(st < toSort[i-1]->strengthFromEmpty) { @@ -168,7 +168,7 @@ SortedLines::classifyRepertoire() { st = probe.getStrength(*toSort[i+1], *toSort[i]); if(st == UCOL_OFF) { logger->log("Cannot deduce distance from empty using next element. Something is very wrong! Line:"); - logger->log(toSort[i]->toString(TRUE), TRUE); + logger->log(toSort[i]->toString(true), true); } else if(st == UCOL_IDENTICAL || st < toSort[i+1]->strengthFromEmpty) { nextStrength = toSort[i+1]->strengthFromEmpty; } else if(st >= toSort[i+1]->strengthFromEmpty) { @@ -195,12 +195,12 @@ SortedLines::classifyRepertoire() { lastChange = i; debug->log("Problem detected in distances from empty. Most probably word sort is on\n"); */ - wordSort = TRUE; + wordSort = true; } i++; } debug->log("Distances from empty string\n"); - debug->log(toStringFromEmpty(), TRUE); + debug->log(toStringFromEmpty(), true); } void @@ -217,15 +217,15 @@ SortedLines::analyse(UErrorCode &status) { return; } logger->log("upper first value is %i\n", upperFirst, upperFirst); - sort(TRUE, TRUE); + sort(true, true); classifyRepertoire(); getBounds(status); - //sort(TRUE, TRUE); + //sort(true, true); addContractionsToRepertoire(status); - //sort(TRUE, TRUE); + //sort(true, true); debug->log("\n*** Order after detecting contractions\n\n"); calculateSortKeys(); - debug->log(toPrettyString(FALSE, TRUE), TRUE); + debug->log(toPrettyString(false, true), true); detectExpansions(); } @@ -412,7 +412,7 @@ int32_t SortedLines::addContractionsToRepertoire(UErrorCode &status) noConts = detectContractions(toSort, size, toSort, size, delta, deltaSize, lesserToAddTo, lesserToAddToSize, 3*size, status); setSortingArray(deltaSorted, delta, deltaSize); - sort(deltaSorted, deltaSize, TRUE); + sort(deltaSorted, deltaSize, true); setDistancesFromEmpty(delta, deltaSize); int32_t deltaPSize = deltaSize; @@ -438,9 +438,9 @@ int32_t SortedLines::addContractionsToRepertoire(UErrorCode &status) addAll(deltaP, deltaPSize); setSortingArray(toSort, lines, size); - sort(TRUE, TRUE); + sort(true, true); setSortingArray(newDeltaSorted, newDeltaP, newDeltaSize); - sort(newDeltaSorted, newDeltaSize, TRUE); + sort(newDeltaSorted, newDeltaSize, true); // if no new ones, bail //if (newDeltaSize == 0) break; @@ -468,7 +468,7 @@ int32_t SortedLines::addContractionsToRepertoire(UErrorCode &status) setDistancesFromEmpty(lesserToAddTo, lesserToAddToSize); addAll(lesserToAddTo, lesserToAddToSize); setSortingArray(toSort, lines, size); - sort(TRUE, TRUE); + sort(true, true); delete[] deltaSorted; delete[] delta; @@ -518,7 +518,7 @@ int32_t SortedLines::detectContractions(Line **firstRep, int32_t firstSize, } if(duplicators && duplicators->get(UnicodeString(secondRep[j]->name, secondRep[j]->len)) != NULL) { debug->log("Skipping duplicator "); - debug->log(secondRep[j]->toString(), TRUE); + debug->log(secondRep[j]->toString(), true); continue; } @@ -623,7 +623,7 @@ int32_t SortedLines::detectContractions(Line **firstRep, int32_t firstSize, // and // XY- firstCC || firstRep[i]->lastCC < secondRep[j-1]->firstCC) && !frenchSecondary) ||((!firstRep[i]->firstCC || firstRep[i]->firstCC > secondRep[j-1]->lastCC) && frenchSecondary)) { @@ -650,7 +650,7 @@ int32_t SortedLines::detectContractions(Line **firstRep, int32_t firstSize, if(probe.compare(xyp, xym) >= 0) { // xyp looks like a contraction noteContraction("!1", toAddTo, toAddToSize, firstRep[i], secondRep[j], noConts, status); - toAddIsContraction = TRUE; + toAddIsContraction = true; } else { break; } @@ -668,11 +668,11 @@ int32_t SortedLines::detectContractions(Line **firstRep, int32_t firstSize, if(probe.compare(xyp, xym) <= 0) { // xyp looks like a contraction noteContraction("!2", toAddTo, toAddToSize, firstRep[i], secondRep[j-1], noConts, status); - xymIsContraction = TRUE; + xymIsContraction = true; } } } else { - xymIsContraction = TRUE; + xymIsContraction = true; } // if they have reordered, but none has moved, then we add them both // and hope for the best @@ -729,7 +729,7 @@ SortedLines::noteContraction(const char* msg, Line *toAddTo, int32_t &toAddToSiz // so while 'ch' is contraction, 'ch'+dot_above sorts between 'cg'+dot_above and 'ci'+dot_above debug->log("Con -"); debug->log(msg); - debug->log(toAdd.toString(FALSE), TRUE); + debug->log(toAdd.toString(false), true); return; } } else { @@ -741,7 +741,7 @@ SortedLines::noteContraction(const char* msg, Line *toAddTo, int32_t &toAddToSiz // so while 'ch' is contraction, 'ch'+dot_above sorts between 'cg'+dot_above and 'ci'+dot_above debug->log("Con -"); debug->log(msg); - debug->log(toAdd.toString(FALSE), TRUE); + debug->log(toAdd.toString(false), true); return; } } @@ -753,7 +753,7 @@ SortedLines::noteContraction(const char* msg, Line *toAddTo, int32_t &toAddToSiz // so while 'ch' is contraction, 'ch'+dot_above sorts between 'cg'+dot_above and 'ci'+dot_above debug->log("Con -"); debug->log(msg); - debug->log(toAdd.toString(FALSE), TRUE); + debug->log(toAdd.toString(false), true); return; } } @@ -770,7 +770,7 @@ SortedLines::noteContraction(const char* msg, Line *toAddTo, int32_t &toAddToSiz // so while 'ch' is contraction, 'ch'+dot_above sorts between 'cg'+dot_above and 'ci'+dot_above debug->log("Con -"); debug->log(msg); - debug->log(toAdd.toString(FALSE), TRUE); + debug->log(toAdd.toString(false), true); return; } } @@ -782,7 +782,7 @@ SortedLines::noteContraction(const char* msg, Line *toAddTo, int32_t &toAddToSiz noConts++; debug->log(msg); debug->log(" Con + "); - debug->log(toAdd.toString(FALSE), TRUE); + debug->log(toAdd.toString(false), true); if(!left->sortKey) { calculateSortKey(*left); @@ -797,7 +797,7 @@ SortedLines::noteContraction(const char* msg, Line *toAddTo, int32_t &toAddToSiz debug->log(" = "); calculateSortKey(toAdd); - debug->log(toAdd.dumpSortkey(), TRUE); + debug->log(toAdd.dumpSortkey(), true); if(noConts > size/2) { status = U_BUFFER_OVERFLOW_ERROR; } @@ -814,7 +814,7 @@ SortedLines::getExpansionLine(const Line &expansion, const Line &previous, const int32_t comparisonResult = 0; int32_t i = 0, k = 0, prevK = 0; Line trial; - UBool sequenceCompleted = FALSE; + UBool sequenceCompleted = false; int32_t expIndexes[256]; int32_t expIndexesSize = 0; @@ -834,7 +834,7 @@ SortedLines::getExpansionLine(const Line &expansion, const Line &previous, const prevK = 0; while(k < size) { if(expansionLine.len > 15) { - sequenceCompleted = TRUE; + sequenceCompleted = true; break; } while(k < size && toSort[k]->strength != UCOL_PRIMARY) @@ -860,12 +860,12 @@ SortedLines::getExpansionLine(const Line &expansion, const Line &previous, const comparisonResult = probe.compare(trial, expansion); if(comparisonResult == 0) { expansionLine = *toSort[k]; - return TRUE; + return true; } else if (comparisonResult > 0) { if(prevK) { if(exp == *toSort[prevK]) { expansionLine = exp; - return TRUE; + return true; } i = prevK; while(i < k-1) { @@ -892,7 +892,7 @@ SortedLines::getExpansionLine(const Line &expansion, const Line &previous, const int32_t putBreakPointHere = 0; } } else { - sequenceCompleted = TRUE; + sequenceCompleted = true; break; } //break; @@ -912,7 +912,7 @@ int32_t SortedLines::gooseUp(int32_t resetIndex, int32_t expansionIndex, Line &expLine, int32_t *expIndexes, int32_t &expIndexSize, UColAttributeValue strength) { int32_t i = expansionIndex, k = resetIndex+1, n = 0, m = 0, start = 0; - UBool haveChanges = FALSE; + UBool haveChanges = false; Line trial, prefix, suffix; // we will first try goosing up the reset index //while(toSort[k]->strength >= strength) @@ -949,7 +949,7 @@ SortedLines::gooseUp(int32_t resetIndex, int32_t expansionIndex, Line &expLine, } } if(k > expIndexes[n]+1) { - haveChanges = TRUE; + haveChanges = true; expIndexes[n] = k-1; } prefix.append(*toSort[expIndexes[n]]); @@ -983,7 +983,7 @@ SortedLines::gooseUp(int32_t resetIndex, int32_t expansionIndex, Line &expLine, } expIndexes[n] = k; expIndexSize++; - haveChanges = TRUE; + haveChanges = true; break; } #if 0 @@ -997,7 +997,7 @@ SortedLines::gooseUp(int32_t resetIndex, int32_t expansionIndex, Line &expLine, } expIndexes[n] = k-1; expIndexSize++; - haveChanges = TRUE; + haveChanges = true; if(n == expIndexSize-1) { // added to the end of the string UColAttributeValue str = probe.getStrength(trial, *toSort[i]); int32_t putBreakHere = 0; @@ -1031,7 +1031,7 @@ SortedLines::detectExpansions() int32_t exCount = 0; int32_t i = 0, j = 0, k = 0, prevK = 0; Line *previous, trial, expansionLine; - UBool foundExp = FALSE, sequenceCompleted = FALSE; + UBool foundExp = false, sequenceCompleted = false; UColAttributeValue strength = UCOL_OFF; UColAttributeValue maxStrength = UCOL_IDENTICAL; UColAttributeValue expStrength = UCOL_OFF; @@ -1056,23 +1056,23 @@ SortedLines::detectExpansions() { int32_t putBreakpointhere = 0; } - foundExp = FALSE; - sequenceCompleted = FALSE; + foundExp = false; + sequenceCompleted = false; strength = toSort[i]->strength; - if(strength == UCOL_IDENTICAL && toSort[i-1]->isExpansion == TRUE) { + if(strength == UCOL_IDENTICAL && toSort[i-1]->isExpansion == true) { u_strcpy(toSort[i]->expansionString, toSort[i-1]->expansionString); toSort[i]->expLen = toSort[i-1]->expLen; - toSort[i]->isExpansion = TRUE; + toSort[i]->isExpansion = true; toSort[i]->expIndex = toSort[i-1]->expIndex; toSort[i]->expStrength = UCOL_IDENTICAL; //toSort[i]->expStrength = toSort[i-1]->expStrength; - foundExp = TRUE; - sequenceCompleted = TRUE; + foundExp = true; + sequenceCompleted = true; } //logger->log("%i %i\n", i, j); while(!foundExp && strength <= maxStrength) { j = i-1; - while(j && (toSort[j]->isExpansion == TRUE || toSort[j]->isRemoved == TRUE)) { + while(j && (toSort[j]->isExpansion == true || toSort[j]->isRemoved == true)) { //if(toSort[j]->strength < strength) { //strength = toSort[j]->strength; //} @@ -1096,7 +1096,7 @@ SortedLines::detectExpansions() //trial.setToConcat(previous, UB[strength]); trial.setToConcat(previous, UB[probe.getStrength(*toSort[j], *toSort[i])]); if(probe.compare(trial, *toSort[i]) > 0) { - foundExp = TRUE; + foundExp = true; } //} if(strength == UCOL_QUATERNARY) { @@ -1122,7 +1122,7 @@ SortedLines::detectExpansions() prevK = 0; while(k < size) { if(expansionLine.len > 15) { - sequenceCompleted = TRUE; + sequenceCompleted = true; break; } while(k < size && toSort[k]->strength != UCOL_PRIMARY) { @@ -1158,7 +1158,7 @@ SortedLines::detectExpansions() int32_t putBreakPointHere = 0; } } else { - sequenceCompleted = TRUE; + sequenceCompleted = true; break; } //break; @@ -1209,7 +1209,7 @@ SortedLines::detectExpansions() } if((!isExpansionLineAContraction && s1 >= expStrength) || (diffLen <= 0 && s1 == UCOL_IDENTICAL)) { contractionsTable->remove(UnicodeString(toSort[i]->name, toSort[i]->len)); - toSort[i]->isRemoved = TRUE; + toSort[i]->isRemoved = true; if(toSort[i]->next && toSort[i]->previous) { toSort[i]->previous->next = toSort[i]->next; } @@ -1217,14 +1217,14 @@ SortedLines::detectExpansions() toSort[i]->next->previous = toSort[i]->previous; } debug->log("Exp -N: "); - debug->log(toSort[i]->toString(FALSE)); + debug->log(toSort[i]->toString(false)); debug->log(" / "); - debug->log(expansionLine.toString(FALSE), TRUE); + debug->log(expansionLine.toString(false), true); } else { u_strncat(toSort[i]->expansionString, expansionLine.name, expansionLine.len); - toSort[i]->isExpansion = TRUE; + toSort[i]->isExpansion = true; toSort[i]->expStrength = expStrength; toSort[i]->expLen = expansionLine.len; toSort[i]->expansionString[toSort[i]->expLen] = 0; @@ -1232,12 +1232,12 @@ SortedLines::detectExpansions() } } } - if(toSort[i]->isExpansion == TRUE) { + if(toSort[i]->isExpansion == true) { if(debug->isOn()) { debug->log("Exp + : &"); - debug->log(toSort[j]->toString(FALSE)); - debug->log(toSort[i]->strengthToString(toSort[i]->expStrength, TRUE)); - debug->log(toSort[i]->toString(FALSE)); + debug->log(toSort[j]->toString(false)); + debug->log(toSort[i]->strengthToString(toSort[i]->expStrength, true)); + debug->log(toSort[i]->toString(false)); debug->log(" "); if(!toSort[j]->sortKey) { calculateSortKey(*toSort[j]); @@ -1250,7 +1250,7 @@ SortedLines::detectExpansions() debug->log(toSort[i]->dumpSortkey()); calculateSortKey(expansionLine); debug->log("/"); - debug->log(expansionLine.dumpSortkey(), TRUE); + debug->log(expansionLine.dumpSortkey(), true); } } @@ -1374,7 +1374,7 @@ SortedLines::arrayToString(Line** sortedLines, int32_t linesSize, UBool pretty, Line *line = NULL; Line *previous = sortedLines[0]; if(printSortKeys && !sortkeys) { - printSortKeys = FALSE; + printSortKeys = false; } if(previous->isReset) { result.append(" & "); @@ -1436,9 +1436,9 @@ debug(debug), contractionsTable(NULL), duplicators(NULL), maxExpansionPrefixSize(0), -wordSort(FALSE), -frenchSecondary(FALSE), -upperFirst(FALSE), +wordSort(false), +frenchSecondary(false), +upperFirst(false), sortkeys(NULL), sortkeyOffset(0) { @@ -1506,8 +1506,8 @@ SortedLines::toFile(FILE *file, UBool useLinks, UErrorCode &status) UnicodeString SortedLines::toStringFromEmpty() { - UBool useLinks = FALSE; - UBool pretty = FALSE; + UBool useLinks = false; + UBool pretty = false; UnicodeString result; int32_t i = 0; @@ -1558,14 +1558,14 @@ SortedLines::toStringFromEmpty() { UnicodeString SortedLines::toString(UBool useLinks) { - return arrayToString(toSort, size, FALSE, useLinks, FALSE); + return arrayToString(toSort, size, false, useLinks, false); } UnicodeString SortedLines::toPrettyString(UBool useLinks, UBool printSortKeys) { - return arrayToString(toSort, size, TRUE, useLinks, printSortKeys); + return arrayToString(toSort, size, true, useLinks, printSortKeys); } UnicodeString @@ -1788,8 +1788,8 @@ SortedLines::reduceDifference(SortedLines& reference) { Hashtable *seenReference = new Hashtable(); - UBool found = FALSE; - UBool finished = FALSE; + UBool found = false; + UBool finished = false; const int32_t lookForward = 20; int32_t tailoringMove = 0; //int32_t referenceSize = reference.getSize(); @@ -1798,18 +1798,18 @@ SortedLines::reduceDifference(SortedLines& reference) { refLine = refLine->next; Line *myLine = getFirst(); Line *myLatestEqual = myLine; - myLatestEqual->isRemoved = TRUE; + myLatestEqual->isRemoved = true; myLine = myLine->next; while(myLine && refLine) { - found = FALSE; + found = false; while(myLine && refLine && myLine->equals(*refLine)) { myLatestEqual = myLine; - myLatestEqual->isRemoved = TRUE; + myLatestEqual->isRemoved = true; myLine = myLine->next; refLatestEqual = refLine; refLine = refLine->next; if(refLine == NULL && myLine == NULL) { - finished = TRUE; + finished = true; } } if(myLine) { @@ -1869,7 +1869,7 @@ SortedLines::reduceDifference(SortedLines& reference) { if(refLine == NULL) { // ran out of reference // this is the tail of tailoring - the last insertion myLine = NULL; - found = TRUE; + found = true; } else if(tailoringMove == lookForward || myLine == NULL) { // run over treshold or out of tailoring tailoringMove = 0; // we didn't find insertion after all @@ -1901,7 +1901,7 @@ SortedLines::reduceDifference(SortedLines& reference) { continue; } } - found = TRUE; + found = true; } if(found) { if(myLatestEqual->next != myLine || refLine == NULL) { @@ -1938,7 +1938,7 @@ SortedLines::reduceDifference(SortedLines& reference) { while(refStart && refStart != refLine) { if(*myStart == *refStart) { if(myStart->cumulativeStrength == refStart->cumulativeStrength) { - myStart->isRemoved = TRUE; + myStart->isRemoved = true; removed++; } } @@ -1948,8 +1948,8 @@ SortedLines::reduceDifference(SortedLines& reference) { traversed++; } if(removed < traversed) { - myLatestEqual->isReset = TRUE; - myLatestEqual->isRemoved = FALSE; + myLatestEqual->isReset = true; + myLatestEqual->isRemoved = false; } myLatestEqual = myLine; @@ -2014,7 +2014,7 @@ SortedLines::removeDecompositionsFromRepertoire() { len = repertoireIter.getString().length(); u_memcpy(string, repertoireIter.getString().getBuffer(), len); } else { // process code point - UBool isError = FALSE; + UBool isError = false; U16_APPEND(string, len, 25, repertoireIter.getCodepoint(), isError); } string[len] = 0; // zero terminate, for our evil ways @@ -2027,7 +2027,7 @@ SortedLines::removeDecompositionsFromRepertoire() { } } debug->log("\nRemoving\n"); - debug->log(toRemove.toPattern(compString, TRUE), TRUE); + debug->log(toRemove.toPattern(compString, true), true); repertoire.removeAll(toRemove); } diff --git a/tools/colprobe/sortedlines.h b/tools/colprobe/sortedlines.h index c76f8b79086..ca83c3de13f 100644 --- a/tools/colprobe/sortedlines.h +++ b/tools/colprobe/sortedlines.h @@ -57,12 +57,12 @@ public: ~SortedLines(); void analyse(UErrorCode &status); - void sort(UBool setStrengths = TRUE, UBool link = FALSE); - void sort(Line **sortingArray, int32_t sizeToSort, UBool setStrengths = TRUE, UBool link = FALSE); + void sort(UBool setStrengths = true, UBool link = false); + void sort(Line **sortingArray, int32_t sizeToSort, UBool setStrengths = true, UBool link = false); Line *getFirst(); Line *getLast(); - void add(Line *line, UBool linkIn = FALSE); + void add(Line *line, UBool linkIn = false); void insert(Line *line, int32_t index); Line *getNext(); Line *getPrevious(); @@ -73,9 +73,9 @@ public: int32_t detectExpansions(); - UnicodeString toString(UBool useLinks = FALSE); + UnicodeString toString(UBool useLinks = false); UnicodeString toStringFromEmpty(); - UnicodeString toPrettyString(UBool useLinks, UBool printSortKeys = FALSE); + UnicodeString toPrettyString(UBool useLinks, UBool printSortKeys = false); UnicodeString toOutput(const char *format, const char *locale, const char *platform, const char *reference, UBool useLinks, UBool initialize, UBool moreToCome); diff --git a/tools/colprobe/strengthprobe.cpp b/tools/colprobe/strengthprobe.cpp index 232aa42d16a..8010cc623b8 100644 --- a/tools/colprobe/strengthprobe.cpp +++ b/tools/colprobe/strengthprobe.cpp @@ -31,7 +31,7 @@ StrengthProbe::StrengthProbe(CompareFn comparer, GetSortKeyFn getter, UChar SE, SE(SE), B0(B0), B1(B1), B2(B2), B3(B3), utilFirstP(&utilFirst), utilSecondP(&utilSecond), -frenchSecondary(FALSE), +frenchSecondary(false), comparer(comparer), skgetter(getter) { } @@ -111,9 +111,9 @@ StrengthProbe::probePrefix(const Line &x, const Line &y, UChar first, UChar seco utilSecond.len = y.len+2; if(comparer(&utilFirstP, &utilSecondP) < 0) { - return TRUE; + return true; } else { - return FALSE; + return false; } } @@ -131,9 +131,9 @@ StrengthProbe::probeSuffix(const Line &x, const Line &y, UChar first, UChar seco utilSecond.len = y.len + 2; if(comparer(&utilFirstP, &utilSecondP) < 0) { - return TRUE; + return true; } else { - return FALSE; + return false; } } @@ -150,9 +150,9 @@ StrengthProbe::probePrefixNoSep(const Line &x, const Line &y, UChar first, UChar utilSecond.len = y.len + 1; if(comparer(&utilFirstP, &utilSecondP) < 0) { - return TRUE; + return true; } else { - return FALSE; + return false; } } @@ -168,9 +168,9 @@ StrengthProbe::probeSuffixNoSep(const Line &x, const Line &y, UChar first, UChar utilSecond.len = y.len + 1; if(comparer(&utilFirstP, &utilSecondP) < 0) { - return TRUE; + return true; } else { - return FALSE; + return false; } } @@ -364,13 +364,13 @@ StrengthProbe::isFrenchSecondary(UErrorCode &status) { int32_t result = compare(utilFirst, utilSecond); if(result < 0) { - return FALSE; + return false; } else if(result > 0) { - frenchSecondary = TRUE; - return TRUE; + frenchSecondary = true; + return true; } else { status = U_INTERNAL_PROGRAM_ERROR; - return FALSE; + return false; } } @@ -393,12 +393,12 @@ StrengthProbe::isUpperFirst(UErrorCode &status) { } if(lower == 0 && equal == 0) { - return TRUE; + return true; } if(upper == 0 && equal == 0) { - return FALSE; + return false; } status = U_INTERNAL_PROGRAM_ERROR; - return FALSE; + return false; } diff --git a/tools/colprobe/uprinter.cpp b/tools/colprobe/uprinter.cpp index 20c78058df0..ce46f195206 100644 --- a/tools/colprobe/uprinter.cpp +++ b/tools/colprobe/uprinter.cpp @@ -20,7 +20,7 @@ #include "uprinter.h" UPrinter::UPrinter(FILE *file, const char *locale, const char *encoding, UBool transliterateNonPrintable) { - _on = TRUE; + _on = true; out = u_finit(file, locale, encoding); strcpy(_locale, locale); if(transliterateNonPrintable) { @@ -31,7 +31,7 @@ UPrinter::UPrinter(FILE *file, const char *locale, const char *encoding, UBool t }; UPrinter::UPrinter(const char *name, const char *locale, const char *encoding, UTransliterator *trans, UBool transliterateNonPrintable) { - _on = TRUE; + _on = true; out = u_fopen(name, "wb", locale, encoding); u_fputc(0xFEFF, out); // emit a BOM strcpy(_locale, locale); @@ -109,10 +109,10 @@ void UPrinter::log(const char *fmt, ...) void UPrinter::on(void) { - _on = TRUE; + _on = true; } void UPrinter::off(void) { - _on = FALSE; + _on = false; } diff --git a/tools/colprobe/uprinter.h b/tools/colprobe/uprinter.h index 453e7ddb7a6..6c70b820012 100644 --- a/tools/colprobe/uprinter.h +++ b/tools/colprobe/uprinter.h @@ -33,13 +33,13 @@ class UPrinter { UBool _on; char _locale[256]; public: - UPrinter(FILE *file, const char *locale, const char *encoding, UBool transliterateNonPrintable=TRUE); + UPrinter(FILE *file, const char *locale, const char *encoding, UBool transliterateNonPrintable=true); UPrinter(const char *name, const char *locale, const char *encoding, UTransliterator *trans, UBool transliterateNonPrintable); ~UPrinter(); - void log(const UnicodeString &string, UBool nl = FALSE); - void log(const UChar *string, UBool nl = FALSE); - //void log(const char *string, UBool nl = FALSE); - void log(const Line *line, UBool nl = FALSE); + void log(const UnicodeString &string, UBool nl = false); + void log(const UChar *string, UBool nl = false); + //void log(const char *string, UBool nl = false); + void log(const Line *line, UBool nl = false); void log(const char *fmt, ...); void off(void); void on(void); diff --git a/tools/multi/proj/chello/date.c b/tools/multi/proj/chello/date.c index 523a8352f3c..88a4ee1619d 100644 --- a/tools/multi/proj/chello/date.c +++ b/tools/multi/proj/chello/date.c @@ -16,8 +16,9 @@ ******************************************************************************* */ -#include +#include #include +#include #include #include "unicode/utypes.h" @@ -182,7 +183,7 @@ date(const UChar *tz, fmt = udat_open(style, style, 0, tz, -1,NULL,0, status); if ( format != NULL ) { u_charsToUChars(format,uFormat,strlen(format)), - udat_applyPattern(fmt,FALSE,uFormat,strlen(format)); + udat_applyPattern(fmt,false,uFormat,strlen(format)); } len = udat_format(fmt, ucal_getNow(), 0, len, 0, status); if(*status == U_BUFFER_OVERFLOW_ERROR) { diff --git a/tools/multi/proj/chello/uprint.cpp b/tools/multi/proj/chello/uprint.cpp index b5e88788273..e26ff379936 100644 --- a/tools/multi/proj/chello/uprint.cpp +++ b/tools/multi/proj/chello/uprint.cpp @@ -60,7 +60,7 @@ uprint(const UChar *s, /* perform the conversion */ ucnv_fromUnicode(converter, &myTarget, myTarget + arraySize, &mySource, mySourceEnd, NULL, - TRUE, status); + true, status); /* Write the converted data to the FILE* */ fwrite(buf, sizeof(char), myTarget - buf, f); diff --git a/tools/multi/proj/icu4cscan/testxml.cpp b/tools/multi/proj/icu4cscan/testxml.cpp index 83a346d8211..9b9ab21dba6 100644 --- a/tools/multi/proj/icu4cscan/testxml.cpp +++ b/tools/multi/proj/icu4cscan/testxml.cpp @@ -85,7 +85,7 @@ static void _getCLDRVersionDirect(UVersionInfo versionArray, UErrorCode *status) // strcpy(tmp, "type=\"cldr\" version=\""); // u_versionToString(cldrVersion, tmp+strlen(tmp)); // strcat(tmp, "\""); -// XMLElement icuData(xf, "feature", tmp, TRUE); +// XMLElement icuData(xf, "feature", tmp, true); } ures_close(resindx); } @@ -111,7 +111,7 @@ static void _getCLDRVersionOld(UVersionInfo versionArray, UErrorCode *status) { // strcpy(tmp, "type=\"cldr\" version=\""); // u_versionToString(cldrVersion, tmp+strlen(tmp)); // strcat(tmp, "\""); -// XMLElement icuData(xf, "feature", tmp, TRUE); +// XMLElement icuData(xf, "feature", tmp, true); } ures_close(resindx); } @@ -272,7 +272,7 @@ date(const UChar *tz, fmt = udat_open(style, style, locale, tz, -1,NULL,0, status); if ( format != NULL ) { u_charsToUChars(format,uFormat,strlen(format)), - udat_applyPattern(fmt,FALSE,uFormat,strlen(format)); + udat_applyPattern(fmt,false,uFormat,strlen(format)); } len = udat_format(fmt, ucal_getNow(), 0, len, 0, status); if(*status == U_BUFFER_OVERFLOW_ERROR) { @@ -463,7 +463,7 @@ int main (int argc, char ** argv) { { sprintf(tmp, "type=\"unicode\" version=\"%s\"", U_UNICODE_VERSION); - XMLElement icuData(xf, "feature", tmp, TRUE); + XMLElement icuData(xf, "feature", tmp, true); } { UCollator *col; @@ -479,7 +479,7 @@ int main (int argc, char ** argv) { #endif sprintf(tmp, "type=\"uca\" version=\"%s\"", ucavers); - XMLElement icuData(xf, "feature", tmp, TRUE); + XMLElement icuData(xf, "feature", tmp, true); ucol_close(col); } #if (U_ICU_VERSION_MAJOR_NUM>3) || ((U_ICU_VERSION_MAJOR_NUM > 2) && (U_ICU_VERSION_MINOR_NUM >7)) @@ -489,7 +489,7 @@ int main (int argc, char ** argv) { tzvers = ucal_getTZDataVersion(&status); sprintf(tmp, "type=\"tz\" version=\"%s\"", tzvers); - XMLElement icuData(xf, "feature", tmp, TRUE); + XMLElement icuData(xf, "feature", tmp, true); } #endif { @@ -510,7 +510,7 @@ int main (int argc, char ** argv) { strcpy(tmp, "type=\"cldr\" version=\""); u_versionToString(cldrVersion, tmp+strlen(tmp)); strcat(tmp, "\""); - XMLElement icuData(xf, "feature", tmp, TRUE); + XMLElement icuData(xf, "feature", tmp, true); } } if(1) { diff --git a/tools/multi/proj/icu4cscan/xmlout.h b/tools/multi/proj/icu4cscan/xmlout.h index 501664a13b6..e5932660057 100644 --- a/tools/multi/proj/icu4cscan/xmlout.h +++ b/tools/multi/proj/icu4cscan/xmlout.h @@ -12,7 +12,7 @@ class XMLFile { /** * Write indent at current level, increment level, and then return what the initial level was */ - int indent(const char *s, bool single = FALSE); + int indent(const char *s, bool single = false); /** * Decrement level, write indent of 'outer' level, and return what the new level is. Should match your earlier call to indent. */ @@ -35,7 +35,7 @@ class XMLFile { class XMLElement { public: - XMLElement(XMLFile &f, const char *name, const char *attribs = NULL, bool single=FALSE); + XMLElement(XMLFile &f, const char *name, const char *attribs = NULL, bool single=false); ~XMLElement(); const char *name; diff --git a/tools/multi/proj/provider/colldiff.cpp b/tools/multi/proj/provider/colldiff.cpp index d80072d46b5..e8f791e3fd7 100644 --- a/tools/multi/proj/provider/colldiff.cpp +++ b/tools/multi/proj/provider/colldiff.cpp @@ -83,7 +83,7 @@ int main(int /* argc*/ , const char * /*argv*/ []) { strcat(xbuf2,locID); strcat(xbuf2,"/"); //printf(" -> %s\n", xbuf2); - UCollator *col = ucol_openFromShortString(xbuf2, FALSE,NULL, &subStatus); + UCollator *col = ucol_openFromShortString(xbuf2, false,NULL, &subStatus); #else UCollator *col = ucol_open(locID, &subStatus); #endif @@ -122,7 +122,7 @@ int main(int /* argc*/ , const char * /*argv*/ []) { printf("\n"); char xbuf4[200]; - UCollator *col2 = ucol_openFromShortString(xbuf3, FALSE, NULL, &subStatus); + UCollator *col2 = ucol_openFromShortString(xbuf3, false, NULL, &subStatus); if(U_FAILURE(subStatus)) { printf("Err opening from new short string : %s\n", u_errorName(subStatus)); continue; diff --git a/tools/multi/proj/provider/glue/cal_fe.cpp b/tools/multi/proj/provider/glue/cal_fe.cpp index dc1ce3e6132..fb39a2aee45 100644 --- a/tools/multi/proj/provider/glue/cal_fe.cpp +++ b/tools/multi/proj/provider/glue/cal_fe.cpp @@ -92,7 +92,7 @@ GLUE_SYM ( Calendar ) :: ~ GLUE_SYM(Calendar) () { UBool GLUE_SYM ( Calendar ) :: haveDefaultCentury() const { - return FALSE; + return false; } UDate GLUE_SYM ( Calendar ) :: defaultCenturyStart() const { return 0L; @@ -104,7 +104,7 @@ const char * GLUE_SYM ( Calendar ) :: getType() const { return "dilbert"; } UBool GLUE_SYM ( Calendar ) :: inDaylightTime(UErrorCode& status) const { - return FALSE; + return false; } int32_t GLUE_SYM ( Calendar ) :: defaultCenturyStartYear() const { return 2012; diff --git a/tools/release/c/os-mapping/displayLocaleConv.c b/tools/release/c/os-mapping/displayLocaleConv.c index 51a7e68a908..3f7524b7118 100644 --- a/tools/release/c/os-mapping/displayLocaleConv.c +++ b/tools/release/c/os-mapping/displayLocaleConv.c @@ -18,6 +18,7 @@ #include "unicode/ucnv.h" #include "unicode/uloc.h" #include "unicode/ures.h" +#include #include #include @@ -27,7 +28,7 @@ int main(int argc, const char* const argv[]) { ures_close(ures_open(NULL, NULL, &status)); if (status != U_ZERO_ERROR) { printf("uloc_getDefault = %s\n", uloc_getDefault()); - printf("Locale available in ICU = %s\n", status == U_ZERO_ERROR ? "TRUE" : "FALSE"); + printf("Locale available in ICU = %s\n", status == U_ZERO_ERROR ? "true" : "false"); } if (strcmp(ucnv_getDefaultName(), "US-ASCII") == 0) { printf("uprv_getDefaultCodepage = %s\n", uprv_getDefaultCodepage()); diff --git a/tools/unicode/c/genuca/genuca.cpp b/tools/unicode/c/genuca/genuca.cpp index 41e253f3cd1..863c03ffb64 100644 --- a/tools/unicode/c/genuca/genuca.cpp +++ b/tools/unicode/c/genuca/genuca.cpp @@ -70,7 +70,7 @@ enum HanOrderValue { HAN_RADICAL_STROKE }; -static UBool beVerbose=FALSE, withCopyright=TRUE, icu4xMode=FALSE; +static UBool beVerbose=false, withCopyright=true, icu4xMode=false; static HanOrderValue hanOrder = HAN_NO_ORDER; @@ -412,7 +412,7 @@ static int32_t getCharScript(UChar32 c) { */ class HanOrder { public: - HanOrder(UErrorCode &errorCode) : ranges(errorCode), set(), done(FALSE) {} + HanOrder(UErrorCode &errorCode) : ranges(errorCode), set(), done(false) {} void addRange(UChar32 start, UChar32 end, UErrorCode &errorCode) { int32_t length = ranges.size(); @@ -429,11 +429,11 @@ public: void setBuilderHanOrder(CollationBaseDataBuilder &builder, UErrorCode &errorCode) { if(U_FAILURE(errorCode)) { return; } builder.initHanRanges(ranges.getBuffer(), ranges.size(), errorCode); - done = TRUE; + done = true; } void setDone() { - done = TRUE; + done = true; } UBool isDone() { return done; } @@ -681,7 +681,7 @@ readAnElement(char *line, int64_t ces[32], int32_t &cesLength, UErrorCode *status) { if(U_FAILURE(*status)) { - return FALSE; + return false; } int32_t lineLength = (int32_t)uprv_strlen(line); while(lineLength>0 && (line[lineLength-1] == '\r' || line[lineLength-1] == '\n')) { @@ -696,13 +696,13 @@ readAnElement(char *line, lineLength -= 3; } if(line[0] == 0 || line[0] == '#') { - return FALSE; // just a comment, skip whole line + return false; // just a comment, skip whole line } // Directives. if(line[0] == '[') { readAnOption(builder, line, status); - return FALSE; + return false; } CharString input; @@ -711,7 +711,7 @@ readAnElement(char *line, if(endCodePoint == NULL) { fprintf(stderr, "error - line with no code point:\n%s\n", line); *status = U_INVALID_FORMAT_ERROR; /* No code point - could be an error, but probably only an empty line */ - return FALSE; + return false; } char *pipePointer = strchr(line, '|'); @@ -728,7 +728,7 @@ readAnElement(char *line, fprintf(stderr, "error - parsing of prefix \"%s\" failed: %s\n%s\n", input.data(), line, u_errorName(*status)); *status = U_INVALID_FORMAT_ERROR; - return FALSE; + return false; } prefix.releaseBuffer(prefixSize); startCodePoint = pipePointer + 1; @@ -747,7 +747,7 @@ readAnElement(char *line, fprintf(stderr, "error - parsing of code point(s) \"%s\" failed: %s\n%s\n", input.data(), line, u_errorName(*status)); *status = U_INVALID_FORMAT_ERROR; - return FALSE; + return false; } s.releaseBuffer(cSize); @@ -767,13 +767,13 @@ readAnElement(char *line, if(cesLength >= 31) { fprintf(stderr, "Error: Too many CEs on line '%s'\n", line); *status = U_INVALID_FORMAT_ERROR; - return FALSE; + return false; } ces[cesLength++] = parseCE(builder, pointer, *status); if(U_FAILURE(*status)) { fprintf(stderr, "Syntax error parsing CE from line '%s' - %s\n", line, u_errorName(*status)); - return FALSE; + return false; } } @@ -787,17 +787,17 @@ readAnElement(char *line, // intltest collate/CollationTest/TestRootElements for (int32_t i = 0; i < cesLength; ++i) { int64_t ce = ces[i]; - UBool isCompressible = FALSE; + UBool isCompressible = false; for (int j = 7; j >= 0; --j) { uint8_t b = (uint8_t)(ce >> (j * 8)); if(j <= 1) { b &= 0x3f; } // tertiary bytes use 6 bits if (b == 1) { fprintf(stderr, "Warning: invalid UCA weight byte 01 for %s\n", line); - return FALSE; + return false; } if (j == 7 && b == 2) { fprintf(stderr, "Warning: invalid UCA primary weight lead byte 02 for %s\n", line); - return FALSE; + return false; } if (j == 7) { isCompressible = builder.isCompressibleLeadByte(b); @@ -808,14 +808,14 @@ readAnElement(char *line, if (isCompressible && (b <= 3 || b == 0xff)) { fprintf(stderr, "Warning: invalid UCA primary second weight byte %02X for %s\n", b, line); - return FALSE; + return false; } } } } } - return TRUE; + return true; } static void diff --git a/tools/unicode/c/genuts46/genuts46.cpp b/tools/unicode/c/genuts46/genuts46.cpp index a50109e6b06..1c569b3097e 100644 --- a/tools/unicode/c/genuts46/genuts46.cpp +++ b/tools/unicode/c/genuts46/genuts46.cpp @@ -65,7 +65,7 @@ toIDNA2003(const UStringPrepProfile *prep, UChar32 c, icu::UnicodeString &destSt int32_t destLength; dest=destString.getBuffer(32); if(dest==NULL) { - return FALSE; + return false; } UErrorCode errorCode=U_ZERO_ERROR; destLength=usprep_prepare(prep, src, srcLength, @@ -75,8 +75,8 @@ toIDNA2003(const UStringPrepProfile *prep, UChar32 c, icu::UnicodeString &destSt if(errorCode==U_STRINGPREP_PROHIBITED_ERROR) { return -1; } else { - // Returns FALSE=0 for U_STRINGPREP_UNASSIGNED_ERROR and processing errors, - // TRUE=1 if c is valid or mapped. + // Returns false=0 for U_STRINGPREP_UNASSIGNED_ERROR and processing errors, + // true=1 if c is valid or mapped. return U_SUCCESS(errorCode); } } @@ -163,7 +163,7 @@ main(int argc, const char *argv[]) { // HACK: The StringPrep API performs a BiDi check according to the data. // We need to override that for this data generation, by resetting an internal flag. - namePrep->checkBiDi=FALSE; + namePrep->checkBiDi=false; icu::UnicodeSet baseExclusionSet; icu::UnicodeString cString, mapping, namePrepResult; @@ -240,7 +240,7 @@ main(int argc, const char *argv[]) { add(0x2e); // not mapped, simply valid UBool madeChange; do { - madeChange=FALSE; + madeChange=false; { removeSet.clear(); icu::UnicodeSetIterator iter(validSet); @@ -250,7 +250,7 @@ main(int argc, const char *argv[]) { fprintf(stderr, "U+%04lX valid -> disallowed: NFD not wholly valid\n", (long)c); disallowedSet.add(c); removeSet.add(c); - madeChange=TRUE; + madeChange=true; } } validSet.removeAll(removeSet); @@ -267,7 +267,7 @@ main(int argc, const char *argv[]) { fprintf(stderr, "U+%04lX mapped -> disallowed: NFD of mapping not wholly valid\n", (long)c); disallowedSet.add(c); removeSet.add(c); - madeChange=TRUE; + madeChange=true; } } mappedSet.removeAll(removeSet); diff --git a/tools/unicodetools/readme.html b/tools/unicodetools/readme.html index 6873413e820..d3d8cf982ad 100644 --- a/tools/unicodetools/readme.html +++ b/tools/unicodetools/readme.html @@ -269,11 +269,11 @@ TestFailureCount=1

A-B, then in B-A, then in A&B.
  • For example, here is a listing of a problem that must be corrected. Note that usually there is a comment that explains what the following - line or lines are supposed to test. Then will come FALSE (indicating + line or lines are supposed to test. Then will come false (indicating that the test failed), then the detailed error report.
    # Canonical decompositions (minus exclusions) must be identical across releases
     [$Decomposition_Type:Canonical - $Full_Composition_Exclusion] = [$×Decomposition_Type:Canonical - $×Full_Composition_Exclusion]
     
    -FALSE
    +false
     **** START Error Info ****
     
     In [$×Decomposition_Type:Canonical - $×Full_Composition_Exclusion], but not in [$Decomposition_Type:Canonical - $Full_Composition_Exclusion] :