mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 06:05:58 -06:00
sizeof(wchar) is changed to 4 (32 bits) to support non BMP unicode characters
This might bring some incompatibilities in the code that expects wchar to be 16 bit, which escpecially involves dealing with Win32 (and to lesser extend MacOS) APIs, so if your application is doing that, please check all instances of WCHAR (UniChar on MacOS) or even wchar especially type casts. To support host APIs, char16 is introduced (but there is no 16-bit String varian). Use ToSystemCharsetW, FromSystemCharsetW to convert texts to Win32 API. - Support of drawing non-BMP characters in GUI - Vastly improved character font replacement code (when drawing characters missing with requested font, replacement font is used) - Last instances of Win32 ANSI calls (those ending with A) are removed - UTF handling routines are refactored and their's naming is unified - RTF is now being able to handle non-BMP characters (RTF is used as clipboard format for RichText) Other minor changes: - fixed TryRealloc issue - improved MemoryCheck - Removed MemoryAlloc48/MemoryFree48 - In theide Background parsing should less often cause delays in the main thread
This commit is contained in:
parent
a6a071a16c
commit
34ff691308
149 changed files with 2373 additions and 1446 deletions
17
examples/GetMemoryBlockSize/GetMemoryBlockSize.cpp
Normal file
17
examples/GetMemoryBlockSize/GetMemoryBlockSize.cpp
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#include <Core/Core.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
// TEST IN RELEASE MODE!
|
||||
|
||||
CONSOLE_APP_MAIN
|
||||
{
|
||||
for(int q = 5; q < 500*1024*1024; q = q + 1 + q / 10) {
|
||||
size_t sz = q;
|
||||
void *ptr = MemoryAllocSz(sz);
|
||||
DLOG("Requested " << q << ", allocated " << sz << ", GetMemoryBlockSize " << GetMemoryBlockSize(ptr));
|
||||
if(sz != GetMemoryBlockSize(ptr))
|
||||
Panic("FAILED!");
|
||||
MemoryFree(ptr);
|
||||
}
|
||||
}
|
||||
9
examples/GetMemoryBlockSize/GetMemoryBlockSize.upp
Normal file
9
examples/GetMemoryBlockSize/GetMemoryBlockSize.upp
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
uses
|
||||
Core;
|
||||
|
||||
file
|
||||
GetMemoryBlockSize.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "DEBUGCODE";
|
||||
|
||||
17
examples/MemorySize/MemorySize.cpp
Normal file
17
examples/MemorySize/MemorySize.cpp
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#include <Core/Core.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
// TEST IN RELEASE MODE!
|
||||
|
||||
CONSOLE_APP_MAIN
|
||||
{
|
||||
for(int q = 5; q < 500*1024*1024; q = q + 1 + q / 10) {
|
||||
size_t sz = q;
|
||||
void *ptr = MemoryAllocSz(sz);
|
||||
DLOG("Requested " << q << ", allocated " << sz << ", GetMemoryBlockSize " << GetMemoryBlockSize(ptr));
|
||||
if(sz != GetMemoryBlockSize(ptr))
|
||||
Panic("FAILED!");
|
||||
MemoryFree(ptr);
|
||||
}
|
||||
}
|
||||
9
examples/MemorySize/MemorySize.upp
Normal file
9
examples/MemorySize/MemorySize.upp
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
uses
|
||||
Core;
|
||||
|
||||
file
|
||||
MemorySize.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "DEBUGCODE";
|
||||
|
||||
13
examples/WeirdBug/WeirdBug.cpp
Normal file
13
examples/WeirdBug/WeirdBug.cpp
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#include <Core/Core.h>
|
||||
|
||||
using namespace Upp;
|
||||
|
||||
Vector<ValueMap> g_turbine_data; // one for turbine*scenario
|
||||
|
||||
CONSOLE_APP_MAIN
|
||||
{
|
||||
String data = LoadFile("D:/xxx/td.bin");
|
||||
RDUMP(data.GetCount());
|
||||
LoadFromString(g_turbine_data, data);
|
||||
RDUMP(g_turbine_data);
|
||||
}
|
||||
9
examples/WeirdBug/WeirdBug.upp
Normal file
9
examples/WeirdBug/WeirdBug.upp
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
uses
|
||||
Core;
|
||||
|
||||
file
|
||||
WeirdBug.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "DEBUGCODE";
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue