mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
Merge remote-tracking branch 'smally/platform_type_consistency' into platform-type-consistency
Conflicts: Engine/source/platform/platformCPUCount.cpp
This commit is contained in:
commit
87d9e245b7
210 changed files with 896 additions and 896 deletions
|
|
@ -140,7 +140,7 @@ bool FindMatch::isMatch( const char *exp, const char *str, bool caseSensitive )
|
|||
bool FindMatch::isMatchMultipleExprs( const char *exps, const char *str, bool caseSensitive )
|
||||
{
|
||||
char *tok = 0;
|
||||
int len = dStrlen(exps);
|
||||
S32 len = dStrlen(exps);
|
||||
|
||||
char *e = new char[len+1];
|
||||
dStrcpy(e,exps);
|
||||
|
|
|
|||
|
|
@ -97,10 +97,10 @@ nat_toupper( nat_char a )
|
|||
|
||||
|
||||
|
||||
static int
|
||||
static S32
|
||||
compare_right(const nat_char* a, const nat_char* b)
|
||||
{
|
||||
int bias = 0;
|
||||
S32 bias = 0;
|
||||
|
||||
/* The longest run of digits wins. That aside, the greatest
|
||||
value wins, but we can't know that it will until we've scanned
|
||||
|
|
@ -149,11 +149,11 @@ compare_left(const nat_char* a, const nat_char* b)
|
|||
}
|
||||
|
||||
|
||||
static int strnatcmp0(const nat_char* a, const nat_char* b, int fold_case)
|
||||
static S32 strnatcmp0(const nat_char* a, const nat_char* b, S32 fold_case)
|
||||
{
|
||||
int ai, bi;
|
||||
S32 ai, bi;
|
||||
nat_char ca, cb;
|
||||
int fractional, result;
|
||||
S32 fractional, result;
|
||||
|
||||
ai = bi = 0;
|
||||
while (1) {
|
||||
|
|
@ -200,13 +200,13 @@ static int strnatcmp0(const nat_char* a, const nat_char* b, int fold_case)
|
|||
}
|
||||
|
||||
|
||||
int dStrnatcmp(const nat_char* a, const nat_char* b) {
|
||||
S32 dStrnatcmp(const nat_char* a, const nat_char* b) {
|
||||
return strnatcmp0(a, b, 0);
|
||||
}
|
||||
|
||||
|
||||
/* Compare, recognizing numeric string and ignoring case. */
|
||||
int dStrnatcasecmp(const nat_char* a, const nat_char* b) {
|
||||
S32 dStrnatcasecmp(const nat_char* a, const nat_char* b) {
|
||||
return strnatcmp0(a, b, 1);
|
||||
}
|
||||
|
||||
|
|
@ -328,12 +328,12 @@ char* dStrcpyl(char *dst, dsize_t dstSize, ...)
|
|||
}
|
||||
|
||||
|
||||
int dStrcmp( const UTF16 *str1, const UTF16 *str2)
|
||||
S32 dStrcmp( const UTF16 *str1, const UTF16 *str2)
|
||||
{
|
||||
#if defined(TORQUE_OS_WIN) || defined(TORQUE_OS_XBOX) || defined(TORQUE_OS_XENON)
|
||||
return wcscmp( reinterpret_cast<const wchar_t *>( str1 ), reinterpret_cast<const wchar_t *>( str2 ) );
|
||||
#else
|
||||
int ret;
|
||||
S32 ret;
|
||||
const UTF16 *a, *b;
|
||||
a = str1;
|
||||
b = str2;
|
||||
|
|
|
|||
|
|
@ -52,22 +52,22 @@ inline char *dStrncat(char *dst, const char *src, dsize_t len)
|
|||
return strncat(dst,src,len);
|
||||
}
|
||||
|
||||
inline int dStrcmp(const char *str1, const char *str2)
|
||||
inline S32 dStrcmp(const char *str1, const char *str2)
|
||||
{
|
||||
return strcmp(str1, str2);
|
||||
}
|
||||
|
||||
inline int dStrncmp(const char *str1, const char *str2, dsize_t len)
|
||||
inline S32 dStrncmp(const char *str1, const char *str2, dsize_t len)
|
||||
{
|
||||
return strncmp(str1, str2, len);
|
||||
}
|
||||
|
||||
inline int dStricmp(const char *str1, const char *str2)
|
||||
inline S32 dStricmp(const char *str1, const char *str2)
|
||||
{
|
||||
return strcasecmp( str1, str2 );
|
||||
}
|
||||
|
||||
inline int dStrnicmp(const char *str1, const char *str2, dsize_t len)
|
||||
inline S32 dStrnicmp(const char *str1, const char *str2, dsize_t len)
|
||||
{
|
||||
return strncasecmp( str1, str2, len );
|
||||
}
|
||||
|
|
@ -87,22 +87,22 @@ inline dsize_t dStrlen(const char *str)
|
|||
return strlen(str);
|
||||
}
|
||||
|
||||
inline char *dStrchr(char *str, int c)
|
||||
inline char *dStrchr(char *str, S32 c)
|
||||
{
|
||||
return strchr(str,c);
|
||||
}
|
||||
|
||||
inline const char *dStrchr(const char *str, int c)
|
||||
inline const char *dStrchr(const char *str, S32 c)
|
||||
{
|
||||
return strchr(str,c);
|
||||
}
|
||||
|
||||
inline char *dStrrchr(char *str, int c)
|
||||
inline char *dStrrchr(char *str, S32 c)
|
||||
{
|
||||
return strrchr(str,c);
|
||||
}
|
||||
|
||||
inline const char *dStrrchr(const char *str, int c)
|
||||
inline const char *dStrrchr(const char *str, S32 c)
|
||||
{
|
||||
return strrchr(str,c);
|
||||
}
|
||||
|
|
@ -198,9 +198,9 @@ extern char *dStrlwr(char *str);
|
|||
extern char* dStrichr( char* str, char ch );
|
||||
extern const char* dStrichr( const char* str, char ch );
|
||||
|
||||
extern int dStrcmp(const UTF16 *str1, const UTF16 *str2);
|
||||
extern int dStrnatcmp( const char* str1, const char* str2 );
|
||||
extern int dStrnatcasecmp( const char* str1, const char* str2 );
|
||||
extern S32 dStrcmp(const UTF16 *str1, const UTF16 *str2);
|
||||
extern S32 dStrnatcmp( const char* str1, const char* str2 );
|
||||
extern S32 dStrnatcasecmp( const char* str1, const char* str2 );
|
||||
|
||||
inline bool dAtob(const char *str)
|
||||
{
|
||||
|
|
@ -219,9 +219,9 @@ char* dStripPath(const char* filename);
|
|||
// standard I/O functions [defined in platformString.cpp]
|
||||
|
||||
extern void dPrintf(const char *format, ...);
|
||||
extern int dVprintf(const char *format, void *arglist);
|
||||
extern int dSprintf(char *buffer, U32 bufferSize, const char *format, ...);
|
||||
extern int dVsprintf(char *buffer, U32 bufferSize, const char *format, void *arglist);
|
||||
extern int dSscanf(const char *buffer, const char *format, ...);
|
||||
extern S32 dVprintf(const char *format, void *arglist);
|
||||
extern S32 dSprintf(char *buffer, U32 bufferSize, const char *format, ...);
|
||||
extern S32 dVsprintf(char *buffer, U32 bufferSize, const char *format, void *arglist);
|
||||
extern S32 dSscanf(const char *buffer, const char *format, ...);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -311,7 +311,7 @@ UTF32 oneUTF8toUTF32( const UTF8* codepoint, U32 *unitsWalked)
|
|||
U8 codeunit;
|
||||
|
||||
// check the first byte ( a.k.a. codeunit ) .
|
||||
unsigned char c = codepoint[0];
|
||||
U8 c = codepoint[0];
|
||||
c = c >> 1;
|
||||
expectedByteCount = sgFirstByteLUT[c];
|
||||
if(expectedByteCount > 0) // 0 or negative is illegal to start with
|
||||
|
|
@ -469,7 +469,7 @@ U32 oneUTF32toUTF8(const UTF32 codepoint, UTF8 *threeByteCodeunitBuf)
|
|||
U8 marker = ( ~mask << 1); // 1000 0000
|
||||
|
||||
// Process the low order bytes, shifting the codepoint down 6 each pass.
|
||||
for( int i = bytecount-1; i > 0; i--)
|
||||
for( S32 i = bytecount-1; i > 0; i--)
|
||||
{
|
||||
threeByteCodeunitBuf[i] = marker | (working & mask);
|
||||
working >>= 6;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue