Jim Park's Unicode NSIS merging - Step 1 : switch to TCHARs where relevant.
Compiler output is identical before & after this step git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/branches/wizou@6036 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
4e48722b63
commit
752d7d239a
209 changed files with 9698 additions and 7658 deletions
|
@ -13,6 +13,8 @@
|
|||
*
|
||||
* This software is provided 'as-is', without any express or implied
|
||||
* warranty.
|
||||
*
|
||||
* Unicode support by Jim Park -- 08/28/2007
|
||||
*/
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
@ -21,6 +23,7 @@
|
|||
#include "MyWindows.h"
|
||||
#else
|
||||
#include <stdlib.h>
|
||||
#include "../../tchar.h"
|
||||
#endif
|
||||
|
||||
#include "Alloc.h"
|
||||
|
@ -39,7 +42,7 @@ void *MyAlloc(size_t size) throw()
|
|||
if (size == 0)
|
||||
return 0;
|
||||
#ifdef _SZ_ALLOC_DEBUG
|
||||
fprintf(stderr, "\nAlloc %10d bytes; count = %10d", size, g_allocCount++);
|
||||
_ftprintf(stderr, _T("\nAlloc %10d bytes; count = %10d"), size, g_allocCount++);
|
||||
#endif
|
||||
return ::malloc(size);
|
||||
}
|
||||
|
@ -48,7 +51,7 @@ void MyFree(void *address) throw()
|
|||
{
|
||||
#ifdef _SZ_ALLOC_DEBUG
|
||||
if (address != 0)
|
||||
fprintf(stderr, "\nFree; count = %10d", --g_allocCount);
|
||||
_ftprintf(stderr, _T("\nFree; count = %10d"), --g_allocCount);
|
||||
#endif
|
||||
|
||||
::free(address);
|
||||
|
@ -61,7 +64,7 @@ void *MidAlloc(size_t size) throw()
|
|||
if (size == 0)
|
||||
return 0;
|
||||
#ifdef _SZ_ALLOC_DEBUG
|
||||
fprintf(stderr, "\nAlloc_Mid %10d bytes; count = %10d", size, g_allocCountMid++);
|
||||
_ftprintf(stderr, _T("\nAlloc_Mid %10d bytes; count = %10d"), size, g_allocCountMid++);
|
||||
#endif
|
||||
return ::VirtualAlloc(0, size, MEM_COMMIT, PAGE_READWRITE);
|
||||
}
|
||||
|
@ -70,7 +73,7 @@ void MidFree(void *address) throw()
|
|||
{
|
||||
#ifdef _SZ_ALLOC_DEBUG
|
||||
if (address != 0)
|
||||
fprintf(stderr, "\nFree_Mid; count = %10d", --g_allocCountMid);
|
||||
_ftprintf(stderr, _T("\nFree_Mid; count = %10d"), --g_allocCountMid);
|
||||
#endif
|
||||
if (address == 0)
|
||||
return;
|
||||
|
@ -89,7 +92,7 @@ typedef SIZE_T (WINAPI *GetLargePageMinimumP)();
|
|||
bool SetLargePageSize()
|
||||
{
|
||||
GetLargePageMinimumP largePageMinimum = (GetLargePageMinimumP)
|
||||
::GetProcAddress(::GetModuleHandle(TEXT("kernel32.dll")), "GetLargePageMinimum");
|
||||
::GetProcAddress(::GetModuleHandle(_T("kernel32.dll")), "GetLargePageMinimum");
|
||||
if (largePageMinimum == 0)
|
||||
return false;
|
||||
SIZE_T size = largePageMinimum();
|
||||
|
@ -105,7 +108,7 @@ void *BigAlloc(size_t size) throw()
|
|||
if (size == 0)
|
||||
return 0;
|
||||
#ifdef _SZ_ALLOC_DEBUG
|
||||
fprintf(stderr, "\nAlloc_Big %10d bytes; count = %10d", size, g_allocCountBig++);
|
||||
_ftprintf(stderr, _T("\nAlloc_Big %10d bytes; count = %10d"), size, g_allocCountBig++);
|
||||
#endif
|
||||
|
||||
if (size >= (1 << 18))
|
||||
|
@ -122,7 +125,7 @@ void BigFree(void *address) throw()
|
|||
{
|
||||
#ifdef _SZ_ALLOC_DEBUG
|
||||
if (address != 0)
|
||||
fprintf(stderr, "\nFree_Big; count = %10d", --g_allocCountBig);
|
||||
_ftprintf(stderr, _T("\nFree_Big; count = %10d"), --g_allocCountBig);
|
||||
#endif
|
||||
|
||||
if (address == 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue