*/
/* This file contains some common functions needed to carry out certain
- * ops. For example both pp_schomp() and pp_chomp() - scalar and array
- * chomp operations - call the function do_chomp() found in this file.
+ * ops. For example, both pp_sprintf() and pp_prtf() call the function
+ * do_printf() found in this file.
*/
#include "EXTERN.h"
const U8 * const e = s + len;
while (t < e) {
const U8 ch = *t++;
- hibit = !NATIVE_IS_INVARIANT(ch);
+ hibit = !NATIVE_BYTE_IS_INVARIANT(ch);
if (hibit) {
s = bytes_to_utf8(s, &len);
break;
if (uv < none) {
s += UTF8SKIP(s);
matches++;
- d = uvuni_to_utf8(d, uv);
+ d = uvchr_to_utf8(d, uv);
}
else if (uv == none) {
const int i = UTF8SKIP(s);
else if (uv == extra) {
s += UTF8SKIP(s);
matches++;
- d = uvuni_to_utf8(d, final);
+ d = uvchr_to_utf8(d, final);
}
else
s += UTF8SKIP(s);
const U8 * const e = s + len;
while (t < e) {
const U8 ch = *t++;
- hibit = !NATIVE_IS_INVARIANT(ch);
+ hibit = !NATIVE_BYTE_IS_INVARIANT(ch);
if (hibit) {
start = s = bytes_to_utf8(s, &len);
break;
const U8 * const e = s + len;
while (t < e) {
const U8 ch = *t++;
- hibit = !NATIVE_IS_INVARIANT(ch);
+ hibit = !NATIVE_BYTE_IS_INVARIANT(ch);
if (hibit) {
s = bytes_to_utf8(s, &len);
break;
matches++;
s += UTF8SKIP(s);
if (uv != puv) {
- d = uvuni_to_utf8(d, uv);
+ d = uvchr_to_utf8(d, uv);
puv = uv;
}
continue;
if (havefinal) {
s += UTF8SKIP(s);
if (puv != final) {
- d = uvuni_to_utf8(d, final);
+ d = uvchr_to_utf8(d, final);
puv = final;
}
}
else {
STRLEN len;
- uv = utf8n_to_uvuni(s, send - s, &len, UTF8_ALLOW_DEFAULT);
+ uv = utf8n_to_uvchr(s, send - s, &len, UTF8_ALLOW_DEFAULT);
if (uv != puv) {
Move(s, d, len, U8);
d += len;
if (uv < none) {
matches++;
s += UTF8SKIP(s);
- d = uvuni_to_utf8(d, uv);
+ d = uvchr_to_utf8(d, uv);
continue;
}
else if (uv == none) { /* "none" is unmapped character */
else if (uv == extra && !del) {
matches++;
s += UTF8SKIP(s);
- d = uvuni_to_utf8(d, final);
+ d = uvchr_to_utf8(d, final);
continue;
}
matches++; /* "none+1" is delete character */
PERL_ARGS_ASSERT_DO_TRANS;
if (SvREADONLY(sv) && !(PL_op->op_private & OPpTRANS_IDENTICAL)) {
- if (!SvIsCOW(sv))
- Perl_croak_no_modify(aTHX);
+ Perl_croak_no_modify();
}
(void)SvPV_const(sv, len);
if (!len)
}
void
-Perl_do_join(pTHX_ register SV *sv, SV *delim, register SV **mark, register SV **sp)
+Perl_do_join(pTHX_ SV *sv, SV *delim, SV **mark, SV **sp)
{
dVAR;
SV ** const oldmark = mark;
/* sv_setpv retains old UTF8ness [perl #24846] */
SvUTF8_off(sv);
- if (PL_tainting && SvMAGICAL(sv))
+ if (TAINTING_get && SvMAGICAL(sv))
SvTAINTED_off(sv);
if (items-- > 0) {