mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 00:38:39 +09:00
Issue #1971 - Part 2: Update ICU source to 63.2.
This commit is contained in:
parent
8df84683be
commit
1e69214382
3160 changed files with 275815 additions and 234203 deletions
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2016 and later: Unicode, Inc. and others.
|
||||
// © 2016 and later: Unicode, Inc. and others.
|
||||
// License & terms of use: http://www.unicode.org/copyright.html
|
||||
/*
|
||||
*******************************************************************************
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
*
|
||||
*******************************************************************************
|
||||
* file name: usprep.cpp
|
||||
* encoding: US-ASCII
|
||||
* encoding: UTF-8
|
||||
* tab size: 8 (not used)
|
||||
* indentation:4
|
||||
*
|
||||
|
|
@ -112,7 +112,9 @@ hashEntry(const UHashTok parm) {
|
|||
UHashTok namekey, pathkey;
|
||||
namekey.pointer = b->name;
|
||||
pathkey.pointer = b->path;
|
||||
return uhash_hashChars(namekey)+37*uhash_hashChars(pathkey);
|
||||
uint32_t unsignedHash = static_cast<uint32_t>(uhash_hashChars(namekey)) +
|
||||
37u * static_cast<uint32_t>(uhash_hashChars(pathkey));
|
||||
return static_cast<int32_t>(unsignedHash);
|
||||
}
|
||||
|
||||
/* compares two entries */
|
||||
|
|
@ -347,17 +349,13 @@ usprep_getProfile(const char* path,
|
|||
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;
|
||||
if( key.allocateInsteadAndReset() == NULL ||
|
||||
keyName.allocateInsteadAndCopy(uprv_strlen(name)+1) == NULL ||
|
||||
keyName.allocateInsteadAndCopy(static_cast<int32_t>(uprv_strlen(name)+1)) == NULL ||
|
||||
(path != NULL &&
|
||||
keyPath.allocateInsteadAndCopy(uprv_strlen(path)+1) == NULL)
|
||||
keyPath.allocateInsteadAndCopy(static_cast<int32_t>(uprv_strlen(path)+1)) == NULL)
|
||||
) {
|
||||
*status = U_MEMORY_ALLOCATION_ERROR;
|
||||
usprep_unload(newProfile.getAlias());
|
||||
|
|
@ -730,12 +728,12 @@ usprep_prepare( const UStringPrepProfile* profile,
|
|||
((result < _SPREP_TYPE_THRESHOLD) && (result & 0x01) /* first bit says it the code point is prohibited*/)
|
||||
){
|
||||
*status = U_STRINGPREP_PROHIBITED_ERROR;
|
||||
uprv_syntaxError(b1, b2Index-U16_LENGTH(ch), b2Len, parseError);
|
||||
uprv_syntaxError(b2, b2Index-U16_LENGTH(ch), b2Len, parseError);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(profile->checkBiDi) {
|
||||
direction = ubidi_getClass(profile->bdp, ch);
|
||||
direction = ubidi_getClass(ch);
|
||||
if(firstCharDir == U_CHAR_DIRECTION_COUNT){
|
||||
firstCharDir = direction;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue