* (POSIX Extended Character Classes, that is)
* The text between e.g. [: and :] would start
* at posixccs + 1 and stop at regcomp_parse - 2. */
- if (dowarn && !SIZE_ONLY)
+ if (PL_dowarn && !SIZE_ONLY)
warn("Character class syntax [%c %c] is reserved for future extensions", posixccc, posixccc);
PL_regcomp_parse++; /* skip over the ending ] */
}
* (POSIX Extended Character Classes, that is)
* The text between e.g. [: and :] would start
* at posixccs + 1 and stop at regcomp_parse - 2. */
- if (dowarn && !SIZE_ONLY)
+ if (PL_dowarn && !SIZE_ONLY)
warn("Character class syntax [%c %c] is reserved for future extensions", posixccc, posixccc);
PL_regcomp_parse++; /* skip over the ending ] */
}
/* (now in tr/// code again) */
- if (*s & 0x80 && dowarn && thisutf) {
+ if (*s & 0x80 && PL_dowarn && thisutf) {
(void)utf8_to_uv(s, &len); /* could cvt latin-1 to utf8 here... */
if (len) {
while (len--)
if (!e)
yyerror("Missing right brace on \\x{}");
- if (dowarn && !utf)
+ if (PL_dowarn && !utf)
warn("Use of \\x{} without utf8 declaration");
/* note: utf always shorter than hex */
- d = uv_to_utf8(d, scan_hex(s + 1, e - s, &len));
+ d = uv_to_utf8(d, scan_hex(s + 1, e - s - 1, &len));
s = e + 1;
}
d = uv_to_utf8(d, uv); /* doing a CU or UC */
}
else {
- if (dowarn && uv >= 127 && UTF)
+ if (PL_dowarn && uv >= 127 && UTF)
warn(
"\\x%.*s will produce malformed UTF-8 character; use \\x{%.*s} for that",
len,s,len,s);