From 46a30c6afbcc52acf330155a7b0fbb2bfec62505 Mon Sep 17 00:00:00 2001 From: s1lentq Date: Fri, 4 Dec 2015 17:05:25 +0600 Subject: [PATCH] use own tables non-printable characters for windows. symbol 0x1160 marked to like non-printable --- rehlds/engine/unicode_strtools.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/rehlds/engine/unicode_strtools.cpp b/rehlds/engine/unicode_strtools.cpp index a66461e..c26aac1 100644 --- a/rehlds/engine/unicode_strtools.cpp +++ b/rehlds/engine/unicode_strtools.cpp @@ -28,7 +28,6 @@ #include "precompiled.h" -#ifndef _WIN32 // Table for Q_iswprint static const uint32_t g_isPrintTable[2048] = { 0x00000200, 0xFFFFFFFF, 0xFFFFFFFF, 0x7FFFFFFF, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, @@ -48,7 +47,7 @@ static const uint32_t g_isPrintTable[2048] = { 0xFFFFFFFE, 0x07FFFFFF, 0x0FFFFFFF, 0x00000000, 0xFEF02596, 0x200DECAE, 0x33FF005F, 0x00000000, 0x0007FFF1, 0x3C0003FF, 0xFFFFFEFF, 0x00001FFF, 0x00000F20, 0x00000000, 0x001F0000, 0x00000000, 0xFFFFFFFF, 0x800007FF, 0x3C3FFFFF, 0xFFE1C062, 0x03FF4003, 0xFFFFFFFF, 0xFFFF003F, 0x1FFFFFFF, - 0xFFFFFFFF, 0xFFFFFFFF, 0x83FFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFF07, 0xFFFFFFFF, 0x03FFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0x03FFFFFF, 0xFFFFFFFE, 0xFFFFFFFF, 0xFFFFFF07, 0xFFFFFFFF, 0x03FFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x3D7F3DFF, 0xFFFFFFFF, 0xFFFF3DFF, 0x7F3DFFFF, 0xFF7FFF3D, 0xFFFFFFFF, 0xFF3DFFFF, 0xFFFFFFFF, 0x07FFFFFF, 0x000001FE, 0x0000FFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x001FFFFF, 0xFFFFFFFE, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, @@ -288,7 +287,6 @@ static const uint32_t g_isPrintTable[2048] = { 0x03FF0000, 0xFFFF0000, 0xFFF7FFFF, 0xFFDF0D0B, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0x9FFFFFFF, 0x8FFFF7EE, 0xBFFFFFFF, 0xAFFFFFFE, 0xFFFFFFFF, 0xFFFFFFFF, 0x7FFFFFFF, 0x1CFCFCFC, 0x00000000 }; -#endif // _WIN32 /* ../engine/unicode_strtools.cpp:23 */ //----------------------------------------------------------------------------- @@ -377,11 +375,7 @@ decodeFinishedMaybeCESU8: bool Q_iswprint(uchar16 c) { -#ifdef _WIN32 - return iswprint(c) != 0; -#else // _WIN32 return (g_isPrintTable[c / 32] & (1 << (c % 32))) != 0; -#endif // _WIN32 } int __cdecl Q_IsUnprintableW(uchar16 c)