richter     01/04/10 04:02:42

  Modified:    .        Tag: Embperl2c Cmd.xs ep2.h epcomp.c
               Embperl/Syntax Tag: Embperl2c EmbperlBlocks.pm
               test/html Tag: Embperl2c subtab.htm
  Log:
  Embperl 2 - fix sub handling and setting of $_ep_DomTree
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.6   +5 -4      embperl/Cmd.xs
  
  Index: Cmd.xs
  ===================================================================
  RCS file: /home/cvs/embperl/Cmd.xs,v
  retrieving revision 1.1.2.5
  retrieving revision 1.1.2.6
  diff -u -r1.1.2.5 -r1.1.2.6
  --- Cmd.xs    2001/03/28 10:07:30     1.1.2.5
  +++ Cmd.xs    2001/04/10 11:02:33     1.1.2.6
  @@ -10,7 +10,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: Cmd.xs,v 1.1.2.5 2001/03/28 10:07:30 richter Exp $
  +#   $Id: Cmd.xs,v 1.1.2.6 2001/04/10 11:02:33 richter Exp $
   #
   ###################################################################################
   
  @@ -72,12 +72,13 @@
       int  xDomTree
       AV * pSaveAV
   CODE:
  -    embperl_ExecuteSubStart (pCurrReq, SvRV(pDomTreeSV), xDomTree, pSaveAV) ;
  +    embperl_ExecuteSubStart (pCurrReq, pDomTreeSV, xDomTree, pSaveAV) ;
   
   
   void
  -embperl_SubEnd (pSaveAV)
  +embperl_SubEnd (pDomTreeSV, pSaveAV)
  +    SV * pDomTreeSV 
       AV * pSaveAV
   CODE:
  -    embperl_ExecuteSubEnd (pCurrReq, pSaveAV) ;
  +    embperl_ExecuteSubEnd (pCurrReq, pDomTreeSV, pSaveAV) ;
   
  
  
  
  1.1.2.13  +2 -1      embperl/Attic/ep2.h
  
  Index: ep2.h
  ===================================================================
  RCS file: /home/cvs/embperl/Attic/ep2.h,v
  retrieving revision 1.1.2.12
  retrieving revision 1.1.2.13
  diff -u -r1.1.2.12 -r1.1.2.13
  --- ep2.h     2001/03/28 10:07:30     1.1.2.12
  +++ ep2.h     2001/04/10 11:02:34     1.1.2.13
  @@ -10,7 +10,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: ep2.h,v 1.1.2.12 2001/03/28 10:07:30 richter Exp $
  +#   $Id: ep2.h,v 1.1.2.13 2001/04/10 11:02:34 richter Exp $
   #
   
###################################################################################*/
   
  @@ -104,6 +104,7 @@
                                     /*in*/  AV *         pSaveAV) ;
   
   int embperl_ExecuteSubEnd           (/*in*/  tReq *    r,
  +                                  /*in*/  SV *         pDomTreeSV,
                                     /*in*/  AV *         pSaveAV) ;
   
   
  
  
  
  1.4.2.44  +7 -5      embperl/Attic/epcomp.c
  
  Index: epcomp.c
  ===================================================================
  RCS file: /home/cvs/embperl/Attic/epcomp.c,v
  retrieving revision 1.4.2.43
  retrieving revision 1.4.2.44
  diff -u -r1.4.2.43 -r1.4.2.44
  --- epcomp.c  2001/03/28 12:58:19     1.4.2.43
  +++ epcomp.c  2001/04/10 11:02:35     1.4.2.44
  @@ -9,7 +9,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: epcomp.c,v 1.4.2.43 2001/03/28 12:58:19 richter Exp $
  +#   $Id: epcomp.c,v 1.4.2.44 2001/04/10 11:02:35 richter Exp $
   #
   
###################################################################################*/
   
  @@ -1510,10 +1510,11 @@
       if (l && pCurrReq -> bDebug & dbgParse)
        lprintf (r, "[%d]EPCOMP: AfterCompileTimeCode:    %*.*s\n", r -> nPid, l, l, r 
-> pProgDef) ; 
   
  -    pSV = newSVpvf("package %s ; \nmy ($_ep_req, $_ep_DomTree) = @_;\n%*.*s", r -> 
Buf.sEvalPackage, l,l, r -> pProgDef) ;
  +    //pSV = newSVpvf("package %s ; \nmy ($_ep_req, $_ep_DomTree) = @_;\n%*.*s", r 
-> Buf.sEvalPackage, l,l, r -> pProgDef) ;
  +    pSV = newSVpvf("package %s ; \n%*.*s", r -> Buf.sEvalPackage, l,l, r -> 
pProgDef) ;
       args[0] = r -> pReqSV ;
       args[1] = pDomTree -> pDomTreeSV ;
  -    if ((rc = EvalDirect (r, pSV, 2, args)) != ok)
  +    if ((rc = EvalDirect (r, pSV, 0, args)) != ok)
        LogError (r, rc) ;
       SvREFCNT_dec(pSV);
   
  @@ -1751,7 +1752,7 @@
                                     /*in*/  AV *         pSaveAV)
   
       {
  -    tIndex xOrgDomTree  ;
  +    tIndex xOrgDomTree = -1  ;
       tIndex xOldDomTree  ;
       tDomTree * pDomTree ;
       tDomTree * pCurrDomTree ;
  @@ -1790,7 +1791,7 @@
       sv_setiv (pDomTreeSV, r -> xCurrDomTree) ;
   
       if (pCurrReq -> bDebug & dbgParse)
  -     lprintf (pCurrReq, "[%d]SUB: Enter from DomTree=%d into new DomTree=%d, Source 
DomTree=%d \n", pCurrReq -> nPid, xOldDomTree, r -> xCurrDomTree, xDomTree) ; 
  +     lprintf (pCurrReq, "[%d]SUB: Enter from DomTree=%d into new DomTree=%d, Source 
DomTree=%d (org=%d)\n", pCurrReq -> nPid, xOldDomTree, r -> xCurrDomTree, xDomTree, 
xOrgDomTree) ; 
   
       return r -> xCurrDomTree ;
       }
  @@ -1807,6 +1808,7 @@
   
   
   int embperl_ExecuteSubEnd           (/*in*/  tReq *    r,
  +                                  /*in*/  SV *         pDomTreeSV,
                                     /*in*/  AV *         pSaveAV)
   
       {
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.13  +2 -2      embperl/Embperl/Syntax/Attic/EmbperlBlocks.pm
  
  Index: EmbperlBlocks.pm
  ===================================================================
  RCS file: /home/cvs/embperl/Embperl/Syntax/Attic/EmbperlBlocks.pm,v
  retrieving revision 1.1.2.12
  retrieving revision 1.1.2.13
  diff -u -r1.1.2.12 -r1.1.2.13
  --- EmbperlBlocks.pm  2001/04/10 08:03:45     1.1.2.12
  +++ EmbperlBlocks.pm  2001/04/10 11:02:39     1.1.2.13
  @@ -10,7 +10,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: EmbperlBlocks.pm,v 1.1.2.12 2001/04/10 08:03:45 richter Exp $
  +#   $Id: EmbperlBlocks.pm,v 1.1.2.13 2001/04/10 11:02:39 richter Exp $
   #
   ###################################################################################
    
  @@ -328,7 +328,7 @@
                   switchcodetype => 2,
                   },
                   { 
  -                perlcode => '};  sub %^subname% { my @_ep_save ; 
HTML::Embperl::Cmd::SubStart(\\$_ep_DomTree,%$q%,\\@_ep_save); my $_ep_ret = 
_ep_sub_%^subname% (@_); HTML::Embperl::Cmd::SubEnd(\\@_ep_save); return $_ep_ret } ; 
$_[0] -> ExportHash -> {%^"subname%} = \&%^subname% ; ', 
  +                perlcode => '};  sub %^subname% { my @_ep_save ; 
HTML::Embperl::Cmd::SubStart($_ep_DomTree,%$q%,\\@_ep_save); my $_ep_ret = 
_ep_sub_%^subname% (@_); HTML::Embperl::Cmd::SubEnd($_ep_DomTree,\\@_ep_save); return 
$_ep_ret } ; $_[0] -> ExportHash -> {%^"subname%} = \&%^subname% ; ', 
                   removenode => 10,
                   mayjump     => 1,
                   pop2        => 'subname',
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.2   +44 -30    embperl/test/html/Attic/subtab.htm
  
  Index: subtab.htm
  ===================================================================
  RCS file: /home/cvs/embperl/test/html/Attic/subtab.htm,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- subtab.htm        2001/04/10 08:03:46     1.1.2.1
  +++ subtab.htm        2001/04/10 11:02:41     1.1.2.2
  @@ -6,10 +6,47 @@
   
   <body>
   
  +
  
+[###############################################################################################]
  +
   [$ sub Kurslink $]<a href="epl_ober.htm?id=[+ $rec->{id} +]&bereich_id=[+ 
$fdat{bereich_id} +]" onMouseOut='hidePopup()'>[$endsub$]
   
  
+[###############################################################################################]
   
  +[$ sub cell $]
  +             [$if !$rec -> {id} $]
  +        
  +                     <td bgcolor="[+ $bgcol +]" align=center>[- Neulink -]<img 
border=0 src="/images/leer.gif"><img border=0 src="/images/leer.gif"><img border=0 
src="/images/leer.gif"></td>
  +        
  +             [$ elsif $fdat{bereich_id} eq 'f' || !$kurs -> {-gebucht} || $xkurs $]
  +             
  +                     [$if $xkurs $]
  +                             <td bgcolor="[+ $bgcol +]" align="[+ $fdat{bereich_id} 
eq 'f'?'center':'left' +]">&nbsp;[- Kurslink -]<img  border=0 src="[+ 
$mainrec?"/images/leer2_gelb.gif":($xkurs -> 
{-gebucht}?"/images/leer_rot.gif":"/images/leer_gelb.gif") +]"></td>
  +            [$else$]
  +                             <td bgcolor="[+ $bgcol +]" align="[+ $fdat{bereich_id} 
eq 'f'?'center':'left' +]">&nbsp;[- Kurslink -]<img  border=0 src="[+ $kurs -> 
{-gebucht}?"/images/belegt_rot$gifext.gif":"/images/reserv_gelb$gifext.gif" +]"></td>
  +                     [$endif$]
  +             
  +             [$ elsif $fdat{bereich_id} eq 'b' $]
  +             
  +            [- $n = 2 -]
  +                     <td bgcolor="[+ $bgcol +]" align=left> <table> <tr>
  +                             <td>[- Kurslink -]<img  border=0 src="[+ $kurs -> 
{-gebucht}?"/images/belegt_rot$gifext.gif":"/images/reserv_gelb$gifext.gif" +]"></td>
  +                [$ while ($n--) $]
  +                    [-  
  +                    $banzahl = 1 ;
  +                    $sanzahl = 5 ;
  +                                     -]
  +                    [$ if $banzahl > 0  $]
  +                                             <td bgcolor="[+ $subbgcol = $sanzahl 
== 0?'#ff0000':($sanzahl < $banzahl?'#ffff00':'#00ff00') +]">[- Kurslink (($sanzahl || 
0) . "/$banzahl") -]<small><strong><font face="[+ $fontface +]" color="[+ 
$xkurs?$subbgcol:($subbgcol eq '#ff0000'?'#ffffff':'#000000') +]">&nbsp;[+ $brec -> 
{bereichkurz} +]&nbsp;</td>
  +                                     [$endif$]
  +                [$endwhile$]
  +                     </tr> </table> </td>
  +        
  +             [$ endif $]
  +[$endsub $]
   
  
+[###############################################################################################]
  +
   [-
   
   $rec  = { id => 1 } ;
  @@ -19,42 +56,19 @@
   $fdat{bereich_id} = 'b' ;
   $bgcol = '#1' ;
   $gifext = 'xxx' ;
  -$n = 2 ;
  +$l = 2 ;
   
   -]
   
   <table>
        <tr>
  +
  +    [$ while ($l-- > 0) $]
  +        [- cell -]
  +    [$endwhile$]
   
  -                     [$if !$rec -> {id} $]
  -            
  -                         <td bgcolor="[+ $bgcol +]" align=center>[- Neulink -]<img 
border=0 src="/images/leer.gif"><img border=0 src="/images/leer.gif"><img border=0 
src="/images/leer.gif"></td>
  -            
  -                     [$ elsif $fdat{bereich_id} eq 'f' || !$kurs -> {-gebucht} || 
$xkurs $]
  -                     
  -                             [$if $xkurs $]
  -                                     <td bgcolor="[+ $bgcol +]" align="[+ 
$fdat{bereich_id} eq 'f'?'center':'left' +]">&nbsp;[- Kurslink -]<img  border=0 
src="[+ $mainrec?"/images/leer2_gelb.gif":($xkurs -> 
{-gebucht}?"/images/leer_rot.gif":"/images/leer_gelb.gif") +]"></td>
  -                [$else$]
  -                                     <td bgcolor="[+ $bgcol +]" align="[+ 
$fdat{bereich_id} eq 'f'?'center':'left' +]">&nbsp;[- Kurslink -]<img  border=0 
src="[+ $kurs -> 
{-gebucht}?"/images/belegt_rot$gifext.gif":"/images/reserv_gelb$gifext.gif" +]"></td>
  -                             [$endif$]
  -                     
  -                     [$ elsif $fdat{bereich_id} eq 'b' $]
  -                     
  -                             <td bgcolor="[+ $bgcol +]" align=left> <table> <tr>
  -                                     <td>[- Kurslink -]<img  border=0 src="[+ $kurs 
-> {-gebucht}?"/images/belegt_rot$gifext.gif":"/images/reserv_gelb$gifext.gif" 
+]"></td>
  -                    [$ while ($n--) $]
  -                        [-  
  -                        $banzahl = 0 ;
  -                        $sanzahl = 5 ;
  -                                             -]
  -                        [$ if $banzahl > 0  $]
  -                                                     <td bgcolor="[+ $subbgcol = 
$sanzahl == 0?'#ff0000':($sanzahl < $banzahl?'#ffff00':'#00ff00') +]">[- Kurslink 
(($sanzahl || 0) . "/$banzahl") -]<small><strong><font face="[+ $fontface +]" 
color="[+ $xkurs?$subbgcol:($subbgcol eq '#ff0000'?'#ffffff':'#000000') +]">&nbsp;[+ 
$brec -> {bereichkurz} +]&nbsp;</td>
  -                                             [$endif$]
  -                    [$endwhile$]
  -                             </tr> </table> </td>
  -            
  -                     [$ endif $]
  -                     
  +    </tr>
  +</table>                     
   
   
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to