Renamed my_alloc to my_GlobalAlloc

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@954 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2002-09-07 20:49:18 +00:00
parent f92b6409f1
commit 3a65507878
5 changed files with 12 additions and 12 deletions

View file

@ -358,7 +358,7 @@ int NSISCALL ui_doinstall(void)
int size;
lang_num=g_inst_header->common.str_tables_num;
size=lang_num*sizeof(common_strings);
cur_common_strings_table=common_strings_tables=(common_strings*)my_alloc(size);
cur_common_strings_table=common_strings_tables=(common_strings*)my_GlobalAlloc(size);
GetCompressedDataFromDataBlockToMemory(g_inst_header->common.str_tables,(char*)common_strings_tables,size);
#ifdef NSIS_CONFIG_UNINSTALL_SUPPORT
if (g_is_uninstaller)
@ -366,7 +366,7 @@ int NSISCALL ui_doinstall(void)
else
#endif
size=lang_num*sizeof(installer_strings);
cur_install_strings_table=install_strings_tables=(char *)my_alloc(size);
cur_install_strings_table=install_strings_tables=(char *)my_GlobalAlloc(size);
GetCompressedDataFromDataBlockToMemory(g_inst_header->common.inst_str_tables,install_strings_tables,size);
myitoa(state_language, GetUserDefaultLangID());
@ -690,7 +690,7 @@ static BOOL CALLBACK LicenseProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM
char *szUrl;
long min=enlink->chrg.cpMin, max=enlink->chrg.cpMax;
SendMessage(hwLicense,EM_SETSEL,min,max);
szUrl=(char *)my_alloc(max-min+1);
szUrl=(char *)my_GlobalAlloc(max-min+1);
SendMessage(hwLicense,EM_GETSELTEXT,0,(LPARAM)szUrl);
SetCursor(LoadCursor(0,IDC_WAIT));
ShellExecute(hwndDlg,"open",szUrl,NULL,NULL,SW_SHOWNORMAL);
@ -951,7 +951,7 @@ static BOOL CALLBACK SelProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
HBITMAP hBMcheck1;
int x;
if (hTreeItems) GlobalFree(hTreeItems);
hTreeItems=(HTREEITEM*)my_alloc(sizeof(HTREEITEM)*num_sections);
hTreeItems=(HTREEITEM*)my_GlobalAlloc(sizeof(HTREEITEM)*num_sections);
hBMcheck1=LoadBitmap(g_hInstance, MAKEINTRESOURCE(IDB_BITMAP1));
SetUITextFromLang(hwndDlg,IDC_INTROTEXT,g_inst_header->common.intro_text_id,LANGID_COMP_TEXT);

View file

@ -636,7 +636,7 @@ static int NSISCALL ExecuteEntry(entry *entries, int pos)
}
else
{
s=(stack_t*)my_alloc(sizeof(stack_t));
s=(stack_t*)my_GlobalAlloc(sizeof(stack_t));
process_string_fromtab(s->text,parm0);
s->next=g_st;
g_st=s;
@ -783,7 +783,7 @@ static int NSISCALL ExecuteEntry(entry *entries, int pos)
if (s1)
{
void *b1;
b1=my_alloc(s1);
b1=my_GlobalAlloc(s1);
if (b1)
{
UINT uLen;
@ -1269,7 +1269,7 @@ static int NSISCALL ExecuteEntry(entry *entries, int pos)
{
unsigned char *filebuf;
DWORD l;
filebuf=(unsigned char *)my_alloc(g_filehdrsize);
filebuf=(unsigned char *)my_GlobalAlloc(g_filehdrsize);
if (filebuf)
{
int fixoffs=0;
@ -1278,7 +1278,7 @@ static int NSISCALL ExecuteEntry(entry *entries, int pos)
if (g_inst_header->uninstdata_offset != -1)
{
// Changed by Amir Szekely 11th July 2002
unsigned char* unicon_data = (unsigned char*)my_alloc(g_inst_header->uninsticon_size);
unsigned char* unicon_data = (unsigned char*)my_GlobalAlloc(g_inst_header->uninsticon_size);
if (unicon_data) {
DWORD i;
unsigned char* seeker = unicon_data + sizeof(DWORD);

View file

@ -57,7 +57,7 @@ int NSISCALL loadHeaders(void)
if (!ReadFile(g_db_hFile,(LPVOID)&h,sizeof(h),&r,NULL) || r != sizeof(h) || !isheader(&h)) return -1;
data=(void*)my_alloc(h.length_of_header);
data=(void*)my_GlobalAlloc(h.length_of_header);
#ifdef NSIS_CONFIG_COMPRESSION_SUPPORT
inflateInit(&g_inflate_stream);

View file

@ -39,7 +39,7 @@ int NSISCALL my_MessageBox(const char *text, UINT type) {
return MessageBox(g_hwnd, text, g_caption, type);
}
void * NSISCALL my_alloc(DWORD dwBytes) {
void * NSISCALL my_GlobalAlloc(DWORD dwBytes) {
return (void *)GlobalAlloc(GPTR, dwBytes);
}
@ -254,7 +254,7 @@ BOOL NSISCALL MoveFileOnReboot(LPCTSTR pszExisting, LPCTSTR pszNew)
if (pszNextSec)
{
int l=dwFileSize - (pszNextSec - pszWinInit);
void* data=(void*)my_alloc(l);
void* data=(void*)my_GlobalAlloc(l);
mini_memcpy(data, pszNextSec, l);
mini_memcpy(pszNextSec + cchRenameLine, data, l);
GlobalFree((HGLOBAL)data);

View file

@ -39,7 +39,7 @@ extern char g_log_file[1024];
HANDLE NSISCALL myCreateProcess(char *cmd, char *dir);
int NSISCALL my_MessageBox(const char *text, UINT type);
void * NSISCALL my_alloc(DWORD dwBytes);
void * NSISCALL my_GlobalAlloc(DWORD dwBytes);
void NSISCALL doRMDir(char *buf, int recurse);