richter     00/06/06 03:25:53

  Modified:    .        Tag: Embperl2 Changes.pod TODO epcomp.c epdat.h
                        epdom.c epdom.h epmain.c epparse.c test.pl
               Embperl  Tag: Embperl2 Syntax.pm
               test/cmp Tag: Embperl2 div.htm include.htm includeerr1.htm
                        includeerr2.htm
               test/html Tag: Embperl2 div.htm inc.htm
               test/html/nph Tag: Embperl2 div.htm
               test/html/ofunc Tag: Embperl2 div.htm
               test/html/rawinput Tag: Embperl2 rawinput.htm
               test/html/safe Tag: Embperl2 safe.htm
  Added:       test/html/rawinput Tag: Embperl2 include.htm
  Removed:     test/html Tag: Embperl2 include.htm
  Log:
  Embperl 2
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.115.2.7 +6 -7      embperl/Changes.pod
  
  Index: Changes.pod
  ===================================================================
  RCS file: /home/cvs/embperl/Changes.pod,v
  retrieving revision 1.115.2.6
  retrieving revision 1.115.2.7
  diff -u -r1.115.2.6 -r1.115.2.7
  --- Changes.pod       2000/06/05 10:06:53     1.115.2.6
  +++ Changes.pod       2000/06/06 10:25:24     1.115.2.7
  @@ -19,26 +19,25 @@
           4 executing
           5 outputing
        Since steps 1-3 has only to take place for the first time a file
  -     is processed, Embperl is about 100% faster the Embperl 1.x.
  +     is processed, Embperl is about 25-100% faster the Embperl 1.x.
        (Embperl 1.x has also precompiled the Perl code, but Embperl
        goes much further and stores also a precompiled structure of
        the document)
        This modularisation will also allow to replace single steps
        with other modules and to cascade multiple processors, that
        work on one document.
  -
      - The following options can currently only set from the httpd.conf:
  -     optRawInput, optKeepSpaces, optDisableHtmlScan, optDisableTableScan,
  +     optRawInput, optKeepSpaces
  +   - The following options are currently not supported:
  +     optDisableHtmlScan, optDisableTableScan,
        optDisableInputScan, optDisableMetaScan 
  -
      - Nesting must be properly. I.e. you cannot put a table tag (for an
        dynamic table) inside an if and the /table inside another if.
        (That still works for static tables)
  -
      - optUndefToEmptyValue is always set and cannot be disabled.
  -
      - make test works with Apache that has mod_jserv compiled in
  -
  +   - [$ foreach $x (@x) $] requires now the bracket around the
  +     array (like Perl)
   
   
   =head1 1.3b4_dev -- That's what currently under developement
  
  
  
  1.90.2.6  +10 -0     embperl/TODO
  
  Index: TODO
  ===================================================================
  RCS file: /home/cvs/embperl/TODO,v
  retrieving revision 1.90.2.5
  retrieving revision 1.90.2.6
  diff -u -r1.90.2.5 -r1.90.2.6
  --- TODO      2000/06/04 19:42:40     1.90.2.5
  +++ TODO      2000/06/06 10:25:25     1.90.2.6
  @@ -134,6 +134,8 @@
   
   - <xxxx> -> empty loop -> loop.htm
   
  +- no space between </td></tr> -> </td></tr></table><doc> -> include.htm
  +
   - <th>, $cnt -> table.htm
   
   - $row etc. ende checken
  @@ -141,5 +143,13 @@
   - discard.htm
   
   - double nested table (Region/Kategorie) -> table.htm, input.htm
  +
  +- [$ sub $]
  +
  +- exit
  +
  +- print OUT
  +
  +- safe namespaces (importing Embperl functions)
   
   
  
  
  
  1.1.2.26  +66 -2     embperl/Attic/epcomp.c
  
  Index: epcomp.c
  ===================================================================
  RCS file: /home/cvs/embperl/Attic/epcomp.c,v
  retrieving revision 1.1.2.25
  retrieving revision 1.1.2.26
  diff -u -r1.1.2.25 -r1.1.2.26
  --- epcomp.c  2000/06/05 11:55:41     1.1.2.25
  +++ epcomp.c  2000/06/06 10:25:26     1.1.2.26
  @@ -18,12 +18,14 @@
   struct tEmbperlCmd
       {
       const char * *  sPerlCode ;
  +    const char * *  sCompileTimePerlCode ;
       const char *    sPerlCodeEnd ;
       const char *    sStackName ;
       const char *    sPushStack ;
       const char *    sStackName2 ;
       const char *    sPushStack2 ;
       int                  numPerlCode ;
  +    int                  numCompileTimePerlCode ;
       int                  bRemoveNode ;
       int                  bPerlCodeRemove ;
       int                  bCompileChilds ;
  @@ -112,6 +114,43 @@
               }
           }
       
  +
  +    ppSV = hv_fetch(pHash, "compiletimeperlcode", 19, 0) ;  
  +    if (ppSV != NULL && *ppSV != NULL && 
  +        SvTYPE(*ppSV) == SVt_RV && SvTYPE((pAV = (AV *)SvRV(*ppSV))) == SVt_PVAV)
  +     { /* Array reference  */
  +     int f = AvFILL(pAV) + 1 ;
  +        int i ;
  +        STRLEN l ;
  +        char * s ;
  +
  +        pEmbperlCmds[nNodeName].sCompileTimePerlCode = malloc (f * sizeof (char *)) 
;
  +        pEmbperlCmds[nNodeName].numCompileTimePerlCode = f ;
  +
  +        for (i = 0; i < f; i++)
  +         {
  +         ppSV = av_fetch (pAV, i, 0) ;
  +         if (ppSV && *ppSV)
  +             pEmbperlCmds[nNodeName].sCompileTimePerlCode[i] = strdup (SvPV (*ppSV, 
l)) ;
  +            else
  +             pEmbperlCmds[nNodeName].sCompileTimePerlCode[i] = NULL ;
  +            }
  +        }
  +    else
  +        {
  +        if (ppSV)
  +            {
  +            STRLEN  l ; 
  +            
  +            pEmbperlCmds[nNodeName].sCompileTimePerlCode = malloc (sizeof (char *)) 
;
  +            pEmbperlCmds[nNodeName].numCompileTimePerlCode = 1 ;
  +            pEmbperlCmds[nNodeName].sCompileTimePerlCode[0] = sstrdup (SvPV (*ppSV, 
l)) ;
  +            }
  +        }
  +    
  +    
  +    
  +    
       pEmbperlCmds[nNodeName].sPerlCodeEnd = GetHashValueStrDup  (pHash, 
"perlcodeend", NULL) ;
       pEmbperlCmds[nNodeName].sStackName   = GetHashValueStrDup  (pHash, "stackname", 
NULL) ;
       pEmbperlCmds[nNodeName].sPushStack   = GetHashValueStrDup  (pHash, "push", 
NULL) ;
  @@ -616,6 +655,28 @@
               {
               int i ;
   
  +            for (i = 0; i < pCmd -> numCompileTimePerlCode; i++)
  +                {
  +                if (embperl_CompileToPerlCode (pDomTree, pNode, pCmd -> 
sCompileTimePerlCode[i], &pCode))
  +                    {
  +                    SV * pSV ;
  +                 int   rc ;
  +
  +                 if (pCode)
  +                        {
  +                     int l = ArrayGetSize (pCode) ;
  +                     if (pCurrReq -> bDebug & dbgParse)
  +                         lprintf (pCurrReq, "[%d]EPCOMP: #%d CompileTimeCode:    
%*.*s\n", pCurrReq -> nPid, pNode -> xNdx, l, l, pCode) ; 
  +
  +                     pSV = newSVpvf("package %s ; \n#line %d %s\n%*.*s",
  +                             pCurrReq -> Buf.sEvalPackage, pCurrReq ->  
Buf.nSourceline, pCurrReq ->  Buf.pFile -> sSourcefile, l,l, pCode) ;
  +                     if ((rc = EvalDirect (pCurrReq, pSV)) != ok)
  +                         LogError (pCurrReq, rc) ;
  +                     SvREFCNT_dec(pSV);
  +                     }
  +                    break ;
  +                    }
  +                }
               for (i = 0; i < pCmd -> numPerlCode; i++)
                   {
                   if (embperl_CompileToPerlCode (pDomTree, pNode, pCmd -> 
sPerlCode[i], &pCode))
  @@ -776,6 +837,7 @@
       SV **    ppSV ;
       tNode    xNode ;
       tDomTree *       pDomTree ;
  +    tDomTree *       pCurrDomTree ;
       clock_t  cl1 = clock () ;
       clock_t  cl2  ;
       clock_t  cl3  ;
  @@ -807,7 +869,7 @@
        *ppSV = newSViv(r -> xCurrDomTree) ;
          /* SvREFCNT_inc (*ppSV) ; */  
       lprintf (r, "IV ppSV=%s type=%d\n", *ppSV?"ok":"NULL", *ppSV?SvTYPE (*ppSV):-1) 
;               
  -     pDomTree = r -> pCurrDomTree ;
  +     pDomTree = DomTree_self (r -> xCurrDomTree) ;
   
        xNode = Node_firstChild (pDomTree, r -> xDocument) ;
   
  @@ -861,8 +923,10 @@
        {
        cl1 = clock () ;
        
  -     if (!(r -> xCurrDomTree  = DomTree_clone (pDomTree, &(r -> pCurrDomTree))))
  +     if (!(r -> xCurrDomTree  = DomTree_clone (pDomTree, &pCurrDomTree)))
            return 1 ;
  +
  +     r -> xDocument = pCurrDomTree -> xDocument ;
   
        if (pSV)
            {
  
  
  
  1.17.2.4  +0 -1      embperl/epdat.h
  
  Index: epdat.h
  ===================================================================
  RCS file: /home/cvs/embperl/epdat.h,v
  retrieving revision 1.17.2.3
  retrieving revision 1.17.2.4
  diff -u -r1.17.2.3 -r1.17.2.4
  --- epdat.h   2000/06/05 13:56:02     1.17.2.3
  +++ epdat.h   2000/06/06 10:25:26     1.17.2.4
  @@ -264,7 +264,6 @@
       tNode    xDocument ;
       tNode    xCurrNode ;
       tIndex   xCurrDomTree ;
  -    tDomTree *       pCurrDomTree ;
       struct tTokenTable *  pTokenTable ;
   
   
  
  
  
  1.1.2.28  +188 -36   embperl/Attic/epdom.c
  
  Index: epdom.c
  ===================================================================
  RCS file: /home/cvs/embperl/Attic/epdom.c,v
  retrieving revision 1.1.2.27
  retrieving revision 1.1.2.28
  diff -u -r1.1.2.27 -r1.1.2.28
  --- epdom.c   2000/06/05 13:56:03     1.1.2.27
  +++ epdom.c   2000/06/06 10:25:27     1.1.2.28
  @@ -29,7 +29,8 @@
   int numStr    = 0 ;
   int numPads   = 0 ;
   
  -tIndex xNoName = 0 ;
  +tIndex xNoName  = 0 ;
  +tIndex xDomTreeAttr = 0 ;
   
   #define dom_malloc(s)  (nMemUsage += s, malloc(s))
   #define dom_free(s)    (free(s))
  @@ -398,7 +399,8 @@
   
       numStr+=2 ;
   
  -    xNoName = String2Ndx ("<noname>", 8) ;
  +    xNoName  = String2Ndx ("<noname>", 8) ;
  +    xDomTreeAttr = String2Ndx ("<domtree>", 9) ;
   
       ArrayNew (&pDomTrees, 16, sizeof (tDomTree)) ; 
       ArrayAdd (&pDomTrees, 1) ;
  @@ -450,10 +452,12 @@
       {
       tDomTree * pDomTree ;
       int                 n ;
  +    tNodeData * pDocument ;
   
       n = ArrayAdd (&pDomTrees, 1) ;
       pDomTree = DomTree_self (n) ;
       pDomTree -> xNdx = n ;
  +    pDomTree -> xDocument = pOrgDomTree -> xDocument ;
   
       ArrayClone (pOrgDomTree, &pDomTree -> pLookup) ; 
       ArrayNew (&pDomTree -> pOrder, 128, sizeof (tNode)) ; 
  @@ -461,7 +465,16 @@
       if (pDomTree -> pSV = pOrgDomTree -> pSV)
           SvREFCNT_inc (pDomTree -> pSV) ;
   
  +    pDocument = Node_self (pDomTree, pDomTree -> xDocument) ;
       
  +    if (pDocument -> nType == ntypDocumentFraq)
  +     {
  +     pDocument = Node_selfCloneNode (pDomTree, pDocument, 1) ;
  +     Element_selfSetAttribut (pDomTree, pDocument, NULL, xDomTreeAttr, NULL, 
pDomTree -> xNdx) ;
  +     pDomTree -> xDocument = pDocument -> xNdx ;
  +     }
  +    
  +
       *pNewDomTree = pDomTree  ;
   
       return n ;
  @@ -868,7 +881,7 @@
           
           if (!bAddChild && !bForceAttrValue)
            {
  -         pNew -> xValue = String2Ndx (sText, nTextLen) ;
  +         pNew -> xValue  = sText?String2Ndx (sText, nTextLen):nTextLen ;
            if (pCurrReq -> bDebug & dbgParse)
                lprintf (pCurrReq, "[%d]PARSE: AddNode: +%02d %*s AttributValue 
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) ; 
            pNew -> bFlags |= aflgAttrValue ;
  @@ -1005,7 +1018,76 @@
       return pChild ;
       }
   
  +/* ------------------------------------------------------------------------ */
  +/*                                                                          */
  +/* Node_replaceChild                                                        */
  +/*                                                                          */
  +/* Replace child node                                                       */
  +/*                                                                          */
  +/* ------------------------------------------------------------------------ */
  +
  +
  +tNodeData * Node_selfCloneNode (/*in*/ tDomTree *      pDomTree,
  +                             /*in*/ tNodeData *     pNode,
  +                             /*in*/  int            bDeep)
  +
  +    {
  +    int              len  = sizeof (tNodeData) + (bDeep == -1?0:pNode -> numAttr * 
sizeof (tAttrData)) ; 
  +    tNode       xParent = xNode_selfParentNode (pNode) ;
  +    tNodePad *  pPad = NewPad (pDomTree, xParent, len) ;
  +    tNodeData * pNew = NodePad_selfFirstChild (pDomTree,pPad) ;
  +    tNode    xNewNode ;
  +
  +    memcpy (pNew, pNode, len) ;
  +
  +    xNewNode = ArrayAdd (&pDomTree -> pLookup, 1) ;
  +    pDomTree -> pLookup[xNewNode] = pNew ;
  +    pNew -> xNdx     = xNewNode ;
  +    pNew -> nPadOffset = pPad -> nFill ;
  +
  +    pPad -> numChilds++ ;
  +    pPad -> nFill += len ;
  +    numNodes++ ;
  +
  +    if (bDeep == -1)
  +     pNew -> numAttr = 0 ;
  +    else
  +     {
  +     tAttrData * pAttr = (tAttrData * )(pNew + 1) ;
  +     int         n     = pNew -> numAttr ;
  +
  +     while (n)
  +         {
  +         xNewNode = ArrayAdd (&pDomTree -> pLookup, 1) ;
  +         pDomTree -> pLookup[xNewNode] = pAttr ;
  +         pAttr -> xNdx = xNewNode ;
  +         n-- ;
  +         pAttr++ ;
  +         }
  +     }
  +    if (bDeep < 1)
  +     pNew -> xChilds = 0 ;
   
  +    return pNew ;
  +    }
  +                                
  +
  +
  +
  +tNode Node_cloneNode (/*in*/ tDomTree *      pDomTree,
  +                 /*in*/ tNode            xNode,
  +                 /*in*/  int             bDeep)
  +
  +    {
  +    tNodeData * pNew = Node_selfCloneNode (pDomTree, Node_self (pDomTree, xNode), 
bDeep) ;
  +
  +    if (pNew)
  +     return pNew -> xNdx ;
  +
  +    return 0 ;
  +    }
  +
  +
   /* ------------------------------------------------------------------------ */
   /*                                                                          */
   /* Node_replaceChild                                                        */
  @@ -1016,19 +1098,78 @@
   
   
   
  -tNode Node_replaceChildWithNode (/*in*/ tDomTree *      pParentDomTree,
  -                              /*in*/ tNode           xParent,
  -                                 /*in*/ tDomTree *      pChildDomTree,
  -                              /*in*/ tNode           xChild)
  +tNode Node_replaceChildWithNode (/*in*/ tDomTree *      pDomTree,
  +                              /*in*/ tNode           xNode,
  +                                 /*in*/ tDomTree *      pOldChildDomTree,
  +                              /*in*/ tNode           xOldChild)
   
       {
  -    tNodeData *      pParent = Node_self (pParentDomTree, xParent) ;
  -    tNodeData *      pChild  = Node_self (pChildDomTree, xChild) ;
  +    int              bFlags = nflgModified | nflgReturn ;
  +    tNodeData *      pOldChild  = Node_self (pOldChildDomTree, xOldChild) ;
  +    tNodeData *      pNode      = Node_self (pDomTree, xNode) ;
  +    
   
  -    pParent -> bFlags |= nflgIgnore ;
  -    pParent -> xChilds = Node_selfPad (pChild) -> xNdx ;
  +    if (pOldChild -> bFlags & nflgModified)
  +     {
  +     pOldChild -> bFlags |= bFlags ;
  +     pOldChild = Node_selfCloneNode (pOldChildDomTree, pNode, 1) ;
  +     xOldChild = pOldChild -> xNdx ;
  +     }
  +    else
  +     {
  +     int     len  = sizeof (tNodeData) + pNode -> numAttr * sizeof (tAttrData) ; 
  +     int     numAttr = pOldChild -> numAttr ;
  +     int             nOffset ;
   
  -    return xChild ;
  +     if (pNode -> numAttr > pOldChild -> numAttr)
  +         {
  +         tAttrData *  pNew = ((struct tAttrData * )(pOldChild + 1)) + pOldChild -> 
numAttr ;
  +         tNodePad  *  pPad = Node_selfPad (pOldChild) ;
  +
  +
  +         if (((tUInt8 *)pNew) - ((tUInt8 *)pPad) != pPad -> nFill)
  +             { /* not last child in pad -> move following node to new pad */
  +             NodePad_splitPad (pOldChildDomTree, pPad, (tNodeData *)pNew, 0) ;
  +             }
  +
  +         if (((tUInt8 *)pOldChild) - ((tUInt8 *)pPad) + len > pPad -> nMax)
  +             { /* pad full -> move into new pad */
  +             pPad = NodePad_splitPad (pOldChildDomTree, pPad, pOldChild, len) ;
  +             pOldChild = NodePad_selfFirstChild (pOldChildDomTree, pPad) ;
  +             }
  +             
  +         }
  +     
  +     nOffset = pOldChild -> nPadOffset ;
  +     xOldChild = pOldChild -> xNdx ;
  +     memcpy (pOldChild, pNode, len) ;
  +     
  +
  +     pOldChild -> nPadOffset = nOffset ;
  +     pOldChild -> xNdx       = xOldChild ;
  +     pOldChild -> bFlags |= bFlags ;
  +
  +     if (numAttr > pNode -> numAttr)
  +         {
  +         tAttrData * pAttr = ((struct tAttrData * )(pOldChild + 1)) + pOldChild -> 
numAttr ;
  +         int         n     = numAttr - pNode -> numAttr ;
  +
  +         while (n > 0)
  +             {
  +             pAttr -> bFlags = nflgDeleted ;
  +             n-- ;
  +             pAttr++ ;
  +             }
  +         }       
  +     }
  +
  +    if (pOldChild -> nType == ntypDocumentFraq)
  +     Element_selfSetAttribut (pOldChildDomTree, pOldChild, NULL, xDomTreeAttr, 
NULL, pDomTree -> xNdx) ;
  +
  +     
  +    DomTree_selfCheckpoint (pOldChildDomTree, xOldChild) ;
  +    
  +    return xOldChild ;
       }
   
   
  @@ -1054,22 +1195,9 @@
   
       if (pOldChild -> bFlags & nflgModified)
        {
  -     tNodePad * pPad = NewPad (pDomTree, Node_parentNode (pDomTree, xOldChild), 0) ;
  -     
  -     tNodeData * pNew = (struct tNodeData *)(pPad + 1) ;
  -
        pOldChild -> bFlags |= bFlags ;
  -     memcpy (pNew, pOldChild, sizeof (*pNew)) ;
  -
  -     xOldChild = ArrayAdd (&pDomTree -> pLookup, 1) ;
  -     pDomTree -> pLookup[xOldChild] = pNew ;
  -     pNew -> xNdx    = xOldChild ;
  -     pNew -> nPadOffset = pPad -> nFill ;
  -
  -     pPad -> numChilds++ ;
  -     pPad -> nFill += sizeof (tNodeData) + pNew -> numAttr * sizeof (tAttrData) ;
  -     numNodes++ ;
  -     pOldChild = pNew ; 
  +     pOldChild = Node_selfCloneNode (pDomTree, pOldChild, 0) ;
  +     xOldChild = pOldChild -> xNdx ;
        }
       
       DomTree_selfCheckpoint (pDomTree, xOldChild) ;
  @@ -1129,6 +1257,23 @@
   
   /* ------------------------------------------------------------------------ */
   /*                                                                          */
  +/* Node_selfParentNode                                                      */
  +/*                                                                          */
  +/* Get parent node                                                       */
  +/*                                                                          */
  +/* ------------------------------------------------------------------------ */
  +
  +
  +tNode xNode_selfParentNode  (/*in*/  tNodeData *     pNode) 
  +
  +    {
  +    tNodePad *       pPad    = (struct tNodePad * )(((tUInt8 *)pNode) - pNode -> 
nPadOffset) ;
  +    return pPad -> xParent ;
  +    }
  +
  +
  +/* ------------------------------------------------------------------------ */
  +/*                                                                          */
   /* Node_firstChild                                                          */
   /*                                                                          */
   /* Get first child node                                                          */
  @@ -1299,14 +1444,13 @@
       tNodeData * pNextNode ;
       tNodeData * pSavedNode = NULL ;
       tNodeData * pLastStartTag = NULL ;
  -    struct tNodeData * pNode = Node_self (pDomTree, xNode) ;
  +    tNodeData * pNode = Node_self (pDomTree, xNode) ;
  +    tNodeData * pFirstNode = pNode ;
  +    
       
       
       if (pNode -> nType == ntypDocumentFraq)
  -        {
  -        Node_toString (DomTree_self (Node_selfPad(pNode) -> xDomTree), r, pNode -> 
xNdx) ; 
  -        return ;
  -        }
  +     pDomTree = DomTree_self (Element_selfGetAttribut (pDomTree, pNode, NULL, 
xDomTreeAttr) -> xValue) ;
       
       pNode = Node_selfFirstChild (pDomTree, pNode) ;
   
  @@ -1367,6 +1511,11 @@
   
        if (pNode -> bFlags & nflgIgnore)
               ;
  +     else if (pNode -> nType == ntypDocumentFraq)
  +         {
  +         Node_toString (pDomTree, r, pNode -> xNdx) ; 
  +         oputs (r, "\r\n") ;
  +         }
           else if (pNode -> nType == ntypTag || pNode -> nType == ntypStartTag)
            {
            int n = pNode -> numAttr ;
  @@ -1431,7 +1580,10 @@
            }
   
        
  -     pNextNode = Node_selfFirstChild (pDomTree, pNode) ;
  +     if (pNode -> nType == ntypDocumentFraq)
  +         pNextNode = NULL ;
  +     else
  +         pNextNode = Node_selfFirstChild (pDomTree, pNode) ;
        if (pNextNode == NULL)
            {
            if (pSavedNode)
  @@ -1441,7 +1593,7 @@
            while (pNextNode == NULL)
                {
                pNextNode = Node_selfParentNode (pDomTree, pNode) ;
  -             if (pNextNode == NULL || pNextNode -> xNdx == xFirstNode)
  +             if (pNextNode == NULL || pNextNode  == pFirstNode)
                       {
                       *pOrderNdx = nOrderNdx ;
                       return ;
  @@ -1562,7 +1714,7 @@
                                      /*in*/ int                nAttrNameLen) 
   
       {
  -    int nAttrName = String2Ndx (sAttrName, nAttrNameLen) ;
  +    int nAttrName = sAttrName?String2Ndx (sAttrName, nAttrNameLen):nAttrNameLen ;
       struct tAttrData * pAttr = (struct tAttrData * )(pNode + 1) ;
       int  n = pNode -> numAttr ;
   
  @@ -1630,7 +1782,7 @@
   
       if (pAttr)
        {
  -     pAttr -> xValue = String2Ndx (sNewValue, nNewValueLen) ;
  +     pAttr -> xValue = sNewValue?String2Ndx (sNewValue, nNewValueLen):nNewValueLen ;
        return pAttr ;
        }
   
  
  
  
  1.1.2.22  +6 -0      embperl/Attic/epdom.h
  
  Index: epdom.h
  ===================================================================
  RCS file: /home/cvs/embperl/Attic/epdom.h,v
  retrieving revision 1.1.2.21
  retrieving revision 1.1.2.22
  diff -u -r1.1.2.21 -r1.1.2.22
  --- epdom.h   2000/06/05 13:56:03     1.1.2.21
  +++ epdom.h   2000/06/06 10:25:27     1.1.2.22
  @@ -162,6 +162,7 @@
   extern tDomTree  *    pDomTrees ;         /* Array with all Dom Trees */
   extern HE * *              pStringTableArray  ;   /* Array with pointers to strings 
*/
   extern tIndex              xNoName ;              /* String index for Attribut with 
noname */
  +extern tIndex              xDomTreeAttr ;         /* String index for Attribut 
which holds the DomTree index */
   
   
   
  @@ -229,6 +230,8 @@
   tNodeData * Node_selfParentNode  (/*in*/  tDomTree * pDomTree,
                                  /*in*/  tNodeData *   pNode) ;
   
  +tNode xNode_selfParentNode  (/*in*/  tNodeData *     pNode) ;
  +
   tNode Node_firstChild  (/*in*/ tDomTree *  pDomTree,
                        /*in*/  tNode            xNode) ;
   
  @@ -257,6 +260,9 @@
   #define Node_nodeName(pDomTree,pNode)            (Ndx2String (Node_self 
(pDomTree,xNode) -> nText))
   #define Node_selfPad(pNode)        ((struct tNodePad * )(((tUInt8 *)pNode) - pNode 
-> nPadOffset))
   
  +tNodeData * Node_selfCloneNode (/*in*/ tDomTree *      pDomTree,
  +                             /*in*/ tNodeData *     pNode,
  +                             /*in*/  int            bDeep) ;
   
   void Node_toString (/*in*/ tDomTree *  pDomTree,
                    /*i/o*/ register req * r,
  
  
  
  1.65.2.8  +8 -3      embperl/epmain.c
  
  Index: epmain.c
  ===================================================================
  RCS file: /home/cvs/embperl/epmain.c,v
  retrieving revision 1.65.2.7
  retrieving revision 1.65.2.8
  diff -u -r1.65.2.7 -r1.65.2.8
  --- epmain.c  2000/06/05 13:56:03     1.65.2.7
  +++ epmain.c  2000/06/06 10:25:27     1.65.2.8
  @@ -2448,7 +2448,7 @@
                
            #ifdef EP2
            if (!bError)
  -             Node_toString (r -> pCurrDomTree, r, r -> xDocument) ;
  +             Node_toString (DomTree_self (r -> xCurrDomTree), r, r -> xDocument) ;
            #endif
            oputs (r, "\r\n") ;
                
  @@ -2467,7 +2467,7 @@
                   tReq * l = r -> pLastReq ;
                #ifdef EP2
                if (!bError)
  -                 Node_replaceChildWithNode (l -> pCurrDomTree, l -> xCurrNode, r -> 
pCurrDomTree, r -> xDocument) ;
  +                 Node_replaceChildWithNode (DomTree_self (r -> xCurrDomTree), r -> 
xDocument, DomTree_self (l -> xCurrDomTree), l -> xCurrNode) ;
                   #else
                   l -> pFirstBuf   = r -> pFirstBuf  ;
                   l -> pLastBuf    = r -> pLastBuf   ;
  @@ -2480,7 +2480,7 @@
                   oCommit (r, NULL) ;
                #ifdef EP2
                if (!bError)
  -                 Node_toString (r -> pCurrDomTree, r, r -> xDocument) ;
  +                 Node_toString (DomTree_self (r -> xCurrDomTree), r, r -> 
xDocument) ;
                #endif
                }
            }
  @@ -2490,6 +2490,11 @@
           oRollbackOutput (r, NULL) ;
           if (bOutToMem)
               sv_setsv (pOut, &sv_undef) ;
  +     #ifdef EP2
  +     else
  +         Node_toString (DomTree_self (r -> xCurrDomTree), r, r -> xDocument) ;
  +     
  +     #endif
           }    
   
       if (!r -> bAppendToMainReq)
  
  
  
  1.1.2.21  +24 -14    embperl/Attic/epparse.c
  
  Index: epparse.c
  ===================================================================
  RCS file: /home/cvs/embperl/Attic/epparse.c,v
  retrieving revision 1.1.2.20
  retrieving revision 1.1.2.21
  diff -u -r1.1.2.20 -r1.1.2.21
  --- epparse.c 2000/06/05 13:56:03     1.1.2.20
  +++ epparse.c 2000/06/06 10:25:29     1.1.2.21
  @@ -447,6 +447,7 @@
       char * pCurrStart = pCurr ;
       tNode xNewNode ;
       int          rc ;
  +    tDomTree * pDomTree = DomTree_self (r -> xCurrDomTree) ;
       
       while (pCurr < pEnd)
           {
  @@ -524,7 +525,7 @@
                               r -> bEscInUrl = 0 ;
                               }
   
  -                     if (!(xNewNode = Node_appendChild (r -> pCurrDomTree, 
nCDataType, 0, pCurrStart, pCurrTokenStart - pCurrStart, xParentNode, level)))
  +                     if (!(xNewNode = Node_appendChild (pDomTree, nCDataType, 0, 
pCurrStart, pCurrTokenStart - pCurrStart, xParentNode, level)))
                            return 1 ;
                        }
                    pCurrStart = pCurrTokenStart ;
  @@ -548,23 +549,23 @@
                                   r -> bEscInUrl = 0 ;
                                   }
   
  -                         if (!(xNewAttrNode = Node_appendChild (r -> pCurrDomTree, 
pToken -> nCDataType, 0, pCurr, pEndCurr - pCurr, xParentNode, level+1)))
  +                         if (!(xNewAttrNode = Node_appendChild (pDomTree, pToken -> 
nCDataType, 0, pCurr, pEndCurr - pCurr, xParentNode, level+1)))
                                return 1 ;
                            }
                        pCurr = pEndCurr + strlen (pToken -> sEndText) ;
                        }
                    level-- ;
  -                 xParentNode = Node_parentNode  (r -> pCurrDomTree, xParentNode) ;
  +                 xParentNode = Node_parentNode  (pDomTree, xParentNode) ;
                    }
                else
                    {
                    if (pToken -> nNodeType == ntypEndStartTag && level > 0)
                        {
  -                     xParentNode = Node_parentNode  (r -> pCurrDomTree, 
xParentNode) ;
  +                     xParentNode = Node_parentNode  (pDomTree, xParentNode) ;
                        level-- ;
                        }
                    /* add token as node */
  -                    if (!(xNewNode = Node_appendChild (r -> pCurrDomTree, pToken -> 
nNodeType, (nCDataType == ntypAttrValue && pToken -> nNodeType != ntypAttr), 
pNodeName, strlen (pNodeName), xParentNode, level)))
  +                    if (!(xNewNode = Node_appendChild (pDomTree, pToken -> 
nNodeType, (nCDataType == ntypAttrValue && pToken -> nNodeType != ntypAttr), 
pNodeName, strlen (pNodeName), xParentNode, level)))
                        return rc ;
                    
                    if (pInside = pToken -> pInside)
  @@ -601,7 +602,7 @@
                                       r -> bEscInUrl = 0 ;
                                       }
   
  -                             if (!(xNewAttrNode = Node_appendChild (r -> 
pCurrDomTree, pToken -> nCDataType, 0, pCurr, pEndCurr - pCurr, xNewNode, level+1)))
  +                             if (!(xNewAttrNode = Node_appendChild (pDomTree, 
pToken -> nCDataType, 0, pCurr, pEndCurr - pCurr, xNewNode, level+1)))
                                    return 1 ;
                                }
                            pCurr = pEndCurr + nSkip ;
  @@ -622,7 +623,7 @@
               {
            if (pCurr - pCurrStart && nCDataType)
                {
  -             if (!(xNewNode = Node_appendChild (r -> pCurrDomTree, nCDataType, 0, 
pCurrStart, pCurr - pCurrStart, xParentNode, level)))
  +             if (!(xNewNode = Node_appendChild (pDomTree, nCDataType, 0, 
pCurrStart, pCurr - pCurrStart, xParentNode, level)))
                    return 1 ;
                }
               *ppCurr = pCurr ;
  @@ -632,7 +633,7 @@
            (*pCurr == *sEndText && strncmp (pCurr, sEndText, nEndText) == 0))
               {
            if ((pCurr - pCurrStart != 0 || nCDataType == ntypAttrValue) && nCDataType)
  -             if (!(xNewNode = Node_appendChild (r -> pCurrDomTree,  nCDataType, 0, 
pCurrStart, pCurr - pCurrStart, xParentNode, level)))
  +             if (!(xNewNode = Node_appendChild (pDomTree,  nCDataType, 0, 
pCurrStart, pCurr - pCurrStart, xParentNode, level)))
                    return 1 ;
               pCurr += nEndText ;
               *ppCurr = pCurr ;
  @@ -643,7 +644,7 @@
           }
           
       if (nCDataType)
  -     if (!(xNewNode = Node_appendChild (r -> pCurrDomTree,  nCDataType, 
0,pCurrStart, pCurr - pCurrStart, xParentNode, level)))
  +     if (!(xNewNode = Node_appendChild (pDomTree,  nCDataType, 0,pCurrStart, pCurr 
- pCurrStart, xParentNode, level)))
            return 1 ;
   
       *ppCurr = pCurr ;
  @@ -668,23 +669,32 @@
       char * pEnd   = r -> Buf.pEndPos ;
       int          rc ;
       tNode   xDocNode ;
  +    tNode   xNode ;
  +    tDomTree * pDomTree = DomTree_self (r -> xCurrDomTree) ;
   
   
  -    if (!(r -> xCurrDomTree  = DomTree_new (&(r -> pCurrDomTree))))
  +    if (!(r -> xCurrDomTree  = DomTree_new (&pDomTree)))
        return 1 ;
   
       
  -    if (!(xDocNode = Node_appendChild (r -> pCurrDomTree,  ntypTag, 0, "attr", 3, 
0, 0)))
  +    if (!(xDocNode = Node_appendChild (pDomTree,  ntypTag, 0, "attr", 3, 0, 0)))
        return 1 ;
   
  -    if (!(xDocNode = Node_appendChild (r -> pCurrDomTree,  r -> 
bSubReq?ntypDocumentFraq:ntypDocument, 0, "doc", 3, 0, 0)))
  +    if (!(xDocNode = Node_appendChild (pDomTree,  r -> 
bSubReq?ntypDocumentFraq:ntypDocument, 0, "doc", 3, 0, 0)))
        return 1 ;
       
  +    if (!(xNode = Node_appendChild (pDomTree,  ntypAttr, 0, NULL, xDomTreeAttr, 
xDocNode, 0)))
  +     return 1 ;
  +
  +    if (!(xNode = Node_appendChild (pDomTree,  ntypAttrValue, 0, NULL, r -> 
xCurrDomTree, xNode, 0)))
  +     return 1 ;
  +
  +    pDomTree -> xDocument = xDocNode ;
  +    r -> xDocument = xDocNode ;
  +
       if ((rc = ParseTokens (r, &pStart, pEnd, r -> pTokenTable, "", NULL, ntypCDATA, 
0, 0, "root", xDocNode, 0)) != ok)
        return rc ; 
   
  -    r -> pCurrDomTree -> xDocument = xDocNode ;
  -    r -> xDocument = xDocNode ;
   
   
       return ok ;
  
  
  
  1.57.2.16 +21 -21    embperl/test.pl
  
  Index: test.pl
  ===================================================================
  RCS file: /home/cvs/embperl/test.pl,v
  retrieving revision 1.57.2.15
  retrieving revision 1.57.2.16
  diff -u -r1.57.2.15 -r1.57.2.16
  --- test.pl   2000/06/05 06:44:05     1.57.2.15
  +++ test.pl   2000/06/06 10:25:29     1.57.2.16
  @@ -52,32 +52,32 @@
       'upload.htm?multval=A&multval=B&multval=C&single=S',
       'reqrec.htm',
       'reqrec.htm',
  -    'include.htm',
  +    'rawinput/include.htm????16',
       'includeerr1.htm???1',
  -    'includeerr2.htm???4',
  +    'includeerr2.htm???1',
       'registry/Execute.htm',
       'registry/errpage.htm???16',
       'registry/tied.htm???3',
       'registry/tied.htm???3',
  -    'callsub.htm',
  -    'callsub.htm',
  -    'importsub.htm',
  -    'importsub.htm',
  -    'importsub2.htm',
  -    'importmodule.htm',
  -    'recursexec.htm',
  +##    'callsub.htm',
  +##    'callsub.htm',
  +##    'importsub.htm',
  +##    'importsub.htm',
  +##    'importsub2.htm',
  +##    'importmodule.htm',
  +##    'recursexec.htm',
       'nph/div.htm????64',
  -    'nph/npherr.htm???8?64',
  +##    'nph/npherr.htm???8?64',
       'nph/nphinc.htm????64',
       'sub.htm',
       'sub.htm',
  -    'exit.htm',
  -    'exit2.htm',
  -    'exit3.htm',
  +##    'exit.htm',
  +##    'exit2.htm',
  +##    'exit3.htm',
       'chdir.htm?a=1&b=2&c=&d=&f=5&g&h=7&=8&=',
       'chdir.htm?a=1&b=2&c=&d=&f=5&g&h=7&=8&=',
       'allform/allform.htm?a=1&b=2&c=&d=&f=5&g&h=7&=8&=???8192',
  -    'stdout/stdout.htm????16384',
  +##    'stdout/stdout.htm????16384',
       'nochdir/nochdir.htm?a=1&b=2???384',
       'match/div.htm',
       'match/div.asc',
  @@ -85,11 +85,11 @@
       'div.htm',
       'taint.htm???1',
       'ofunc/div.htm',
  -    'safe/safe.htm???-1?4',
  -    'safe/safe.htm???-1?4',
  -    'safe/safe.htm???-1?4',
  -    'opmask/opmask.htm???-1?12?TEST',
  -    'opmask/opmasktrap.htm???2?12?TEST',
  +##    'safe/safe.htm???-1?4',
  +##    'safe/safe.htm???-1?4',
  +##    'safe/safe.htm???-1?4',
  +##    'opmask/opmask.htm???-1?12?TEST',
  +##    'opmask/opmasktrap.htm???2?12?TEST',
       'mdatsess.htm?cnt=0',
       'setsess.htm?a=1',
       'mdatsess.htm?cnt=1',
  @@ -901,9 +901,9 @@
                    
                   $err = CheckError (8) if ($err == 0) ;
   
  -                if (@errors != 12)
  +                if (@errors != 2)
                       {
  -                    print "\n\n\@errors does not return correct number of errors 
(is " . scalar(@errors) . ", should 12)\n" ;
  +                    print "\n\n\@errors does not return correct number of errors 
(is " . scalar(@errors) . ", should 2)\n" ;
                       $err = 1 ;
                       }
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.21  +18 -12    embperl/Embperl/Attic/Syntax.pm
  
  Index: Syntax.pm
  ===================================================================
  RCS file: /home/cvs/embperl/Embperl/Attic/Syntax.pm,v
  retrieving revision 1.1.2.20
  retrieving revision 1.1.2.21
  diff -u -r1.1.2.20 -r1.1.2.21
  --- Syntax.pm 2000/06/05 13:56:06     1.1.2.20
  +++ Syntax.pm 2000/06/06 10:25:36     1.1.2.21
  @@ -10,7 +10,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: Syntax.pm,v 1.1.2.20 2000/06/05 13:56:06 richter Exp $
  +#   $Id: Syntax.pm,v 1.1.2.21 2000/06/06 10:25:36 richter Exp $
   #
   ###################################################################################
   
  @@ -140,7 +140,7 @@
           'unescape' => 1,
           'procinfo' => {
               embperl =>  { 
  -                        perlcode => 'if (!$first++) { %#0% } ;',
  +                        compiletimeperlcode => '%#0%;',
                           removenode  => 3,
                           compilechilds => 0,
                           }
  @@ -402,16 +402,16 @@
           'nodetype'   => ntypEndTag, 
           'cdatatype'  => 0,
            },
  -    'th' => {
  -        'text' => 'th',
  -        'nodetype'   => ntypStartTag, 
  -        %HtmlTagsStd,
  -         },
  -    '/th' => {
  -        'text' => '/th',
  -        'nodetype'   => ntypEndTag, 
  -        'cdatatype'  => 0,
  -         },
  +#    'th' => {
  +#        'text' => 'th',
  +#        'nodetype'   => ntypStartTag, 
  +#        %HtmlTagsStd,
  +#         },
  +#    '/th' => {
  +#        'text' => '/th',
  +#        'nodetype'   => ntypEndTag, 
  +#        'cdatatype'  => 0,
  +#         },
       'select' => {
           'text' => 'select',
           'nodetype'   => ntypStartTag, 
  @@ -824,6 +824,12 @@
   =item perlcodeend => <string> 
   
   Code to generate at the end of the block.
  +
  +=item compiletimeperlcode => <string> or <arrayref>
  +
  +Code that is executed at compile time. You can also specify a arrayref of string.
  +The first string which contains matching attributes are used.
  +The same special strings are replaced as in C<perlcode>.
   
   =item perlcoderemove => 0/1
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.2.2.1   +39 -12    embperl/test/cmp/div.htm
  
  Index: div.htm
  ===================================================================
  RCS file: /home/cvs/embperl/test/cmp/div.htm,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- div.htm   1998/10/29 20:14:34     1.2
  +++ div.htm   2000/06/06 10:25:39     1.2.2.1
  @@ -43,16 +43,38 @@
   $e = 2 <BR>
   
   a <br>
  +
  +
  +
   a <br>
  +
  +
  +
   a <br>
       b is null <br>
  -    a <br>
  +    
  +
  +
  +
  +a <br>
       b is null <br>
  -    a<br>
  +    
  +
  +
  +
  +a<br>
       b is null <br>
  -    <table></table>
  +    
  +
  +
   
   
  +
  +
  +
  +<table></table>
  +
  +
   <p> $tabmode = default <p>
   
   <hr><p>Display an two dimensional array with one, two and three columns !<BR>
  @@ -93,17 +115,20 @@
           <th>2</th>
           <th>3</th>
       </tr> 
  -    <tr>
  +    
  +     <tr>
           <td>a1/1 </td>
       </tr> 
  - 
  -    <tr>
  +
  +    
  +     <tr>
           <td>a2/1 </td>
       
           <td>a2/2 </td>
       </tr> 
  - 
  -    <tr>
  +
  +    
  +     <tr>
           <td>a3/1 </td>
       
           <td>a3/2 </td>
  @@ -120,16 +145,19 @@
       
           <th>b3/3</th>
       </tr> 
  +     
       <tr>
           <td>a1/1 </td>
       </tr> 
  - 
  +
  +    
       <tr>
           <td>a2/1 </td>
       
           <td>a2/2 </td>
       </tr> 
  - 
  +
  +    
       <tr>
           <td>a3/1 </td>
       
  @@ -285,7 +313,7 @@
       </tr> 
   </table>
   
  -^<P>.*?<P>
  +<P>2.0b1_dev<P>
   
   <P>17<P>
   <P>1<P>
  @@ -336,4 +364,3 @@
   
   </body>
   </html>
  -
  
  
  
  1.7.2.1   +113 -65   embperl/test/cmp/include.htm
  
  Index: include.htm
  ===================================================================
  RCS file: /home/cvs/embperl/test/cmp/include.htm,v
  retrieving revision 1.7
  retrieving revision 1.7.2.1
  diff -u -r1.7 -r1.7.2.1
  --- include.htm       2000/03/29 07:00:42     1.7
  +++ include.htm       2000/06/06 10:25:39     1.7.2.1
  @@ -6,87 +6,135 @@
   
   <h1>Embperl Tests - Include other Embperl pages via Execute</h1>
   
  -
  -<H1> 1.) Include from memory</H1>
  -
  +<H1> 1.) Include from memory</H1> 
  + 
   <P>Here is some text</P>
  -<H1> 2.) Include from memory with some Embperl code</H1>
  -
  -<table><tr><td>a1</td><td>b2</td><td>c3</td></tr></table></P>
  -<H1> 3.) Include from memory with passing of variables</H1>
  -
  -
  +<H1> 2.) Include from memory with some Embperl code</H1> 
  + 
  +<table><tr><td>a1</td> <td>b2</td> <td>c3</td> </tr> </table> </P>
  +<H1> 3.) Include from memory with passing of variables</H1> 
  + 
  + 
   <P>Transfer some vars Some Var !</P>
  -<H1> 4.) Change the variable, but not the code</H1>
  -
  +<H1> 4.) Change the variable, but not the code</H1> 
  + 
   <P>Transfer some vars Do it again !</P>
  -<H1> 5.) Use \@param to pass parameters</H1>
  -
  -
  +<H1> 5.) Use \@param to pass parameters</H1> 
  + 
  + 
   <P>Use @param to transfer some data (1 2 3 4) !</P>
  -<H1> 6.) Use \@param to pass parameters and return it</H1>
  -
  -<H3> $p[0] is vara and $p[1] is varb<H3>
  -
  +<H1> 6.) Use \@param to pass parameters and return it</H1> 
  + 
  +<H3> $p[0] is vara and $p[1] is varb<H3> 
  + 
   <P>Got data in @param (vara varb) !</P><P>Change data in @param to (newA newB) !</P>
  -<H3> $p[0] is now newA and $p[1] is now newB <H3>
  -
  -<H1> 7.) Presetup \%fdat and \@ffld</H1>
  -
  +<H3> $p[0] is now newA and $p[1] is now newB <H3> 
  + 
  +<H1> 7.) Presetup \%fdat and \@ffld</H1> 
  + 
   
<P><table><tr><td>fdat</td><td>text</td></tr><tr><td>test</td><td>value</td></tr></table></P>
  -<H1> 8.) Inculde a file</H1>
  -
  +<H1> 8a.) Include a file</H1> 
  + 
   
   Here it starts with some HTML Text<P>
   
   All values should be undefined at the first include and
   apear at the second include:
   <P>
  -
  -$a =  <BR>
  -$b =  <BR>
  -$c =  <BR>
  -$d =  <BR>
  -$e =  <BR>
  -
  -
  -First of all assign a value:
  -<BR>
   
  -Now we have some 'Umlaute':
  -
  -
  -Now lets look what we are getting from this:<BR>
  -(this is the value in $a) (this is the value in $a) &auml;&ouml;&uuml;<BR>
  -
  -And now a and b together: (this is the value in $a)(this is the value in $a) 
&auml;&ouml;&uuml;<P>
  -
  -Here we have some HTML tags within the perl code, Embperl will delete them!<BR>
  -
  +$a =  <BR> 
  +$b =  <BR> 
  +$c =  <BR> 
  +$d =  <BR> 
  +$e =  <BR> 
  + 
  + 
  +First of all assign a value: 
  +<BR> 
  + 
  +Now we have some 'Umlaute': 
  + 
  + 
  +Now lets look what we are getting from this:<BR> 
  +(this is the value in $a) (this is the value in $a) 
&amp;auml;&amp;ouml;&amp;uuml;<BR> 
  + 
  +And now a and b together: (this is the value in $a)(this is the value in $a) 
&amp;auml;&amp;ouml;&amp;uuml;<P> 
  + 
  +Here we have some HTML tags within the perl code, Embperl will delete them!<BR> 
  + 
   57
  -SELECT *  FROM a ORDER BY b USING &lt;; Hi There&gt;
  -Here we have something which looks like a HTML tag, but does not start with<br>
  -a character, Embperl does not change them!<BR>
  -
  +SELECT * &lt;br&gt; FROM a ORDER BY b USING &lt;; Hi There&gt;
  +Here we have something which looks like a HTML tag, but does not start with<br> 
  +a character, Embperl does not change them!<BR> 
  + 
   SELECT * FROM a ORDER BY b USING &lt;; Hi There&gt;
  -Embperl will also translate HMTL escapes to the right characters i.e. $a &amp;lt; 6 
will get the perl expression $a &lt; 6: <BR>
  -
  +Embperl will also translate HMTL escapes to the right characters i.e. $a &amp;lt; 6 
will get the perl expression $a &lt; 6: <BR> 
  + 
   1
  -Now they should have a value
  +Now they should have a value 
  + 
  +$a = (this is the value in $a) <BR> 
  +$b = (this is the value in $a) &amp;auml;&amp;ouml;&amp;uuml; <BR> 
  +$c = 57 <BR> 
  +$d = 1 <BR> 
  +$e = 2 <BR> 
  + 
  +<P>Ok.<P> 
   
  -$a = (this is the value in $a) <BR>
  -$b = (this is the value in $a) &auml;&ouml;&uuml; <BR>
  -$c = 57 <BR>
  -$d = 1 <BR>
  -$e = 2 <BR>
   
  -<P>Ok.<P>
  +<H1> 8b.) Include again the same file </H1> 
  + 
   
  +Here it starts with some HTML Text<P>
   
  -<H1> 9.) Inculde a file and return output in a scalar</H1>
  +All values should be undefined at the first include and
  +apear at the second include:
  +<P>
   
  +$a = (this is the value in $a) <BR> 
  +$b = (this is the value in $a) &amp;auml;&amp;ouml;&amp;uuml; <BR> 
  +$c = 57 <BR> 
  +$d = 1 <BR> 
  +$e = 2 <BR> 
  +
  +
  +First of all assign a value: 
  +<BR> 
  + 
  +Now we have some 'Umlaute': 
  + 
  + 
  +Now lets look what we are getting from this:<BR> 
  +(this is the value in $a) (this is the value in $a) 
&amp;auml;&amp;ouml;&amp;uuml;<BR> 
  + 
  +And now a and b together: (this is the value in $a)(this is the value in $a) 
&amp;auml;&amp;ouml;&amp;uuml;<P> 
  + 
  +Here we have some HTML tags within the perl code, Embperl will delete them!<BR> 
  + 
  +57
  +SELECT * &lt;br&gt; FROM a ORDER BY b USING &lt;; Hi There&gt;
  +Here we have something which looks like a HTML tag, but does not start with<br> 
  +a character, Embperl does not change them!<BR> 
  + 
  +SELECT * FROM a ORDER BY b USING &lt;; Hi There&gt;
  +Embperl will also translate HMTL escapes to the right characters i.e. $a &amp;lt; 6 
will get the perl expression $a &lt; 6: <BR> 
  + 
  +1
  +Now they should have a value 
  + 
  +$a = (this is the value in $a) <BR> 
  +$b = (this is the value in $a) &amp;auml;&amp;ouml;&amp;uuml; <BR> 
  +$c = 57 <BR> 
  +$d = 1 <BR> 
  +$e = 2 <BR> 
  + 
  +<P>Ok.<P> 
   
   
  +<H1> 9.) Include a file and return output in a scalar</H1> 
  + 
  + 
  + 
   <H3> 
   Here it starts with some HTML Text&lt;P&gt;
   
  @@ -95,7 +143,7 @@
   &lt;P&gt;
   
   $a = (this is the value in $a) &lt;BR&gt;
  -$b = (this is the value in $a) &amp;auml;&amp;ouml;&amp;uuml; &lt;BR&gt;
  +$b = (this is the value in $a) &amp;amp;auml;&amp;amp;ouml;&amp;amp;uuml; 
&lt;BR&gt; 
   $c = 57 &lt;BR&gt;
   $d = 1 &lt;BR&gt;
   $e = 2 &lt;BR&gt;
  @@ -108,14 +156,14 @@
   
   
   Now lets look what we are getting from this:&lt;BR&gt;
  -(this is the value in $a) (this is the value in $a) 
&amp;auml;&amp;ouml;&amp;uuml;&lt;BR&gt;
  +(this is the value in $a) (this is the value in $a) 
&amp;amp;auml;&amp;amp;ouml;&amp;amp;uuml;&lt;BR&gt; 
   
  -And now a and b together: (this is the value in $a)(this is the value in $a) 
&amp;auml;&amp;ouml;&amp;uuml;&lt;P&gt;
  +And now a and b together: (this is the value in $a)(this is the value in $a) 
&amp;amp;auml;&amp;amp;ouml;&amp;amp;uuml;&lt;P&gt; 
   
   Here we have some HTML tags within the perl code, Embperl will delete 
them!&lt;BR&gt;
   
   57
  -SELECT *  FROM a ORDER BY b USING &amp;lt;; Hi There&amp;gt;
  +SELECT * &amp;lt;br&amp;gt; FROM a ORDER BY b USING &amp;lt;; Hi There&amp;gt;
   Here we have something which looks like a HTML tag, but does not start 
with&lt;br&gt;
   a character, Embperl does not change them!&lt;BR&gt;
   
  @@ -126,7 +174,7 @@
   Now they should have a value
   
   $a = (this is the value in $a) &lt;BR&gt;
  -$b = (this is the value in $a) &amp;auml;&amp;ouml;&amp;uuml; &lt;BR&gt;
  +$b = (this is the value in $a) &amp;amp;auml;&amp;amp;ouml;&amp;amp;uuml; 
&lt;BR&gt; 
   $c = 57 &lt;BR&gt;
   $d = 1 &lt;BR&gt;
   $e = 2 &lt;BR&gt;
  @@ -238,7 +286,7 @@
   </table>
   
   
  -<H1> 11.) Inculde a file with parameters</H1>
  +<H1> 11.) Include a file with parameters</H1>
   
   Here is param[0] -> 0<br>
   Here is param[1] -> B<br>
  @@ -248,7 +296,7 @@
   
   
   
  -<H1> 12.) Inculde a file and write outputfile</H1>
  +<H1> 12.) Include a file and write outputfile</H1>
   
   <H1> 12.) Done :-)</H1>
   
  
  
  
  1.2.2.1   +1 -1      embperl/test/cmp/includeerr1.htm
  
  Index: includeerr1.htm
  ===================================================================
  RCS file: /home/cvs/embperl/test/cmp/includeerr1.htm,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- includeerr1.htm   1999/10/05 06:02:11     1.2
  +++ includeerr1.htm   2000/06/06 10:25:39     1.2.2.1
  @@ -2,7 +2,7 @@
   <H1>Internal Server Error</H1>
   The server encountered an internal error or misconfiguration and was unable to 
complete your request.<P>
   ^Please contact the server administrator\,.*?and inform them of the time the error 
occurred\, and anything you might have done that may have caused the error
  -^\[.*?\]ERR\:  24\: Line 10\: Error in Perl code: Can't locate object method 
&quot;is&quot; via package &quot;here&quot; at .*?includeerr1.htm line 10.<p>
  +^\[.*?\]ERR\:  24\: Line \d+\: Error in Perl code: Can't locate object method 
&quot;is&quot; via package &quot;here&quot; at 
   ^ HTML\:\:Embperl.*?<P>
   </BODY></HTML>
   
  
  
  
  1.3.2.1   +5 -10     embperl/test/cmp/includeerr2.htm
  
  Index: includeerr2.htm
  ===================================================================
  RCS file: /home/cvs/embperl/test/cmp/includeerr2.htm,v
  retrieving revision 1.3
  retrieving revision 1.3.2.1
  diff -u -r1.3 -r1.3.2.1
  --- includeerr2.htm   2000/03/28 19:14:11     1.3
  +++ includeerr2.htm   2000/06/06 10:25:40     1.3.2.1
  @@ -2,16 +2,11 @@
   <H1>Internal Server Error</H1>
   The server encountered an internal error or misconfiguration and was unable to 
complete your request.<P>
   ^Please contact the server administrator\,.*?and inform them of the time the error 
occurred\, and anything you might have done that may have caused the error
  -^\[.*?\]ERR\:  32\: Line 6\: Warning in Perl code: Use of uninitialized value
  -^\[.*?\]ERR\:  32\: Line 6\: Warning in Perl code: Use of uninitialized value
  -^\[.*?\]ERR\:  32\: Line 6\: Warning in Perl code: Use of uninitialized value
  -^\[.*?\]ERR\:  32\: Line 18\: Warning in Perl code: Use of uninitialized value
  -^\[.*?\]ERR\:  24\: Line 6\: Error in Perl code: Can't locate object method 
&quot;is&quot; via package &quot;here&quot; at .*?incerr.htm line 6.<p>
  -^\[.*?\]ERR\:  32\: Line 6\: Warning in Perl code: Use of uninitialized value
  -^\[.*?\]ERR\:  24\: Line 6\: Error in Perl code: Can't locate object method 
&quot;is&quot; via package &quot;here&quot; at .*?incerr.htm line 6.<p>
  -^\[.*?\]ERR\:  32\: Line 6\: Warning in Perl code: Use of uninitialized value
  -^\[.*?\]ERR\:  24\: Line 6\: Error in Perl code: Can't locate object method 
&quot;is&quot; via package &quot;here&quot; at .*?incerr.htm line 6.<p>
  -^\[.*?\]ERR\:  32\: Line 6\: Warning in Perl code: Use of uninitialized value
  +^\[.*?\]ERR\:  32\: Line \d+\: Warning in Perl code: Use of uninitialized value
  +^\[.*?\]ERR\:  32\: Line \d+\: Warning in Perl code: Use of uninitialized value
  +^\[.*?\]ERR\:  32\: Line \d+\: Warning in Perl code: Use of uninitialized value
  +^\[.*?\]ERR\:  32\: Line \d+\: Warning in Perl code: Use of uninitialized value
  +^\[.*?\]ERR\:  24\: Line \d+\: Error in Perl code: Can't locate object method 
.*?is.*? via package .*?here.*? at 
   ^ HTML\:\:Embperl.*?<P>
   </BODY></HTML>
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1.2.1 +6 -2      embperl/test/html/div.htm
  
  Index: div.htm
  ===================================================================
  RCS file: /home/cvs/embperl/test/html/div.htm,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.1.2.1
  diff -u -r1.1.2.1 -r1.1.2.1.2.1
  --- div.htm   1998/07/14 20:11:20     1.1.2.1
  +++ div.htm   2000/06/06 10:25:41     1.1.2.1.2.1
  @@ -169,20 +169,24 @@
   </table>
   
   <table border="2" width="100%">
  -    <tr>
  +    [$ if $row == 0 $]
  +     <tr>
           <th>1</th>
           <th>2</th>
           <th>3</th>
       </tr> 
  -    <tr>
  +    [$endif$]
  +     <tr>
           <td>[+ $a[$row][$col] +] </td>
       </tr> 
   </table>
   
   <table border="2" width="100%">
  +    [$ if $row == 0 $]
       <tr>
           <th>[+ $b[2][$col] +]</th>
       </tr> 
  +     [$endif$]
       <tr>
           <td>[+ $a[$row][$col] +] </td>
       </tr> 
  
  
  
  1.1.2.1.2.1 +2 -2      embperl/test/html/inc.htm
  
  Index: inc.htm
  ===================================================================
  RCS file: /home/cvs/embperl/test/html/inc.htm,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.1.2.1
  diff -u -r1.1.2.1 -r1.1.2.1.2.1
  --- inc.htm   1998/07/14 20:11:20     1.1.2.1
  +++ inc.htm   2000/06/06 10:25:42     1.1.2.1.2.1
  @@ -27,7 +27,7 @@
   
   Here we have some HTML tags within the perl code, Embperl will delete them!<BR>
   
  -[+ $c = <BR> 6 + 17 <font size="3"> * 3 +]
  +[+ $c =  6 + 17 * 3 +]
   [+ "SELECT * <br> FROM a ORDER BY b USING <; Hi There>" +]
   
   Here we have something which looks like a HTML tag, but does not start with<br>
  @@ -38,7 +38,7 @@
   Embperl will also translate HMTL escapes to the right characters i.e. $a &amp;lt; 6 
will get the perl expression $a &lt; 6: <BR>
   
   [- $e = 2 -]
  -[+ $d = $e &lt; 6 +]
  +[+ $d = $e < 6 +]
   
   Now they should have a value
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1.2.1 +6 -2      embperl/test/html/nph/div.htm
  
  Index: div.htm
  ===================================================================
  RCS file: /home/cvs/embperl/test/html/nph/div.htm,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.1.2.1
  diff -u -r1.1.2.1 -r1.1.2.1.2.1
  --- div.htm   1998/07/14 20:11:21     1.1.2.1
  +++ div.htm   2000/06/06 10:25:45     1.1.2.1.2.1
  @@ -169,20 +169,24 @@
   </table>
   
   <table border="2" width="100%">
  -    <tr>
  +    [$ if $row == 0 $]
  +     <tr>
           <th>1</th>
           <th>2</th>
           <th>3</th>
       </tr> 
  -    <tr>
  +    [$endif$]
  +     <tr>
           <td>[+ $a[$row][$col] +] </td>
       </tr> 
   </table>
   
   <table border="2" width="100%">
  +    [$ if $row == 0 $]
       <tr>
           <th>[+ $b[2][$col] +]</th>
       </tr> 
  +     [$endif$]
       <tr>
           <td>[+ $a[$row][$col] +] </td>
       </tr> 
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1.2.1 +6 -2      embperl/test/html/ofunc/div.htm
  
  Index: div.htm
  ===================================================================
  RCS file: /home/cvs/embperl/test/html/ofunc/div.htm,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.1.2.1
  diff -u -r1.1.2.1 -r1.1.2.1.2.1
  --- div.htm   1998/07/14 20:11:25     1.1.2.1
  +++ div.htm   2000/06/06 10:25:47     1.1.2.1.2.1
  @@ -169,20 +169,24 @@
   </table>
   
   <table border="2" width="100%">
  -    <tr>
  +    [$ if $row == 0 $]
  +     <tr>
           <th>1</th>
           <th>2</th>
           <th>3</th>
       </tr> 
  -    <tr>
  +    [$endif$]
  +     <tr>
           <td>[+ $a[$row][$col] +] </td>
       </tr> 
   </table>
   
   <table border="2" width="100%">
  +    [$ if $row == 0 $]
       <tr>
           <th>[+ $b[2][$col] +]</th>
       </tr> 
  +     [$endif$]
       <tr>
           <td>[+ $a[$row][$col] +] </td>
       </tr> 
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.2.2.1   +2 -2      embperl/test/html/rawinput/rawinput.htm
  
  Index: rawinput.htm
  ===================================================================
  RCS file: /home/cvs/embperl/test/html/rawinput/rawinput.htm,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- rawinput.htm      1999/10/05 06:04:10     1.2
  +++ rawinput.htm      2000/06/06 10:25:49     1.2.2.1
  @@ -59,7 +59,7 @@
   
   
   optRawInput is now: [+ $optRawInput +] <BR>
  -optRawInput is set now to: [+ $optRawInput = 1 +] <BR>
  +optRawInput is set now to: [! $optRawInput = 1 !] <BR>
   optRawInput is now: [+ $optRawInput +] <BR>
   
   [+ $c = "<BR> 6 + 17 <font size=\"3\"> * 3" +]
  @@ -73,7 +73,7 @@
   $c = [+ $c +] <BR>
   
   optRawInput is now: [+ $optRawInput +] <BR>
  -optRawInput is set now to: [+ $optRawInput = 0 +] <BR>
  +optRawInput is set now to: [! $optRawInput = 0 !] <BR>
   optRawInput is now: [+ $optRawInput +] <BR>
   
   [+ $c = "<BR> 6 + 17 <font size=\"3\"> * 3" +]
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +155 -0    embperl/test/html/rawinput/Attic/include.htm
  
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.2.2.1   +1 -1      embperl/test/html/safe/safe.htm
  
  Index: safe.htm
  ===================================================================
  RCS file: /home/cvs/embperl/test/html/safe/safe.htm,v
  retrieving revision 1.2
  retrieving revision 1.2.2.1
  diff -u -r1.2 -r1.2.2.1
  --- safe.htm  1999/12/12 19:32:43     1.2
  +++ safe.htm  2000/06/06 10:25:52     1.2.2.1
  @@ -217,7 +217,7 @@
   </table>
   
   [- @fe = (1, 10, 100, 1000) -]
  -[$ foreach $fe @fe $]
  +[$ foreach $fe (@fe) $]
       [+ $fe +]
   [$ endforeach $]
   
  
  
  

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

Reply via email to