I32 grows = PL_op->op_private & OPpTRANS_GROWS;
I32 complement = PL_op->op_private & OPpTRANS_COMPLEMENT;
I32 del = PL_op->op_private & OPpTRANS_DELETE;
- STRLEN len, rlen;
+ STRLEN len, rlen = 0;
short *tbl;
I32 ch;
SV** svp = hv_fetch(hv, "NONE", 4, FALSE);
UV none = svp ? SvUV(*svp) : 0x7fffffff;
UV extra = none + 1;
- UV final;
+ UV final = 0;
UV uv;
I32 isutf8;
U8 hibit = 0;
S_do_trans_count_utf8(pTHX_ SV *sv)/* SPC - OK */
{
U8 *s;
- U8 *start, *send;
+ U8 *start = 0, *send;
I32 matches = 0;
STRLEN len;
SV** svp = hv_fetch(hv, "NONE", 4, FALSE);
UV none = svp ? SvUV(*svp) : 0x7fffffff;
UV extra = none + 1;
- UV final;
+ UV final = 0;
bool havefinal = FALSE;
UV uv;
STRLEN len;
char *rsave;
bool left_utf = DO_UTF8(left);
bool right_utf = DO_UTF8(right);
- I32 needlen;
+ I32 needlen = 0;
if (left_utf && !right_utf)
sv_utf8_upgrade(right);
#define BGET_op_tr_array(arg) do { \
unsigned short *ary; \
- int i; \
New(666, ary, 256, unsigned short); \
BGET_FREAD(ary, sizeof(unsigned short), 256); \
arg = (char *) ary; \
DBT value ;
int i ;
int One ;
- DB * Db = db->dbp ;
STRLEN n_a;
DBT_clear(key) ;
#ifdef DB_VERSION_MAJOR
RETVAL = (db->cursor->c_put)(db->cursor, &key, &value, DB_BEFORE) ;
#else
- RETVAL = (Db->put)(Db, &key, &value, R_IBEFORE) ;
+ RETVAL = (db->dbp->put)(db->dbp, &key, &value, R_IBEFORE) ;
#endif
if (RETVAL != 0)
break;
# ifndef NGROUPS
# define NGROUPS 32
# endif
+# ifdef I_GRP
+# include <grp.h>
+# endif
#endif
static void restore_magic(pTHXo_ void *p);
getrx:
if (i >= 0) {
- bool was_tainted;
+ bool was_tainted = FALSE;
if (PL_tainting) {
was_tainted = PL_tainted;
PL_tainted = FALSE;
{
register char *s;
I32 i;
- SV** svp;
+ SV** svp = 0;
STRLEN len;
s = MgPV(mg,len);
dSP;
GV *gv = Nullgv;
HV *st;
- SV *sv, *tSv = PL_Sv;
+ SV *sv = Nullsv, *tSv = PL_Sv;
CV *cv = Nullcv;
OP *myop = PL_op;
U32 flags = 0;
LOGOP myop; /* fake syntax tree node */
UNOP method_op;
I32 oldmark;
- I32 retval;
+ I32 retval = 0;
I32 oldscope;
bool oldcatch = CATCH_GET;
int ret;
dSP;
UNOP myop; /* fake syntax tree node */
I32 oldmark = SP - PL_stack_base;
- I32 retval;
+ I32 retval = 0;
I32 oldscope;
int ret;
OP* oldop = PL_op;
IO *io = GvIOn((GV *)SvRV(sv));
PerlIO *ifp = IoIFP(io);
PerlIO *ofp = IoOFP(io);
- AV *av = (AV *) mg->mg_obj;
Perl_warn(aTHX_ "set %"SVf" %p %p %p",sv,io,ifp,ofp);
}
return 0;
IO *io = GvIOn((GV *)SvRV(sv));
PerlIO *ifp = IoIFP(io);
PerlIO *ofp = IoOFP(io);
- AV *av = (AV *) mg->mg_obj;
Perl_warn(aTHX_ "get %"SVf" %p %p %p",sv,io,ifp,ofp);
}
return 0;
/* Pop back to bottom layer */
if (f && *f)
{
- int code = 0;
PerlIO_flush(f);
while (!(PerlIOBase(f)->tab->kind & PERLIO_K_RAW))
{
{
PerlIO *top = f;
PerlIOl *l;
- while (l = *top)
+ while ((l = *top))
{
if (PerlIOBase(top)->tab == &PerlIO_crlf)
{
{
AV *layera;
IV n;
- PerlIO_funcs *tab;
+ PerlIO_funcs *tab = NULL;
if (f && *f)
{
/* This is "reopen" - it is not tested as perl does not use it yet */
PerlIOBase_pushed(PerlIO *f, const char *mode, SV *arg)
{
PerlIOl *l = PerlIOBase(f);
+#if 0
const char *omode = mode;
char temp[8];
+#endif
PerlIO_funcs *tab = PerlIOBase(f)->tab;
l->flags &= ~(PERLIO_F_CANREAD|PERLIO_F_CANWRITE|
PERLIO_F_TRUNCATE|PERLIO_F_APPEND);
PerlIOUnix_tell(PerlIO *f)
{
dTHX;
- Off_t posn = PerlLIO_lseek(PerlIOSelf(f,PerlIOUnix)->fd,0,SEEK_CUR);
return PerlLIO_lseek(PerlIOSelf(f,PerlIOUnix)->fd,0,SEEK_CUR);
}
f = (*tab->Open)(aTHX_ tab, layers, n-2, mode,fd,imode,perm,NULL,narg,args);
if (f)
{
- PerlIOBuf *b = PerlIOSelf(PerlIO_push(aTHX_ f,self,mode,PerlIOArg),PerlIOBuf);
+ PerlIO_push(aTHX_ f,self,mode,PerlIOArg);
fd = PerlIO_fileno(f);
#if O_BINARY != O_TEXT
/* do something about failing setmode()? --jhi */
{
dTHX;
PerlIOMmap *m = PerlIOSelf(f,PerlIOMmap);
- PerlIOBuf *b = &m->base;
IV flags = PerlIOBase(f)->flags;
IV code = 0;
if (m->len)
Perl_re_intuit_start(pTHX_ regexp *prog, SV *sv, char *strpos,
char *strend, U32 flags, re_scream_pos_data *data)
{
- register I32 start_shift;
+ register I32 start_shift = 0;
/* Should be nonnegative! */
- register I32 end_shift;
+ register I32 end_shift = 0;
register char *s;
register SV *check;
char *strbeg;
char *t;
I32 ml_anch;
- char *tmp;
register char *other_last = Nullch; /* other substr checked before this */
- char *check_at; /* check substr found at this pos */
+ char *check_at = Nullch; /* check substr found at this pos */
#ifdef DEBUGGING
char *i_strpos = strpos;
#endif
s = find_byclass(prog, prog->regstclass, s, endpos, startpos, 1);
if (!s) {
#ifdef DEBUGGING
- char *what;
+ char *what = 0;
#endif
if (endpos == strend) {
DEBUG_r( PerlIO_printf(Perl_debug_log,
DEBUG_r( what = "floating" );
goto hop_and_restart;
}
- DEBUG_r( if (t != s)
- PerlIO_printf(Perl_debug_log,
+ if (t != s) {
+ DEBUG_r(PerlIO_printf(Perl_debug_log,
"By STCLASS: moving %ld --> %ld\n",
- (long)(t - i_strpos), (long)(s - i_strpos));
- else
- PerlIO_printf(Perl_debug_log,
- "Does not contradict STCLASS...\n") );
+ (long)(t - i_strpos), (long)(s - i_strpos))
+ );
+ }
+ else {
+ DEBUG_r(PerlIO_printf(Perl_debug_log,
+ "Does not contradict STCLASS...\n");
+ );
+ }
}
giveup:
DEBUG_r(PerlIO_printf(Perl_debug_log, "%s%s:%s match at offset %ld\n",
s++;
}
}
- DEBUG_r(did_match ||
+ DEBUG_r(if (!did_match)
PerlIO_printf(Perl_debug_log,
- "Did not find anchored character...\n"));
+ "Did not find anchored character...\n")
+ );
}
/*SUPPRESS 560*/
else if (do_utf8 == (UTF!=0) &&
}
}
}
- DEBUG_r(did_match ||
- PerlIO_printf(Perl_debug_log, "Did not find %s substr `%s%.*s%s'%s...\n",
+ DEBUG_r(if (!did_match)
+ PerlIO_printf(Perl_debug_log,
+ "Did not find %s substr `%s%.*s%s'%s...\n",
((must == prog->anchored_substr)
? "anchored" : "floating"),
PL_colors[0],
(int)(SvCUR(must) - (SvTAIL(must)!=0)),
SvPVX(must),
- PL_colors[1], (SvTAIL(must) ? "$" : "")));
+ PL_colors[1], (SvTAIL(must) ? "$" : ""))
+ );
goto phooey;
}
else if ((c = prog->regstclass)) {
register I32 nextchr; /* renamed nextchr - nextchar colides with
function of same name */
register I32 n; /* no or next */
- register I32 ln; /* len or last */
- register char *s; /* operand or save */
+ register I32 ln = 0; /* len or last */
+ register char *s = Nullch; /* operand or save */
register char *locinput = PL_reginput;
- register I32 c1, c2, paren; /* case fold search, parenth */
+ register I32 c1 = 0, c2 = 0, paren; /* case fold search, parenth */
int minmod = 0, sw = 0, logical = 0;
I32 unwind = 0;
+#if 0
I32 firstcp = PL_savestack_ix;
+#endif
register bool do_utf8 = DO_UTF8(PL_reg_sv);
#ifdef DEBUGGING
inner = NEXTOPER(scan);
do_branch:
{
- CHECKPOINT lastcp;
c1 = OP(scan);
if (OP(next) != c1) /* No choice. */
next = inner; /* Avoid recursion. */
STATIC I32
S_regrepeat_hard(pTHX_ regnode *p, I32 max, I32 *lp)
{
- register char *scan;
+ register char *scan = Nullch;
register char *start;
register char *loceol = PL_regeol;
I32 l = 0;
{
dXSARGS;
UV uv = SvUV(ST(0));
+
+ if (items > 1)
+ Perl_croak(aTHX_ "Usage: utf8::native_to_unicode(sv)");
+
ST(0) = sv_2mortal(newSViv(NATIVE_TO_UNI(uv)));
XSRETURN(1);
}
{
dXSARGS;
UV uv = SvUV(ST(0));
+
+ if (items > 1)
+ Perl_croak(aTHX_ "Usage: utf8::unicode_to_native(sv)");
+
ST(0) = sv_2mortal(newSViv(UNI_TO_NATIVE(uv)));
XSRETURN(1);
}
}
if (pid == 0) {
/* Child */
- GV* tmpgv;
- int fd;
#undef THIS
#undef THAT
#define THIS that
}
#if !defined(HAS_FCNTL) || !defined(F_SETFD)
/* No automatic close - do it by hand */
-#ifndef NOFILE
-#define NOFILE 20
-#endif
- for (fd = PL_maxsysfd + 1; fd < NOFILE; fd++) {
+# ifndef NOFILE
+# define NOFILE 20
+# endif
+ for (int fd = PL_maxsysfd + 1; fd < NOFILE; fd++) {
if (fd != pp[1])
PerlLIO_close(fd);
}
Pid_t pid;
Pid_t pid2;
bool close_failed;
- int saved_errno;
+ int saved_errno = 0;
#ifdef VMS
int saved_vaxc_errno;
#endif
I32
Perl_wait4pid(pTHX_ Pid_t pid, int *statusp, int flags)
{
+ if (!pid)
+ return -1;
+#if !defined(HAS_WAITPID) && !defined(HAS_WAIT4) || defined(HAS_WAITPID_RUNTIME)
+ {
SV *sv;
SV** svp;
char spid[TYPE_CHARS(int)];
- if (!pid)
- return -1;
-#if !defined(HAS_WAITPID) && !defined(HAS_WAIT4) || defined(HAS_WAITPID_RUNTIME)
if (pid > 0) {
sprintf(spid, "%"IVdf, (IV)pid);
svp = hv_fetch(PL_pidstatus,spid,strlen(spid),FALSE);
(void)hv_delete(PL_pidstatus,spid,strlen(spid),G_DISCARD);
return pid;
}
+ }
}
#endif
#ifdef HAS_WAITPID
for (argc--,argv++; argc; argc--,argv++) {
if (argv[0][0] != '-' || !argv[0][1])
break;
- reswitch:
switch (argv[0][1]) {
#ifdef DEBUGGING
case 'D':
retry:
#if YYDEBUG
- if (yydebug)
+ if (yydebug) {
if (strchr(s,'\n'))
fprintf(stderr,"Tokener at %s",s);
else
fprintf(stderr,"Tokener at %s\n",s);
+ }
#endif
switch (*s) {
default:
{
int type;
STR *str;
- int numargs;
+ int numargs = 0;
if (!arg)
return prevargs;
str->str_len = nstr->str_len;
str->str_cur = nstr->str_cur;
str->str_pok = nstr->str_pok;
- if (str->str_nok = nstr->str_nok)
+ if ((str->str_nok = nstr->str_nok))
str->str_nval = nstr->str_nval;
safefree((char*)nstr);
}
STR *tmp2str;
STR *tmp3str;
char *t;
- char *d, *s;
+ char *d, *s = 0;
int numarg;
int numeric = FALSE;
STR *fstr;
subretnum |= numarg;
s = Nullch;
t = tmp2str->str_ptr;
- while (t = instr(t,"return "))
+ while ((t = instr(t,"return ")))
s = t++;
if (s) {
i = 0;
if (!s)
fatal("Illegal for loop: %s",d);
*s++ = '\0';
- for (t = s; i = *t; t++) {
+ for (t = s; (i = *t); t++) {
i &= 127;
if (i == '}' || i == ']')
break;
dXSARGS;
char *file = __FILE__;
+ if( items > 0 )
+ Perl_croak(aTHX_ "Usage: bootstrap");
+
newXSproto("attributes::_warn_reserved", XS_attributes__warn_reserved, file, "");
newXS("attributes::_modify_attrs", XS_attributes__modify_attrs, file);
newXSproto("attributes::_guess_stash", XS_attributes__guess_stash, file, "$");