+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
**********************************************************************
-* Copyright (C) 2001-2006, International Business Machines
+* Copyright (C) 2001-2011, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* Date Name Description
#include "unicode/unifilt.h"
#include "unicode/uchar.h"
#include "unicode/uniset.h"
-#include "name2uni.h"
+#include "unicode/utf16.h"
#include "cmemory.h"
+#include "name2uni.h"
+#include "patternprops.h"
#include "uprops.h"
#include "uinvchar.h"
#include "util.h"
// Does not use uset.h to reduce code dependencies
static void U_CALLCONV
_set_add(USet *set, UChar32 c) {
- ((UnicodeSet *)set)->add(c);
+ uset_add(set, c);
}
-static void U_CALLCONV
+// These functions aren't used.
+/*static void U_CALLCONV
_set_addRange(USet *set, UChar32 start, UChar32 end) {
((UnicodeSet *)set)->add(start, end);
}
static void U_CALLCONV
_set_addString(USet *set, const UChar *str, int32_t length) {
((UnicodeSet *)set)->add(UnicodeString((UBool)(length<0), str, length));
-}
+}*/
U_CDECL_END
USetAdder sa = {
(USet *)legalPtr, // USet* == UnicodeSet*
_set_add,
- _set_addRange,
- _set_addString,
- NULL // don't need remove()
+ NULL, // Don't need _set_addRange
+ NULL, // Don't need _set_addString
+ NULL, // Don't need remove()
+ NULL
};
uprv_getCharNameCharacters(&sa);
}
/**
* Assignment operator.
*/
-NameUnicodeTransliterator& NameUnicodeTransliterator::operator=(
+/*NameUnicodeTransliterator& NameUnicodeTransliterator::operator=(
const NameUnicodeTransliterator& o) {
Transliterator::operator=(o);
// not necessary: the legal sets should all be the same -- legal=o.legal;
return *this;
-}
+}*/
/**
* Transliterator API.
// Convert \s+ => SPACE. This assumes there are no
// runs of >1 space characters in names.
- if (uprv_isRuleWhiteSpace(c)) {
+ if (PatternProps::isWhiteSpace(c)) {
// Ignore leading whitespace
if (name.length() > 0 &&
name.charAt(name.length()-1) != SPACE) {
if (U_SUCCESS(status)) {
// Lookup succeeded
- // assert(UTF_CHAR_LENGTH(CLOSE_DELIM) == 1);
+ // assert(U16_LENGTH(CLOSE_DELIM) == 1);
cursor++; // advance over CLOSE_DELIM
str.truncate(0);
break;
}
- cursor += UTF_CHAR_LENGTH(c);
+ cursor += U16_LENGTH(c);
}
offsets.contextLimit += limit - offsets.limit;