X-Git-Url: https://git.saurik.com/apple/icu.git/blobdiff_plain/08b89b0a244153b9f5bbb2f49c55ab0f7298122e..b331163bffd790ced0e88b73f44f86d49ccc48a5:/icuSources/common/rbbiscan.cpp diff --git a/icuSources/common/rbbiscan.cpp b/icuSources/common/rbbiscan.cpp index 0113c08e..13a33210 100644 --- a/icuSources/common/rbbiscan.cpp +++ b/icuSources/common/rbbiscan.cpp @@ -2,7 +2,7 @@ // // file: rbbiscan.cpp // -// Copyright (C) 2002-2012, International Business Machines Corporation and others. +// Copyright (C) 2002-2014, International Business Machines Corporation and others. // All Rights Reserved. // // This file contains the Rule Based Break Iterator Rule Builder functions for @@ -35,8 +35,6 @@ #include "uassert.h" -#define LENGTHOF(array) (int32_t)(sizeof(array)/sizeof((array)[0])) - //------------------------------------------------------------------------------ // // Unicode Set init strings for each of the character classes needed for parsing a rule file. @@ -490,6 +488,8 @@ UBool RBBIRuleScanner::doParseActions(int32_t action) fRB->fChainRules = TRUE; } else if (opt == UNICODE_STRING("LBCMNoChain", 11)) { fRB->fLBCMNoChain = TRUE; + } else if (opt == UNICODE_STRING("RINoChain", 9)) { + fRB->fRINoChain = TRUE; } else if (opt == UNICODE_STRING("forward", 7)) { fRB->fDefaultTree = &fRB->fForwardTree; } else if (opt == UNICODE_STRING("reverse", 7)) { @@ -581,7 +581,7 @@ void RBBIRuleScanner::error(UErrorCode e) { fRB->fParseError->line = fLineNum; fRB->fParseError->offset = fCharNum; fRB->fParseError->preContext[0] = 0; - fRB->fParseError->preContext[0] = 0; + fRB->fParseError->postContext[0] = 0; } } } @@ -993,7 +993,7 @@ void RBBIRuleScanner::parse() { if (tableEl->fCharClass >= 128 && tableEl->fCharClass < 240 && // Table specs a char class && fC.fEscaped == FALSE && // char is not escaped && fC.fChar != (UChar32)-1) { // char is not EOF - U_ASSERT((tableEl->fCharClass-128) < LENGTHOF(fRuleSets)); + U_ASSERT((tableEl->fCharClass-128) < UPRV_LENGTHOF(fRuleSets)); if (fRuleSets[tableEl->fCharClass-128].contains(fC.fChar)) { // Table row specified a character class, or set of characters, // and the current char matches it.