- Many fixes to the new scriptcontext to make it work

This commit is contained in:
koennecke
2008-06-18 14:08:25 +00:00
parent ed304fb5f1
commit 45ac6c526f
12 changed files with 74 additions and 13 deletions

View File

@ -366,6 +366,7 @@ extern pServer pServ;
}
assert( (iMode == 0) || (iMode == 1));
self->iMacro = iMode;
/* SCPrintf(self,eError, "SCsetMacro = %lx, %d\n", (long int)self, iMode); */
return 1;
}
/*---------------------------------------------------------------------------*/
@ -2272,7 +2273,7 @@ SConnection *SCStorePush(SCStore *conStore) {
/* push macro flag on stack */
conStore->macroStack <<= 1;
conStore->macroStack |= (pCon->iMacro != 0);
pCon->iMacro = conStore->inMacro;
SCsetMacro(pCon, conStore->inMacro);
SCPushContext2(pCon, conStore->cc);
return pCon;
}
@ -2282,8 +2283,10 @@ void SCStorePop(SCStore *conStore) {
pCon = SCLoad(conStore);
SCPopContext(pCon);
/* pop macro flag from stack */
pCon->iMacro = (conStore->macroStack | 1);
/* pop macro flag from stack
SCsetMacro(pCon,conStore->macroStack);
*/
SCsetMacro(pCon, (conStore->macroStack & 1));
conStore->macroStack >>= 1;
}
/*--------------------------------------------------------------------------*/