From 3a655078780a0b3673f8256ae76a2512d5943c2b Mon Sep 17 00:00:00 2001 From: kichik Date: Sat, 7 Sep 2002 20:49:18 +0000 Subject: [PATCH] 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 --- Source/exehead/Ui.c | 8 ++++---- Source/exehead/exec.c | 8 ++++---- Source/exehead/fileform.c | 2 +- Source/exehead/util.c | 4 ++-- Source/exehead/util.h | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Source/exehead/Ui.c b/Source/exehead/Ui.c index 9e1049cb..a17f29c5 100644 --- a/Source/exehead/Ui.c +++ b/Source/exehead/Ui.c @@ -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); diff --git a/Source/exehead/exec.c b/Source/exehead/exec.c index 80f7666e..243f7066 100644 --- a/Source/exehead/exec.c +++ b/Source/exehead/exec.c @@ -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); diff --git a/Source/exehead/fileform.c b/Source/exehead/fileform.c index 1f358737..b79c9c77 100644 --- a/Source/exehead/fileform.c +++ b/Source/exehead/fileform.c @@ -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); diff --git a/Source/exehead/util.c b/Source/exehead/util.c index d51a730a..cdd4ef96 100644 --- a/Source/exehead/util.c +++ b/Source/exehead/util.c @@ -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); diff --git a/Source/exehead/util.h b/Source/exehead/util.h index 3b598246..e679eee3 100644 --- a/Source/exehead/util.h +++ b/Source/exehead/util.h @@ -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);