Remove global var psFunctions which is __always__ NULL

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4690 4a71c877-e1ca-e34f-864e-861f7616d084
master
Giel van Schijndel 2008-04-20 14:18:06 +00:00
parent 1fae16dedc
commit f494f40dde
1 changed files with 0 additions and 26 deletions

View File

@ -110,9 +110,6 @@ static UDWORD numEventLocalVars[maxEventsLocalVars]; /* number of declard local
static VAR_SYMBOL *psLocalVarsTemp; /* temporary storage for local vars, before current event declaration is found */
EVENT_SYMBOL *psCurEvent = NULL; /* stores current event: for local var declaration */
/* The list of function definitions */
static FUNC_SYMBOL *psFunctions=NULL;
/* The current object variable context */
static INTERP_TYPE objVarContext = (INTERP_TYPE)0;
@ -5736,7 +5733,6 @@ static void scriptResetTables(void)
VAR_SYMBOL *psCurr, *psNext;
TRIGGER_SYMBOL *psTCurr, *psTNext;
EVENT_SYMBOL *psECurr, *psENext;
FUNC_SYMBOL *psFCurr, *psFNext;
SDWORD i;
@ -5819,17 +5815,6 @@ static void scriptResetTables(void)
}
psEvents = NULL;
numEvents = 0;
/* Reset the function symbol table */
for(psFCurr = psFunctions; psFCurr != NULL; psFCurr = psFNext)
{
psFNext = psFCurr->psNext;
FREE_DEBUG(psFCurr);
free(psFCurr->pIdent);
free(psFCurr->pCode);
free(psFCurr);
}
psFunctions = NULL;
}
/* Compile a script program */
@ -6440,7 +6425,6 @@ BOOL scriptLookUpConstant(const char *pIdent, CONST_SYMBOL **ppsSym)
BOOL scriptLookUpFunction(const char *pIdent, FUNC_SYMBOL **ppsSym)
{
UDWORD i;
FUNC_SYMBOL *psCurr;
//debug(LOG_SCRIPT, "scriptLookUpFunction");
@ -6457,16 +6441,6 @@ BOOL scriptLookUpFunction(const char *pIdent, FUNC_SYMBOL **ppsSym)
}
}
/* See if the function is defined as a script function */
for(psCurr = psFunctions; psCurr != NULL; psCurr = psCurr->psNext)
{
if (strcmp(psCurr->pIdent, pIdent) == 0)
{
*ppsSym = psCurr;
return true;
}
}
/* Failed to find the indentifier */
*ppsSym = NULL;