mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-12 23:54:17 +00:00
backend update from Raze.
Mainly fixing case table for Georgian script and de-inlining M_Calloc.
This commit is contained in:
parent
749d4e3acb
commit
36d05112d5
4 changed files with 96 additions and 75 deletions
|
@ -850,37 +850,6 @@ FString I_GetLongPathName(const FString &shortpath)
|
|||
return longpath;
|
||||
}
|
||||
|
||||
#ifdef _USING_V110_SDK71_
|
||||
//==========================================================================
|
||||
//
|
||||
// _stat64i32
|
||||
//
|
||||
// Work around an issue where stat() function doesn't work
|
||||
// with Windows XP compatible toolset.
|
||||
// It uses GetFileInformationByHandleEx() which requires Windows Vista.
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
int _wstat64i32(const wchar_t *path, struct _stat64i32 *buffer)
|
||||
{
|
||||
WIN32_FILE_ATTRIBUTE_DATA data;
|
||||
if(!GetFileAttributesExW(path, GetFileExInfoStandard, &data))
|
||||
return -1;
|
||||
|
||||
buffer->st_ino = 0;
|
||||
buffer->st_mode = ((data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? S_IFDIR : S_IFREG)|
|
||||
((data.dwFileAttributes & FILE_ATTRIBUTE_READONLY) ? S_IREAD : S_IREAD|S_IWRITE);
|
||||
buffer->st_dev = buffer->st_rdev = 0;
|
||||
buffer->st_nlink = 1;
|
||||
buffer->st_uid = 0;
|
||||
buffer->st_gid = 0;
|
||||
buffer->st_size = data.nFileSizeLow;
|
||||
buffer->st_atime = (*(uint64_t*)&data.ftLastAccessTime) / 10000000 - 11644473600LL;
|
||||
buffer->st_mtime = (*(uint64_t*)&data.ftLastWriteTime) / 10000000 - 11644473600LL;
|
||||
buffer->st_ctime = (*(uint64_t*)&data.ftCreationTime) / 10000000 - 11644473600LL;
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
struct NumaNode
|
||||
{
|
||||
|
|
|
@ -77,6 +77,7 @@ void *M_Realloc(void *memblock, size_t size)
|
|||
GC::ReportRealloc(oldsize, _msize(block));
|
||||
return block;
|
||||
}
|
||||
|
||||
#else
|
||||
void *M_Malloc(size_t size)
|
||||
{
|
||||
|
@ -113,6 +114,14 @@ void *M_Realloc(void *memblock, size_t size)
|
|||
return block;
|
||||
}
|
||||
#endif
|
||||
|
||||
void* M_Calloc(size_t v1, size_t v2)
|
||||
{
|
||||
auto p = M_Malloc(v1 * v2);
|
||||
memset(p, 0, v1 * v2);
|
||||
return p;
|
||||
}
|
||||
|
||||
#else
|
||||
#ifdef _MSC_VER
|
||||
#include <crtdbg.h>
|
||||
|
|
|
@ -72,12 +72,7 @@ inline void* M_Calloc_Dbg(size_t v1, size_t v2, const char* file, int lineno)
|
|||
#else
|
||||
void *M_Malloc (size_t size);
|
||||
void *M_Realloc (void *memblock, size_t size);
|
||||
inline void* M_Calloc(size_t v1, size_t v2)
|
||||
{
|
||||
auto p = M_Malloc(v1 * v2);
|
||||
memset(p, 0, v1 * v2);
|
||||
return p;
|
||||
}
|
||||
void* M_Calloc(size_t v1, size_t v2);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -823,44 +823,52 @@ static const uint16_t loweruppercase[] = {
|
|||
0x0584,0x0554,
|
||||
0x0585,0x0555,
|
||||
0x0586,0x0556,
|
||||
0x10D0,0x10A0,
|
||||
0x10D1,0x10A1,
|
||||
0x10D2,0x10A2,
|
||||
0x10D3,0x10A3,
|
||||
0x10D4,0x10A4,
|
||||
0x10D5,0x10A5,
|
||||
0x10D6,0x10A6,
|
||||
0x10D7,0x10A7,
|
||||
0x10D8,0x10A8,
|
||||
0x10D9,0x10A9,
|
||||
0x10DA,0x10AA,
|
||||
0x10DB,0x10AB,
|
||||
0x10DC,0x10AC,
|
||||
0x10DD,0x10AD,
|
||||
0x10DE,0x10AE,
|
||||
0x10DF,0x10AF,
|
||||
0x10E0,0x10B0,
|
||||
0x10E1,0x10B1,
|
||||
0x10E2,0x10B2,
|
||||
0x10E3,0x10B3,
|
||||
0x10E4,0x10B4,
|
||||
0x10E5,0x10B5,
|
||||
0x10E6,0x10B6,
|
||||
0x10E7,0x10B7,
|
||||
0x10E8,0x10B8,
|
||||
0x10E9,0x10B9,
|
||||
0x10EA,0x10BA,
|
||||
0x10EB,0x10BB,
|
||||
0x10EC,0x10BC,
|
||||
0x10ED,0x10BD,
|
||||
0x10EE,0x10BE,
|
||||
0x10EF,0x10BF,
|
||||
0x10F0,0x10C0,
|
||||
0x10F1,0x10C1,
|
||||
0x10F2,0x10C2,
|
||||
0x10F3,0x10C3,
|
||||
0x10F4,0x10C4,
|
||||
0x10F5,0x10C5,
|
||||
0x10D0,0x1C90,
|
||||
0x10D1,0x1C91,
|
||||
0x10D2,0x1C92,
|
||||
0x10D3,0x1C93,
|
||||
0x10D4,0x1C94,
|
||||
0x10D5,0x1C95,
|
||||
0x10D6,0x1C96,
|
||||
0x10D7,0x1C97,
|
||||
0x10D8,0x1C98,
|
||||
0x10D9,0x1C99,
|
||||
0x10DA,0x1C9A,
|
||||
0x10DB,0x1C9B,
|
||||
0x10DC,0x1C9C,
|
||||
0x10DD,0x1C9D,
|
||||
0x10DE,0x1C9E,
|
||||
0x10DF,0x1C9F,
|
||||
0x10E0,0x1CA0,
|
||||
0x10E1,0x1CA1,
|
||||
0x10E2,0x1CA2,
|
||||
0x10E3,0x1CA3,
|
||||
0x10E4,0x1CA4,
|
||||
0x10E5,0x1CA5,
|
||||
0x10E6,0x1CA6,
|
||||
0x10E7,0x1CA7,
|
||||
0x10E8,0x1CA8,
|
||||
0x10E9,0x1CA9,
|
||||
0x10EA,0x1CAA,
|
||||
0x10EB,0x1CAB,
|
||||
0x10EC,0x1CAC,
|
||||
0x10ED,0x1CAD,
|
||||
0x10EE,0x1CAE,
|
||||
0x10EF,0x1CAF,
|
||||
0x10F0,0x1CB0,
|
||||
0x10F1,0x1CB1,
|
||||
0x10F2,0x1CB2,
|
||||
0x10F3,0x1CB3,
|
||||
0x10F4,0x1CB4,
|
||||
0x10F5,0x1CB5,
|
||||
0x10F6,0x1CB6,
|
||||
0x10F7,0x1CB7,
|
||||
0x10F8,0x1CB8,
|
||||
0x10F9,0x1CB9,
|
||||
0x10FA,0x1CBA,
|
||||
0x10FD,0x1CBD,
|
||||
0x10FE,0x1CBE,
|
||||
0x10FF,0x1CBF,
|
||||
0x1E01,0x1E00,
|
||||
0x1E03,0x1E02,
|
||||
0x1E05,0x1E04,
|
||||
|
@ -1085,6 +1093,46 @@ static const uint16_t loweruppercase[] = {
|
|||
0x24E7, 0x24CD,
|
||||
0x24E8, 0x24CE,
|
||||
0x24E9, 0x24CF,
|
||||
0x2D00, 0x10A0,
|
||||
0x2D01, 0x10A1,
|
||||
0x2D02, 0x10A2,
|
||||
0x2D03, 0x10A3,
|
||||
0x2D04, 0x10A4,
|
||||
0x2D05, 0x10A5,
|
||||
0x2D06, 0x10A6,
|
||||
0x2D07, 0x10A7,
|
||||
0x2D08, 0x10A8,
|
||||
0x2D09, 0x10A9,
|
||||
0x2D0A, 0x10AA,
|
||||
0x2D0B, 0x10AB,
|
||||
0x2D0C, 0x10AC,
|
||||
0x2D0D, 0x10AD,
|
||||
0x2D0E, 0x10AE,
|
||||
0x2D0F, 0x10AF,
|
||||
0x2D10, 0x10B0,
|
||||
0x2D11, 0x10B1,
|
||||
0x2D12, 0x10B2,
|
||||
0x2D13, 0x10B3,
|
||||
0x2D14, 0x10B4,
|
||||
0x2D15, 0x10B5,
|
||||
0x2D16, 0x10B6,
|
||||
0x2D17, 0x10B7,
|
||||
0x2D18, 0x10B8,
|
||||
0x2D19, 0x10B9,
|
||||
0x2D1A, 0x10BA,
|
||||
0x2D1B, 0x10BB,
|
||||
0x2D1C, 0x10BC,
|
||||
0x2D1D, 0x10BD,
|
||||
0x2D1E, 0x10BE,
|
||||
0x2D1F, 0x10BF,
|
||||
0x2D20, 0x10C0,
|
||||
0x2D21, 0x10C1,
|
||||
0x2D22, 0x10C2,
|
||||
0x2D23, 0x10C3,
|
||||
0x2D24, 0x10C4,
|
||||
0x2D25, 0x10C5,
|
||||
0x2D27, 0x10C7,
|
||||
0x2D2D, 0x10CD,
|
||||
0xFF41, 0xFF21,
|
||||
0xFF42, 0xFF22,
|
||||
0xFF43, 0xFF23,
|
||||
|
|
Loading…
Reference in a new issue