richter 00/12/20 22:20:16
Modified: . Tag: Embperl2c epcomp.c
test/html Tag: Embperl2c include.htm
test/html/rawinput Tag: Embperl2c include.htm
Log:
Embperl 2 - fix if/Execute mixing
Revision Changes Path
No revision
No revision
1.4.2.31 +2 -12 embperl/Attic/epcomp.c
Index: epcomp.c
===================================================================
RCS file: /home/cvs/embperl/Attic/epcomp.c,v
retrieving revision 1.4.2.30
retrieving revision 1.4.2.31
diff -u -r1.4.2.30 -r1.4.2.31
--- epcomp.c 2000/12/20 14:51:53 1.4.2.30
+++ epcomp.c 2000/12/21 06:20:15 1.4.2.31
@@ -912,7 +912,6 @@
/*in*/ tNodeData * pNode,
/*in*/ tEmbperlCmd * pCmd,
/*in*/ int nCheckpointCodeOffset,
- /*in*/ int nCheckpointLastNode,
/*i/o*/ int * bCheckpointPending)
@@ -945,9 +944,6 @@
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 (nCheckpointLastNode)
- pDomTree -> xLastNode = nCheckpointLastNode ;
-
}
if (*bCheckpointPending && (pNode -> bFlags & nflgIgnore))
@@ -959,8 +955,6 @@
//l = sprintf (buf, " _ep_cp($_ep_DomTree,%d) ;\n",
*bCheckpointPending<0?pNode -> xNdx:*bCheckpointPending) ;
//l = sprintf (buf, " _ep_cp($_ep_DomTree,%d) ;\n", pNode -> xNdx) ;
l = sprintf (buf, " _ep_cp(%d) ;\n", pNode -> xNdx) ;
- nCheckpointLastNode = pDomTree -> xLastNode ;
- pDomTree -> xLastNode = pNode -> xNdx ;
//l = sprintf (buf, " $_ep_cp=%d;\n", pNode -> xNdx) ;
nCheckpointCodeOffset = StringAdd (r -> pProg, buf, l) ;
*bCheckpointPending = 0 ;
@@ -1127,7 +1121,6 @@
int nAttr = 0 ;
int nStartCodeOffset = 0 ;
int nCheckpointCodeOffset = 0 ;
- int nCheckpointLastNode = 0 ;
if (pCurrReq -> bDebug & dbgParse)
@@ -1148,7 +1141,7 @@
pCmd = pCmdHead = NULL ;
- if (pCmd == NULL || (pCmd -> bRemoveNode & 9) == 0)
+ if (pCmd == NULL || (pCmd -> bRemoveNode & 1) == 0)
pDomTree -> xLastNode = xNode ;
// if (*bCheckpointPending && (pNode -> nType == ntypText || pNode -> nType
== ntypCDATA) && pNode -> bFlags && (pNode -> bFlags & nflgIgnore) == 0)
@@ -1162,8 +1155,6 @@
//l = sprintf (buf, " _ep_cp($_ep_DomTree,%d) ;\n",
*bCheckpointPending<0?pNode -> xNdx:*bCheckpointPending) ;
//l = sprintf (buf, " _ep_cp($_ep_DomTree,%d) ;\n", pNode -> xNdx) ;
l = sprintf (buf, " _ep_cp(%d) ;\n", xNode) ;
- nCheckpointLastNode = pDomTree -> xLastNode ;
- pDomTree -> xLastNode = xNode ;
//l = sprintf (buf, " $_ep_cp=%d;\n", pNode -> xNdx) ;
nCheckpointCodeOffset = StringAdd (r -> pProg, buf, l) ;
*bCheckpointPending = 0 ;
@@ -1177,7 +1168,6 @@
{
r -> pProg = &r -> pProgDef ;
nCheckpointCodeOffset = 0 ;
- nCheckpointLastNode = 0 ;
}
if (pCmd == NULL || (pCmd -> bRemoveNode & 8) == 0)
@@ -1212,7 +1202,7 @@
pCmd = pCmdHead ;
if (pCmd)
- if ((rc = embperl_CompilePostProcess (r, pDomTree, pNode, pCmd,
nCheckpointCodeOffset, nCheckpointLastNode, bCheckpointPending)) != ok)
+ if ((rc = embperl_CompilePostProcess (r, pDomTree, pNode, pCmd,
nCheckpointCodeOffset, bCheckpointPending)) != ok)
return rc ;
No revision
No revision
1.6.6.6 +17 -1 embperl/test/html/include.htm
Index: include.htm
===================================================================
RCS file: /home/cvs/embperl/test/html/include.htm,v
retrieving revision 1.6.6.5
retrieving revision 1.6.6.6
diff -u -r1.6.6.5 -r1.6.6.6
--- include.htm 2000/12/18 11:38:59 1.6.6.5
+++ include.htm 2000/12/21 06:20:16 1.6.6.6
@@ -143,7 +143,23 @@
}) ;
- #]
-<H1> 12.) Done :-)</H1>
+
+<H1> 13.) Include with if's</H1>
+
+[$if 1 $]
+ [# blabla #]
+[$endif$]
+[$if 1 $]
+[- Execute ({input => \$tst1,
+ mtime => 1,
+ inputfile => 'Some text',
+ }) ;
+-]
+[$endif$]
+
+
+
+<H1> 14.) Done :-)</H1>
<br>
No revision
No revision
1.1.4.4 +15 -1 embperl/test/html/rawinput/Attic/include.htm
Index: include.htm
===================================================================
RCS file: /home/cvs/embperl/test/html/rawinput/Attic/include.htm,v
retrieving revision 1.1.4.3
retrieving revision 1.1.4.4
diff -u -r1.1.4.3 -r1.1.4.4
--- include.htm 2000/12/18 11:39:36 1.1.4.3
+++ include.htm 2000/12/21 06:20:16 1.1.4.4
@@ -143,7 +143,21 @@
}) ;
- #]
-<H1> 12.) Done :-)</H1>
+<H1> 13.) Include with if's</H1>
+
+[$if 1 $]
+ [# blabla #]
+[$endif$]
+[$if 1 $]
+[- Execute ({input => \$tst1,
+ mtime => 1,
+ inputfile => 'Some text',
+ }) ;
+-]
+[$endif$]
+
+
+<H1> 14.) Done :-)</H1>
<br>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]