You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-06 17:25:19 +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:
70
thirdparty/icu4c/common/utrace.cpp
vendored
70
thirdparty/icu4c/common/utrace.cpp
vendored
@@ -18,10 +18,10 @@
|
||||
#include "ucln_cmn.h"
|
||||
|
||||
|
||||
static UTraceEntry *pTraceEntryFunc = NULL;
|
||||
static UTraceExit *pTraceExitFunc = NULL;
|
||||
static UTraceData *pTraceDataFunc = NULL;
|
||||
static const void *gTraceContext = NULL;
|
||||
static UTraceEntry *pTraceEntryFunc = nullptr;
|
||||
static UTraceExit *pTraceExitFunc = nullptr;
|
||||
static UTraceData *pTraceDataFunc = nullptr;
|
||||
static const void *gTraceContext = nullptr;
|
||||
|
||||
/**
|
||||
* \var utrace_level
|
||||
@@ -32,7 +32,7 @@ utrace_level = UTRACE_ERROR;
|
||||
|
||||
U_CAPI void U_EXPORT2
|
||||
utrace_entry(int32_t fnNumber) {
|
||||
if (pTraceEntryFunc != NULL) {
|
||||
if (pTraceEntryFunc != nullptr) {
|
||||
(*pTraceEntryFunc)(gTraceContext, fnNumber);
|
||||
}
|
||||
}
|
||||
@@ -46,7 +46,7 @@ static const char gExitFmtPtrStatus[] = "Returns %d. Status = %p.";
|
||||
|
||||
U_CAPI void U_EXPORT2
|
||||
utrace_exit(int32_t fnNumber, int32_t returnType, ...) {
|
||||
if (pTraceExitFunc != NULL) {
|
||||
if (pTraceExitFunc != nullptr) {
|
||||
va_list args;
|
||||
const char *fmt;
|
||||
|
||||
@@ -80,7 +80,7 @@ utrace_exit(int32_t fnNumber, int32_t returnType, ...) {
|
||||
|
||||
U_CAPI void U_EXPORT2
|
||||
utrace_data(int32_t fnNumber, int32_t level, const char *fmt, ...) {
|
||||
if (pTraceDataFunc != NULL) {
|
||||
if (pTraceDataFunc != nullptr) {
|
||||
va_list args;
|
||||
va_start(args, fmt );
|
||||
(*pTraceDataFunc)(gTraceContext, fnNumber, level, fmt, args);
|
||||
@@ -117,9 +117,9 @@ static void outputChar(char c, char *outBuf, int32_t *outIx, int32_t capacity, i
|
||||
outBuf[*outIx] = c;
|
||||
}
|
||||
if (c != 0) {
|
||||
/* Nulls only appear as end-of-string terminators. Move them to the output
|
||||
/* NULs only appear as end-of-string terminators. Move them to the output
|
||||
* buffer, but do not update the length of the buffer, so that any
|
||||
* following output will overwrite the null. */
|
||||
* following output will overwrite the NUL. */
|
||||
(*outIx)++;
|
||||
}
|
||||
}
|
||||
@@ -157,7 +157,7 @@ static void outputPtrBytes(void *val, char *outBuf, int32_t *outIx, int32_t capa
|
||||
static void outputString(const char *s, char *outBuf, int32_t *outIx, int32_t capacity, int32_t indent) {
|
||||
int32_t i = 0;
|
||||
char c;
|
||||
if (s==NULL) {
|
||||
if (s==nullptr) {
|
||||
s = "*NULL*";
|
||||
}
|
||||
do {
|
||||
@@ -168,12 +168,12 @@ static void outputString(const char *s, char *outBuf, int32_t *outIx, int32_t ca
|
||||
|
||||
|
||||
|
||||
static void outputUString(const UChar *s, int32_t len,
|
||||
static void outputUString(const char16_t *s, int32_t len,
|
||||
char *outBuf, int32_t *outIx, int32_t capacity, int32_t indent) {
|
||||
int32_t i = 0;
|
||||
UChar c;
|
||||
if (s==NULL) {
|
||||
outputString(NULL, outBuf, outIx, capacity, indent);
|
||||
char16_t c;
|
||||
if (s==nullptr) {
|
||||
outputString(nullptr, outBuf, outIx, capacity, indent);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -205,7 +205,7 @@ utrace_vformat(char *outBuf, int32_t capacity, int32_t indent, const char *fmt,
|
||||
/* Literal character, not part of a %sequence. Just copy it to the output. */
|
||||
outputChar(fmtC, outBuf, &outIx, capacity, indent);
|
||||
if (fmtC == 0) {
|
||||
/* We hit the null that terminates the format string.
|
||||
/* We hit the NUL that terminates the format string.
|
||||
* This is the normal (and only) exit from the loop that
|
||||
* interprets the format
|
||||
*/
|
||||
@@ -225,16 +225,16 @@ utrace_vformat(char *outBuf, int32_t capacity, int32_t indent, const char *fmt,
|
||||
break;
|
||||
|
||||
case 's':
|
||||
/* char * string, null terminated. */
|
||||
/* char * string, NUL terminated. */
|
||||
ptrArg = va_arg(args, char *);
|
||||
outputString((const char *)ptrArg, outBuf, &outIx, capacity, indent);
|
||||
break;
|
||||
|
||||
case 'S':
|
||||
/* UChar * string, with length, len==-1 for null terminated. */
|
||||
/* char16_t * string, with length, len==-1 for NUL terminated. */
|
||||
ptrArg = va_arg(args, char *); /* Ptr */
|
||||
intArg =(int32_t)va_arg(args, int32_t); /* Length */
|
||||
outputUString((const UChar *)ptrArg, intArg, outBuf, &outIx, capacity, indent);
|
||||
outputUString((const char16_t *)ptrArg, intArg, outBuf, &outIx, capacity, indent);
|
||||
break;
|
||||
|
||||
case 'b':
|
||||
@@ -269,7 +269,7 @@ utrace_vformat(char *outBuf, int32_t capacity, int32_t indent, const char *fmt,
|
||||
|
||||
case 0:
|
||||
/* Single '%' at end of fmt string. Output as literal '%'.
|
||||
* Back up index into format string so that the terminating null will be
|
||||
* Back up index into format string so that the terminating NUL will be
|
||||
* re-fetched in the outer loop, causing it to terminate.
|
||||
*/
|
||||
outputChar('%', outBuf, &outIx, capacity, indent);
|
||||
@@ -299,7 +299,7 @@ utrace_vformat(char *outBuf, int32_t capacity, int32_t indent, const char *fmt,
|
||||
i64Ptr = (int64_t *)i8Ptr;
|
||||
ptrPtr = (void **)i8Ptr;
|
||||
vectorLen =(int32_t)va_arg(args, int32_t);
|
||||
if (ptrPtr == NULL) {
|
||||
if (ptrPtr == nullptr) {
|
||||
outputString("*NULL* ", outBuf, &outIx, capacity, indent);
|
||||
} else {
|
||||
for (i=0; i<vectorLen || vectorLen==-1; i++) {
|
||||
@@ -323,28 +323,28 @@ utrace_vformat(char *outBuf, int32_t capacity, int32_t indent, const char *fmt,
|
||||
case 'p':
|
||||
charsToOutput = 0;
|
||||
outputPtrBytes(*ptrPtr, outBuf, &outIx, capacity);
|
||||
longArg = *ptrPtr==NULL? 0: 1; /* test for null terminated array. */
|
||||
longArg = *ptrPtr==nullptr? 0: 1; /* test for nullptr terminated array. */
|
||||
ptrPtr++;
|
||||
break;
|
||||
case 'c':
|
||||
charsToOutput = 0;
|
||||
outputChar(*i8Ptr, outBuf, &outIx, capacity, indent);
|
||||
longArg = *i8Ptr; /* for test for null terminated array. */
|
||||
longArg = *i8Ptr; /* for test for nullptr terminated array. */
|
||||
i8Ptr++;
|
||||
break;
|
||||
case 's':
|
||||
charsToOutput = 0;
|
||||
outputString((const char *)*ptrPtr, outBuf, &outIx, capacity, indent);
|
||||
outputChar('\n', outBuf, &outIx, capacity, indent);
|
||||
longArg = *ptrPtr==NULL? 0: 1; /* for test for null term. array. */
|
||||
longArg = *ptrPtr==nullptr? 0: 1; /* for test for nullptr term. array. */
|
||||
ptrPtr++;
|
||||
break;
|
||||
|
||||
case 'S':
|
||||
charsToOutput = 0;
|
||||
outputUString((const UChar *)*ptrPtr, -1, outBuf, &outIx, capacity, indent);
|
||||
outputUString((const char16_t *)*ptrPtr, -1, outBuf, &outIx, capacity, indent);
|
||||
outputChar('\n', outBuf, &outIx, capacity, indent);
|
||||
longArg = *ptrPtr==NULL? 0: 1; /* for test for null term. array. */
|
||||
longArg = *ptrPtr==nullptr? 0: 1; /* for test for nullptr term. array. */
|
||||
ptrPtr++;
|
||||
break;
|
||||
|
||||
@@ -374,8 +374,8 @@ utrace_vformat(char *outBuf, int32_t capacity, int32_t indent, const char *fmt,
|
||||
outputChar(fmtC, outBuf, &outIx, capacity, indent);
|
||||
}
|
||||
}
|
||||
outputChar(0, outBuf, &outIx, capacity, indent); /* Make sure that output is null terminated */
|
||||
return outIx + 1; /* outIx + 1 because outIx does not increment when outputting final null. */
|
||||
outputChar(0, outBuf, &outIx, capacity, indent); /* Make sure that output is NUL terminated */
|
||||
return outIx + 1; /* outIx + 1 because outIx does not increment when outputting final NUL. */
|
||||
}
|
||||
|
||||
|
||||
@@ -431,11 +431,11 @@ utrace_getLevel() {
|
||||
|
||||
U_CFUNC UBool
|
||||
utrace_cleanup() {
|
||||
pTraceEntryFunc = NULL;
|
||||
pTraceExitFunc = NULL;
|
||||
pTraceDataFunc = NULL;
|
||||
pTraceEntryFunc = nullptr;
|
||||
pTraceExitFunc = nullptr;
|
||||
pTraceDataFunc = nullptr;
|
||||
utrace_level = UTRACE_OFF;
|
||||
gTraceContext = NULL;
|
||||
gTraceContext = nullptr;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -444,7 +444,7 @@ static const char * const
|
||||
trFnName[] = {
|
||||
"u_init",
|
||||
"u_cleanup",
|
||||
NULL
|
||||
nullptr
|
||||
};
|
||||
|
||||
|
||||
@@ -458,7 +458,7 @@ trConvNames[] = {
|
||||
"ucnv_flushCache",
|
||||
"ucnv_load",
|
||||
"ucnv_unload",
|
||||
NULL
|
||||
nullptr
|
||||
};
|
||||
|
||||
|
||||
@@ -473,7 +473,7 @@ trCollNames[] = {
|
||||
"ucol_strcollIter",
|
||||
"ucol_openFromShortString",
|
||||
"ucol_strcollUTF8",
|
||||
NULL
|
||||
nullptr
|
||||
};
|
||||
|
||||
|
||||
@@ -483,7 +483,7 @@ trResDataNames[] = {
|
||||
"bundle-open",
|
||||
"file-open",
|
||||
"res-open",
|
||||
NULL
|
||||
nullptr
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user