_countof and swprintf fixes for VC6

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6045 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2010-03-30 17:50:08 +00:00
parent 34395604e8
commit 82d42b1159
13 changed files with 68 additions and 74 deletions

View file

@ -2,6 +2,12 @@
#include "pluginapi.h"
#ifdef _countof
#define COUNTOF _countof
#else
#define COUNTOF(a) (sizeof(a)/sizeof(a[0]))
#endif
unsigned int g_stringsize;
stack_t **g_stacktop;
TCHAR *g_variables;
@ -267,7 +273,7 @@ int NSISCALL myatoi_or(const TCHAR *s)
int NSISCALL popint()
{
TCHAR buf[128];
if (popstringn(buf,_countof(buf)))
if (popstringn(buf,COUNTOF(buf)))
return 0;
return myatoi(buf);
@ -276,7 +282,7 @@ int NSISCALL popint()
int NSISCALL popint_or()
{
TCHAR buf[128];
if (popstringn(buf,_countof(buf)))
if (popstringn(buf,COUNTOF(buf)))
return 0;
return myatoi_or(buf);