richter 02/03/20 07:31:01
Modified: . Tag: Embperl2c Changes.pod epcmd2.c epdom.c
Embperl/Syntax Tag: Embperl2c EmbperlHTML.pm
test/html Tag: Embperl2c input.htm
Log:
select in loop problem
Revision Changes Path
No revision
No revision
1.129.4.58 +2 -0 embperl/Changes.pod
Index: Changes.pod
===================================================================
RCS file: /home/cvs/embperl/Changes.pod,v
retrieving revision 1.129.4.57
retrieving revision 1.129.4.58
diff -u -r1.129.4.57 -r1.129.4.58
--- Changes.pod 20 Mar 2002 08:24:52 -0000 1.129.4.57
+++ Changes.pod 20 Mar 2002 15:31:00 -0000 1.129.4.58
@@ -13,6 +13,8 @@
objects was kept after the end of it's lifetime, which caused a
segfault.
- Don't do a path search when the filename starts with './'.
+ - Fix segfault that occured when many nested sub's are used,
+ but only a low number of strings.
=head1 2.0b6 (BETA) 13. Mar. 2002
1.4.2.19 +5 -5 embperl/Attic/epcmd2.c
Index: epcmd2.c
===================================================================
RCS file: /home/cvs/embperl/Attic/epcmd2.c,v
retrieving revision 1.4.2.18
retrieving revision 1.4.2.19
diff -u -r1.4.2.18 -r1.4.2.19
--- epcmd2.c 19 Jan 2002 14:13:41 -0000 1.4.2.18
+++ epcmd2.c 20 Mar 2002 15:31:00 -0000 1.4.2.19
@@ -9,7 +9,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: epcmd2.c,v 1.4.2.18 2002/01/19 14:13:41 richter Exp $
+# $Id: epcmd2.c,v 1.4.2.19 2002/03/20 15:31:00 richter Exp $
#
###################################################################################*/
@@ -129,13 +129,13 @@
{
Element_selfSetAttribut (r -> pApp, pDomTree, pNode, nRepeatLevel,
sAttrName, nAttrLen, NULL, 0) ;
if (r -> Component.Config.bDebug & dbgInput)
- lprintf (r -> pApp, "[%d]INPU: Set Attribut: Name: '%*.*s' Value:
'%*.*s' Attribute: '%*.*s'\n", r -> pThread -> nPid, nNameLen, nNameLen, pName,
nValLen, nValLen, pVal, nAttrLen, nAttrLen, sAttrName) ;
+ lprintf (r -> pApp, "[%d]INPU: Set Attribut: Name: '%*.*s' Value:
'%*.*s' Attribute: '%*.*s' nRepeatLevel=%d\n", r -> pThread -> nPid, nNameLen,
nNameLen, pName, nValLen, nValLen, pVal, nAttrLen, nAttrLen, sAttrName, nRepeatLevel)
;
}
else
{
Element_selfRemoveAttribut (r -> pApp, pDomTree, pNode, nRepeatLevel,
sAttrName, nAttrLen) ;
if (r -> Component.Config.bDebug & dbgInput)
- lprintf (r -> pApp, "[%d]INPU: Remove Attribut: Name: '%*.*s' Value:
'%*.*s' Attribute: '%*.*s'\n", r -> pThread -> nPid, nNameLen, nNameLen, pName,
nValLen, nValLen, pVal, nAttrLen, nAttrLen, sAttrName ) ;
+ lprintf (r -> pApp, "[%d]INPU: Remove Attribut: Name: '%*.*s' Value:
'%*.*s' Attribute: '%*.*s' nRepeatLevel=%d\n", r -> pThread -> nPid, nNameLen,
nNameLen, pName, nValLen, nValLen, pVal, nAttrLen, nAttrLen, sAttrName, nRepeatLevel )
;
}
}
else
@@ -144,12 +144,12 @@
{
hv_store (r -> pThread -> pInputHash, (char *)pName, nNameLen, newSVpv
((nValLen?((char *)pVal):""), nValLen), 0) ;
if (r -> Component.Config.bDebug & dbgInput)
- lprintf (r -> pApp, "[%d]INPU: Has already Attribut: Name: '%*.*s'
Value: '%*.*s' Attribute: '%*.*s'\n", r -> pThread -> nPid, nNameLen, nNameLen, pName,
nValLen, nValLen, pVal, nAttrLen, nAttrLen, sAttrName ) ;
+ lprintf (r -> pApp, "[%d]INPU: Has already Attribut: Name: '%*.*s'
Value: '%*.*s' Attribute: '%*.*s' nRepeatLevel=%d\n", r -> pThread -> nPid, nNameLen,
nNameLen, pName, nValLen, nValLen, pVal, nAttrLen, nAttrLen, sAttrName, nRepeatLevel )
;
}
else
{
if (r -> Component.Config.bDebug & dbgInput)
- lprintf (r -> pApp, "[%d]INPU: No value in %%fdat for Attribut: Name:
'%*.*s' Value: '%*.*s' Attribute: '%*.*s'\n", r -> pThread -> nPid, nNameLen,
nNameLen, pName, nValLen, nValLen, pVal, nAttrLen, nAttrLen, sAttrName ) ;
+ lprintf (r -> pApp, "[%d]INPU: No value in %%fdat for Attribut: Name:
'%*.*s' Value: '%*.*s' Attribute: '%*.*s' nRepeatLevel=%d\n", r -> pThread -> nPid,
nNameLen, nNameLen, pName, nValLen, nValLen, pVal, nAttrLen, nAttrLen, sAttrName,
nRepeatLevel ) ;
}
}
1.4.2.84 +15 -6 embperl/Attic/epdom.c
Index: epdom.c
===================================================================
RCS file: /home/cvs/embperl/Attic/epdom.c,v
retrieving revision 1.4.2.83
retrieving revision 1.4.2.84
diff -u -r1.4.2.83 -r1.4.2.84
--- epdom.c 5 Mar 2002 08:07:20 -0000 1.4.2.83
+++ epdom.c 20 Mar 2002 15:31:00 -0000 1.4.2.84
@@ -9,7 +9,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: epdom.c,v 1.4.2.83 2002/03/05 08:07:20 richter Exp $
+# $Id: epdom.c,v 1.4.2.84 2002/03/20 15:31:00 richter Exp $
#
###################################################################################*/
@@ -1257,7 +1257,7 @@
{
tAttrData * pAttr;
pDocument = Node_selfCloneNode (a, pDomTree, pDocument, 0, 1) ;
- pAttr = Element_selfSetAttribut (a, pDomTree, pDocument, 0, NULL,
xDomTreeAttr, NULL, pDomTree -> xNdx) ;
+ pAttr = Element_selfSetAttribut (a, pDomTree, pDocument, 0, NULL,
xDomTreeAttr, (char *)&pDomTree -> xNdx, sizeof (pDomTree -> xNdx)) ;
pAttr -> bFlags = aflgOK ; /* reset string value flag */
pDomTree -> xDocument = pDocument -> xNdx ;
pDocument -> nType = ntypDocumentFraq ;
@@ -1324,7 +1324,7 @@
pDomTree -> xDocument = pCheckpoints[nRunCheckpoint].xNode ;
pDocument = Node_self (pDomTree, pDomTree -> xDocument) ;
- pAttr = Element_selfSetAttribut (a, pDomTree, pDocument, 0, NULL,
xDomTreeAttr, NULL, pDomTree -> xNdx) ;
+ pAttr = Element_selfSetAttribut (a, pDomTree, pDocument, 0, NULL,
xDomTreeAttr, (char *)&pDomTree -> xNdx, sizeof (pDomTree -> xNdx)) ;
pAttr -> bFlags = aflgOK ; /* reset string value flag */
pDocument = Node_self (pDomTree, pDomTree -> xDocument) ;
pDocument -> nType = ntypDocumentFraq ;
@@ -2707,7 +2707,7 @@
if (pOldChild -> nType == ntypDocumentFraq)
{
- tAttrData * pAttr = Element_selfSetAttribut (a, pOldChildDomTree, pOldChild,
nOldRepeatLevel, NULL, xDomTreeAttr, NULL, pDomTree -> xNdx) ;
+ tAttrData * pAttr = Element_selfSetAttribut (a, pOldChildDomTree, pOldChild,
nOldRepeatLevel, NULL, xDomTreeAttr, (char *)&pDomTree -> xNdx, sizeof (pDomTree ->
xNdx)) ;
pAttr -> bFlags = aflgOK ; /* reset string value flag */
}
@@ -2792,7 +2792,7 @@
if (pNewNode -> nType == ntypDocumentFraq)
{
- tAttrData * pAttr = Element_selfSetAttribut (a, pRefNodeDomTree, pNewNode,
nRefRepeatLevel, NULL, xDomTreeAttr, NULL, pNewNodeDomTree -> xNdx) ;
+ tAttrData * pAttr = Element_selfSetAttribut (a, pRefNodeDomTree, pNewNode,
nRefRepeatLevel, NULL, xDomTreeAttr, (char *)&pNewNodeDomTree -> xNdx, sizeof
(pNewNodeDomTree -> xNdx)) ;
pAttr -> bFlags = aflgOK ; /* reset string value flag */
}
@@ -3192,7 +3192,16 @@
if (pNode -> nType == ntypDocumentFraq)
{
int o = pDomTree -> xNdx ;
- pDomTree = DomTree_self (Element_selfGetAttribut (a, pDomTree, pNode, NULL,
xDomTreeAttr) -> xValue) ;
+ tAttrData * pAttr = Element_selfGetAttribut (a, pDomTree, pNode, NULL,
xDomTreeAttr) ;
+ if (pAttr)
+ {
+ char * p ;
+ char * pNdx ;
+
+ pNdx = Attr_selfValue(a, pDomTree, pAttr, nRepeatLevel, &p) ;
+ pDomTree = DomTree_self (*(tIndexShort *)pNdx) ;
+ }
+
if (r -> Component.Config.bDebug & dbgOutput)
lprintf (a, "[%d]toString: ** Switch from DomTree=%d to new
DomTree=%d\n", r -> pThread -> nPid, o, pDomTree -> xNdx) ;
No revision
No revision
1.1.2.11 +7 -5 embperl/Embperl/Syntax/Attic/EmbperlHTML.pm
Index: EmbperlHTML.pm
===================================================================
RCS file: /home/cvs/embperl/Embperl/Syntax/Attic/EmbperlHTML.pm,v
retrieving revision 1.1.2.10
retrieving revision 1.1.2.11
diff -u -r1.1.2.10 -r1.1.2.11
--- EmbperlHTML.pm 22 Jan 2002 09:29:56 -0000 1.1.2.10
+++ EmbperlHTML.pm 20 Mar 2002 15:31:00 -0000 1.1.2.11
@@ -10,7 +10,7 @@
# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
#
-# $Id: EmbperlHTML.pm,v 1.1.2.10 2002/01/22 09:29:56 richter Exp $
+# $Id: EmbperlHTML.pm,v 1.1.2.11 2002/03/20 15:31:00 richter Exp $
#
###################################################################################
@@ -114,8 +114,8 @@
stackname2 => 'htmlselect',
push2 => '%&*\'name%',
- perlcode => 'l%$p%: for (my $row = 0; $row < $maxrow; $row++) {'
,
- perlcodeend => '} %?*-htmltable%' ,
+ perlcode => 'l%$p%: { my $_ep_selectname=%&*\'name%;print
"epsel=$_ep_selectname\n" ; for (my $row = 0; $row < $maxrow; $row++) {' ,
+ perlcodeend => '}} %?*-htmltable%' ,
perlcoderemove => 1,
stackname => 'htmltable',
'push' => '%$p%',
@@ -127,8 +127,10 @@
{
perlcode =>
[
- '_ep_opt (%$n%, %^*htmlselect%, %&*\'value%, %&\'selected%);',
- '_ep_opt (%$n%, %^*htmlselect%, %>*\'1%, %&\'selected%);',
+ '_ep_opt (%$n%, $_ep_selectname, %&*\'value%, %&\'selected%);
print "epselo=$_ep_selectname\n" ;',
+ '_ep_opt (%$n%, $_ep_selectname, %>*\'1%, %&\'selected%);print
"epselo=$_ep_selectname\n" ;',
+ #'_ep_opt (%$n%, %^*htmlselect%, %&*\'value%, %&\'selected%);',
+ #'_ep_opt (%$n%, %^*htmlselect%, %>*\'1%, %&\'selected%);',
]
}) ;
$self -> AddTagWithStart ('/option', 'option') ;
No revision
No revision
1.10.4.12 +6 -0 embperl/test/html/input.htm
Index: input.htm
===================================================================
RCS file: /home/cvs/embperl/test/html/input.htm,v
retrieving revision 1.10.4.11
retrieving revision 1.10.4.12
diff -u -r1.10.4.11 -r1.10.4.12
--- input.htm 27 Feb 2002 08:19:44 -0000 1.10.4.11
+++ input.htm 20 Mar 2002 15:31:01 -0000 1.10.4.12
@@ -196,6 +196,12 @@
<option value="Wert8">Wert8</option>
</select>
+ [- @ksall = qw{Wert1 Wert2 Wert3 Wert4 Wert5 Wert6 Wert7 Wert8} ; -]
+ <select name="[- $eld = 'eld' -]f[+ $eld +][+ 5 +]">
+ <option value="[+ $ksall[$row] +]">[+ $ksall[$row] +]</option>
+ </select>
+
+
<input type="checkbox" value="Wert1" name="mult" checked>
<input type="checkbox" value="Wert1" name="mult">
<input type="checkbox" value="Wert2" name="mult" checked>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]