#define RF_evaled 4 /* Did an EVAL with setting? */
#define RF_utf8 8 /* String contains multibyte chars? */
-#define UTF (PL_reg_flags & RF_utf8)
+#define UTF ((PL_reg_flags & RF_utf8) != 0)
#define RS_init 1 /* eval environment created */
#define RS_set 2 /* replsv value is set */
);
}
DEBUG_r(
- if (*PL_reglastparen + 1 <= PL_regnpar) {
+ if ((I32)(*PL_reglastparen + 1) <= PL_regnpar) {
PerlIO_printf(Perl_debug_log,
" restoring \\%"IVdf"..\\%"IVdf" to undef\n",
(IV)(*PL_reglastparen + 1), (IV)PL_regnpar);
* building DynaLoader will fail:
* "Error: '*' not in typemap in DynaLoader.xs, line 164"
* --jhi */
- for (paren = *PL_reglastparen + 1; paren <= PL_regnpar; paren++) {
- if (paren > PL_regsize)
+ for (paren = *PL_reglastparen + 1; (I32)paren <= PL_regnpar; paren++) {
+ if ((I32)paren > PL_regsize)
PL_regstartp[paren] = -1;
PL_regendp[paren] = -1;
}
c1 = *(U8*)m;
c2 = PL_fold_locale[c1];
do_exactf:
- e = HOP3c(strend, -ln, s);
+ e = HOP3c(strend, -(I32)ln, s);
if (norun && e < s)
e = s; /* Due to minlen logic of intuit() */
if ( c == c1
&& (ln == len ||
ibcmp_utf8(s, (char **)0, 0, do_utf8,
- m, (char **)0, ln, UTF))
+ m, (char **)0, ln, (bool)UTF))
&& (norun || regtry(prog, s)) )
goto got_it;
else {
!ibcmp_utf8((char *) foldbuf,
(char **)0, foldlen, do_utf8,
m,
- (char **)0, ln, UTF))
+ (char **)0, ln, (bool)UTF))
&& (norun || regtry(prog, s)) )
goto got_it;
}
if ( (c == c1 || c == c2)
&& (ln == len ||
ibcmp_utf8(s, (char **)0, 0, do_utf8,
- m, (char **)0, ln, UTF))
+ m, (char **)0, ln, (bool)UTF))
&& (norun || regtry(prog, s)) )
goto got_it;
else {
!ibcmp_utf8((char *) foldbuf,
(char **)0, foldlen, do_utf8,
m,
- (char **)0, ln, UTF))
+ (char **)0, ln, (bool)UTF))
&& (norun || regtry(prog, s)) )
goto got_it;
}
sp = prog->startp;
ep = prog->endp;
if (prog->nparens) {
- for (i = prog->nparens; i > *PL_reglastparen; i--) {
+ for (i = prog->nparens; i > (I32)*PL_reglastparen; i--) {
*++sp = -1;
*++ep = -1;
}
case EXACT:
s = STRING(scan);
ln = STR_LEN(scan);
- if (do_utf8 != (UTF!=0)) {
+ if (do_utf8 != UTF) {
/* The target and the pattern have differing utf8ness. */
char *l = locinput;
char *e = s + ln;
char *l = locinput;
char *e = PL_regeol;
- if (ibcmp_utf8(s, 0, ln, UTF,
+ if (ibcmp_utf8(s, 0, ln, (bool)UTF,
l, &e, 0, do_utf8)) {
/* One more case for the sharp s:
* pack("U0U*", 0xDF) =~ /ss/i,
n = ARG(scan); /* which paren pair */
ln = PL_regstartp[n];
PL_reg_leftiter = PL_reg_maxiter; /* Void cache */
- if (*PL_reglastparen < n || ln == -1)
+ if ((I32)*PL_reglastparen < n || ln == -1)
sayNO; /* Do not match unless seen CLOSEn. */
if (ln == PL_regendp[n])
break;
n = ARG(scan); /* which paren pair */
PL_regstartp[n] = PL_reg_start_tmp[n] - PL_bostr;
PL_regendp[n] = locinput - PL_bostr;
- if (n > *PL_reglastparen)
+ if (n > (I32)*PL_reglastparen)
*PL_reglastparen = n;
*PL_reglastcloseparen = n;
break;
case GROUPP:
n = ARG(scan); /* which paren pair */
- sw = (*PL_reglastparen >= n && PL_regendp[n] != -1);
+ sw = ((I32)*PL_reglastparen >= n && PL_regendp[n] != -1);
break;
case IFTHEN:
PL_reg_leftiter = PL_reg_maxiter; /* Void cache */
PL_regcc = &cc;
/* XXXX Probably it is better to teach regpush to support
parenfloor > PL_regsize... */
- if (parenfloor > *PL_reglastparen)
+ if (parenfloor > (I32)*PL_reglastparen)
parenfloor = *PL_reglastparen; /* Pessimization... */
cc.parenfloor = parenfloor;
cc.cur = -1;
DEBUG_r(
PerlIO_printf(Perl_debug_log,
- "%*s %ld out of %ld..%ld cc=%lx\n",
+ "%*s %ld out of %ld..%ld cc=%"UVxf"\n",
REPORT_CODE_OFF+PL_regindent*2, "",
(long)n, (long)cc->min,
- (long)cc->max, (long)cc)
+ (long)cc->max, PTR2UV(cc))
);
/* If degenerate scan matches "", assume scan done. */
if (PL_reg_leftiter-- == 0) {
I32 size = (PL_reg_maxiter + 7)/8;
if (PL_reg_poscache) {
- if (PL_reg_poscache_size < size) {
+ if ((I32)PL_reg_poscache_size < size) {
Renew(PL_reg_poscache, size, char);
PL_reg_poscache_size = size;
}
if (paren) {
if (paren > PL_regsize)
PL_regsize = paren;
- if (paren > *PL_reglastparen)
+ if (paren > (I32)*PL_reglastparen)
*PL_reglastparen = paren;
}
scan = NEXTOPER(scan) + NODE_STEP_REGNODE;
ln = PL_regstartp[n];
/* assume yes if we haven't seen CLOSEn */
if (
- *PL_reglastparen < n ||
+ (I32)*PL_reglastparen < n ||
ln == -1 ||
ln == PL_regendp[n]
) {
ln = PL_regstartp[n];
/* assume yes if we haven't seen CLOSEn */
if (
- *PL_reglastparen < n ||
+ (I32)*PL_reglastparen < n ||
ln == -1 ||
ln == PL_regendp[n]
) {
paren = scan->flags; /* Which paren to set */
if (paren > PL_regsize)
PL_regsize = paren;
- if (paren > *PL_reglastparen)
+ if (paren > (I32)*PL_reglastparen)
*PL_reglastparen = paren;
ln = ARG1(scan); /* min to match */
n = ARG2(scan); /* max to match */
ln = PL_regstartp[n];
/* assume yes if we haven't seen CLOSEn */
if (
- *PL_reglastparen < n ||
+ (I32)*PL_reglastparen < n ||
ln == -1 ||
ln == PL_regendp[n]
) {
utf8n_to_uvchr((U8*)locinput,
UTF8_MAXLEN, &len,
ckWARN(WARN_UTF8) ?
- 0 : UTF8_ALLOW_ANY) != c1) {
+ 0 : UTF8_ALLOW_ANY) != (UV)c1) {
locinput += len;
count++;
}
UTF8_MAXLEN, &len,
ckWARN(WARN_UTF8) ?
0 : UTF8_ALLOW_ANY);
- if (c == c1 || c == c2)
+ if (c == (UV)c1 || c == (UV)c2)
break;
locinput += len;
count++;
else
c = UCHARAT(PL_reginput);
/* If it could work, try it. */
- if (c == c1 || c == c2)
+ if (c == (UV)c1 || c == (UV)c2)
{
TRYPAREN(paren, n, PL_reginput);
REGCP_UNWIND(lastcp);
c = UCHARAT(PL_reginput);
}
/* If it could work, try it. */
- if (c1 == -1000 || c == c1 || c == c2)
+ if (c1 == -1000 || c == (UV)c1 || c == (UV)c2)
{
TRYPAREN(paren, n, PL_reginput);
REGCP_UNWIND(lastcp);
c = UCHARAT(PL_reginput);
}
/* If it could work, try it. */
- if (c1 == -1000 || c == c1 || c == c2)
+ if (c1 == -1000 || c == (UV)c1 || c == (UV)c2)
{
TRYPAREN(paren, n, PL_reginput);
REGCP_UNWIND(lastcp);
if (ANYOF_BITMAP_TEST(n, c))
match = TRUE;
else if (flags & ANYOF_FOLD) {
- I32 f;
+ U8 f;
if (flags & ANYOF_LOCALE) {
PL_reg_flags |= RF_tainted;