This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pack with a human face: the sequel
[perl5.git] / dump.c
diff --git a/dump.c b/dump.c
index 321fecc..0a36024 100644 (file)
--- a/dump.c
+++ b/dump.c
@@ -1,6 +1,6 @@
 /*    dump.c
  *
- *    Copyright (c) 1991-2001, Larry Wall
+ *    Copyright (c) 1991-2002, Larry Wall
  *
  *    You may distribute under the terms of either the GNU General Public
  *    License or the Artistic License, as specified in the README file.
@@ -279,13 +279,14 @@ Perl_sv_peek(pTHX_ SV *sv)
            Perl_sv_catpvf(aTHX_ t, "%s)", pv_display(tmp, SvPVX(sv), SvCUR(sv), SvLEN(sv), 127));
            if (SvUTF8(sv))
                Perl_sv_catpvf(aTHX_ t, " [UTF8 \"%s\"]",
-                              sv_uni_display(tmp, sv, 8 * sv_len_utf8(sv), 0));
+                              sv_uni_display(tmp, sv, 8 * sv_len_utf8(sv),
+                                             UNI_DISPLAY_QQ));
            SvREFCNT_dec(tmp);
        }
     }
     else if (SvNOKp(sv)) {
        STORE_NUMERIC_LOCAL_SET_STANDARD();
-       Perl_sv_catpvf(aTHX_ t, "(%g)",SvNVX(sv));
+       Perl_sv_catpvf(aTHX_ t, "(%"NVgf")",SvNVX(sv));
        RESTORE_NUMERIC_LOCAL();
     }
     else if (SvIOKp(sv)) {
@@ -1115,7 +1116,7 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
                PerlIO_printf(file, "( %s . ) ", pv_display(d, SvPVX(sv)-SvIVX(sv), SvIVX(sv), 0, pvlim));
            PerlIO_printf(file, "%s", pv_display(d, SvPVX(sv), SvCUR(sv), SvLEN(sv), pvlim));
            if (SvUTF8(sv)) /* the 8?  \x{....} */
-               PerlIO_printf(file, " [UTF8 \"%s\"]", sv_uni_display(d, sv, 8 * sv_len_utf8(sv), 0));
+               PerlIO_printf(file, " [UTF8 \"%s\"]", sv_uni_display(d, sv, 8 * sv_len_utf8(sv), UNI_DISPLAY_QQ));
            PerlIO_printf(file, "\n");
            Perl_dump_indent(aTHX_ level, file, "  CUR = %"IVdf"\n", (IV)SvCUR(sv));
            Perl_dump_indent(aTHX_ level, file, "  LEN = %"IVdf"\n", (IV)SvLEN(sv));
@@ -1247,7 +1248,7 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
                elt = hv_iterval(hv, he);
                Perl_dump_indent(aTHX_ level+1, file, "Elt %s ", pv_display(d, keypv, len, 0, pvlim));
                if (SvUTF8(keysv))
-                   PerlIO_printf(file, "[UTF8 \"%s\"] ", sv_uni_display(d, keysv, 8 * sv_len_utf8(keysv), 0));
+                   PerlIO_printf(file, "[UTF8 \"%s\"] ", sv_uni_display(d, keysv, 8 * sv_len_utf8(keysv), UNI_DISPLAY_QQ));
                PerlIO_printf(file, "HASH = 0x%"UVxf"\n", (UV)hash);
                do_sv_dump(level+1, file, elt, nest+1, maxnest, dumpops, pvlim);
            }