diff --git a/docs/userguide/boundaryanalysis/index.md b/docs/userguide/boundaryanalysis/index.md index 697602ab4b4..2e8dd6e944a 100644 --- a/docs/userguide/boundaryanalysis/index.md +++ b/docs/userguide/boundaryanalysis/index.md @@ -193,7 +193,7 @@ that a single instance cannot operate in parallel on multiple texts. For concurrent break iteration, each thread must use its own break iterator. These can be obtained by creating separate break iterators of the desired type, -or by initially creating a master break iterator and then creating a clone for +or by initially creating a main break iterator and then creating a clone for each thread. ### Line Breaking Strictness, a CSS Property diff --git a/docs/userguide/dev/codingguidelines.md b/docs/userguide/dev/codingguidelines.md index c702dea9343..b76b5ab8b1b 100644 --- a/docs/userguide/dev/codingguidelines.md +++ b/docs/userguide/dev/codingguidelines.md @@ -1907,7 +1907,7 @@ stored in a format that is used directly during processing. Most of the data items are pre-built into binary files that are then installed on a user's machine. Some data can also be built at runtime but is not -persistent. In the latter case, a master object should be built once and then +persistent. In the latter case, a primary object should be built once and then cloned to avoid the multiple parsing, processing, and building of the same data. Binary data formats for ICU must be portable across platforms that share the diff --git a/icu4c/source/Doxyfile.in b/icu4c/source/Doxyfile.in index 25b535cc7ac..7ced104ce80 100644 --- a/icu4c/source/Doxyfile.in +++ b/icu4c/source/Doxyfile.in @@ -1310,7 +1310,7 @@ CHM_FILE = HHC_LOCATION = # The GENERATE_CHI flag controls if a separate .chi index file is generated -# (YES) or that it should be included in the master .chm file (NO). +# (YES) or that it should be included in the primary .chm file (NO). # The default value is: NO. # This tag requires that the tag GENERATE_HTMLHELP is set to YES. diff --git a/icu4c/source/common/unicode/ucnv.h b/icu4c/source/common/unicode/ucnv.h index ec7c5f350b4..614001cc433 100644 --- a/icu4c/source/common/unicode/ucnv.h +++ b/icu4c/source/common/unicode/ucnv.h @@ -476,7 +476,7 @@ ucnv_openCCSID(int32_t codepage, *

The name will NOT be looked up in the alias mechanism, nor will the converter be * stored in the converter cache or the alias table. The only way to open further converters * is call this function multiple times, or use the ucnv_safeClone() function to clone a - * 'master' converter.

+ * 'primary' converter.

* *

A future version of ICU may add alias table lookups and/or caching * to this function.

diff --git a/icu4c/source/common/unifiedcache.cpp b/icu4c/source/common/unifiedcache.cpp index f2dd9165595..493ab79f6d9 100644 --- a/icu4c/source/common/unifiedcache.cpp +++ b/icu4c/source/common/unifiedcache.cpp @@ -311,7 +311,7 @@ void UnifiedCache::_putNew( } keyToAdopt->fCreationStatus = creationStatus; if (value->softRefCount == 0) { - _registerMaster(keyToAdopt, value); + _registerPrimary(keyToAdopt, value); } void *oldValue = uhash_put(fHashtable, keyToAdopt, (void *) value, &status); U_ASSERT(oldValue == nullptr); @@ -338,7 +338,7 @@ void UnifiedCache::_putIfAbsentAndGet( } else { _put(element, value, status); } - // Run an eviction slice. This will run even if we added a master entry + // Run an eviction slice. This will run even if we added a primary entry // which doesn't increase the unused count, but that is still o.k _runEvictionSlice(); } @@ -403,9 +403,9 @@ void UnifiedCache::_get( } } -void UnifiedCache::_registerMaster( +void UnifiedCache::_registerPrimary( const CacheKeyBase *theKey, const SharedObject *value) const { - theKey->fIsMaster = true; + theKey->fIsPrimary = true; value->cachePtr = this; ++fNumValuesTotal; ++fNumValuesInUse; @@ -420,7 +420,7 @@ void UnifiedCache::_put( const SharedObject *oldValue = (const SharedObject *) element->value.pointer; theKey->fCreationStatus = status; if (value->softRefCount == 0) { - _registerMaster(theKey, value); + _registerPrimary(theKey, value); } value->softRefCount++; UHashElement *ptr = const_cast(element); @@ -474,9 +474,9 @@ UBool UnifiedCache::_isEvictable(const UHashElement *element) const return FALSE; } - // We can evict entries that are either not a master or have just + // We can evict entries that are either not a primary or have just // one reference (The one reference being from the cache itself). - return (!theKey->fIsMaster || (theValue->softRefCount == 1 && theValue->noHardReferences())); + return (!theKey->fIsPrimary || (theValue->softRefCount == 1 && theValue->noHardReferences())); } void UnifiedCache::removeSoftRef(const SharedObject *value) const { diff --git a/icu4c/source/common/unifiedcache.h b/icu4c/source/common/unifiedcache.h index d6c9945126c..6bb46a597fc 100644 --- a/icu4c/source/common/unifiedcache.h +++ b/icu4c/source/common/unifiedcache.h @@ -34,13 +34,13 @@ class UnifiedCache; */ class U_COMMON_API CacheKeyBase : public UObject { public: - CacheKeyBase() : fCreationStatus(U_ZERO_ERROR), fIsMaster(FALSE) {} + CacheKeyBase() : fCreationStatus(U_ZERO_ERROR), fIsPrimary(FALSE) {} /** * Copy constructor. Needed to support cloning. */ CacheKeyBase(const CacheKeyBase &other) - : UObject(other), fCreationStatus(other.fCreationStatus), fIsMaster(FALSE) { } + : UObject(other), fCreationStatus(other.fCreationStatus), fIsPrimary(FALSE) { } virtual ~CacheKeyBase(); /** @@ -88,7 +88,7 @@ class U_COMMON_API CacheKeyBase : public UObject { } private: mutable UErrorCode fCreationStatus; - mutable UBool fIsMaster; + mutable UBool fIsPrimary; friend class UnifiedCache; }; @@ -463,17 +463,17 @@ class U_COMMON_API UnifiedCache : public UnifiedCacheBase { void _runEvictionSlice() const; /** - * Register a master cache entry. A master key is the first key to create + * Register a primary cache entry. A primary key is the first key to create * a given SharedObject value. Subsequent keys whose create function - * produce referneces to an already existing SharedObject are not masters - + * produce referneces to an already existing SharedObject are not primary - * they can be evicted and subsequently recreated. * * On entry, gCacheMutex must be held. - * On exit, items in use count incremented, entry is marked as a master + * On exit, items in use count incremented, entry is marked as a primary * entry, and value registered with cache so that subsequent calls to * addRef() and removeRef() on it correctly interact with the cache. */ - void _registerMaster(const CacheKeyBase *theKey, const SharedObject *value) const; + void _registerPrimary(const CacheKeyBase *theKey, const SharedObject *value) const; /** * Store a value and creation error status in given hash entry. diff --git a/icu4c/source/data/cldr-icu-readme.txt b/icu4c/source/data/cldr-icu-readme.txt index 09ece4c7c0b..dc967295662 100644 --- a/icu4c/source/data/cldr-icu-readme.txt +++ b/icu4c/source/data/cldr-icu-readme.txt @@ -233,7 +233,7 @@ make check 2>&1 | tee /tmp/icu4c-newData-makeCheck.txt # Repeat steps 4-7 until there are no errors. # 9. You can also run the make check tests in exhaustive mode (these will also -# be run automatically on the master branch after the merge resulting from this +# be run automatically on the default branch after the merge resulting from this # integration): cd $ICU4C_DIR/source diff --git a/icu4c/source/i18n/dtitvfmt.cpp b/icu4c/source/i18n/dtitvfmt.cpp index b71a571d1c4..9b9e11d4dcc 100644 --- a/icu4c/source/i18n/dtitvfmt.cpp +++ b/icu4c/source/i18n/dtitvfmt.cpp @@ -239,7 +239,7 @@ DateIntervalFormat::operator==(const Format& other) const { if (fDateFormat && fmt->fDateFormat && (*fDateFormat != *fmt->fDateFormat)) {return FALSE;} } // note: fFromCalendar and fToCalendar hold no persistent state, and therefore do not participate in operator ==. - // fDateFormat has the master calendar for the DateIntervalFormat. + // fDateFormat has the primary calendar for the DateIntervalFormat. if (fSkeleton != fmt->fSkeleton) {return FALSE;} if (fDatePattern != fmt->fDatePattern && (fDatePattern == nullptr || fmt->fDatePattern == nullptr)) {return FALSE;} if (fDatePattern && fmt->fDatePattern && (*fDatePattern != *fmt->fDatePattern)) {return FALSE;} @@ -583,7 +583,7 @@ DateIntervalFormat::adoptTimeZone(TimeZone* zone) if (fDateFormat != nullptr) { fDateFormat->adoptTimeZone(zone); } - // The fDateFormat has the master calendar for the DateIntervalFormat and has + // The fDateFormat has the primary calendar for the DateIntervalFormat and has // ownership of any adopted TimeZone; fFromCalendar and fToCalendar are internal // work clones of that calendar (and should not also be given ownership of the // adopted TimeZone). @@ -601,7 +601,7 @@ DateIntervalFormat::setTimeZone(const TimeZone& zone) if (fDateFormat != nullptr) { fDateFormat->setTimeZone(zone); } - // The fDateFormat has the master calendar for the DateIntervalFormat; + // The fDateFormat has the primary calendar for the DateIntervalFormat; // fFromCalendar and fToCalendar are internal work clones of that calendar. if (fFromCalendar) { fFromCalendar->setTimeZone(zone); diff --git a/icu4c/source/i18n/nfrs.cpp b/icu4c/source/i18n/nfrs.cpp index e7b17b46c3a..1510d885094 100644 --- a/icu4c/source/i18n/nfrs.cpp +++ b/icu4c/source/i18n/nfrs.cpp @@ -37,7 +37,7 @@ enum { /** 0.x */ PROPER_FRACTION_RULE_INDEX = 2, /** x.0 */ - MASTER_RULE_INDEX = 3, + DEFAULT_RULE_INDEX = 3, /** Inf */ INFINITY_RULE_INDEX = 4, /** NaN */ @@ -278,8 +278,8 @@ void NFRuleSet::setNonNumericalRule(NFRule *rule) { else if (baseValue == NFRule::kProperFractionRule) { setBestFractionRule(PROPER_FRACTION_RULE_INDEX, rule, TRUE); } - else if (baseValue == NFRule::kMasterRule) { - setBestFractionRule(MASTER_RULE_INDEX, rule, TRUE); + else if (baseValue == NFRule::kDefaultRule) { + setBestFractionRule(DEFAULT_RULE_INDEX, rule, TRUE); } else if (baseValue == NFRule::kInfinityRule) { delete nonNumericalRules[INFINITY_RULE_INDEX]; @@ -323,7 +323,7 @@ NFRuleSet::~NFRuleSet() for (int i = 0; i < NON_NUMERICAL_RULE_LENGTH; i++) { if (i != IMPROPER_FRACTION_RULE_INDEX && i != PROPER_FRACTION_RULE_INDEX - && i != MASTER_RULE_INDEX) + && i != DEFAULT_RULE_INDEX) { delete nonNumericalRules[i]; } @@ -375,7 +375,7 @@ NFRuleSet::setDecimalFormatSymbols(const DecimalFormatSymbols &newSymbols, UErro rules[i]->setDecimalFormatSymbols(newSymbols, status); } // Switch the fraction rules to mirror the DecimalFormatSymbols. - for (int32_t nonNumericalIdx = IMPROPER_FRACTION_RULE_INDEX; nonNumericalIdx <= MASTER_RULE_INDEX; nonNumericalIdx++) { + for (int32_t nonNumericalIdx = IMPROPER_FRACTION_RULE_INDEX; nonNumericalIdx <= DEFAULT_RULE_INDEX; nonNumericalIdx++) { if (nonNumericalRules[nonNumericalIdx]) { for (uint32_t fIdx = 0; fIdx < fractionRules.size(); fIdx++) { NFRule *fractionRule = fractionRules[fIdx]; @@ -472,9 +472,9 @@ NFRuleSet::findDoubleRule(double number) const } } - // if there's a master rule, use it to format the number - if (nonNumericalRules[MASTER_RULE_INDEX]) { - return nonNumericalRules[MASTER_RULE_INDEX]; + // if there's a default rule, use it to format the number + if (nonNumericalRules[DEFAULT_RULE_INDEX]) { + return nonNumericalRules[DEFAULT_RULE_INDEX]; } // and if we haven't yet returned a rule, use findNormalRule() @@ -507,13 +507,13 @@ NFRuleSet::findNormalRule(int64_t number) const // do them in findRule(), because the version of format() that // takes a long bypasses findRule() and goes straight to this // function. This function does skip the fraction rules since - // we know the value is an integer (it also skips the master + // we know the value is an integer (it also skips the default // rule, since it's considered a fraction rule. Skipping the - // master rule in this function is also how we avoid infinite + // default rule in this function is also how we avoid infinite // recursion) // {dlf} unfortunately this fails if there are no rules except - // special rules. If there are no rules, use the master rule. + // special rules. If there are no rules, use the default rule. // binary-search the rule list for the applicable rule // (a rule is used for all values from its base value to @@ -553,8 +553,8 @@ NFRuleSet::findNormalRule(int64_t number) const } return result; } - // else use the master rule - return nonNumericalRules[MASTER_RULE_INDEX]; + // else use the default rule + return nonNumericalRules[DEFAULT_RULE_INDEX]; } /** @@ -792,7 +792,7 @@ NFRuleSet::appendRules(UnicodeString& result) const if (nonNumericalRules[i]) { if (rule->getBaseValue() == NFRule::kImproperFractionRule || rule->getBaseValue() == NFRule::kProperFractionRule - || rule->getBaseValue() == NFRule::kMasterRule) + || rule->getBaseValue() == NFRule::kDefaultRule) { for (uint32_t fIdx = 0; fIdx < fractionRules.size(); fIdx++) { NFRule *fractionRule = fractionRules[fIdx]; diff --git a/icu4c/source/i18n/nfrule.cpp b/icu4c/source/i18n/nfrule.cpp index 4f809f9c803..a9b84eda182 100644 --- a/icu4c/source/i18n/nfrule.cpp +++ b/icu4c/source/i18n/nfrule.cpp @@ -153,7 +153,7 @@ NFRule::makeRules(UnicodeString& description, if ((rule1->baseValue > 0 && (rule1->baseValue % util64_pow(rule1->radix, rule1->exponent)) == 0) || rule1->getType() == kImproperFractionRule - || rule1->getType() == kMasterRule) { + || rule1->getType() == kDefaultRule) { // if it passes that test, new up the second rule. If the // rule set both rules will belong to is a fraction rule @@ -181,9 +181,9 @@ NFRule::makeRules(UnicodeString& description, } // if the description began with "x.0" and contains bracketed - // text, it describes both the master rule and the + // text, it describes both the default rule and the // improper fraction rule - else if (rule1->getType() == kMasterRule) { + else if (rule1->getType() == kDefaultRule) { rule2->baseValue = rule1->baseValue; rule1->setType(kImproperFractionRule); } @@ -376,7 +376,7 @@ NFRule::parseRuleDescriptor(UnicodeString& description, UErrorCode& status) decimalPoint = descriptor.charAt(1); } else if (firstChar == gX && lastChar == gZero) { - setBaseValue(kMasterRule, status); + setBaseValue(kDefaultRule, status); decimalPoint = descriptor.charAt(1); } else if (descriptor.compare(gNaN, 3) == 0) { @@ -663,7 +663,7 @@ NFRule::_appendRuleText(UnicodeString& result) const case kNegativeNumberRule: result.append(gMinusX, 2); break; case kImproperFractionRule: result.append(gX).append(decimalPoint == 0 ? gDot : decimalPoint).append(gX); break; case kProperFractionRule: result.append(gZero).append(decimalPoint == 0 ? gDot : decimalPoint).append(gX); break; - case kMasterRule: result.append(gX).append(decimalPoint == 0 ? gDot : decimalPoint).append(gZero); break; + case kDefaultRule: result.append(gX).append(decimalPoint == 0 ? gDot : decimalPoint).append(gZero); break; case kInfinityRule: result.append(gInf, 3); break; case kNaNRule: result.append(gNaN, 3); break; default: diff --git a/icu4c/source/i18n/nfrule.h b/icu4c/source/i18n/nfrule.h index ed33eaa5af7..989fbaa8f9b 100644 --- a/icu4c/source/i18n/nfrule.h +++ b/icu4c/source/i18n/nfrule.h @@ -38,7 +38,7 @@ public: kNegativeNumberRule = -1, kImproperFractionRule = -2, kProperFractionRule = -3, - kMasterRule = -4, + kDefaultRule = -4, kInfinityRule = -5, kNaNRule = -6, kOtherRule = -7 diff --git a/icu4c/source/i18n/nfsubs.cpp b/icu4c/source/i18n/nfsubs.cpp index 208543d1acd..e3d1fc144fa 100644 --- a/icu4c/source/i18n/nfsubs.cpp +++ b/icu4c/source/i18n/nfsubs.cpp @@ -342,7 +342,7 @@ NFSubstitution::makeSubstitution(int32_t pos, // IntegralPartSubstitution else if (rule->getBaseValue() == NFRule::kImproperFractionRule || rule->getBaseValue() == NFRule::kProperFractionRule - || rule->getBaseValue() == NFRule::kMasterRule) { + || rule->getBaseValue() == NFRule::kDefaultRule) { return new IntegralPartSubstitution(pos, ruleSet, description, status); } @@ -371,7 +371,7 @@ NFSubstitution::makeSubstitution(int32_t pos, // FractionalPartSubstitution else if (rule->getBaseValue() == NFRule::kImproperFractionRule || rule->getBaseValue() == NFRule::kProperFractionRule - || rule->getBaseValue() == NFRule::kMasterRule) { + || rule->getBaseValue() == NFRule::kDefaultRule) { return new FractionalPartSubstitution(pos, ruleSet, description, status); } diff --git a/icu4c/source/i18n/rbt_pars.cpp b/icu4c/source/i18n/rbt_pars.cpp index 1ae5b81f034..89d426813ce 100644 --- a/icu4c/source/i18n/rbt_pars.cpp +++ b/icu4c/source/i18n/rbt_pars.cpp @@ -1557,7 +1557,7 @@ UChar TransliteratorParser::getSegmentStandin(int32_t seg, UErrorCode& status) { return 0; } c = variableNext++; - // Set a placeholder in the master variables vector that will be + // Set a placeholder in the primary variables vector that will be // filled in later by setSegmentObject(). We know that we will get // called first because setSegmentObject() will call us. variablesVector.addElement((void*) NULL, status); diff --git a/icu4c/source/i18n/region.cpp b/icu4c/source/i18n/region.cpp index 76445aef328..d8a5ffddc37 100644 --- a/icu4c/source/i18n/region.cpp +++ b/icu4c/source/i18n/region.cpp @@ -217,7 +217,7 @@ void U_CALLCONV Region::loadRegionData(UErrorCode &status) { if ( aliasToRegion != NULL && aliasFromRegion == NULL ) { // This is just an alias from some string to a region uhash_put(newRegionAliases.getAlias(),(void *)aliasFromStr.orphan(), (void *)aliasToRegion,&status); } else { - if ( aliasFromRegion == NULL ) { // Deprecated region code not in the master codes list - so need to create a deprecated region for it. + if ( aliasFromRegion == NULL ) { // Deprecated region code not in the primary codes list - so need to create a deprecated region for it. LocalPointer newRgn(new Region, status); if ( U_SUCCESS(status) ) { aliasFromRegion = newRgn.orphan(); diff --git a/icu4c/source/i18n/unicode/rbnf.h b/icu4c/source/i18n/unicode/rbnf.h index 62b02324b14..283e9696fb9 100644 --- a/icu4c/source/i18n/unicode/rbnf.h +++ b/icu4c/source/i18n/unicode/rbnf.h @@ -297,7 +297,7 @@ enum URBNFRuleSetTag { * * * x.0: - * The rule is a master rule. If the full stop in + * The rule is a default rule. If the full stop in * the middle of the rule name is replaced with the decimal point * that is used in the language or DecimalFormatSymbols, then that rule will * have precedence when formatting and parsing this rule. For example, some @@ -332,9 +332,9 @@ enum URBNFRuleSetTag { * algorithms: If the rule set is a regular rule set, do the following: * *