No more static variables in CEXEBuild member functions
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2849 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
4dc04a8e5d
commit
9cd28a4c3d
3 changed files with 7 additions and 11 deletions
|
@ -140,15 +140,12 @@ class CEXEBuild {
|
||||||
} *cur_ifblock;
|
} *cur_ifblock;
|
||||||
|
|
||||||
TinyGrowBuf build_preprocessor_data;
|
TinyGrowBuf build_preprocessor_data;
|
||||||
int last_line_had_slash;
|
|
||||||
|
|
||||||
void start_ifblock();
|
void start_ifblock();
|
||||||
void end_ifblock();
|
void end_ifblock();
|
||||||
int num_ifblock();
|
int num_ifblock();
|
||||||
/*int ignore;
|
|
||||||
int if_count;
|
int last_line_had_slash;
|
||||||
int ignored_if_count;
|
|
||||||
int wait_for_endif;*/
|
|
||||||
bool inside_comment;
|
bool inside_comment;
|
||||||
|
|
||||||
void ERROR_MSG(const char *s, ...);
|
void ERROR_MSG(const char *s, ...);
|
||||||
|
@ -282,6 +279,8 @@ class CEXEBuild {
|
||||||
|
|
||||||
char build_output_filename[1024];
|
char build_output_filename[1024];
|
||||||
|
|
||||||
|
int build_include_depth;
|
||||||
|
|
||||||
// Added by ramon 6 jun 2003
|
// Added by ramon 6 jun 2003
|
||||||
#ifdef NSIS_SUPPORT_VERSION_INFO
|
#ifdef NSIS_SUPPORT_VERSION_INFO
|
||||||
CResourceVersionInfo rVersionInfo;
|
CResourceVersionInfo rVersionInfo;
|
||||||
|
|
|
@ -2431,14 +2431,13 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
|
||||||
if (malloced) free(f);
|
if (malloced) free(f);
|
||||||
return PS_ERROR;
|
return PS_ERROR;
|
||||||
}
|
}
|
||||||
static int depth;
|
if (build_include_depth >= MAX_INCLUDEDEPTH)
|
||||||
if (depth >= MAX_INCLUDEDEPTH)
|
|
||||||
{
|
{
|
||||||
ERROR_MSG("parseScript: too many levels of includes (%d max).\n",MAX_INCLUDEDEPTH);
|
ERROR_MSG("parseScript: too many levels of includes (%d max).\n",MAX_INCLUDEDEPTH);
|
||||||
if (malloced) free(f);
|
if (malloced) free(f);
|
||||||
return PS_ERROR;
|
return PS_ERROR;
|
||||||
}
|
}
|
||||||
depth++;
|
build_include_depth++;
|
||||||
|
|
||||||
int last_linecnt=linecnt;
|
int last_linecnt=linecnt;
|
||||||
linecnt=0;
|
linecnt=0;
|
||||||
|
@ -2468,7 +2467,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
|
||||||
curfilename=last_filename;
|
curfilename=last_filename;
|
||||||
fp=last_fp;
|
fp=last_fp;
|
||||||
|
|
||||||
depth--;
|
build_include_depth--;
|
||||||
fclose(incfp);
|
fclose(incfp);
|
||||||
if (r != PS_EOF && r != PS_OK)
|
if (r != PS_EOF && r != PS_OK)
|
||||||
{
|
{
|
||||||
|
|
2
TODO.txt
2
TODO.txt
|
@ -16,8 +16,6 @@ NSIS
|
||||||
|
|
||||||
* LZMA compression
|
* LZMA compression
|
||||||
|
|
||||||
* stop using static variables so CEXEBuild can be used as a real class
|
|
||||||
|
|
||||||
EXAMPLES
|
EXAMPLES
|
||||||
|
|
||||||
* write an advanced paging example showing multiple components page with multiple
|
* write an advanced paging example showing multiple components page with multiple
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue