You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl-cvs@perl.apache.org by ri...@locus.apache.org on 2000/06/13 06:52:15 UTC
cvs commit: embperl/test/html if.htm
richter 00/06/12 21:52:15
Modified: . Tag: Embperl2 embpcgi.bat embpcgi.pl
embpcgi.test.bat embpcgi.test.pl embpexec.bat
embpexec.pl epcomp.c epdom.c test.pl
test/html Tag: Embperl2 if.htm
Log:
Embperl 2 - fix memory problem
Revision Changes Path
No revision
No revision
1.7.2.10 +2 -2 embperl/embpcgi.bat
Index: embpcgi.bat
===================================================================
RCS file: /home/cvs/embperl/embpcgi.bat,v
retrieving revision 1.7.2.9
retrieving revision 1.7.2.10
diff -u -r1.7.2.9 -r1.7.2.10
--- embpcgi.bat 2000/06/11 19:37:11 1.7.2.9
+++ embpcgi.bat 2000/06/13 04:52:11 1.7.2.10
@@ -1,9 +1,9 @@
@rem = '--*-Perl-*--
@echo off
-/usr/bin/perl5.004 -x %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
+D:\Perl\5.00502\bin\MSWin32-x86\perl -x %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
goto endofperl
@rem ';
-#!/usr/bin/perl5.004 --
+#!D:\Perl\5.00502\bin\MSWin32-x86\perl --
#line 8
###################################################################################
#
1.7.2.10 +1 -1 embperl/embpcgi.pl
Index: embpcgi.pl
===================================================================
RCS file: /home/cvs/embperl/embpcgi.pl,v
retrieving revision 1.7.2.9
retrieving revision 1.7.2.10
diff -u -r1.7.2.9 -r1.7.2.10
--- embpcgi.pl 2000/06/11 19:37:11 1.7.2.9
+++ embpcgi.pl 2000/06/13 04:52:11 1.7.2.10
@@ -1,4 +1,4 @@
-#!/usr/bin/perl5.004
+#!D:\Perl\5.00502\bin\MSWin32-x86\perl
###################################################################################
#
# Embperl - Copyright (c) 1997-1999 Gerald Richter / ECOS
1.5.2.10 +2 -2 embperl/embpcgi.test.bat
Index: embpcgi.test.bat
===================================================================
RCS file: /home/cvs/embperl/embpcgi.test.bat,v
retrieving revision 1.5.2.9
retrieving revision 1.5.2.10
diff -u -r1.5.2.9 -r1.5.2.10
--- embpcgi.test.bat 2000/06/11 19:37:11 1.5.2.9
+++ embpcgi.test.bat 2000/06/13 04:52:11 1.5.2.10
@@ -1,9 +1,9 @@
@rem = '--*-Perl-*--
@echo off
-/usr/bin/perl5.004 -x -T %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
+D:\Perl\5.00502\bin\MSWin32-x86\perl -x -T %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
goto endofperl
@rem ';
-#!/usr/bin/perl5.004 --
+#!D:\Perl\5.00502\bin\MSWin32-x86\perl --
#line 8
###################################################################################
#
1.7.2.10 +1 -1 embperl/embpcgi.test.pl
Index: embpcgi.test.pl
===================================================================
RCS file: /home/cvs/embperl/embpcgi.test.pl,v
retrieving revision 1.7.2.9
retrieving revision 1.7.2.10
diff -u -r1.7.2.9 -r1.7.2.10
--- embpcgi.test.pl 2000/06/11 19:37:11 1.7.2.9
+++ embpcgi.test.pl 2000/06/13 04:52:11 1.7.2.10
@@ -1,4 +1,4 @@
-#!/usr/bin/perl5.004
+#!D:\Perl\5.00502\bin\MSWin32-x86\perl
###################################################################################
#
# Embperl - Copyright (c) 1997-1999 Gerald Richter / ECOS
1.18.2.10 +2 -2 embperl/embpexec.bat
Index: embpexec.bat
===================================================================
RCS file: /home/cvs/embperl/embpexec.bat,v
retrieving revision 1.18.2.9
retrieving revision 1.18.2.10
diff -u -r1.18.2.9 -r1.18.2.10
--- embpexec.bat 2000/06/11 19:37:11 1.18.2.9
+++ embpexec.bat 2000/06/13 04:52:11 1.18.2.10
@@ -1,9 +1,9 @@
@rem = '--*-Perl-*--
@echo off
-/usr/bin/perl5.004 -x %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
+D:\Perl\5.00502\bin\MSWin32-x86\perl -x %0 %1 %2 %3 %4 %5 %6 %7 %8 %9
goto endofperl
@rem ';
-#!/usr/bin/perl5.004 --
+#!D:\Perl\5.00502\bin\MSWin32-x86\perl --
#line 8
###################################################################################
#
1.18.2.10 +1 -1 embperl/embpexec.pl
Index: embpexec.pl
===================================================================
RCS file: /home/cvs/embperl/embpexec.pl,v
retrieving revision 1.18.2.9
retrieving revision 1.18.2.10
diff -u -r1.18.2.9 -r1.18.2.10
--- embpexec.pl 2000/06/11 19:37:11 1.18.2.9
+++ embpexec.pl 2000/06/13 04:52:11 1.18.2.10
@@ -1,4 +1,4 @@
-#!/usr/bin/perl5.004
+#!D:\Perl\5.00502\bin\MSWin32-x86\perl
###################################################################################
#
# Embperl - Copyright (c) 1997-1999 Gerald Richter / ECOS
1.1.2.30 +9 -9 embperl/Attic/epcomp.c
Index: epcomp.c
===================================================================
RCS file: /home/cvs/embperl/Attic/epcomp.c,v
retrieving revision 1.1.2.29
retrieving revision 1.1.2.30
diff -u -r1.1.2.29 -r1.1.2.30
--- epcomp.c 2000/06/11 18:58:15 1.1.2.29
+++ epcomp.c 2000/06/13 04:52:11 1.1.2.30
@@ -615,7 +615,7 @@
Ndx2StringLen (pDomTree -> xFilename, sSourcefile, nSourcefile) ;
if (pCurrReq -> bDebug & dbgParse)
- lprintf (pCurrReq, "[%d]EPCOMP: #%d -------> parent=%d node=%d type=%d text=%s\n", pCurrReq -> nPid, pNode -> xNdx, Node_parentNode (pDomTree, pNode -> xNdx), pNode -> xNdx, pNode -> nType, Node_selfNodeName(pNode)) ;
+ lprintf (pCurrReq, "[%d]EPCOMP: #%d L%d -------> parent=%d node=%d type=%d text=%s\n", pCurrReq -> nPid, pNode -> xNdx, pNode -> nLinenumber, Node_parentNode (pDomTree, pNode -> xNdx), pNode -> xNdx, 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)
@@ -629,7 +629,7 @@
*bCheckpointPending = 0 ;
if (pCurrReq -> bDebug & dbgParse)
- lprintf (pCurrReq, "[%d]EPCOMP: #%d Checkpoint\n", pCurrReq -> nPid, pNode -> xNdx) ;
+ lprintf (pCurrReq, "[%d]EPCOMP: #%d L%d Checkpoint\n", pCurrReq -> nPid, pNode -> xNdx, pNode -> nLinenumber) ;
}
@@ -669,7 +669,7 @@
{
int l = ArrayGetSize (pCode) ;
if (pCurrReq -> bDebug & dbgParse)
- lprintf (pCurrReq, "[%d]EPCOMP: #%d CompileTimeCode: %*.*s\n", pCurrReq -> nPid, pNode -> xNdx, l, l, pCode) ;
+ lprintf (pCurrReq, "[%d]EPCOMP: #%d L%d CompileTimeCode: %*.*s\n", pCurrReq -> nPid, pNode -> xNdx, pNode -> nLinenumber, l, l, pCode) ;
pSV = newSVpvf("package %s ; \n#line %d \"%s\"\n%*.*s",
pCurrReq -> Buf.sEvalPackage, pNode -> nLinenumber, sSourcefile, l,l, pCode) ;
@@ -706,7 +706,7 @@
StringAdd (&pProg, pCode, l) ;
StringAdd (&pProg, "\n", 1) ;
if (pCurrReq -> bDebug & dbgParse)
- lprintf (pCurrReq, "[%d]EPCOMP: #%d Code: %*.*s\n", pCurrReq -> nPid, pNode -> xNdx, l, l, pCode) ;
+ lprintf (pCurrReq, "[%d]EPCOMP: #%d L%d Code: %*.*s\n", pCurrReq -> nPid, pNode -> xNdx, pNode -> nLinenumber, l, l, pCode) ;
}
}
break ;
@@ -743,7 +743,7 @@
{
*bCheckpointPending = -1 ;
if (pCurrReq -> bDebug & dbgParse)
- lprintf (pCurrReq, "[%d]EPCOMP: #%d Set Checkpoint pending\n", pCurrReq -> nPid, pNode -> xNdx) ;
+ lprintf (pCurrReq, "[%d]EPCOMP: #%d L%d Set Checkpoint pending\n", pCurrReq -> nPid, pNode -> xNdx, pNode -> nLinenumber) ;
}
if (pCmd -> bRemoveNode & 1)
@@ -755,7 +755,7 @@
{
pProg[nCheckpointCodeOffset] = '#' ;
if (pCurrReq -> bDebug & dbgParse)
- lprintf (pCurrReq, "[%d]EPCOMP: #%d Remove Checkpoint\n", pCurrReq -> nPid, pNode -> xNdx) ;
+ lprintf (pCurrReq, "[%d]EPCOMP: #%d L%d Remove Checkpoint\n", pCurrReq -> nPid, pNode -> xNdx, pNode -> nLinenumber) ;
nCheckpointCodeOffset = 0 ;
}
@@ -802,7 +802,7 @@
StringAdd (&pProg, pCode, l) ;
StringAdd (&pProg, "\n", 1) ;
if (pCurrReq -> bDebug & dbgParse)
- lprintf (pCurrReq, "[%d]EPCOMP: #%d Codeend: %*.*s\n", pCurrReq -> nPid, pNode -> xNdx, l, l, pCode) ;
+ lprintf (pCurrReq, "[%d]EPCOMP: #%d L%d Codeend: %*.*s\n", pCurrReq -> nPid, pNode -> xNdx, pNode -> nLinenumber, l, l, pCode) ;
}
}
}
@@ -812,7 +812,7 @@
{
pProg[nStartCodeOffset] = '#' ;
if (pCurrReq -> bDebug & dbgParse)
- lprintf (pCurrReq, "[%d]EPCOMP: #%d Remove Codeblock\n", pCurrReq -> nPid, pNode -> xNdx) ;
+ lprintf (pCurrReq, "[%d]EPCOMP: #%d L%d Remove Codeblock\n", pCurrReq -> nPid, pNode -> xNdx, pNode -> nLinenumber) ;
}
}
if (pCmd -> sPerlCodeEnd && pCmd -> sMayJump)
@@ -820,7 +820,7 @@
{
*bCheckpointPending = -1 ;
if (pCurrReq -> bDebug & dbgParse)
- lprintf (pCurrReq, "[%d]EPCOMP: #%d Set Checkpoint pending\n", pCurrReq -> nPid, pNode -> xNdx) ;
+ lprintf (pCurrReq, "[%d]EPCOMP: #%d L%d Set Checkpoint pending\n", pCurrReq -> nPid, pNode -> xNdx, pNode -> nLinenumber) ;
}
if (pCmd -> sStackName && pCmd -> sPushStack)
{
1.1.2.33 +24 -18 embperl/Attic/epdom.c
Index: epdom.c
===================================================================
RCS file: /home/cvs/embperl/Attic/epdom.c,v
retrieving revision 1.1.2.32
retrieving revision 1.1.2.33
diff -u -r1.1.2.32 -r1.1.2.33
--- epdom.c 2000/06/11 18:58:15 1.1.2.32
+++ epdom.c 2000/06/13 04:52:12 1.1.2.33
@@ -718,15 +718,33 @@
/* ------------------------------------------------------------------------ */
tNodeData * NodePad_appendChild (/*in*/ tDomTree * pDomTree,
- /*in*/ tNodePad * pPad,
+ /*in*/ tNodePad * * ppPad,
/*in*/ tNodeType nType,
/*in*/ tIndex xText,
/*in*/ int nLinenumber)
{
- tNodeData * pNew = (struct tNodeData *)(((tUInt8 *)pPad) + pPad -> nFill) ;
- tNode xNdx = ArrayAdd (&pDomTree -> pLookup, 1) ;
+ tNodePad * pPad = *ppPad ;
+ tNodeData * pNew ;
+ tNode xNdx ;
+
+ if (pPad -> nFill + sizeof (struct tNodeData) > pPad -> nMax)
+ { /* pad full -> make room */
+ struct tNodePad * pNext = NewPad (pDomTree, pPad -> xParent, 0) ;
+ struct tNodePad * pFirst = NodePad_self (pDomTree, pPad -> xFirst) ;
+
+ pNext -> xPrev = pPad -> xNdx ;
+ pPad -> xNext = pNext -> xNdx ;
+ pNext -> xFirst = pFirst -> xFirst ;
+ if (pFirst -> xLast == pPad -> xNdx || pFirst -> xLast == 0)
+ pFirst -> xLast = pNext -> xNdx ;
+
+ *ppPad = pPad = pNext ;
+ }
+ pNew = (struct tNodeData *)(((tUInt8 *)pPad) + pPad -> nFill) ;
+ xNdx = ArrayAdd (&pDomTree -> pLookup, 1) ;
+
pDomTree -> pLookup[xNdx] = pNew ;
pNew -> nText = xText ;
@@ -934,7 +952,7 @@
((tAttrData *)pParent) -> xValue = pChilds -> xNdx ;
((tAttrData *)pParent) -> bFlags |= aflgAttrChilds ;
if (xOldValue)
- NodePad_appendChild (pDomTree, pChilds, ntypAttrValue, xOldValue, nLinenumber) ;
+ NodePad_appendChild (pDomTree, &pChilds, ntypAttrValue, xOldValue, nLinenumber) ;
}
else if (!pParent || !pParent -> xChilds)
@@ -947,25 +965,13 @@
}
else
{
- struct tNodePad * pFirst = pChilds = NodePad_self (pDomTree, pParent -> xChilds) ;
+ pChilds = NodePad_self (pDomTree, pParent -> xChilds) ;
if (pChilds -> xLast)
pChilds = NodePad_self (pDomTree, pChilds -> xLast) ;
- if (pChilds -> nFill + sizeof (struct tNodeData) > pChilds -> nMax)
- { /* pad full -> make room */
- struct tNodePad * pNext = NewPad (pDomTree, xParent, 0) ;
- /* lprintf (pCurrReq, "[%d]PARSE: NewPad Extent Childs: %d -> %d\n", pCurrReq -> nPid, xParent, pNext -> xNdx) ; */
-
- pNext -> xPrev = pChilds -> xNdx ;
- pChilds -> xNext = pNext -> xNdx ;
- pFirst -> xLast = pNext -> xNdx ;
- pNext -> xFirst = pFirst -> xFirst ;
-
- pChilds = pNext ;
- }
}
- pNew = NodePad_appendChild (pDomTree, pChilds, nType, String2Ndx (sText, nTextLen), nLinenumber) ;
+ pNew = NodePad_appendChild (pDomTree, &pChilds, nType, String2Ndx (sText, nTextLen), nLinenumber) ;
if (pCurrReq -> bDebug & dbgParse)
lprintf (pCurrReq, "[%d]PARSE: AddNode: +%02d %*s Element parent=%d node=%d type=%d text=%*.*s (#%d)\n", pCurrReq -> nPid, nLevel, nLevel * 2, "", xParent, pNew -> xNdx, nType, nTextLen, nTextLen, sText, sText?String2Ndx (sText, nTextLen):-1) ;
1.57.2.22 +1 -0 embperl/test.pl
Index: test.pl
===================================================================
RCS file: /home/cvs/embperl/test.pl,v
retrieving revision 1.57.2.21
retrieving revision 1.57.2.22
diff -u -r1.57.2.21 -r1.57.2.22
--- test.pl 2000/06/07 09:22:57 1.57.2.21
+++ test.pl 2000/06/13 04:52:12 1.57.2.22
@@ -5,6 +5,7 @@
@tests = (
'ascii',
+# 'tmp/header.htm',
'pure.htm',
## 'plainlong.htm',
## 'plainlong.htm',
No revision
No revision
1.3.2.2 +43 -2 embperl/test/html/if.htm
Index: if.htm
===================================================================
RCS file: /home/cvs/embperl/test/html/if.htm,v
retrieving revision 1.3.2.1
retrieving revision 1.3.2.2
diff -u -r1.3.2.1 -r1.3.2.2
--- if.htm 2000/05/24 21:08:33 1.3.2.1
+++ if.htm 2000/06/13 04:52:14 1.3.2.2
@@ -1,4 +1,4 @@
-
+[##
<html>
<head>
<title>IF Metacommand in Embperl</title>
@@ -34,7 +34,7 @@
[$ <br> else<br>$]
not a<br>
[$ <br>endif $]
-#]
+#][##
a5
[$ if $a$]
a <br>
@@ -313,6 +313,47 @@
<endif>
+
+##]
+
+<TABLE WIDTH="530" BORDER="0">
+ <TR>
+ <TD ALIGN="LEFT">
+ [$ if ($badge eq "iit") $]
+ <A HREF="/iit/">
+ [$ else $]
+ <A HREF="/">
+ [$ endif $]
+ <IMG SRC="[$ if (($server_type eq "iii.co.uk")) $]/i/www.[+ $server_type +]/[+ $badge || "iiilogo_narrow" +].gif[$ else $]/icons/[+ $badge || "iiilogo_narrow" +].gif[$ endif $]"
+ WIDTH="[+ $icon_width +]" HEIGHT="[+ $icon_height +]" BORDER="0"
+ [$ if ($badge eq "iit") $]
+ ALT="iit logo"
+ [$ else $]
+ ALT="iii logo"
+ [$ endif $]
+ [$ if (($badge eq "iit") && ($badge ne $cookie_badge) && !$cookie_to) $]
+ onload="window.open('/iit/welcometoiit.epl','dis','status=no,scrollbars=no,resizable=yes,width=390,height=410,screenX=50,screenY=50,top=50,left=50'); return false"
+ [$ elsif (($badge eq "") && ($cookie_badge eq "iit") && !$cookie_from) $]
+ onload="window.open('/iit/leavingiit.epl','dis','status=no,scrollbars=no,resizable=yes,width=370,height=320,screenX=100,screenY=100,top=100,left=100'); return false"
+ [$ endif $]>
+
+ </TD>
+</TR>
+</TABLE>
+
+
+<IMG
+[$ if (($server_type eq "iii.co.uk")) $]
+ SRC="/i/www.[+ $server_type +]/[+ $badge || "iiilogo_narrow" +].gif" WIDTH="[+ $icon_width +]" HEIGHT="[+ $icon_height +]" BORDER="0"
+[$ else $]
+ SRC="/icons/[+ $badge || "iiilogo_narrow" +].gif" WIDTH="[+ $icon_width +]" HEIGHT="[+ $icon_height +]" BORDER="0"
+[$ endif $]
+[$ if ($badge eq "iit") $]
+ ALT="iit logo"
+[$ else $]
+ ALT="iii logo"
+[$ endif $]
+>
</body>