richter 00/10/25 07:27:12
Modified: . Tag: Embperl2c epcomp.c
Log:
- Embperl 2 - sub metacommand
Revision Changes Path
No revision
No revision
1.4.2.10 +17 -6 embperl/Attic/epcomp.c
Index: epcomp.c
===================================================================
RCS file: /home/cvs/embperl/Attic/epcomp.c,v
retrieving revision 1.4.2.9
retrieving revision 1.4.2.10
diff -u -r1.4.2.9 -r1.4.2.10
--- epcomp.c 2000/10/25 08:08:17 1.4.2.9
+++ epcomp.c 2000/10/25 14:27:09 1.4.2.10
@@ -919,7 +919,8 @@
if (pCurrReq -> bDebug & dbgParse)
lprintf (pCurrReq, "[%d]EPCOMP: #%d L%d Remove Checkpoint\n", pCurrReq ->
nPid, pNode -> xNdx, pNode -> nLinenumber) ;
nCheckpointCodeOffset = 0 ;
- }
+ *bCheckpointPending = -1 ; /* set checkpoint on next possibility */
+ }
if (*bCheckpointPending && (pNode -> bFlags & nflgIgnore))
{
@@ -1051,8 +1052,13 @@
embperl_CompilePopStack (pDomTree, pCmd -> sStackName2) ;
if (pCmd -> nSwitchCodeType == 1)
- pProg = &pProgRun ;
- }
+ {
+ pProg = &pProgRun ;
+ *bCheckpointPending = -1 ;
+ if (pCurrReq -> bDebug & dbgParse)
+ lprintf (pCurrReq, "[%d]EPCOMP: #%d L%d Set Checkpoint pending (switch
to ProgRun)\n", pCurrReq -> nPid, pNode -> xNdx, pNode -> nLinenumber) ;
+ }
+ }
StringFree (&sStackValue) ;
@@ -1095,7 +1101,9 @@
pNode -> nType, Node_selfNodeName(pNode)) ;
//if (*bCheckpointPending && (pNode -> nType == ntypText || pNode -> nType ==
ntypCDATA) && pNode -> bFlags && (pNode -> bFlags & nflgIgnore) == 0)
- if (*bCheckpointPending && pNode -> bFlags && (pNode -> bFlags & nflgIgnore) ==
0)
+ if ((*bCheckpointPending ||
+ (pCmd && pCmd -> nSwitchCodeType == 2 && pProg != &pProgDef)) &&
+ pNode -> bFlags && (pNode -> bFlags & nflgIgnore) == 0)
{
int l ;
char buf [80] ;
@@ -1124,8 +1132,10 @@
pCmd = pCmdHead = NULL ;
if (pCmd && pCmd -> nSwitchCodeType == 2)
- pProg = &pProgDef ;
-
+ {
+ pProg = &pProgDef ;
+ nCheckpointCodeOffset = 0 ;
+ }
if (pCmd == NULL || (pCmd -> bRemoveNode & 8) == 0)
{ /* calculate attributes before tag, but not when tag should be ignored in
output stream */
@@ -1466,6 +1476,7 @@
SvREFCNT_dec (pSV) ;
}
+ pCurrDomTree = DomTree_self (r -> xCurrDomTree) ; /* relookup DomTree in
case it has moved */
cl2 = clock () ;
#ifdef CLOCKS_PER_SEC
if (r -> bDebug)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]