first, some easy pod fixes to make pod2man much happier:
--- libembperl-perl-2.0b9dev6.orig/Features.pod
+++ libembperl-perl-2.0b9dev6/Features.pod
@@ -1,5 +1,9 @@
=pod
+=head1 NAME
+
+Embperl::Features - Main features of Embperl 2.0
+
=head1 Main features of Embperl 2.0
=over 4
--- libembperl-perl-2.0b9dev6.orig/Intro.pod
+++ libembperl-perl-2.0b9dev6/Intro.pod
@@ -1,5 +1,9 @@
=pod
+=head1 NAME
+
+Embperl::Intro - Introduction to Embperl
+
=head1 Content
=over 4
--- libembperl-perl-2.0b9dev6.orig/IntroEmbperlObject.pod
+++ libembperl-perl-2.0b9dev6/IntroEmbperlObject.pod
@@ -1,5 +1,8 @@
=pod
+=head1 NAME
+
+Embperl::IntroEmbperlObject - Introduction to EmbperlObject
=head1 Contents
--- libembperl-perl-2.0b9dev6.orig/TipsAndTricks.pod
+++ libembperl-perl-2.0b9dev6/TipsAndTricks.pod
@@ -1,5 +1,8 @@
=pod
+=head1 NAME
+
+Embperl::TipsAndTricks - Embperl Tips and Tricks
=head1 Contents
build cleanups:
--- libembperl-perl-2.0b9dev6.orig/Makefile.PL
+++ libembperl-perl-2.0b9dev6/Makefile.PL
@@ -266,12 +266,22 @@
my $man = $self -> {MAN3PODS} ;
while (($k, $v) = each (%$man))
{
- if (!($v =~ /::Embperl/))
- {
- $v =~ s#HTML::#HTML::Embperl::# ;
- $man -> {$k} = $v ;
- }
- }
+ if ($v !~ /Embperl/)
+ {
+ $v =~ s,/([^/]+)$,/Embperl::$1, ;
+ $man -> {$k} = $v ;
+ }
+ }
+
+ foreach my $hash (qw(MAN3PODS PM))
+ {
+ foreach (keys %{$self->{$hash}})
+ {
+ delete $self->{$hash}{$_}
+ if /^(INSTALL|NEWS|Changes)|\.pl$/ ;
+ }
+ }
+
$self -> MM::post_initialize (@_) ;
}
@@ -598,7 +609,7 @@
if (!$b)
{
- $base = GetString ("Apache source not found, enter path name or q to quit",
'') ;
+ $base = GetString ("Apache source not found, enter path name or q to quit",
'q') ;
if ($base eq 'q')
{
$apache = 0 ;
@@ -1234,7 +1245,7 @@
'INC' => $i,
'EXE_FILES' => [ 'embpexec.pl' ],
'clean' => { FILES => 'dirent.h test/conf/httpd.conf test/tmp/* Embperl.c'
},
- 'realclean' => { FILES => 'embpexec.pl embpexec.bat embpcgi.pl embpcgi.test.pl
embpcgi.bat test/conf/config.pl' },
+ 'realclean' => { FILES => 'embpexec.pl embpexec.bat embpcgi.pl embpcgi.test.pl
embpcgi.bat epocgi.pl epocgi.bat epocgi.test.pl embpfastcgi.pl test/conf/config.pl' },
'dist' => { COMPRESS => 'gzip', SUFFIX => 'gz'},
'dynamic_lib' => $dynlib,
'PREREQ_PM' => { 'File::Spec' => 0.8 },
harmless and some not-so-harmless compile warning fixes:
(Gerald, you'd better manually check some of the "may be used
uninitialised" warning fixes, since i think some of them may need more
complicated code changes to cope with bad code paths.
--- libembperl-perl-2.0b9dev6.orig/DOM.xs
+++ libembperl-perl-2.0b9dev6/DOM.xs
@@ -32,7 +32,7 @@
tDomNode * pDomNode ;
MAGIC * mg ;
SV * pSV = SvRV(pRV) ;
- if (mg = mg_find (pSV, '~'))
+ if ((mg = mg_find (pSV, '~')))
{
pDomNode = (tDomNode *)(mg -> mg_len) ;
if (xDomTree)
--- libembperl-perl-2.0b9dev6.orig/Old.xs
+++ libembperl-perl-2.0b9dev6/Old.xs
@@ -43,8 +43,8 @@
tReq * r = CurrReq ;
int bRestore = 0 ;
#ifdef APACHE
- SV * pSaveApacheReqSV ;
- request_rec * pSaveApacheReq ;
+ SV * pSaveApacheReqSV = NULL ;
+ request_rec * pSaveApacheReq = NULL ;
#endif
CODE:
#ifdef APACHE
@@ -177,8 +177,8 @@
PREINIT:
int bRestore = 0 ;
#ifdef APACHE
- SV * pSaveApacheReqSV ;
- request_rec * pSaveApacheReq ;
+ SV * pSaveApacheReqSV = NULL ;
+ request_rec * pSaveApacheReq = NULL ;
#endif
CODE:
#ifdef APACHE
--- libembperl-perl-2.0b9dev6.orig/epcache.c
+++ libembperl-perl-2.0b9dev6/epcache.c
@@ -318,7 +318,7 @@
return rc ;
sKey = SvPV(pKey, len) ;
- if (pNew = Cache_GetByKey (r, sKey))
+ if ((pNew = Cache_GetByKey (r, sKey)))
{
Cache_ParamUpdate (r, pProviderParam, bTopLevel, "Update", pNew) ;
@@ -492,7 +492,7 @@
r -> pThread -> nPid, sProvider) ;
return rc ;
}
- if (pItem = Cache_GetByKey (r, SvPV(pKey, len)))
+ if ((pItem = Cache_GetByKey (r, SvPV(pKey, len))))
{
int bCache = pItem -> bCache ;
--- libembperl-perl-2.0b9dev6.orig/epcgiinit.c
+++ libembperl-perl-2.0b9dev6/epcgiinit.c
@@ -36,16 +36,18 @@
tainted = 0 ; \
p = GetHashValueStr (aTHX_ pThread -> pEnvHash, REDIR"EMBPERL_"#CFGNAME, NULL) ;
\
if (p) \
+ { \
if (isdigit(*p)) \
pConfig -> NAME = (TYPE)strtol (p, NULL, 0) ; \
else \
{ \
int val ; \
int rc ; \
- if (rc = embperl_OptionListSearch(Options##CFGNAME,1,#CFGNAME,p,&val)) \
+ if ((rc =
embperl_OptionListSearch(Options##CFGNAME,1,#CFGNAME,p,&val))) \
return rc ; \
pConfig -> NAME = (TYPE)val ; \
} \
+ } \
tainted = 0 ; \
}
@@ -278,7 +280,7 @@
pParam -> sUri = GetHashValueStrDup (aTHX_ pPool, pThread -> pEnvHash,
"PATH_INFO", "") ;
pParam -> sPathInfo = GetHashValueStrDup (aTHX_ pPool, pThread -> pEnvHash,
"PATH_INFO", "") ;
pParam -> sQueryInfo = GetHashValueStrDup (aTHX_ pPool, pThread -> pEnvHash,
"QUERY_STRING", "") ;
- if (p = GetHashValueStrDup (aTHX_ pPool, pThread -> pEnvHash,
"HTTP_ACCEPT_LANGUAGE", NULL))
+ if ((p = GetHashValueStrDup (aTHX_ pPool, pThread -> pEnvHash,
"HTTP_ACCEPT_LANGUAGE", NULL)))
{
while (isspace(*p))
p++ ;
--- libembperl-perl-2.0b9dev6.orig/epcmd2.c
+++ libembperl-perl-2.0b9dev6/epcmd2.c
@@ -83,7 +83,7 @@
-static embperlCmd_SetRemove (/*i/o*/ register req * r,
+static void embperlCmd_SetRemove (/*i/o*/ register req * r,
/*in*/ tDomTree * pDomTree,
/*in*/ tNode xNode,
/*in*/ tRepeatLevel nRepeatLevel,
@@ -445,7 +445,7 @@
lprintf (r -> pApp, "a xOldChild=%d, rl=%d\n", xOldChild, nRepeatLevel) ;
hv_iterinit (pHV) ;
- while (pEntry = hv_iternext (pHV))
+ while ((pEntry = hv_iternext (pHV)))
{
if (i++ > 0)
Node_appendChild (r -> pApp, pDomTree, xOldChild, nRepeatLevel,
ntypCDATA, 0, "&", 5, 0, 0, NULL) ;
--- libembperl-perl-2.0b9dev6.orig/epcomp.c
+++ libembperl-perl-2.0b9dev6/epcomp.c
@@ -333,7 +333,7 @@
or = strchr (eq + 1, '|') ;
e = or?or:q ;
- if (f = (char *)strstrn (sText, eq, e - eq))
+ if ((f = (char *)strstrn (sText, eq, e - eq)))
if (!isalnum (f[e - eq]) && f[e - eq] != '_')
break ;
if (or == NULL)
@@ -676,7 +676,7 @@
{
if (pChildNode -> bFlags & aflgAttrChilds)
{
- int l = sprintf (buf, "XML::Embperl::DOM::Attr::iValue ($_ep_DomTree,%d)",
pChildNode -> xNdx) ;
+ int l = sprintf (buf, "XML::Embperl::DOM::Attr::iValue
($_ep_DomTree,%ld)", pChildNode -> xNdx) ;
sText = buf ;
if (out == 2)
out = 1 ;
@@ -795,7 +795,7 @@
if (*p == 'n')
{
char s [20] ;
- int l = sprintf (s, "$_ep_DomTree,%u", pNode -> xNdx) ;
+ int l = sprintf (s, "$_ep_DomTree,%ld", pNode -> xNdx) ;
StringAdd (r -> pApp, ppCode, s, l) ;
}
else if (*p == 't')
@@ -805,13 +805,13 @@
else if (*p == 'x')
{
char s [20] ;
- int l = sprintf (s, "%u", pNode -> xNdx) ;
+ int l = sprintf (s, "%ld", pNode -> xNdx) ;
StringAdd (r -> pApp, ppCode, s, l) ;
}
else if (*p == 'l')
{
char s [20] ;
- int l = sprintf (s, "%u", pDomTree -> xLastNode) ;
+ int l = sprintf (s, "%ld", pDomTree -> xLastNode) ;
StringAdd (r -> pApp, ppCode, s, l) ;
}
else if (*p == 'c')
@@ -819,7 +819,7 @@
char s [20] ;
if (pDomTree -> xLastNode != pDomTree -> xCurrNode)
{
- int l = sprintf (s, "$_ep_node=%u;", pDomTree ->
xLastNode) ;
+ int l = sprintf (s, "$_ep_node=%ld;", pDomTree ->
xLastNode) ;
StringAdd (r -> pApp, ppCode, s, l) ;
xCurrNode = pDomTree -> xLastNode ;
}
@@ -842,7 +842,7 @@
int l ;
tIndex nCheckpointArrayOffset = ArrayAdd (r -> pApp, &pDomTree
-> pCheckpoints, 1) ;
pDomTree -> pCheckpoints[nCheckpointArrayOffset].xNode = pNode
-> xNdx ;
- l = sprintf (s, " _ep_cp(%d) ;\n", nCheckpointArrayOffset) ;
+ l = sprintf (s, " _ep_cp(%ld) ;\n", nCheckpointArrayOffset) ;
StringAdd (r -> pApp, ppCode, s, l) ;
if (r -> Component.Config.bDebug & dbgCompile)
@@ -943,7 +943,7 @@
int nSourcefile ;
int i ;
SV * args[4] ;
- int nCodeLen ;
+ int nCodeLen = 0;
int found = 0 ;
r -> Component.pCodeSV = NULL ;
@@ -1110,7 +1110,7 @@
if (pCmd -> bRemoveNode & 16)
{
tNodeData * pChild ;
- while (pChild = Node_selfFirstChild (r -> pApp, pDomTree, pNode, 0))
+ while ((pChild = Node_selfFirstChild (r -> pApp, pDomTree, pNode, 0)))
{
Node_selfRemoveChild (r -> pApp, pDomTree, pNode -> xNdx, pChild) ;
}
@@ -1400,6 +1400,7 @@
if (nNdx <= pInfo -> nMaxEmbperlCmd)
{
pCmd = pCmdHead = &(pInfo -> pEmbperlCmds[nNdx]) ;
+ pCmdLast = NULL ;
/* ??if (pCmd -> nNodeType != pNode -> nType) */
/* pCmd = NULL ; */
}
@@ -1447,7 +1448,7 @@
if (pCmd == NULL || (pCmd -> bRemoveNode & 8) == 0)
{ /* calculate attributes before tag, but not when tag should be ignored in
output stream */
- while (pAttr = Element_selfGetNthAttribut (r -> pApp, pDomTree, pNode,
nAttr++))
+ while ((pAttr = Element_selfGetNthAttribut (r -> pApp, pDomTree, pNode,
nAttr++)))
{
if (pAttr -> bFlags & aflgAttrChilds)
{
--- libembperl-perl-2.0b9dev6.orig/epdefault.c
+++ libembperl-perl-2.0b9dev6/epdefault.c
@@ -95,7 +95,6 @@
static void embperl_DefaultComponentConfig (/*in*/ tComponentConfig *pCfg)
{
- pCfg -> sPackage ;
pCfg -> bDebug = dbgStd ;
/* pCfg -> bOptions = optRawInput | optAllFormData ; */
pCfg -> nEscMode = escStd ;
--- libembperl-perl-2.0b9dev6.orig/epdom.c
+++ libembperl-perl-2.0b9dev6/epdom.c
@@ -96,7 +96,7 @@
if (nFree > sizeof (MemFree) / sizeof (void *))
mydie (a, "Node to huge for dom_malloc") ;
- if (pNew = MemFree[nFree])
+ if ((pNew = MemFree[nFree]))
{ /* --- take one entry off the free list --- */
MemFree[nFree] = *((tUInt8 * *)pNew) ;
(*pCounter)++ ;
@@ -254,7 +254,7 @@
void * m = ((size_t *)s) - 1 ;
size_t * m_size;
nMemUsage -= *((size_t *)m) ;
- if (m = realloc (m, n + sizeof (size_t)))
+ if ((m = realloc (m, n + sizeof (size_t))))
{
nMemUsage += n ;
/* make the following in multiple step, so sun-cc is happy... */
@@ -1114,7 +1114,7 @@
int numLookup ;
tIndexShort xDomTree = pDomTree -> xNdx ;
tIndex xNdx ;
- tIndex xNode ;
+ tIndex xNode = -1 ;
tRepeatLevelLookup * pLookupLevelNode ;
tRepeatLevelLookupItem * pLookupLevelNodeLevel ;
tRepeatLevelLookupItem * pItem ;
@@ -1293,7 +1293,7 @@
ArrayClone (a, &pOrgDomTree -> pLookup, &pDomTree -> pLookup) ;
ArrayClone (a, &pOrgDomTree -> pCheckpoints, &pDomTree -> pCheckpoints) ;
- if (pDomTree -> pSV = pOrgDomTree -> pSV)
+ if ((pDomTree -> pSV = pOrgDomTree -> pSV))
SvREFCNT_inc (pDomTree -> pSV) ;
pDocument = Node_self (pDomTree, pDomTree -> xDocument) ;
@@ -1694,7 +1694,7 @@
-/*---------------------------------------------------------------------------
+/*--------------------------------------------------------------------------*/
/* */
/* DomTree_discardAfterCheckpoint */
/* */
@@ -1896,7 +1896,7 @@
}
if (pLnNode -> nRepeatLevel == nLevel)
return pLnNode ;
- while (pLookupLevelNodeLevel = pLookupLevelNodeLevel -> pNext)
+ while ((pLookupLevelNodeLevel = pLookupLevelNodeLevel -> pNext))
{
pLnNode = pLookupLevelNodeLevel -> pNode ;
if (pLnNode -> nRepeatLevel == nLevel)
@@ -2352,7 +2352,7 @@
pLookupLevelNodeLevel -> pNode = pNewChild ;
else
{
- while (pLookupLevelNodeLevel = pLookupLevelNodeLevel -> pNext)
+ while ((pLookupLevelNodeLevel = pLookupLevelNodeLevel -> pNext))
{
pLnNode = pLookupLevelNodeLevel -> pNode ;
if (pLnNode -> nRepeatLevel == nLevel)
@@ -3320,6 +3320,7 @@
{
pNodeStart = ++pNodeName ;
nNodeStartLen = 0 ;
+ pNodeEnd = NULL ;
nNodeEndLen = 0 ;
while (*pNodeName && *pNodeName != ':')
{
@@ -3391,10 +3392,12 @@
if (pAttr -> xValue)
{
if (pAttr -> xName != xNoName)
+ {
if (pAttr -> bFlags & aflgSingleQuote)
oputs (r, "='") ;
else
oputs (r, "=\"") ;
+ }
if (pAttr -> bFlags & aflgAttrChilds)
{
@@ -3419,10 +3422,12 @@
nLastLen += l ;
}
if (pAttr -> xName != xNoName)
+ {
if (pAttr -> bFlags & aflgSingleQuote)
oputc (r, '\'') ;
else
oputc (r, '"') ;
+ }
}
}
pAttr++ ;
--- libembperl-perl-2.0b9dev6.orig/epeval.c
+++ libembperl-perl-2.0b9dev6/epeval.c
@@ -145,7 +145,7 @@
if (strncmp (s, "sub ", 4) == 0)
{
SV * pSVErr ;
- SV * pRV ;
+ SV * pRV = Nullsv ;
int n ;
n = perl_eval_sv (pSV, G_EVAL | G_SCALAR) ;
@@ -233,7 +233,7 @@
SV * pSV ;
char * p ;
STRLEN l ;
- SV * pRV ;
+ SV * pRV = Nullsv ;
SV * pSVErr ;
char c ;
int n ;
@@ -1392,4 +1392,4 @@
return rc ;
return ok ; /* SvIV (pRet) ;*/
}
-#endif
\ No newline at end of file
+#endif
--- libembperl-perl-2.0b9dev6.orig/epinit.c
+++ libembperl-perl-2.0b9dev6/epinit.c
@@ -337,7 +337,7 @@
tAppConfig * pCfg = &a -> Config ;
char * sPackage = pCfg -> sSessionHandlerClass ;
HV * pHash = newHV () ;
- SV * pTie ;
+ SV * pTie = Nullsv ;
int n ;
SV * pSVCode ;
@@ -1508,7 +1508,7 @@
if (SvREFCNT(SvRV(pOutput -> _perlsv)) != 1)
{
char buf[20] ;
- sprintf (buf, "%d", SvREFCNT(SvRV(pOutput -> _perlsv)) - 1) ;
+ sprintf (buf, "%d", (int)SvREFCNT(SvRV(pOutput -> _perlsv)) - 1) ;
LogErrorParam (r -> pApp, rcRefcntNotOne, buf, "request.component.output") ;
}
sv_unmagic(SvRV(pOutput -> _perlsv), '~') ;
@@ -1572,19 +1572,19 @@
if (SvREFCNT(SvRV(c -> Config._perlsv)) != 1)
{
char buf[20] ;
- sprintf (buf, "%d", SvREFCNT(SvRV(c -> Config._perlsv)) - 1) ;
+ sprintf (buf, "%d", (int)SvREFCNT(SvRV(c -> Config._perlsv)) - 1) ;
LogErrorParam (r -> pApp, rcRefcntNotOne, buf, "request.component.config") ;
}
if (SvREFCNT(SvRV(c -> Param._perlsv)) != 1)
{
char buf[20] ;
- sprintf (buf, "%d", SvREFCNT(SvRV(c -> Param._perlsv)) - 1) ;
+ sprintf (buf, "%d", (int)SvREFCNT(SvRV(c -> Param._perlsv)) - 1) ;
LogErrorParam (r -> pApp, rcRefcntNotOne, buf, "request.component.param") ;
}
if (SvREFCNT(c -> _perlsv) != 1)
{
char buf[20] ;
- sprintf (buf, "%d", SvREFCNT(SvRV(c -> _perlsv)) - 1) ;
+ sprintf (buf, "%d", (int)SvREFCNT(SvRV(c -> _perlsv)) - 1) ;
LogErrorParam (r -> pApp, rcRefcntNotOne, buf, "request.component") ;
}
@@ -1594,13 +1594,13 @@
Embperl__Component_destroy(aTHX_ c) ;
pHV = SvRV (c -> _perlsv) ;
- if (mg = mg_find (pHV, '~'))
+ if ((mg = mg_find (pHV, '~')))
*((tComponent **)(mg -> mg_ptr)) = &NullRequest.Component ;
pHV = SvRV (c -> Config._perlsv) ;
- if (mg = mg_find (pHV, '~'))
+ if ((mg = mg_find (pHV, '~')))
*((tComponentConfig **)(mg -> mg_ptr)) = &NullRequest.Component.Config ;
pHV = SvRV (c -> Param._perlsv) ;
- if (mg = mg_find (pHV, '~'))
+ if ((mg = mg_find (pHV, '~')))
*((tComponentParam **)(mg -> mg_ptr)) = &NullRequest.Component.Param ;
SvREFCNT_dec (c -> Config._perlsv) ;
@@ -1616,13 +1616,13 @@
/* adjust pointer in perl magic */
pHV = SvRV (c -> _perlsv) ;
- if (mg = mg_find (pHV, '~'))
+ if ((mg = mg_find (pHV, '~')))
*((tComponent **)(mg -> mg_ptr)) = c ;
pHV = SvRV (c -> Config._perlsv) ;
- if (mg = mg_find (pHV, '~'))
+ if ((mg = mg_find (pHV, '~')))
*((tComponentConfig **)(mg -> mg_ptr)) = &c -> Config ;
pHV = SvRV (c -> Param._perlsv) ;
- if (mg = mg_find (pHV, '~'))
+ if ((mg = mg_find (pHV, '~')))
*((tComponentParam **)(mg -> mg_ptr)) = &c -> Param ;
}
else
@@ -1711,13 +1711,13 @@
if (SvREFCNT(SvRV(r -> Config._perlsv)) != 1)
{
char buf[20] ;
- sprintf (buf, "%d", SvREFCNT(SvRV(r -> Config._perlsv)) - 1) ;
+ sprintf (buf, "%d", (int)SvREFCNT(SvRV(r -> Config._perlsv)) - 1) ;
LogErrorParam (r -> pApp, rcRefcntNotOne, buf, "request.config") ;
}
if (SvREFCNT(SvRV(r -> Param._perlsv)) != 1)
{
char buf[20] ;
- sprintf (buf, "%d", SvREFCNT(SvRV(r -> Param._perlsv)) - 1) ;
+ sprintf (buf, "%d", (int)SvREFCNT(SvRV(r -> Param._perlsv)) - 1) ;
LogErrorParam (r -> pApp, rcRefcntNotOne, buf, "request.param") ;
}
/*
@@ -1739,13 +1739,13 @@
Embperl__Req_destroy(aTHX_ r) ;
pHV = SvRV (r -> _perlsv) ;
- if (mg = mg_find (pHV, '~'))
+ if ((mg = mg_find (pHV, '~')))
*((tReq **)(mg -> mg_ptr)) = &NullRequest ;
pHV = SvRV (r -> Config._perlsv) ;
- if (mg = mg_find (pHV, '~'))
+ if ((mg = mg_find (pHV, '~')))
*((tReqConfig **)(mg -> mg_ptr)) = &NullRequest.Config ;
pHV = SvRV (r -> Param._perlsv) ;
- if (mg = mg_find (pHV, '~'))
+ if ((mg = mg_find (pHV, '~')))
*((tReqParam **)(mg -> mg_ptr)) = &NullRequest.Param ;
@@ -1882,13 +1882,13 @@
/* adjust pointer in perl magic */
pHV = SvRV (pPrev -> _perlsv) ;
- if (mg = mg_find (pHV, '~'))
+ if ((mg = mg_find (pHV, '~')))
*((tComponent **)(mg -> mg_ptr)) = pPrev ;
pHV = SvRV (pPrev -> Config._perlsv) ;
- if (mg = mg_find (pHV, '~'))
+ if ((mg = mg_find (pHV, '~')))
*((tComponentConfig **)(mg -> mg_ptr)) = &pPrev -> Config ;
pHV = SvRV (pPrev -> Param._perlsv) ;
- if (mg = mg_find (pHV, '~'))
+ if ((mg = mg_find (pHV, '~')))
*((tComponentParam **)(mg -> mg_ptr)) = &pPrev -> Param ;
}
@@ -1984,7 +1984,7 @@
else
pParam -> sInputfile = r -> Param.sFilename ;
}
- else if (p = strchr(pParam -> sInputfile, '#'))
+ else if ((p = strchr(pParam -> sInputfile, '#')))
{
pParam -> sSub = p + 1 ;
if (p == pParam -> sInputfile && c -> pPrev)
--- libembperl-perl-2.0b9dev6.orig/epmain.c
+++ libembperl-perl-2.0b9dev6/epmain.c
@@ -456,7 +456,7 @@
char * pInitialUID = NULL ;
STRLEN ulen = 0 ;
STRLEN ilen = 0 ;
- IV bModified ;
+ IV bModified = 0 ;
char * pCookie = NULL ;
STRLEN ldummy ;
tAppConfig * pCfg = &r -> pApp -> Config ;
@@ -1183,7 +1183,7 @@
epTHX_
int rc ;
SV * pParam ;
- SV * pParamRV ;
+ SV * pParamRV = Nullsv;
SV * pRecipe = r -> Component.Config.pRecipe ;
STRLEN l ;
int num ;
@@ -1319,10 +1319,12 @@
if (!r -> bError)
{
if ((rc = ProcessFile (r, 0 /*r -> Buf.pFile -> nFilesize*/)) != ok)
+ {
if (rc == rcExit)
rc = ok ;
else
LogError (r, rc) ;
+ }
if (r -> Component.Param.nImport > 0)
export (r) ;
@@ -1441,10 +1443,12 @@
oBegin (r) ;
if ((rc = ProcessFile (r, 0 /*r -> Buf.pFile -> nFilesize*/)) != ok)
+ {
if (rc == rcExit)
rc = ok ;
else
LogError (r, rc) ;
+ }
if (rc == ok && (c -> Config.bOptions & optReturnError) && r -> bError)
rc = 500 ;
--- libembperl-perl-2.0b9dev6.orig/epparse.c
+++ libembperl-perl-2.0b9dev6/epparse.c
@@ -95,7 +95,7 @@
pHVProcInfo = (HV *)SvRV (*ppSV) ;
hv_iterinit (pHVProcInfo ) ;
- while (pEntry = hv_iternext (pHVProcInfo))
+ while ((pEntry = hv_iternext (pHVProcInfo)))
{
pKey = hv_iterkey (pEntry, &l) ;
pSVValue = hv_iterval (pHVProcInfo , pEntry) ;
@@ -336,7 +336,7 @@
p -> pStartTag = (struct tToken *)GetHashValueStrDup (aTHX_ r -> pThread
-> pMainPool, pHash, "starttag", NULL) ;
p -> pEndTag = (struct tToken *)GetHashValueStrDup (aTHX_ r -> pThread
-> pMainPool, pHash, "endtag", NULL) ;
p -> sParseTimePerlCode = GetHashValueStrDup (aTHX_ r -> pThread ->
pMainPool, pHash, "parsetimeperlcode", NULL) ;
- if (sC = sContains = GetHashValueStrDup (aTHX_ r -> pThread -> pMainPool,
pHash, "contains", NULL))
+ if ((sC = sContains = GetHashValueStrDup (aTHX_ r -> pThread ->
pMainPool, pHash, "contains", NULL)))
{
unsigned char * pC ;
if ((p -> pContains = parse_malloc (r, sizeof (tCharMap))) == NULL)
@@ -489,7 +489,7 @@
SV * args[2] ;
epTHX ;
- if (p = strnstr (sPCode, "%%", nLen))
+ if ((p = strnstr (sPCode, "%%", nLen)))
{
sCode = parse_malloc (r, nLen + plen + 1) ;
n = p - sPCode ;
@@ -582,7 +582,7 @@
char * pCurr = *ppCurr ;
char * pCurrStart = pCDATAStart?pCDATAStart:pCurr ;
tNode xNewNode ;
- int rc ;
+ int rc = ok;
tDomTree * pDomTree = DomTree_self (r -> Component.xCurrDomTree) ;
int numInside = 0 ;
@@ -695,7 +695,7 @@
}
- while (pNextTokenTab = pToken -> pFollowedBy) ;
+ while ((pNextTokenTab = pToken -> pFollowedBy)) ;
if (pToken)
{ /* matching token found */
@@ -802,7 +802,7 @@
xParentNode = Node_parentNode (r -> pApp, pDomTree,
xParentNode, 0) ;
level-- ;
}
- if (pToken -> nNodeType && pToken -> nNodeType != ntypCDATA ||
pToken -> sNodeName)
+ if ((pToken -> nNodeType && pToken -> nNodeType != ntypCDATA) ||
pToken -> sNodeName)
{
/* add token as node if not cdata*/
tNodeType nType = pToken -> nNodeType ;
@@ -825,7 +825,7 @@
xNewNode = xParentNode ;
}
- if (pInside = pToken -> pInside)
+ if ((pInside = pToken -> pInside))
{ /* parse for further tokens inside of this token */
rc = ParseTokens (r, &pCurr, pEnd, pInside,
pToken -> sEndText,
@@ -880,7 +880,7 @@
{ /* nothing more inside of this token allowed, so search for
the end of the token */
char * pEndCurr ;
unsigned char * pContains ;
- int nSkip ;
+ int nSkip = 0;
if ((pContains = pToken -> pContains))
{
pEndCurr = pCurr ;
@@ -900,7 +900,8 @@
pEndCurr = NULL ;
if (strcmp (pToken -> sEndText, "\n\n") == 0)
{
- if (pEndCurr = strstr (pCurr, "\n\r\n"))
+ if ((pEndCurr = strstr (pCurr, "\n\r\n")))
+ {
if (pEndCurr[-1] == '\r')
{
pEndCurr-- ;
@@ -908,6 +909,7 @@
}
else
nSkip = pCurr[3] == '\r'?4:3 ;
+ }
}
if (!pEndCurr)
{
@@ -1005,7 +1007,7 @@
return bInsideMustExist?rcNotFound:ok ;
}
else if (sEndText == NULL ||
- (*pCurr == *sEndText && (strncmp (pCurr, sEndText, nEndText) == 0) ||
+ ((*pCurr == *sEndText && (strncmp (pCurr, sEndText, nEndText) == 0)) ||
(pCurr[0] == '\n' && pCurr[1] == '\r' && pCurr[2] == '\n' &&
sEndText[1] == '\n' && sEndText[2] == '\0')) ||
(pCurr[0] == '\r' && pCurr[1] == '\n' && pCurr[2] == '\r' && pCurr[3] ==
'\n' && sEndText[0] == '\n' && sEndText[1] == '\n' && sEndText[2] == '\0')
)
--- libembperl-perl-2.0b9dev6.orig/epprovider.c
+++ libembperl-perl-2.0b9dev6/epprovider.c
@@ -878,7 +878,7 @@
int rc ;
int num ;
SV * pSyntaxSV ;
- SV * pSyntaxRV ;
+ SV * pSyntaxRV = Nullsv ;
SV * pSyntaxPV ;
tTokenTable * pSyntax ;
const char * sSyntax = GetHashValueStr (aTHX_ pProviderParam, "syntax", r ->
Component.Config.sSyntax) ;
@@ -1154,7 +1154,7 @@
/*if (r -> Config.bDebug)
lprintf (r -> pApp, "[%d]ep_acquire_mutex(PackageCountMutex)\n", r -> pThread
-> nPid) ; */
- if (sPackage = GetHashValueStrDupA (aTHX_ pProviderParam, "package", r ->
Component.Config.sPackage))
+ if ((sPackage = GetHashValueStrDupA (aTHX_ pProviderParam, "package", r ->
Component.Config.sPackage)))
{
int n ;
ep_acquire_mutex(PackageCountMutex) ;
--- libembperl-perl-2.0b9dev6.orig/eputil.c
+++ libembperl-perl-2.0b9dev6/eputil.c
@@ -632,10 +632,12 @@
if (strnicmp (pTag, pArg, l) == 0 && (pTag[l] == '=' || isspace (pTag[l]) ||
pTag[l] == '>' || pTag[l] == '\0'))
+ {
if (*pLen > 0)
return pVal ;
else
return pTag ;
+ }
pTag = pEnd ;
}
@@ -777,7 +779,7 @@
ppSV = hv_fetch(pHash, (char *)sKey, strlen (sKey), 0) ;
if (ppSV != NULL)
{
- if (s = SvPV (*ppSV, l))
+ if ((s = SvPV (*ppSV, l)))
return ep_pstrdup (pPool, s);
else
return NULL ;
@@ -801,7 +803,7 @@
ppSV = hv_fetch(pHash, (char *)sKey, strlen (sKey), 0) ;
if (ppSV != NULL)
{
- if (s = SvPV (*ppSV, l))
+ if ((s = SvPV (*ppSV, l)))
return strdup (s);
else
return NULL ;
@@ -827,10 +829,12 @@
ppSV = hv_fetch(pHash, (char *)sKey, strlen (sKey), 0) ;
if (ppSV != NULL)
+ {
if (!SvROK(*ppSV) || SvTYPE (SvRV(*ppSV)) != SVt_PVHV)
*sValue = SvPV (*ppSV, l), *pHV = NULL ;
else
*pHV = (HV *)SvRV(*ppSV), *sValue = NULL ;
+ }
}
@@ -1807,10 +1811,10 @@
epTHX_
char * pMsg ;
- if (pMsg = embperl_GetText1(r, sMsgId, r -> pMessages))
+ if ((pMsg = embperl_GetText1(r, sMsgId, r -> pMessages)))
return pMsg ;
- if (pMsg = embperl_GetText1(r, sMsgId, r -> pDefaultMessages))
+ if ((pMsg = embperl_GetText1(r, sMsgId, r -> pDefaultMessages)))
return pMsg ;
return sMsgId ;
--- libembperl-perl-2.0b9dev6.orig/mod_embperl.c
+++ libembperl-perl-2.0b9dev6/mod_embperl.c
@@ -334,7 +334,7 @@
{
module * m ;
/* make sure embperl module is removed before mod_perl in case mod_perl is loaded
dynamicly*/
- if (m = ap_find_linked_module("mod_perl.c"))
+ if ((m = ap_find_linked_module("mod_perl.c")))
{
if (m -> dynamic_load_handle)
{
@@ -598,7 +598,7 @@
#define EPCFG_BOOL(STRUCT,TYPE,NAME,CFGNAME) \
const char * embperl_Apache_Config_##STRUCT##NAME (cmd_parms *cmd, /*
tApacheDirConfig */ void * pDirCfg, const char * arg) \
{ \
- ((tApacheDirConfig *)pDirCfg) -> STRUCT.NAME = (TYPE)arg ; \
+ ((tApacheDirConfig *)pDirCfg) -> STRUCT.NAME = (TYPE)atoi(arg) ; \
((tApacheDirConfig *)pDirCfg) -> set_##STRUCT##NAME = 1 ; \
if (bApDebug) \
ap_log_error (APLOG_MARK, APLOG_WARNING | APLOG_NOERRNO, APLOG_STATUSCODE
NULL, "Embperl: Set "#CFGNAME" (type="#TYPE";BOOL) = %s\n", arg) ; \
@@ -937,7 +937,7 @@
pParam -> sUri = r -> uri ;
pParam -> sPathInfo = r -> path_info ;
pParam -> sQueryInfo = r -> args ;
- if (p = ep_pstrdup (pPool, ap_table_get (r -> headers_in, "Accept-Language")))
+ if ((p = ep_pstrdup (pPool, ap_table_get (r -> headers_in, "Accept-Language"))))
{
while (isspace(*p))
p++ ;
--- libembperl-perl-2.0b9dev6.orig/typemap
+++ libembperl-perl-2.0b9dev6/typemap
@@ -25,7 +25,7 @@
T_PTROBJ_REQ
{
MAGIC * mg ;
- if (mg = mg_find (SvRV($arg), '~'))
+ if ((mg = mg_find (SvRV($arg), '~')))
$var = *((tReq **)(mg -> mg_ptr)) ;
else
croak (\"$var is not of type Embperl::Req\") ;
@@ -41,7 +41,7 @@
T_PTROBJ_DOMNODE
{
MAGIC * mg ;
- if (mg = mg_find (SvRV($arg), '~'))
+ if ((mg = mg_find (SvRV($arg), '~')))
$var = *((tDomNode **)(mg -> mg_ptr)) ;
else
croak (\"$var is not of type XML::Embperl::DOM::Node\") ;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]