/*
-=for apidoc Apd|char*|pv_escape|NN SV *dsv|NN const U8 const *str\
+=for apidoc Apd|char*|pv_escape|NN SV *dsv|NN const char const *str\
|const STRLEN count|const STRLEN max
|STRLEN const *escaped, const U32 flags
=cut
*/
#define PV_ESCAPE_OCTBUFSIZE 32
+
char *
-Perl_pv_escape( pTHX_ SV *dsv, U8 const * const str,
+Perl_pv_escape( pTHX_ SV *dsv, char const * const str,
const STRLEN count, const STRLEN max,
STRLEN * const escaped, const U32 flags )
{
- U8 dq = (flags & PERL_PV_ESCAPE_QUOTE) ? '"' : '\\';
- U8 octbuf[PV_ESCAPE_OCTBUFSIZE] = "\\123456789ABCDF";
+ char dq = (flags & PERL_PV_ESCAPE_QUOTE) ? '"' : '\\';
+ char octbuf[PV_ESCAPE_OCTBUFSIZE] = "\\123456789ABCDF";
STRLEN wrote = 0; /* chars written so far */
STRLEN chsize = 0; /* size of data to be written */
STRLEN readsize = 1; /* size of data just read */
bool isuni= flags & PERL_PV_ESCAPE_UNI ? 1 : 0; /* is this unicode */
- const U8 *pv = str;
- const U8 *end = pv + count; /* end of string */
+ const char *pv = str;
+ const char *end = pv + count; /* end of string */
if (!flags & PERL_PV_ESCAPE_NOCLEAR)
sv_setpvn(dsv, "", 0);
- if ((flags & PERL_PV_ESCAPE_UNI_DETECT) && is_utf8_string(pv, count))
+ if ((flags & PERL_PV_ESCAPE_UNI_DETECT) && is_utf8_string((U8*)pv, count))
isuni = 1;
for ( ; (pv < end && (!max || (wrote < max))) ; pv += readsize ) {
- const UV u= (isuni) ? utf8_to_uvchr(pv, &readsize) : *pv;
+ const UV u= (isuni) ? utf8_to_uvchr((U8*)pv, &readsize) : (U8)*pv;
const U8 c = (U8)u & 0xFF;
if ( ( u > 255 ) || (flags & PERL_PV_ESCAPE_ALL)) {
chsize = 1;
break;
default:
- if ( (pv < end) && isDIGIT(*(pv+readsize)) )
+ if ( (pv < end) && isDIGIT((U8)*(pv+readsize)) )
chsize = my_snprintf( octbuf, PV_ESCAPE_OCTBUFSIZE,
"\\%03o", c);
else
return SvPVX(dsv);
}
/*
-=for apidoc Apd|char *|pv_pretty|NN SV *dsv|NN const U8 const *str\
+=for apidoc Apd|char *|pv_pretty|NN SV *dsv|NN const char const *str\
|const STRLEN count|const STRLEN max\
- |const U8 const *start_color| const U8 const *end_color\
+ |const char const *start_color| const char const *end_color\
|const U32 flags
Converts a string into something presentable, handling escaping via
*/
char *
-Perl_pv_pretty( pTHX_ SV *dsv, U8 const * const str, const STRLEN count,
- const STRLEN max, U8 const * const start_color, U8 const * const end_color,
+Perl_pv_pretty( pTHX_ SV *dsv, char const * const str, const STRLEN count,
+ const STRLEN max, char const * const start_color, char const * const end_color,
const U32 flags )
{
U8 dq = (flags & PERL_PV_PRETTY_QUOTE) ? '"' : '\\';
char *
Perl_pv_display(pTHX_ SV *dsv, const char *pv, STRLEN cur, STRLEN len, STRLEN pvlim)
{
- pv_pretty( dsv, pv, cur, pvlim, 0, 0, PERL_PV_PRETTY_DUMP);
+ pv_pretty( dsv, pv, cur, pvlim, NULL, NULL, PERL_PV_PRETTY_DUMP);
if (len > cur && pv[cur] == '\0')
sv_catpvn( dsv, "\\0", 2 );
return SvPVX(dsv);
level++;
seq = sequence_num(o);
if (seq)
- PerlIO_printf(file, "%-4"UVf, seq);
+ PerlIO_printf(file, "%-4"UVuf, seq);
else
PerlIO_printf(file, " ");
PerlIO_printf(file,
"%*sTYPE = %s ===> ",
(int)(PL_dumpindent*level-4), "", OP_NAME(o));
if (o->op_next)
- PerlIO_printf(file, seq ? "%"UVf"\n" : "(%"UVf")\n",
+ PerlIO_printf(file, seq ? "%"UVuf"\n" : "(%"UVuf")\n",
sequence_num(o->op_next));
else
PerlIO_printf(file, "DONE\n");
Perl_dump_indent(aTHX_ level, file, " (was %s)\n", PL_op_name[o->op_targ]);
if (o->op_targ == OP_NEXTSTATE) {
if (CopLINE(cCOPo))
- Perl_dump_indent(aTHX_ level, file, "LINE = %"UVf"\n",
+ Perl_dump_indent(aTHX_ level, file, "LINE = %"UVuf"\n",
(UV)CopLINE(cCOPo));
if (CopSTASHPV(cCOPo))
Perl_dump_indent(aTHX_ level, file, "PACKAGE = \"%s\"\n",
case OP_NEXTSTATE:
case OP_DBSTATE:
if (CopLINE(cCOPo))
- Perl_dump_indent(aTHX_ level, file, "LINE = %"UVf"\n",
+ Perl_dump_indent(aTHX_ level, file, "LINE = %"UVuf"\n",
(UV)CopLINE(cCOPo));
if (CopSTASHPV(cCOPo))
Perl_dump_indent(aTHX_ level, file, "PACKAGE = \"%s\"\n",
case OP_ENTERLOOP:
Perl_dump_indent(aTHX_ level, file, "REDO ===> ");
if (cLOOPo->op_redoop)
- PerlIO_printf(file, "%"UVf"\n", sequence_num(cLOOPo->op_redoop));
+ PerlIO_printf(file, "%"UVuf"\n", sequence_num(cLOOPo->op_redoop));
else
PerlIO_printf(file, "DONE\n");
Perl_dump_indent(aTHX_ level, file, "NEXT ===> ");
if (cLOOPo->op_nextop)
- PerlIO_printf(file, "%"UVf"\n", sequence_num(cLOOPo->op_nextop));
+ PerlIO_printf(file, "%"UVuf"\n", sequence_num(cLOOPo->op_nextop));
else
PerlIO_printf(file, "DONE\n");
Perl_dump_indent(aTHX_ level, file, "LAST ===> ");
if (cLOOPo->op_lastop)
- PerlIO_printf(file, "%"UVf"\n", sequence_num(cLOOPo->op_lastop));
+ PerlIO_printf(file, "%"UVuf"\n", sequence_num(cLOOPo->op_lastop));
else
PerlIO_printf(file, "DONE\n");
break;
case OP_AND:
Perl_dump_indent(aTHX_ level, file, "OTHER ===> ");
if (cLOGOPo->op_other)
- PerlIO_printf(file, "%"UVf"\n", sequence_num(cLOGOPo->op_other));
+ PerlIO_printf(file, "%"UVuf"\n", sequence_num(cLOGOPo->op_other));
else
PerlIO_printf(file, "DONE\n");
break;
if (o->op_targ == OP_NEXTSTATE)
{
if (CopLINE(cCOPo))
- PerlIO_printf(file, " line=\"%"UVf"\"",
+ PerlIO_printf(file, " line=\"%"UVuf"\"",
(UV)CopLINE(cCOPo));
if (CopSTASHPV(cCOPo))
PerlIO_printf(file, " package=\"%s\"",
case OP_NEXTSTATE:
case OP_DBSTATE:
if (CopLINE(cCOPo))
- S_xmldump_attr(aTHX_ level, file, "line=\"%"UVf"\"",
+ S_xmldump_attr(aTHX_ level, file, "line=\"%"UVuf"\"",
(UV)CopLINE(cCOPo));
if (CopSTASHPV(cCOPo))
S_xmldump_attr(aTHX_ level, file, "package=\"%s\"",