From 66bee38a79ae727939c3e93f6dbc0c0445748215 Mon Sep 17 00:00:00 2001 From: Andy Heninger Date: Wed, 13 Mar 2002 23:52:24 +0000 Subject: [PATCH] ICU-1265 rename RulesBasedBreakIterator::IGNORE to avoid conflict with winbase.h X-SVN-Rev: 8007 --- icu4c/source/common/dbbi.cpp | 2 +- icu4c/source/common/dbbi_tbl.cpp | 2 +- icu4c/source/common/rbbi.cpp | 10 +++++----- icu4c/source/common/unicode/rbbi.h | 5 +++-- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/icu4c/source/common/dbbi.cpp b/icu4c/source/common/dbbi.cpp index 45aeb4ebb2b..fe31111f192 100644 --- a/icu4c/source/common/dbbi.cpp +++ b/icu4c/source/common/dbbi.cpp @@ -368,7 +368,7 @@ DictionaryBasedBreakIterator::divideUpDictionaryRange(int32_t startPos, int32_t text->setIndex(startPos); UChar c = text->current(); int category = dictionaryTables->lookupCategory(c, this); - while (category == IGNORE || !dictionaryTables->categoryFlags[category]) { + while (category == RBBI_IGNORE || !dictionaryTables->categoryFlags[category]) { c = text->next(); category = dictionaryTables->lookupCategory(c, this); } diff --git a/icu4c/source/common/dbbi_tbl.cpp b/icu4c/source/common/dbbi_tbl.cpp index 806b5fc0ae2..73ea5f10e6f 100644 --- a/icu4c/source/common/dbbi_tbl.cpp +++ b/icu4c/source/common/dbbi_tbl.cpp @@ -63,7 +63,7 @@ DictionaryBasedBreakIteratorTables::lookupCategory(UChar c, // categories represented in the dictionary. If it is, bump the dictionary- // character count. int32_t result = RuleBasedBreakIteratorTables::lookupCategory(c, bi); - if (result != RuleBasedBreakIterator::IGNORE && categoryFlags[result]) { + if (result != RuleBasedBreakIterator::RBBI_IGNORE && categoryFlags[result]) { ((DictionaryBasedBreakIterator*)bi)->bumpDictionaryCharCount(); } return result; diff --git a/icu4c/source/common/rbbi.cpp b/icu4c/source/common/rbbi.cpp index aed08985ac9..84c52204fe6 100644 --- a/icu4c/source/common/rbbi.cpp +++ b/icu4c/source/common/rbbi.cpp @@ -20,7 +20,7 @@ U_NAMESPACE_BEGIN * A token used as a character-category value to identify ignore characters */ const int8_t -RuleBasedBreakIterator::IGNORE = -1; +RuleBasedBreakIterator::RBBI_IGNORE = -1; /** * The state number of the starting state @@ -456,7 +456,7 @@ int32_t RuleBasedBreakIterator::handleNext(void) { // if the character isn't an ignore character, look up a state // transition in the state table - if (category != IGNORE) { + if (category != RBBI_IGNORE) { state = tables->lookupState(state, category); } @@ -488,7 +488,7 @@ int32_t RuleBasedBreakIterator::handleNext(void) { // keep track of the last "real" character we saw. If this character isn't an // ignore character, take note of it and its position in the text - if (category != IGNORE && state != STOP_STATE) { + if (category != RBBI_IGNORE && state != STOP_STATE) { lastC = c; lastCPos = text->getIndex(); } @@ -542,7 +542,7 @@ int32_t RuleBasedBreakIterator::handlePrevious(void) { // if the current character isn't an ignore character, look up a // state transition in the backwards state table - if (category != IGNORE) + if (category != RBBI_IGNORE) state = tables->lookupBackwardState(state, category); // then advance one character backwards @@ -555,7 +555,7 @@ int32_t RuleBasedBreakIterator::handlePrevious(void) { // that takes us into the stop state will always be the character BEFORE // the break position.) if (c != CharacterIterator::DONE) { - if (lastCategory != IGNORE) + if (lastCategory != RBBI_IGNORE) text->setIndex(text->getIndex() + 2); else text->next(); diff --git a/icu4c/source/common/unicode/rbbi.h b/icu4c/source/common/unicode/rbbi.h index 771a7d2c399..9e5f695b5b4 100644 --- a/icu4c/source/common/unicode/rbbi.h +++ b/icu4c/source/common/unicode/rbbi.h @@ -185,11 +185,12 @@ class BreakIterator; */ class U_COMMON_API RuleBasedBreakIterator : public BreakIterator { -public: +protected: /** * A token used as a character-category value to identify ignore characters */ - static const int8_t IGNORE; + static const int8_t RBBI_IGNORE; + friend class DictionaryBasedBreakIteratorTables; private: /**