/* utf8.c
*
- * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005 by Larry Wall and
- * others
+ * Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ * by Larry Wall and others
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
}
if (dowarn) {
- SV* const sv = sv_2mortal(newSVpv("Malformed UTF-8 character ", 0));
+ SV* const sv = sv_2mortal(newSVpvs("Malformed UTF-8 character "));
switch (warning) {
case 0: /* Intentionally empty. */ break;
case UTF8_WARN_EMPTY:
- Perl_sv_catpv(aTHX_ sv, "(empty string)");
+ sv_catpvs(sv, "(empty string)");
break;
case UTF8_WARN_CONTINUATION:
Perl_sv_catpvf(aTHX_ sv, "(unexpected continuation byte 0x%02"UVxf", with no preceding start byte)", uv);
Perl_sv_catpvf(aTHX_ sv, "(character 0x%04"UVxf")", uv);
break;
default:
- Perl_sv_catpv(aTHX_ sv, "(unknown reason)");
+ sv_catpvs(sv, "(unknown reason)");
break;
}
}
/* create and initialize $swatch */
- swatch = newSVpvn("",0);
+ swatch = newSVpvs("");
scur = octets ? (span * octets) : (span + 7) / 8;
SvGROW(swatch, scur + 1);
s = (U8*)SvPVX(swatch);
Perl_sv_catpvf(aTHX_ dsv, "\\x{%"UVxf"}", u);
}
if (truncated)
- sv_catpvn(dsv, "...", 3);
+ sv_catpvs(dsv, "...");
return SvPVX(dsv);
}
register const U8 *p1 = (const U8*)s1;
register const U8 *p2 = (const U8*)s2;
register const U8 *f1 = NULL;
- register U8 *f2 = NULL;
+ register const U8 *f2 = NULL;
register U8 *e1 = NULL;
register U8 *q1 = NULL;
register U8 *e2 = NULL;