size optimization: added __stdcall wrapper for lstrcat

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4210 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2005-08-06 12:47:46 +00:00
parent 908c776f9c
commit f5105a50b1
5 changed files with 29 additions and 23 deletions

View file

@ -94,7 +94,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst,LPSTR lpszCmdParam,
if (!ValidateTempDir())
{
GetWindowsDirectory(state_temp_dir, NSIS_MAX_STRLEN - 5); // leave space for \Temp
lstrcat(state_temp_dir, "\\Temp");
mystrcat(state_temp_dir, "\\Temp");
if (!ValidateTempDir())
{
goto end;
@ -193,7 +193,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst,LPSTR lpszCmdParam,
{
int x;
lstrcat(state_temp_dir,"~nsu.tmp\\");
mystrcat(state_temp_dir,"~nsu.tmp\\");
CreateDirectory(state_temp_dir,NULL);
for (x = 0; x < 26; x ++)
@ -203,8 +203,8 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst,LPSTR lpszCmdParam,
static char ibuf[NSIS_MAX_STRLEN];
*(LPWORD)buf2=CHAR2_TO_WORD('\"',0);
lstrcat(buf2,state_temp_dir);
lstrcat(buf2,s);
mystrcat(buf2,state_temp_dir);
mystrcat(buf2,s);
DeleteFile(buf2+1); // clean up after all the other ones if they are there
@ -224,10 +224,10 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst,LPSTR lpszCmdParam,
#endif
if (state_install_directory[0]) mystrcpy(ibuf,state_install_directory);
else trimslashtoend(ibuf);
lstrcat(buf2,"\" ");
lstrcat(buf2,realcmds);
lstrcat(buf2," _?=");
lstrcat(buf2,ibuf);
mystrcat(buf2,"\" ");
mystrcat(buf2,realcmds);
mystrcat(buf2," _?=");
mystrcat(buf2,ibuf);
// add a trailing backslash to make sure is_valid_instpath will not fail when it shouldn't
addtrailingslash(buf2);
hProc=myCreateProcess(buf2,state_temp_dir);