+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
*******************************************************************************
*
- * Copyright (C) 2003-2014, International Business Machines
+ * Copyright (C) 2003-2016, International Business Machines
* Corporation and others. All Rights Reserved.
*
*******************************************************************************
* file name: usprep.cpp
- * encoding: US-ASCII
+ * encoding: UTF-8
* tab size: 8 (not used)
* indentation:4
*
newProfile->doNFKC = (UBool)((newProfile->indexes[_SPREP_OPTIONS] & _SPREP_NORMALIZATION_ON) > 0);
newProfile->checkBiDi = (UBool)((newProfile->indexes[_SPREP_OPTIONS] & _SPREP_CHECK_BIDI_ON) > 0);
- if(newProfile->checkBiDi) {
- newProfile->bdp = ubidi_getSingleton();
- }
-
LocalMemory<UStringPrepKey> key;
LocalMemory<char> keyName;
LocalMemory<char> keyPath;
return NULL;
}
int32_t index = (int32_t)type;
- if (index < 0 || index >= (int32_t)(sizeof(PROFILE_NAMES)/sizeof(PROFILE_NAMES[0]))) {
+ if (index < 0 || index >= UPRV_LENGTHOF(PROFILE_NAMES)) {
*status = U_ILLEGAL_ARGUMENT_ERROR;
return NULL;
}
}
if(profile->checkBiDi) {
- direction = ubidi_getClass(profile->bdp, ch);
+ direction = ubidi_getClass(ch);
if(firstCharDir == U_CHAR_DIRECTION_COUNT){
firstCharDir = direction;
}