You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Update HarfBuzz, ICU and FreeType
HarfBuzz: Update to version 7.3.0 ICU4C: Update to version 73.1 FreeType: Update to version 2.13.0
This commit is contained in:
54
thirdparty/icu4c/common/ucnv_ext.cpp
vendored
54
thirdparty/icu4c/common/ucnv_ext.cpp
vendored
@@ -132,7 +132,7 @@ ucnv_extMatchToU(const int32_t *cx, int8_t sisoState,
|
||||
int32_t i, j, idx, length, matchLength;
|
||||
uint8_t b;
|
||||
|
||||
if(cx==NULL || cx[UCNV_EXT_TO_U_LENGTH]<=0) {
|
||||
if(cx==nullptr || cx[UCNV_EXT_TO_U_LENGTH]<=0) {
|
||||
return 0; /* no extension data, no match */
|
||||
}
|
||||
|
||||
@@ -198,7 +198,7 @@ ucnv_extMatchToU(const int32_t *cx, int8_t sisoState,
|
||||
}
|
||||
}
|
||||
|
||||
/* search for the current UChar */
|
||||
/* search for the current char16_t */
|
||||
value=ucnv_extFindToU(toUSection, length, b);
|
||||
if(value==0) {
|
||||
/* no match here, stop with the longest match so far */
|
||||
@@ -236,7 +236,7 @@ ucnv_extMatchToU(const int32_t *cx, int8_t sisoState,
|
||||
static inline void
|
||||
ucnv_extWriteToU(UConverter *cnv, const int32_t *cx,
|
||||
uint32_t value,
|
||||
UChar **target, const UChar *targetLimit,
|
||||
char16_t **target, const char16_t *targetLimit,
|
||||
int32_t **offsets, int32_t srcIndex,
|
||||
UErrorCode *pErrorCode) {
|
||||
/* output the result */
|
||||
@@ -251,7 +251,7 @@ ucnv_extWriteToU(UConverter *cnv, const int32_t *cx,
|
||||
/* output a string - with correct data we have resultLength>0 */
|
||||
ucnv_toUWriteUChars(
|
||||
cnv,
|
||||
UCNV_EXT_ARRAY(cx, UCNV_EXT_TO_U_UCHARS_INDEX, UChar)+
|
||||
UCNV_EXT_ARRAY(cx, UCNV_EXT_TO_U_UCHARS_INDEX, char16_t)+
|
||||
UCNV_EXT_TO_U_GET_INDEX(value),
|
||||
UCNV_EXT_TO_U_GET_LENGTH(value),
|
||||
target, targetLimit,
|
||||
@@ -279,7 +279,7 @@ U_CFUNC UBool
|
||||
ucnv_extInitialMatchToU(UConverter *cnv, const int32_t *cx,
|
||||
int32_t firstLength,
|
||||
const char **src, const char *srcLimit,
|
||||
UChar **target, const UChar *targetLimit,
|
||||
char16_t **target, const char16_t *targetLimit,
|
||||
int32_t **offsets, int32_t srcIndex,
|
||||
UBool flush,
|
||||
UErrorCode *pErrorCode) {
|
||||
@@ -343,7 +343,7 @@ ucnv_extSimpleMatchToU(const int32_t *cx,
|
||||
/* try to match */
|
||||
match=ucnv_extMatchToU(cx, -1,
|
||||
source, length,
|
||||
NULL, 0,
|
||||
nullptr, 0,
|
||||
&value,
|
||||
useFallback, true);
|
||||
if(match==length) {
|
||||
@@ -459,10 +459,10 @@ extFromUUseMapping(UBool useFallback, uint32_t value, UChar32 firstCP) {
|
||||
}
|
||||
|
||||
/*
|
||||
* @return index of the UChar, if found; else <0
|
||||
* @return index of the char16_t, if found; else <0
|
||||
*/
|
||||
static inline int32_t
|
||||
ucnv_extFindFromU(const UChar *fromUSection, int32_t length, UChar u) {
|
||||
ucnv_extFindFromU(const char16_t *fromUSection, int32_t length, char16_t u) {
|
||||
int32_t i, start, limit;
|
||||
|
||||
/* binary search */
|
||||
@@ -508,7 +508,7 @@ ucnv_extFindFromU(const UChar *fromUSection, int32_t length, UChar u) {
|
||||
}
|
||||
|
||||
/*
|
||||
* @param cx pointer to extension data; if NULL, returns 0
|
||||
* @param cx pointer to extension data; if nullptr, returns 0
|
||||
* @param firstCP the first code point before all the other UChars
|
||||
* @param pre UChars that must match; !initialMatch: partial match with them
|
||||
* @param preLength length of pre, >=0
|
||||
@@ -530,21 +530,21 @@ ucnv_extFindFromU(const UChar *fromUSection, int32_t length, UChar u) {
|
||||
static int32_t
|
||||
ucnv_extMatchFromU(const int32_t *cx,
|
||||
UChar32 firstCP,
|
||||
const UChar *pre, int32_t preLength,
|
||||
const UChar *src, int32_t srcLength,
|
||||
const char16_t *pre, int32_t preLength,
|
||||
const char16_t *src, int32_t srcLength,
|
||||
uint32_t *pMatchValue,
|
||||
UBool useFallback, UBool flush) {
|
||||
const uint16_t *stage12, *stage3;
|
||||
const uint32_t *stage3b;
|
||||
|
||||
const UChar *fromUTableUChars, *fromUSectionUChars;
|
||||
const char16_t *fromUTableUChars, *fromUSectionUChars;
|
||||
const uint32_t *fromUTableValues, *fromUSectionValues;
|
||||
|
||||
uint32_t value, matchValue;
|
||||
int32_t i, j, idx, length, matchLength;
|
||||
UChar c;
|
||||
char16_t c;
|
||||
|
||||
if(cx==NULL) {
|
||||
if(cx==nullptr) {
|
||||
return 0; /* no extension data, no match */
|
||||
}
|
||||
|
||||
@@ -575,7 +575,7 @@ ucnv_extMatchFromU(const int32_t *cx,
|
||||
idx=(int32_t)UCNV_EXT_FROM_U_GET_PARTIAL_INDEX(value);
|
||||
|
||||
/* initialize */
|
||||
fromUTableUChars=UCNV_EXT_ARRAY(cx, UCNV_EXT_FROM_U_UCHARS_INDEX, UChar);
|
||||
fromUTableUChars=UCNV_EXT_ARRAY(cx, UCNV_EXT_FROM_U_UCHARS_INDEX, char16_t);
|
||||
fromUTableValues=UCNV_EXT_ARRAY(cx, UCNV_EXT_FROM_U_VALUES_INDEX, uint32_t);
|
||||
|
||||
matchValue=0;
|
||||
@@ -618,7 +618,7 @@ ucnv_extMatchFromU(const int32_t *cx,
|
||||
}
|
||||
}
|
||||
|
||||
/* search for the current UChar */
|
||||
/* search for the current char16_t */
|
||||
idx=ucnv_extFindFromU(fromUSectionUChars, length, c);
|
||||
if(idx<0) {
|
||||
/* no match here, stop with the longest match so far */
|
||||
@@ -749,7 +749,7 @@ ucnv_extWriteFromU(UConverter *cnv, const int32_t *cx,
|
||||
U_CFUNC UBool
|
||||
ucnv_extInitialMatchFromU(UConverter *cnv, const int32_t *cx,
|
||||
UChar32 cp,
|
||||
const UChar **src, const UChar *srcLimit,
|
||||
const char16_t **src, const char16_t *srcLimit,
|
||||
char **target, const char *targetLimit,
|
||||
int32_t **offsets, int32_t srcIndex,
|
||||
UBool flush,
|
||||
@@ -759,7 +759,7 @@ ucnv_extInitialMatchFromU(UConverter *cnv, const int32_t *cx,
|
||||
|
||||
/* try to match */
|
||||
match=ucnv_extMatchFromU(cx, cp,
|
||||
NULL, 0,
|
||||
nullptr, 0,
|
||||
*src, (int32_t)(srcLimit-*src),
|
||||
&value,
|
||||
cnv->useFallback, flush);
|
||||
@@ -781,7 +781,7 @@ ucnv_extInitialMatchFromU(UConverter *cnv, const int32_t *cx,
|
||||
return true;
|
||||
} else if(match<0) {
|
||||
/* save state for partial match */
|
||||
const UChar *s;
|
||||
const char16_t *s;
|
||||
int32_t j;
|
||||
|
||||
/* copy the first code point */
|
||||
@@ -819,8 +819,8 @@ ucnv_extSimpleMatchFromU(const int32_t *cx,
|
||||
/* try to match */
|
||||
match=ucnv_extMatchFromU(cx,
|
||||
cp,
|
||||
NULL, 0,
|
||||
NULL, 0,
|
||||
nullptr, 0,
|
||||
nullptr, 0,
|
||||
&value,
|
||||
useFallback, true);
|
||||
if(match>=2) {
|
||||
@@ -901,7 +901,7 @@ ucnv_extContinueMatchFromU(UConverter *cnv,
|
||||
pErrorCode);
|
||||
} else if(match<0) {
|
||||
/* save state for partial match */
|
||||
const UChar *s;
|
||||
const char16_t *s;
|
||||
int32_t j;
|
||||
|
||||
/* just _append_ the newly consumed input to preFromU[] */
|
||||
@@ -981,16 +981,16 @@ ucnv_extGetUnicodeSetString(const UConverterSharedData *sharedData,
|
||||
UConverterUnicodeSet which,
|
||||
int32_t minLength,
|
||||
UChar32 firstCP,
|
||||
UChar s[UCNV_EXT_MAX_UCHARS], int32_t length,
|
||||
char16_t s[UCNV_EXT_MAX_UCHARS], int32_t length,
|
||||
int32_t sectionIndex,
|
||||
UErrorCode *pErrorCode) {
|
||||
const UChar *fromUSectionUChars;
|
||||
const char16_t *fromUSectionUChars;
|
||||
const uint32_t *fromUSectionValues;
|
||||
|
||||
uint32_t value;
|
||||
int32_t i, count;
|
||||
|
||||
fromUSectionUChars=UCNV_EXT_ARRAY(cx, UCNV_EXT_FROM_U_UCHARS_INDEX, UChar)+sectionIndex;
|
||||
fromUSectionUChars=UCNV_EXT_ARRAY(cx, UCNV_EXT_FROM_U_UCHARS_INDEX, char16_t)+sectionIndex;
|
||||
fromUSectionValues=UCNV_EXT_ARRAY(cx, UCNV_EXT_FROM_U_VALUES_INDEX, uint32_t)+sectionIndex;
|
||||
|
||||
/* read first pair of the section */
|
||||
@@ -1039,12 +1039,12 @@ ucnv_extGetUnicodeSet(const UConverterSharedData *sharedData,
|
||||
uint32_t value;
|
||||
int32_t st1, stage1Length, st2, st3, minLength;
|
||||
|
||||
UChar s[UCNV_EXT_MAX_UCHARS];
|
||||
char16_t s[UCNV_EXT_MAX_UCHARS];
|
||||
UChar32 c;
|
||||
int32_t length;
|
||||
|
||||
cx=sharedData->mbcs.extIndexes;
|
||||
if(cx==NULL) {
|
||||
if(cx==nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user