perl-embperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rich...@locus.apache.org
Subject cvs commit: embperl/Embperl Syntax.pm Tokens.pm
Date Thu, 18 May 2000 07:45:05 GMT
richter     00/05/18 00:45:04

  Modified:    .        Tag: Embperl2 Embperl.pm epcomp.c epdom.c epdom.h
                        epmain.c
  Added:       Embperl  Tag: Embperl2 Syntax.pm
  Removed:     Embperl  Tag: Embperl2 Tokens.pm
  Log:
  Embperl 2
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.104.2.4 +2 -2      embperl/Embperl.pm
  
  Index: Embperl.pm
  ===================================================================
  RCS file: /home/cvs/embperl/Embperl.pm,v
  retrieving revision 1.104.2.3
  retrieving revision 1.104.2.4
  diff -u -r1.104.2.3 -r1.104.2.4
  --- Embperl.pm	2000/05/11 07:27:52	1.104.2.3
  +++ Embperl.pm	2000/05/18 07:44:59	1.104.2.4
  @@ -10,7 +10,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: Embperl.pm,v 1.104.2.3 2000/05/11 07:27:52 richter Exp $
  +#   $Id: Embperl.pm,v 1.104.2.4 2000/05/18 07:44:59 richter Exp $
   #
   ###################################################################################
   
  @@ -24,7 +24,7 @@
   require Exporter;
   require DynaLoader;
   
  -use HTML::Embperl::Tokens ;
  +use HTML::Embperl::Syntax ;
   
   use strict ;
   use vars qw(
  
  
  
  1.1.2.7   +25 -3     embperl/Attic/epcomp.c
  
  Index: epcomp.c
  ===================================================================
  RCS file: /home/cvs/embperl/Attic/epcomp.c,v
  retrieving revision 1.1.2.6
  retrieving revision 1.1.2.7
  diff -u -r1.1.2.6 -r1.1.2.7
  --- epcomp.c	2000/05/16 12:44:20	1.1.2.6
  +++ epcomp.c	2000/05/18 07:44:59	1.1.2.7
  @@ -177,7 +177,29 @@
   		    StringAdd (&pProg, "\n",  1) ; 
   		    }
   		}
  -	    if (pCmd -> bRemoveNode)
  +	    if (pCmd -> bRemoveNode & 6)
  +		{
  +		tNodeData *  pNextNode    = Node_selfNextSibling (pDomTree, pNode) ;
  +		const char * sText        = Node_selfNodeName (pNextNode) ;
  +		const char * p            = sText ;
  +
  +		while (*p && isspace (*p++))
  +		    ;
  +
  +		if (*p)
  +		    p-- ;
  +		if (p > sText && (pCmd -> bRemoveNode & 4))
  +		    p-- ;
  +
  +		if (p > sText)
  +		    { /* remove spaces */
  +		    if (*p)
  +			Node_replaceChildWithCDATA(pDomTree, -1, pNextNode -> xNdx, p, strlen (p)) ;
  +		    else
  +			Node_selfRemoveChild(pDomTree, -1, pNextNode) ;
  +		    }
  +		}
  +	    if (pCmd -> bRemoveNode & 1)
   		Node_selfRemoveChild(pDomTree, -1, pNode) ;
   	    }
   	}
  @@ -185,7 +207,7 @@
   
       
       
  -    xChildNode = Node_firstChild (pDomTree, xNode) ;
  +    xChildNode = pNode -> bFlags?Node_firstChild (pDomTree, xNode):0 ;
   
       while (xChildNode)
   	{
  @@ -242,7 +264,7 @@
   	xNode = Node_firstChild (pDomTree, r -> xDocument) ;
   
   	StringNew (&pProg, 8192) ;
  -	StringAdd (&pProg, "my $_ep_DomTree = $_[1]; print LOG \"ARGS = @_\\n\" ; \n", 0)
;
  +	StringAdd (&pProg, "my $_ep_DomTree = $_[1];\n", 0) ;
       
   	while (xNode)
   	    {
  
  
  
  1.1.2.11  +29 -7     embperl/Attic/epdom.c
  
  Index: epdom.c
  ===================================================================
  RCS file: /home/cvs/embperl/Attic/epdom.c,v
  retrieving revision 1.1.2.10
  retrieving revision 1.1.2.11
  diff -u -r1.1.2.10 -r1.1.2.11
  --- epdom.c	2000/05/16 12:44:20	1.1.2.10
  +++ epdom.c	2000/05/18 07:44:59	1.1.2.11
  @@ -748,10 +748,15 @@
   
       {
       struct tNodePad *	pPad = NodePad_self (pDomTree, Node_self (pDomTree, xNode) ->
xChilds) ;
  +    tNodeData * pNode ;
       if (pPad == NULL)
   	return 0 ;
       
  -    return ((struct tNodeData *)(pPad + 1)) -> xNdx ;
  +    pNode = ((tNodeData *)(pPad + 1)) ;
  +    if (!pNode -> bFlags)
  +	pNode = Node_selfNextSibling (pDomTree, pNode) ;
  +
  +    return pNode && pNode -> bFlags?pNode -> xNdx:0 ;
       }
   
   
  @@ -807,11 +812,10 @@
   /* ------------------------------------------------------------------------ */
   
   
  -tNode  Node_nextSibling (/*in*/ tDomTree *   pDomTree,
  -			 /*in*/ tNode            xNode)
  +tNodeData * Node_selfNextSibling (/*in*/ tDomTree *  pDomTree,
  +			          /*in*/ tNodeData * pNode) 
   
       {
  -    struct tNodeData *	pNode = pDomTree -> pLookup[xNode] ;
       struct tNodePad *	pPad	= (struct tNodePad * )(((tUInt8 *)pNode) - pNode -> nPadOffset)
;
   
       int nOffset = sizeof (struct tNodeData) + sizeof (struct tAttrData) * pNode -> numAttr
;
  @@ -822,18 +826,36 @@
   	    return 0 ;
   
   	pPad = pDomTree -> pLookup[pPad -> xNext] ;
  -	return ((struct tNodeData *)(pPad + 1)) -> xNdx ;
  +	return ((struct tNodeData *)(pPad + 1))  ;
   	}
       
       pNode = (struct tNodeData *)(((tUInt8 *)pNode) + nOffset) ;
       if (!pNode -> bFlags) 
  -	return Node_nextSibling (pDomTree, pNode -> xNdx) ;
  +	return Node_selfNextSibling (pDomTree, pNode) ;
           
  -    return pNode -> xNdx ;
  +    return pNode  ;
       }
   
   
  +/* ------------------------------------------------------------------------ */
  +/*                                                                          */
  +/* Node_nextSibling (xNode) ;                                               */
  +/*                                                                          */
  +/* Get next sibling node						    */
  +/*                                                                          */
  +/* ------------------------------------------------------------------------ */
  +
  +
  +tNode Node_nextSibling (/*in*/ tDomTree *  pDomTree,
  +			/*in*/ tNode       xNode) 
  +
   
  +    {
  +    tNodeData * pNode = Node_self (pDomTree, xNode) ;
  +    tNodeData * pNext = Node_selfNextSibling(pDomTree, pNode) ;
  +
  +    return pNext?pNext -> xNdx:0 ;
  +    }
   
   /* ------------------------------------------------------------------------ */
   /*                                                                          */
  
  
  
  1.1.2.8   +4 -1      embperl/Attic/epdom.h
  
  Index: epdom.h
  ===================================================================
  RCS file: /home/cvs/embperl/Attic/epdom.h,v
  retrieving revision 1.1.2.7
  retrieving revision 1.1.2.8
  diff -u -r1.1.2.7 -r1.1.2.8
  --- epdom.h	2000/05/16 12:44:21	1.1.2.7
  +++ epdom.h	2000/05/18 07:45:00	1.1.2.8
  @@ -153,8 +153,11 @@
   				      /*in*/ int         nChildNo) ;
   
   
  +tNodeData * Node_selfNextSibling (/*in*/ tDomTree *  pDomTree,
  +			          /*in*/ tNodeData * pNode) ;
  +				  
   tNode Node_nextSibling (/*in*/ tDomTree *  pDomTree,
  -			/*in*/ tNode   xNode) ;
  +			/*in*/ tNode       xNode) ;
   
   #define DomTree_self(xDomTree)		    (&pDomTrees[xDomTree]) 
   #define NodePad_self(pDomTree,xNode)	    ((struct tNodePad *)(pDomTree -> pLookup[xNode]))
  
  
  
  1.65.2.4  +4 -4      embperl/epmain.c
  
  Index: epmain.c
  ===================================================================
  RCS file: /home/cvs/embperl/epmain.c,v
  retrieving revision 1.65.2.3
  retrieving revision 1.65.2.4
  diff -u -r1.65.2.3 -r1.65.2.4
  --- epmain.c	2000/05/16 12:44:21	1.65.2.3
  +++ epmain.c	2000/05/18 07:45:00	1.65.2.4
  @@ -40,7 +40,7 @@
   static char sTabMaxColName [] = "HTML::Embperl::maxcol" ;
   static char sTabModeName   [] = "HTML::Embperl::tabmode" ;
   static char sEscModeName   [] = "HTML::Embperl::escmode" ;
  -static char sTokenHashName [] = "HTML::Embperl::Tokens::Main" ;
  +static char sTokenHashName [] = "HTML::Embperl::Syntax::Default" ;
   
   
   static char sDefaultPackageName [] = "HTML::Embperl::DOC::_%d" ;
  @@ -2436,6 +2436,9 @@
       if (!(r -> bOptions & optEarlyHttpHeader) || r -> bAppendToMainReq)
   #endif
           {
  +	#ifdef EP2
  +	Node_toString (r -> pCurrDomTree, r, r -> xDocument) ;
  +	#endif
           oputs (r, "\r\n") ;
           if (bOutToMem)
               {
  @@ -2461,9 +2464,6 @@
                   }
               else
   		{
  -		#ifdef EP2
  -		 Node_toString (r -> pCurrDomTree, r, r -> xDocument) ;
  -		#endif
                   oCommit (r, NULL) ;
   		}
   	    }
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +391 -0    embperl/Embperl/Attic/Syntax.pm
  
  
  
  

Mime
View raw message