Win64 fixes
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6413 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
e23b3db418
commit
e63fa6c53b
38 changed files with 389 additions and 331 deletions
|
@ -46,7 +46,7 @@ void NSISCALL pushstring(const TCHAR *str)
|
|||
*g_stacktop=th;
|
||||
}
|
||||
|
||||
TCHAR * NSISCALL getuservariable(const int varnum)
|
||||
TCHAR* NSISCALL getuservariable(const int varnum)
|
||||
{
|
||||
if (varnum < 0 || varnum >= __INST_LAST) return NULL;
|
||||
return g_variables+varnum*g_stringsize;
|
||||
|
@ -159,9 +159,9 @@ void NSISCALL SetUserVariableW(const int varnum, const wchar_t* wideStr)
|
|||
|
||||
// playing with integers
|
||||
|
||||
int NSISCALL myatoi(const TCHAR *s)
|
||||
INT_PTR NSISCALL nsishelper_str_to_ptr(const TCHAR *s)
|
||||
{
|
||||
int v=0;
|
||||
INT_PTR v=0;
|
||||
if (*s == _T('0') && (s[1] == _T('x') || s[1] == _T('X')))
|
||||
{
|
||||
s++;
|
||||
|
@ -204,7 +204,7 @@ int NSISCALL myatoi(const TCHAR *s)
|
|||
return v;
|
||||
}
|
||||
|
||||
unsigned NSISCALL myatou(const TCHAR *s)
|
||||
unsigned int NSISCALL myatou(const TCHAR *s)
|
||||
{
|
||||
unsigned int v=0;
|
||||
|
||||
|
@ -270,13 +270,12 @@ int NSISCALL myatoi_or(const TCHAR *s)
|
|||
return v;
|
||||
}
|
||||
|
||||
int NSISCALL popint()
|
||||
INT_PTR NSISCALL popintptr()
|
||||
{
|
||||
TCHAR buf[128];
|
||||
if (popstringn(buf,COUNTOF(buf)))
|
||||
return 0;
|
||||
|
||||
return myatoi(buf);
|
||||
return nsishelper_str_to_ptr(buf);
|
||||
}
|
||||
|
||||
int NSISCALL popint_or()
|
||||
|
@ -284,13 +283,12 @@ int NSISCALL popint_or()
|
|||
TCHAR buf[128];
|
||||
if (popstringn(buf,COUNTOF(buf)))
|
||||
return 0;
|
||||
|
||||
return myatoi_or(buf);
|
||||
}
|
||||
|
||||
void NSISCALL pushint(int value)
|
||||
void NSISCALL pushintptr(INT_PTR value)
|
||||
{
|
||||
TCHAR buffer[1024];
|
||||
wsprintf(buffer, _T("%d"), value);
|
||||
TCHAR buffer[30];
|
||||
wsprintf(buffer, sizeof(void*) > 4 ? _T("%Id") : _T("%d"), value);
|
||||
pushstring(buffer);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue