sv_catpvn(dsv, octbuf, chsize);
wrote += chsize;
} else {
- Perl_sv_catpvf( aTHX_ dsv, "%c", c);
+ const char string = (char) c;
+ sv_catpvn(dsv, &string, 1);
wrote++;
}
if ( flags & PERL_PV_ESCAPE_FIRSTCHAR )
Perl_sv_catpvf(aTHX_ dsv, "&#x%X;", c);
}
else {
- Perl_sv_catpvf(aTHX_ dsv, "%c", c);
+ const char string = (char) c;
+ sv_catpvn(dsv, &string, 1);
}
break;
}
| PERL_SCAN_DISALLOW_PREFIX
| (SIZE_ONLY ? PERL_SCAN_SILENT_ILLDIGIT : 0);
UV cp;
+ unsigned char string;
len = (STRLEN)(endbrace - name - 2);
cp = grok_hex(name + 2, &len, &fl, NULL);
if ( len != (STRLEN)(endbrace - name - 2) ) {
*valuep = cp;
return NULL;
}
- sv_str= Perl_newSVpvf_nocontext("%c",(int)cp);
+ string = (unsigned char) cp;
+ sv_str= newSVpvn(&string, 1);
} else {
/* fetch the charnames handler for this scope */
HV * const table = GvHV(PL_hintgv);
{
if (isCNTRL(c) || c == 255 || !isPRINT(c))
Perl_sv_catpvf(aTHX_ sv, "\\%o", c);
- else if (c == '-' || c == ']' || c == '\\' || c == '^')
- Perl_sv_catpvf(aTHX_ sv, "\\%c", c);
- else
- Perl_sv_catpvf(aTHX_ sv, "%c", c);
+ else {
+ const unsigned char string = (unsigned char) c;
+ if (c == '-' || c == ']' || c == '\\' || c == '^')
+ sv_catpvs(sv, "\\");
+ sv_catpvn(sv, &string, 1);
+ }
}
SV * const where_sv = sv_2mortal(newSVpvs("next char "));
if (yychar < 32)
Perl_sv_catpvf(aTHX_ where_sv, "^%c", toCTRL(yychar));
- else if (isPRINT_LC(yychar))
- Perl_sv_catpvf(aTHX_ where_sv, "%c", yychar);
+ else if (isPRINT_LC(yychar)) {
+ const unsigned char string = (unsigned char) yychar;
+ sv_catpvn(where_sv, &string, 1);
+ }
else
Perl_sv_catpvf(aTHX_ where_sv, "\\%03o", yychar & 255);
where = SvPVX_const(where_sv);
default: break;
}
if (ok) {
- Perl_sv_catpvf(aTHX_ dsv, "\\%c", ok);
+ const unsigned char string = (unsigned char) ok;
+ sv_catpvn(dsv, &string, 1);
}
}
/* isPRINT() is the locale-blind version. */
if (!ok && (flags & UNI_DISPLAY_ISPRINT) && isPRINT(c)) {
- Perl_sv_catpvf(aTHX_ dsv, "%c", c);
+ const unsigned char string = (unsigned char) c;
+ sv_catpvn(dsv, &string, 1);
ok = 1;
}
}