Adding of _t to (u)int types, and WChar to char32_t

See: eaae0bb5e
This commit is contained in:
Jonathan G Rennison
2024-01-07 16:41:53 +00:00
parent 55d78a23be
commit 97e6f3062e
655 changed files with 7555 additions and 7555 deletions

View File

@@ -598,14 +598,14 @@ public:
}
};
static WChar _io_file_lexfeed_ASCII(SQUserPointer file)
static char32_t _io_file_lexfeed_ASCII(SQUserPointer file)
{
unsigned char c;
if (((SQFile *)file)->Read(&c, sizeof(c), 1) > 0) return c;
return 0;
}
static WChar _io_file_lexfeed_UTF8(SQUserPointer file)
static char32_t _io_file_lexfeed_UTF8(SQUserPointer file)
{
char buffer[5];
@@ -618,25 +618,25 @@ static WChar _io_file_lexfeed_UTF8(SQUserPointer file)
if (len > 1 && ((SQFile *)file)->Read(buffer + 1, sizeof(buffer[0]), len - 1) != len - 1) return 0;
/* Convert the character, and when definitely invalid, bail out as well. */
WChar c;
char32_t c;
if (Utf8Decode(&c, buffer) != len) return -1;
return c;
}
static WChar _io_file_lexfeed_UCS2_no_swap(SQUserPointer file)
static char32_t _io_file_lexfeed_UCS2_no_swap(SQUserPointer file)
{
unsigned short c;
if (((SQFile *)file)->Read(&c, sizeof(c), 1) > 0) return (WChar)c;
if (((SQFile *)file)->Read(&c, sizeof(c), 1) > 0) return (char32_t)c;
return 0;
}
static WChar _io_file_lexfeed_UCS2_swap(SQUserPointer file)
static char32_t _io_file_lexfeed_UCS2_swap(SQUserPointer file)
{
unsigned short c;
if (((SQFile *)file)->Read(&c, sizeof(c), 1) > 0) {
c = ((c >> 8) & 0x00FF)| ((c << 8) & 0xFF00);
return (WChar)c;
return (char32_t)c;
}
return 0;
}