richter     02/01/14 01:12:43

  Modified:    .        Tag: Embperl2c Embperl.xs Makefile.PL ep.h ep2.h
                        epapinit.c epdat2.h epinit.c
  Added:       .        Tag: Embperl2c epcfg.h eppriv.h
  Log:
  data struct rewrite
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.29.4.33 +60 -26    embperl/Embperl.xs
  
  Index: Embperl.xs
  ===================================================================
  RCS file: /home/cvs/embperl/Embperl.xs,v
  retrieving revision 1.29.4.32
  retrieving revision 1.29.4.33
  diff -u -r1.29.4.32 -r1.29.4.33
  --- Embperl.xs        20 Dec 2001 15:03:25 -0000      1.29.4.32
  +++ Embperl.xs        14 Jan 2002 09:12:42 -0000      1.29.4.33
  @@ -85,7 +85,6 @@
   embperl_GVFile(gv)
       SV * gv
   CODE:
  -    char buf[20] ;
       RETVAL = "" ;
   #ifdef GvFILE
       if (gv && SvTYPE(gv) == SVt_PVGV && GvGP (gv))
  @@ -118,6 +117,8 @@
       RETVAL
   
   
  +#if 0
  +
   # /* ---- Configuration data ----- */
   
   tConf *
  @@ -172,6 +173,8 @@
       RETVAL
   
   
  +#endif
  +
   tReq *
   embperl_CurrReq()
   CODE:        
  @@ -194,6 +197,8 @@
       RETVAL
   
   
  +#if 0
  +
   void
   embperl_GetPackageOfFile(sSourcefile, sPackage, mtime, bEP1Compat)
       char * sSourcefile
  @@ -206,7 +211,7 @@
       PUSHs(sv_2mortal(newSViv(pFile -> mtime == -1?1:0))) ;
       PUSHs(sv_2mortal(newSVpv(pFile -> sCurrPackage, pFile -> nCurrPackage))) ;
   
  -
  +#endif
   
   
   void
  @@ -217,7 +222,6 @@
   PREINIT:
       tReq * r = pCurrReq ;
       int  bRestore = 0 ;
  -    SV * pSaveApacheReqSV ;
   #ifdef APACHE
       request_rec * pSaveApacheReq ;
   #endif
  @@ -265,18 +269,18 @@
       tReq * r = pCurrReq ;
   CODE:
   #ifdef EP2
  -    if (!r->bEP1Compat)
  +    if (!r->Component.ComponentConfig.bEP1Compat)
        {
        char * p = SvPV (sText, l) ;
           /*if Node_self(DomTree_self (r -> xCurrDomTree), r -> xCurrNode) -> nType 
== ntypDocumentFraq)
               Node_appendChild (DomTree_self (r -> xCurrDomTree), r -> xCurrNode, r 
-> nCurrRepeatLevel, ntypCDATA, 0, p, l, 0, 0, NULL) ; 
                   else*/
  -        r -> xCurrNode = Node_insertAfter_CDATA (p, l, (r -> nCurrEscMode & 3)== 
3?1 + (r -> nCurrEscMode & 4):r -> nCurrEscMode, DomTree_self (r -> xCurrDomTree), r 
-> xCurrNode, r -> nCurrRepeatLevel) ; 
  +        r -> Component.xCurrNode = Node_insertAfter_CDATA (p, l, (r -> 
Component.nCurrEscMode & 3)== 3?1 + (r -> Component.nCurrEscMode & 4):r -> 
Component.nCurrEscMode, DomTree_self (r -> Component.xCurrDomTree), r -> 
Component.xCurrNode, r -> Component.nCurrRepeatLevel) ; 
           
           }
       else
   #endif
  -    if (r -> pCurrEscape == NULL)
  +    if (r -> Component.pCurrEscape == NULL)
        {
        char * p = SvPV (sText, l) ;
        owrite (r, p, l) ;
  @@ -318,6 +322,8 @@
       FlushLog (r) ;
   
   
  +#if 0
  +
   char *
   embperl_Sourcefile()
   INIT:
  @@ -338,7 +344,6 @@
   #ifdef APACHE
       request_rec * req_rec  ;
   #endif
  -    SV * rsv ;
   CODE:
   #ifdef APACHE
       if (items > 0)
  @@ -376,6 +381,8 @@
   OUTPUT:
       RETVAL
   
  +#endif
  +
   void
   embperl_exit()
   CODE:
  @@ -408,6 +415,8 @@
   MODULE = HTML::Embperl      PACKAGE = HTML::Embperl::Req     PREFIX = embperl_
   
   
  +#if 0
  +
   char *
   embperl_CurrPackage(r)
       tReq * r
  @@ -419,6 +428,10 @@
   OUTPUT:
       RETVAL
   
  +#endif
  +
  +#if 0
  +
   SV *
   embperl_ExportHash(r)
       tReq * r
  @@ -444,22 +457,25 @@
   OUTPUT:
       RETVAL
   
  +#endif
  +
  +
   char *
   embperl_Path(r,sPath=NULL)
       tReq * r
       char * sPath
   CODE:
       RETVAL = NULL;
  -    if (r -> pConf)
  +    if (1)
           {
           if (sPath)
               {
  -            if (r -> pConf -> sPath)
  -                free (r -> pConf -> sPath) ;
  -            r -> pConf -> sPath = sstrdup (sPath) ;
  +            if (r -> Component.ComponentConfig.sPath)
  +                free (r -> Component.ComponentConfig.sPath) ; /* ???????? */
  +            r -> Component.ComponentConfig.sPath = sstrdup (sPath) ;
               }
  -        if (r -> pConf -> sPath)
  -            RETVAL = r -> pConf -> sPath ;
  +        if (r -> Component.ComponentConfig.sPath)
  +            RETVAL = r -> Component.ComponentConfig.sPath ;
           }
   OUTPUT:
       RETVAL
  @@ -471,8 +487,8 @@
       int    nNdx
   CODE:
       if (nNdx >= 0)
  -        r -> nPathNdx = nNdx ;
  -    RETVAL = r -> nPathNdx ;
  +        r -> Component.nPathNdx = nNdx ;
  +    RETVAL = r -> Component.nPathNdx ;
   OUTPUT:
       RETVAL
   
  @@ -481,8 +497,8 @@
   embperl_ReqFilename(r)
       tReq * r
   CODE:
  -    if (r -> pConf && r -> pConf -> sReqFilename)
  -        RETVAL = r -> pConf -> sReqFilename ;
  +    if (r -> ReqParam.sFilename)
  +        RETVAL = r -> ReqParam.sFilename ;
       else
           RETVAL = NULL;
   OUTPUT:
  @@ -492,7 +508,7 @@
   embperl_Debug(r)
       tReq * r
   CODE:
  -    RETVAL = r -> bDebug ;
  +    RETVAL = r -> Component.ComponentConfig.bDebug ;
   OUTPUT:
       RETVAL
   
  @@ -535,7 +551,7 @@
   embperl_FormArray(r)
       tReq * r
   CODE:
  -    RETVAL = newRV_inc((SV *)r -> pFormArray) ;
  +    RETVAL = newRV_inc((SV *)r -> pThread -> pFormArray) ;
   OUTPUT:
       RETVAL
   
  @@ -544,7 +560,7 @@
   embperl_FormHash(r)
       tReq * r
   CODE:
  -    RETVAL = newRV_inc((SV *)r -> pFormHash) ;
  +    RETVAL = newRV_inc((SV *)r -> pThread -> pFormHash) ;
   OUTPUT:
       RETVAL
   
  @@ -554,7 +570,7 @@
   embperl_EnvHash(r)
       tReq * r
   CODE:
  -    RETVAL = newRV_inc((SV *)r -> pEnvHash) ;
  +    RETVAL = newRV_inc((SV *)r -> pThread -> pEnvHash) ;
   OUTPUT:
       RETVAL
   
  @@ -571,7 +587,7 @@
   
   
   
  -
  +#if 0
   
   char *
   embperl_VirtLogURI(r)
  @@ -610,6 +626,8 @@
       RETVAL
   
   
  +
  +
   int
   embperl_SubReq(r)
       tReq * r
  @@ -626,15 +644,20 @@
   OUTPUT:
       RETVAL
   
  +#endif
  +
  +
   int
   embperl_IsImport(r)
       tReq * r
   CODE:
  -    RETVAL = r -> pImportStash?1:0 ;
  +    RETVAL = r -> Component.pImportStash?1:0 ;
   OUTPUT:
       RETVAL
   
   
  +#if 0
  +
   SV *
   embperl_ReqParameter(r)
       tReq * r
  @@ -649,6 +672,7 @@
       RETVAL
   
   
  +
   SV *
   embperl_Application(r,app=NULL)
       tReq * r
  @@ -668,6 +692,7 @@
   OUTPUT:
       RETVAL
   
  +#endif
   
   
   int
  @@ -692,6 +717,7 @@
   OUTPUT:
       RETVAL
   
  +#if 0
   
   int
   embperl_ProcessSub(r,pFile,nBlockStart,nBlockNo)
  @@ -705,6 +731,7 @@
       RETVAL
   
   
  +
   void
   embperl_logevalerr(r,sText)
       tReq * r
  @@ -719,6 +746,9 @@
        strncpy (r -> errdat1, sText, sizeof (r -> errdat1) - 1) ;
        LogError (r, rcEvalErr) ;
   
  +#endif
  +
  +
   void
   embperl_logerror(r,code, sText,pApacheReqSV=NULL)
       tReq * r
  @@ -727,7 +757,6 @@
       SV * pApacheReqSV
   PREINIT:
       int  bRestore = 0 ;
  -    SV * pSaveApacheReqSV ;
   #ifdef APACHE
       request_rec * pSaveApacheReq ;
   #endif
  @@ -815,7 +844,7 @@
       tReq * r
       char * sText
   CODE:
  -    lprintf (r,"[%d]MEM:  %s: SVs: %d OBJs: %d\n", r->nPid, sText, sv_count, 
sv_objcount) ;
  +    lprintf (r,"[%d]MEM:  %s: SVs: %d OBJs: %d\n", r -> pThread -> nPid, sText, 
sv_count, sv_objcount) ;
   
   SV *
   embperl_Escape(r, str, mode)
  @@ -842,7 +871,7 @@
       RETVAL
   
   
  -
  +#if 0
   
   int
   embperl_Abort(r)
  @@ -862,6 +891,9 @@
   CODE:
       FreeRequest(r) ; 
   
  +#endif
  +
  +#if 0
   
   #ifdef EP2
   
  @@ -908,6 +940,8 @@
   INCLUDE: DOM.xs
   
   INCLUDE: Syntax.xs
  +
  +#endif
   
   #endif
   
  
  
  
  1.31.4.37 +3 -3      embperl/Makefile.PL
  
  Index: Makefile.PL
  ===================================================================
  RCS file: /home/cvs/embperl/Makefile.PL,v
  retrieving revision 1.31.4.36
  retrieving revision 1.31.4.37
  diff -u -r1.31.4.36 -r1.31.4.37
  --- Makefile.PL       27 Nov 2001 08:37:55 -0000      1.31.4.36
  +++ Makefile.PL       14 Jan 2002 09:12:42 -0000      1.31.4.37
  @@ -3,7 +3,7 @@
   #
   # (C) 1997-2001 G.Richter ([EMAIL PROTECTED]) / ECOS
   #
  -# $Id: Makefile.PL,v 1.31.4.36 2001/11/27 08:37:55 richter Exp $
  +# $Id: Makefile.PL,v 1.31.4.37 2002/01/14 09:12:42 richter Exp $
   #
   
   
  @@ -1145,8 +1145,8 @@
   WriteMakefile(
       'NAME'      => 'HTML::Embperl',
       'VERSION_FROM' => 'Embperl.pm',          # finds $VERSION
  -    'OBJECT'       => 'Embperl$(OBJ_EXT) epmain$(OBJ_EXT) epio$(OBJ_EXT) 
epchar$(OBJ_EXT) epcmd$(OBJ_EXT) eputil$(OBJ_EXT) epeval$(OBJ_EXT) epapinit$(OBJ_EXT) 
' . 
  -                       ($EP2?'epcmd2$(OBJ_EXT) epparse$(OBJ_EXT) epdom$(OBJ_EXT) 
epcomp$(OBJ_EXT) epcache$(OBJ_EXT) epprovider$(OBJ_EXT)':'') . $o,
  +    'OBJECT'       => 'Embperl$(OBJ_EXT) epmain$(OBJ_EXT) epio$(OBJ_EXT) 
epchar$(OBJ_EXT) eputil$(OBJ_EXT) epeval$(OBJ_EXT) epapinit$(OBJ_EXT) ' . 
  +                       ($EP2?'epapinit$(OBJ_EXT) epcmd2$(OBJ_EXT) epparse$(OBJ_EXT) 
epdom$(OBJ_EXT) epcomp$(OBJ_EXT) epcache$(OBJ_EXT) 
epprovider$(OBJ_EXT)':'epcmd$(OBJ_EXT) ') . $o,
       'LIBS'      => [$libs || ''],                     
       'DEFINE'    => "$d \$(DEFS)",                     
       'INC'       => $i,                        
  
  
  
  1.27.4.34 +12 -3     embperl/ep.h
  
  Index: ep.h
  ===================================================================
  RCS file: /home/cvs/embperl/ep.h,v
  retrieving revision 1.27.4.33
  retrieving revision 1.27.4.34
  diff -u -r1.27.4.33 -r1.27.4.34
  --- ep.h      23 Nov 2001 07:50:59 -0000      1.27.4.33
  +++ ep.h      14 Jan 2002 09:12:42 -0000      1.27.4.34
  @@ -25,6 +25,10 @@
   #define PERLIO_IS_STDIO
   #endif
   
  +#ifdef EP2
  +#define PERL_NO_GET_CONTEXT
  +#endif
  +
   #ifdef __cplusplus
   extern "C" {
   #endif
  @@ -182,8 +186,11 @@
   
   #ifdef EP2
   #include "epdom.h"
  -#endif
  +#include "eppriv.h"
  +#include "epdat2.h"
  +#else
   #include "epdat.h"
  +#endif
   #include "embperl.h"
   
   
  @@ -209,6 +216,7 @@
   int ExecuteReq (/*i/o*/ register req * r,
                   /*in*/  SV *           pReqSV) ;
   
  +#if 0
   tReq * SetupRequest (/*in*/ SV *    pApacheReqSV,
                        /*in*/ char *  sSourcefile,
                        /*in*/ double  mtime,
  @@ -244,6 +252,7 @@
   
   void FreeConfData       (/*in*/ tConf *   pConf) ;
                            
  +#endif
   
   int ScanCmdEvalsInString (/*i/o*/ register req * r,
                        /*in*/  char *   pIn,
  @@ -260,12 +269,12 @@
                         /*in*/  int     nBlockStart,
                         /*in*/  int     nBlockSize,
                            /*in*/  int     nBlockNo) ;
  -
  +#if 0
   int ProcessSub               (/*i/o*/ register req * r,
                         /*in*/  tFile * pFile,
                         /*in*/  int     nBlockStart,
                            /*in*/  int     nBlockNo) ;
  -
  +#endif
   void NewEscMode (/*i/o*/ register req * r,
                                   SV * pSV) ;
   
  
  
  
  1.1.2.23  +2 -27     embperl/Attic/ep2.h
  
  Index: ep2.h
  ===================================================================
  RCS file: /home/cvs/embperl/Attic/ep2.h,v
  retrieving revision 1.1.2.22
  retrieving revision 1.1.2.23
  diff -u -r1.1.2.22 -r1.1.2.23
  --- ep2.h     15 Nov 2001 12:09:02 -0000      1.1.2.22
  +++ ep2.h     14 Jan 2002 09:12:42 -0000      1.1.2.23
  @@ -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.22 2001/11/15 12:09:02 richter Exp $
  +#   $Id: ep2.h,v 1.1.2.23 2002/01/14 09:12:42 richter Exp $
   #
   
###################################################################################*/
   
  @@ -82,8 +82,6 @@
                                  /*in*/  int            nTagSet,
                                  /*in*/  void * *       ppInfo) ;
   
  -int embperl_CompileDocument (/*i/o*/ register req * r,
  -                          /*in*/  tProcessor   * pFirstProcessor) ;
   
   int embperl_Compile                 (/*in*/  tReq *    r,
                                     /*in*/  tIndex       xDomTree,
  @@ -98,30 +96,7 @@
   int embperl_PreExecute                   (/*in*/  tReq *       r,
                                     /*in*/  struct tCacheItem * pCache) ;
   
  -int embperl_PreExecuteProcessor          (/*in*/  tReq *       r,
  -                                  /*in*/  tProcessor * pProcessor,
  -                                  /*in*/  tDomTree **  pDomTree,
  -                                  /*in*/  SV **        ppPreCompResult,
  -                                  /*in*/  SV **        ppCompResult) ;
  -
  -int embperl_ExecuteProcessor        (/*in*/  tReq *    r,
  -                                  /*in*/  tProcessor * pProcessor,
  -                                  /*in*/  tDomTree **  pDomTree,
  -                                  /*in*/  SV **        ppPreCompResult,
  -                                  /*in*/  SV **        ppCompResult,
  -                                  /*out*/ SV **        ppExecResult) ;
  -
  -int embperl_ParseProcessor          (/*in*/  tReq *    r,
  -                                  /*in*/  tProcessor * pProcessor,
  -                                  /*in*/  tDomTree **  pDomTree,
  -                                  /*in*/  SV **        ppPreCompResult,
  -                                  /*out*/ SV **        ppCompResult) ;
  -
  -int embperl_CompileProcessor        (/*in*/  tReq *    r,
  -                                  /*in*/  tProcessor * pProcessor,
  -                                  /*in*/  tDomTree **  ppDomTree,
  -                                  /*in*/  SV **        ppPreCompResult,
  -                                  /*out*/ SV **        ppCompResult) ;
  +
   
   int embperl_ExecuteSubStart         (/*in*/  tReq *    r,
                                     /*in*/  SV *         pDomTreeSV,
  
  
  
  1.1.2.8   +76 -24    embperl/epapinit.c
  
  Index: epapinit.c
  ===================================================================
  RCS file: /home/cvs/embperl/epapinit.c,v
  retrieving revision 1.1.2.7
  retrieving revision 1.1.2.8
  diff -u -r1.1.2.7 -r1.1.2.8
  --- epapinit.c        11 Jan 2002 16:01:51 -0000      1.1.2.7
  +++ epapinit.c        14 Jan 2002 09:12:42 -0000      1.1.2.8
  @@ -10,7 +10,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: epapinit.c,v 1.1.2.7 2002/01/11 16:01:51 richter Exp $
  +#   $Id: epapinit.c,v 1.1.2.8 2002/01/14 09:12:42 richter Exp $
   #
   
###################################################################################*/
   
  @@ -20,23 +20,48 @@
   #ifdef APACHE
   
   
  +
  +/* define config prototypes */
  +
   static void embperl_ApacheInit (server_rec *s, pool *p) ;
   static void embperl_ApacheInitCleanup (void * p) ;
   
  +#define EPCFG_STR EPCFG
  +#define EPCFG_INT EPCFG
  +#define EPCFG_BOOL EPCFG
  +#define EPCFG_CV EPCFG
  +
  +#define EPCFG(STRUCT,TYPE,NAME,CFGNAME) \
  +    char * embperl_Apache_Config_##NAME (cmd_parms *cmd, tApacheDirConfig * 
pDirCfg, TYPE arg) ;
  +
  +#include "epcfg.h"
  +
  +/* define config data structure */
  +
  +#undef EPCFG
  +#define EPCFG(STRUCT,TYPE,NAME,CFGNAME) \
  +    { #CFGNAME,   embperl_Apache_Config_##NAME,   NULL, RSRC_CONF, TAKE1, "" },
  +
   
   static const command_rec embperl_cmds[] =
   {
  +#include "epcfg.h"
  +    
       {NULL}
   };
   
   
  +
  +
  +
  +
   /* static module MODULE_VAR_EXPORT embperl_module = { */
   static module embperl_module = {
       STANDARD_MODULE_STUFF,
       embperl_ApacheInit,         /* initializer */
       embperl_create_dir_config,  /* dir config creater */
       NULL,                       /* dir merger --- default is to override */
  -    embperl_create_server_config, /* server config */
  +    NULL,                       /* server config */
       NULL,                       /* merge server configs */
       embperl_cmds,               /* command table */
       NULL,                       /* handlers */
  @@ -66,7 +91,6 @@
   
   
   
  -
   void embperl_ApacheAddModule ()
   
       {
  @@ -93,36 +117,20 @@
   
   static void *embperl_create_dir_config(pool *p, char *d)
       {
  -    tReqConfig *cfg = (tReqConfig *) ap_pcalloc(p, sizeof(tReqConfig));
  +    tApacheDirConfig *cfg = (ApacheDirConfig *) ap_pcalloc(p, 
sizeof(ApacheDirConfig));
   
       memset (cfg, 0, sizeof (*cfg)) ;
   
  -    return cfg;
  -    }
  -
  -static void *embperl_create_server_config(pool *p, char *d)
  -    {
  -    tServerConfig *cfg = (tServerConfig *) ap_pcalloc(p, sizeof(tServerConfig));
  -
  -    memset (cfg, 0, sizeof (*cfg)) ;
  +    embperl_DefaultReqConfig (&cfg -> ReqCfg) ;
  +    embperl_DefaultAppConfig (&cfg -> AppCfg) ;
  +    embperl_DefaultComponentConfig (&cfg -> ComponentCfg) ;
   
       return cfg;
       }
   
   
   
  -
  -CHAR_P perl_cmd_env (cmd_parms *cmd, perl_dir_config *rec, int arg) {
  -    if(arg) MP_ENV_on(rec);
  -    else        MP_ENV_off(rec);
  -    MP_TRACE_d(fprintf(stderr, "perl_cmd_env: set to `%s'\n", arg ? "On" : "Off"));
  -    return NULL;
  -}
  -
  -
  -
  -
  -embperl_GetApacheConfig (/*in*/  request_rec * r,
  +embperl_GetApacheConfig (/*in*/  tReq * r,
                            /*out*/ tAppConfig ** ppAppConfig,
                            /*out*/ tReqConfig ** ppReqConfig,
                            /*out*/ tComponentConfig ** ppComponetConfig)
  @@ -149,5 +157,49 @@
           }
   
       }
  +
  +
  +
  +#undef EPCFG
  +#define EPCFG_INT(STRUCT,TYPE,NAME,CFGNAME) \
  +char * embperl_Apache_Config_##NAME (cmd_parms *cmd, tApacheDirConfig * pDirCfg, 
TYPE arg) \
  +    { \
  +    pDirCfg -> STRUCT.NAME = atoi(arg) ; \
  +    pDirCfg -> SETOPT |= cfgset##NAME ; \
  +    return NULL; \
  +    } 
  +
  +#undef EPCFG_BOOL
  +#define EPCFG_BOOL(STRUCT,TYPE,NAME,CFGNAME) \
  +char * embperl_Apache_Config_##NAME (cmd_parms *cmd, tApacheDirConfig * pDirCfg, 
TYPE arg) \
  +    { \
  +    pDirCfg -> STRUCT.NAME = arg ; \
  +    pDirCfg -> SETOPT |= cfgset##NAME ; \
  +    return NULL; \
  +    } 
  +
  +
  +#undef EPCFG_STR
  +#define EPCFG_STR(STRUCT,TYPE,NAME,CFGNAME) \
  +char * embperl_Apache_Config_##NAME (cmd_parms *cmd, tApacheDirConfig * pDirCfg, 
TYPE arg) \
  +    { \
  +    pool * p = cmd -> pool ;    
  +    pDirCfg -> STRUCT.NAME = ap_pstrdup(p, arg) ; \
  +    pDirCfg -> SETOPT |= cfgset##NAME ; \
  +    return NULL; \
  +    } 
  +
  +#undef EPCFG_CV
  +#define EPCFG_CV(STRUCT,TYPE,NAME,CFGNAME) \
  +char * embperl_Apache_Config_##NAME (cmd_parms *cmd, tApacheDirConfig * pDirCfg, 
TYPE arg) \
  +    { \
  +    int rc ;\
  +    if ((rc = EvalConfig (r, sv_2mortal(newSVpv(arg, 0)), 0, NULL, &pDirCfg -> 
STRUCT.NAME)) != ok) \
  +        return LogError (r, rc) ; \
  +    pDirCfg -> SETOPT |= cfgset##NAME ; \
  +    return NULL; \
  +    } 
  +
  +#include "epcfg.h"
   
   #endif
  
  
  
  1.1.2.4   +71 -62    embperl/Attic/epdat2.h
  
  Index: epdat2.h
  ===================================================================
  RCS file: /home/cvs/embperl/Attic/epdat2.h,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- epdat2.h  11 Jan 2002 16:01:51 -0000      1.1.2.3
  +++ epdat2.h  14 Jan 2002 09:12:42 -0000      1.1.2.4
  @@ -30,6 +30,14 @@
       char        cMultFieldSep ;
       } tReqConfig ;
   
  +typedef struct tReqParam
  +    {
  +    char *  sFilename ;
  +    char *  sUnparsedUri ;
  +    char *  sUri ;
  +    char *  sPathInfo ;
  +    char *  sQueryInfo ;
  +    } tReqParam ;
   
   typedef struct tAppConfig
       {
  @@ -43,7 +51,7 @@
       char *  sCookieExpires ;
       int     nSessionMode ;
       char *  sLog ;
  -    } tServerConfig ;
  +    } tAppConfig ;
   
   
   
  @@ -97,72 +105,13 @@
       } tApp ;
   
   
  -typedef struct tReq
  -    {
  -    SV *          pReqSV ;      /* The perl reference to this request structure */
  -
  -#ifdef PERL_IMPLICIT_CONTEXT
  -    pTHX ;                      /* pointer to Perl interpreter */
  -#endif
  -
  -    #ifdef APACHE
  -    request_rec * pApacheReq ;       /* apache request record */
  -    SV *          pApacheReqSV ;
  -    #endif
  -  
  -    tReqConfig    ReqConfig ;    /**< request configuration data */
  -    tReqParam     ReqParam ;     /**< request parameter data */
  -    tApp *        pApp ;
  -    tThreadData * pThread ;
  -
  -    char *  sUnparsedUri ;
  -    char *  sUri ;
  -    char *  sPathInfo ;
  -    char *  sQueryInfo ;
  -    
  -    int     nRequestCount ;     /**< increments by one on each request */
  -    time_t  nRequestTime ;      /**< time when request starts */
  -
  -    int          nSessionMgnt ;      /* how to retrieve the session id */
  -    char *  sSessionID ;        /* stores session name and id for status session 
data */
  -
  -    int          bExit ;             /**< We should exit the request */
  -    long    nLogFileStartPos ;  /**< file position of logfile, when logfile started 
*/
  -
  -    bool    bError  ;                /* Error has occured somewhere */
  -    AV *    pErrArray ;      /* Errors to show on Error response */
  -
  -    char    errdat1 [ERRDATLEN] ; /* Additional error information */
  -    char    errdat2 [ERRDATLEN] ;
  -    char    lastwarn [ERRDATLEN] ; /* last warning */
  -
  -    AV *    pDomTreeAV ; /* holds all DomTrees alocated during the request */
  -    AV *    pCleanupAV ; /* set all sv's that are conatined in that array to undef 
after the whole request */
  -
  -    /* --- for statistics --- */
  -
  -    clock_t startclock ;
  -    I32     stsv_count ;
  -
  -#if defined (_DEBUG) && defined (WIN32)
  -    _CrtMemState MemCheckpoint ;             /* memory leak debugging */    
  -#endif    
  -
  -#ifdef DMALLOC
  -    unsigned long MemCheckpoint ;             /* memory leak debugging */    
  -#endif    
  -    } tReq ;
  -
  -
  -
   
   typedef struct tComponent
       {
       SV *          pComponentSV ;      /* The perl reference to this request 
structure */
   
  -    tReqConfig    ComponentConfig ;    /**< request configuration data */
  -    tReqParam     ComponentParam ;     /**< parameter passed to current request */
  -    tReq *        pReq ;
  +    tComponentConfig    ComponentConfig ;    /**< request configuration data */
  +    tComponentParam     ComponentParam ;     /**< parameter passed to current 
request */
   
       bool    bReqRunning  ;   /* we are inside of a request */
       bool    bSubReq ;           /* This is a sub request (called inside an Embperl 
page) */
  @@ -178,6 +127,7 @@
       bool    bEP1Compat ;     /* run in Embperl 1.x compatible mode */    
       tPhase  nPhase ;         /* which phase of the request we are in */
   
  +    char *  sSourcefile ;    /* Current position in html file */
       char *  pCurrPos ;               /* Current position in html file */
       int     nSourceline ;       /* Currentline in sourcefile */
       char *  pSourcelinePos ;    /* Positon of nSourceline in sourcefile */
  @@ -265,3 +215,62 @@
       SV *   pCodeSV ;         /* contains currently compiled line */
   #endif
       } tComponent ;
  +
  +
  +typedef struct tReq
  +    {
  +    SV *          pReqSV ;      /* The perl reference to this request structure */
  +
  +#ifdef PERL_IMPLICIT_CONTEXT
  +#ifdef USE_THREADS
  +    struct perl_thread *pPerlTHX ;                  /* pointer to Perl interpreter 
*/
  +#else
  +    PerlInterpreter    *pPerlTHX ;                  /* pointer to Perl interpreter 
*/
  +#endif
  +#endif
  +
  +    #ifdef APACHE
  +    request_rec * pApacheReq ;       /* apache request record */
  +    SV *          pApacheReqSV ;
  +    #endif
  +  
  +    tReqConfig    ReqConfig ;    /**< request configuration data */
  +    tReqParam     ReqParam ;     /**< request parameter data */
  +    tComponent    Component ;
  +    tApp *        pApp ;
  +    tThreadData * pThread ;
  +
  +    int     nRequestCount ;     /**< increments by one on each request */
  +    time_t  nRequestTime ;      /**< time when request starts */
  +
  +    int          nSessionMgnt ;      /* how to retrieve the session id */
  +    char *  sSessionID ;        /* stores session name and id for status session 
data */
  +
  +    int          bExit ;             /**< We should exit the request */
  +    long    nLogFileStartPos ;  /**< file position of logfile, when logfile started 
*/
  +
  +    bool    bError  ;                /* Error has occured somewhere */
  +    AV *    pErrArray ;      /* Errors to show on Error response */
  +
  +    char    errdat1 [ERRDATLEN] ; /* Additional error information */
  +    char    errdat2 [ERRDATLEN] ;
  +    char    lastwarn [ERRDATLEN] ; /* last warning */
  +
  +    AV *    pDomTreeAV ; /* holds all DomTrees alocated during the request */
  +    AV *    pCleanupAV ; /* set all sv's that are conatined in that array to undef 
after the whole request */
  +
  +    /* --- for statistics --- */
  +
  +    clock_t startclock ;
  +    I32     stsv_count ;
  +
  +#if defined (_DEBUG) && defined (WIN32)
  +    _CrtMemState MemCheckpoint ;             /* memory leak debugging */    
  +#endif    
  +
  +#ifdef DMALLOC
  +    unsigned long MemCheckpoint ;             /* memory leak debugging */    
  +#endif    
  +    } tReq ;
  +
  +
  
  
  
  1.1.2.4   +15 -31    embperl/Attic/epinit.c
  
  Index: epinit.c
  ===================================================================
  RCS file: /home/cvs/embperl/Attic/epinit.c,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- epinit.c  11 Jan 2002 16:01:51 -0000      1.1.2.3
  +++ epinit.c  14 Jan 2002 09:12:42 -0000      1.1.2.4
  @@ -564,18 +564,20 @@
   #ifdef APACHE
       if (pApacheReq)
           {
  -        r -> sUnparsedUri = pApacheRequest -> unparsed_uri ;
  -        r -> sUri         = pApacheRequest -> uri ;
  -        r -> sPathInfo    = pApacheRequest -> path_info ;
  -        r -> sQueryInfo   = pApacheRequest -> args ;  
  +        r -> ReqParam.sFilename    = pApacheRequest -> filename ;
  +        r -> ReqParam.sUnparsedUri = pApacheRequest -> unparsed_uri ;
  +        r -> ReqParam.sUri         = pApacheRequest -> uri ;
  +        r -> ReqParam.sPathInfo    = pApacheRequest -> path_info ;
  +        r -> ReqParam.sQueryInfo   = pApacheRequest -> args ;  
           }
       else
   #endif
           {
  -        r -> sUnparsedUri = GetHashValueStr (pThread -> pEnvHash, "REQUEST_URI", 
"") ;
  -        r -> sUri         = GetHashValueStr (pThread -> pEnvHash, "SCRIPT_NAME", 
"") ;
  -        r -> sPathInfo    = GetHashValueStr (pThread -> pEnvHash, "PATH_INFO", "") ;
  -        r -> sQueryInfo   = GetHashValueStr (pThread -> pEnvHash, "QUERY_INFO", "") 
;
  +        r -> ReqParam.sFilename    = GetHashValueStr (pThread -> pEnvHash, 
"PATH_TRANSLATED", "") ;
  +        r -> ReqParam.sUnparsedUri = GetHashValueStr (pThread -> pEnvHash, 
"REQUEST_URI", "") ;
  +        r -> ReqParam.sUri         = GetHashValueStr (pThread -> pEnvHash, 
"SCRIPT_NAME", "") ;
  +        r -> ReqParam.sPathInfo    = GetHashValueStr (pThread -> pEnvHash, 
"PATH_INFO", "") ;
  +        r -> ReqParam.sQueryInfo   = GetHashValueStr (pThread -> pEnvHash, 
"QUERY_INFO", "") ;
           }
       
   
  @@ -767,7 +769,7 @@
       {
   
       
  -    if (r -> pComponent -> ComponentConfig.bDebug)
  +    if (r -> Component.ComponentConfig.bDebug)
           {
           lprintf (r, "[%d]REQ: Start Request at %s\n", r -> nPid, ctime 
(time(NULL))) ;
   #ifdef DMALLOC
  @@ -778,7 +780,7 @@
   
   
   #ifdef APACHE
  -    if (r -> pApacheReq && (r -> pComponent -> ComponentConfig.bDebug & 
dbgHeadersIn))
  +    if (r -> pApacheReq && (r -> Component.ComponentConfig.bDebug & dbgHeadersIn))
           {
           int i;
           array_header *hdrs_arr;
  @@ -793,7 +795,7 @@
                   lprintf (r,  "[%d]HDR:  %s=%s\n", r -> nPid, hdrs[i].key, 
hdrs[i].val) ; 
           }
   #endif
  -    if (r -> pComponent -> ComponentConfig.bDebug & dbgEnv)
  +    if (r -> Component.ComponentConfig.bDebug & dbgEnv)
           {
           SV *   psv ;
           HE *   pEntry ;
  @@ -891,26 +893,8 @@
       *ppReq = r ;
   
       embperl_LogStartRequest (r) ;
  -    }
  -
  -
  -
  -
  -
  -int     embperl_InitRequestApache (/*in*/ pTHX_
  -                             /*in*/ SV *             pApacheReqSV,
  -                             /*in*/ tReqConfig *     pAppCfg,
  -                             /*in*/ tReqConfig *     pReqCfg,
  -                             /*in*/ tReqConfig *     pReqParam,
  -                             /*in*/ SV *             pPerlParam,
  -                             /*in*/ tApp *           pApp,
  -                             /*out*/tReq * *         ppReq)
  -
  -
  -    {
  -    
  -
  -
   
  +    return ok ;
       }
  +
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +43 -0     embperl/Attic/epcfg.h
  
  
  
  
  1.1.2.1   +118 -0    embperl/Attic/eppriv.h
  
  
  
  

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

Reply via email to