Change 13099 by jhi@alpha on 2001/11/19 18:02:14

        The _uni_display should not be in dump.c since they
        are used under normal operation (S_not_a_number()).

Affected files ...

.... //depot/perl/dump.c#102 edit
.... //depot/perl/embed.h#307 edit
.... //depot/perl/embed.pl#296 edit
.... //depot/perl/global.sym#186 edit
.... //depot/perl/proto.h#349 edit
.... //depot/perl/utf8.c#114 edit

Differences ...

==== //depot/perl/dump.c#102 (text) ====
Index: perl/dump.c
--- perl/dump.c.~1~     Mon Nov 19 11:15:05 2001
+++ perl/dump.c Mon Nov 19 11:15:05 2001
@@ -143,35 +143,6 @@
 }
 
 char *
-Perl_pv_uni_display(pTHX_ SV *dsv, U8 *spv, STRLEN len, STRLEN pvlim, UV flags)
-{
-    int truncated = 0;
-    char *s, *e;
-
-    sv_setpvn(dsv, "", 0);
-    for (s = (char *)spv, e = s + len; s < e; s += UTF8SKIP(s)) {
-        UV u;
-        if (pvlim && SvCUR(dsv) >= pvlim) {
-             truncated++;
-             break;
-        }
-        u = utf8_to_uvchr((U8*)s, 0);
-        Perl_sv_catpvf(aTHX_ dsv, "\\x{%"UVxf"}", u);
-    }
-    if (truncated)
-        sv_catpvn(dsv, "...", 3);
-    
-    return SvPVX(dsv);
-}
-
-char *
-Perl_sv_uni_display(pTHX_ SV *dsv, SV *ssv, STRLEN pvlim, UV flags)
-{
-  return Perl_pv_uni_display(aTHX_ dsv, (U8*)SvPVX(ssv), SvCUR(ssv),
-                            pvlim, flags);
-}
-
-char *
 Perl_sv_peek(pTHX_ SV *sv)
 {
     SV *t = sv_newmortal();

==== //depot/perl/embed.h#307 (text+w) ====
Index: perl/embed.h
--- perl/embed.h.~1~    Mon Nov 19 11:15:05 2001
+++ perl/embed.h        Mon Nov 19 11:15:05 2001
@@ -751,6 +751,8 @@
 #define utf8n_to_uvuni         Perl_utf8n_to_uvuni
 #define uvchr_to_utf8          Perl_uvchr_to_utf8
 #define uvuni_to_utf8          Perl_uvuni_to_utf8
+#define pv_uni_display         Perl_pv_uni_display
+#define sv_uni_display         Perl_sv_uni_display
 #define vivify_defelem         Perl_vivify_defelem
 #define vivify_ref             Perl_vivify_ref
 #define wait4pid               Perl_wait4pid
@@ -808,8 +810,6 @@
 #define sv_usepvn_mg           Perl_sv_usepvn_mg
 #define get_vtbl               Perl_get_vtbl
 #define pv_display             Perl_pv_display
-#define pv_uni_display         Perl_pv_uni_display
-#define sv_uni_display         Perl_sv_uni_display
 #define dump_indent            Perl_dump_indent
 #define dump_vindent           Perl_dump_vindent
 #define do_gv_dump             Perl_do_gv_dump
@@ -2265,6 +2265,8 @@
 #define utf8n_to_uvuni(a,b,c,d)        Perl_utf8n_to_uvuni(aTHX_ a,b,c,d)
 #define uvchr_to_utf8(a,b)     Perl_uvchr_to_utf8(aTHX_ a,b)
 #define uvuni_to_utf8(a,b)     Perl_uvuni_to_utf8(aTHX_ a,b)
+#define pv_uni_display(a,b,c,d,e)      Perl_pv_uni_display(aTHX_ a,b,c,d,e)
+#define sv_uni_display(a,b,c,d)        Perl_sv_uni_display(aTHX_ a,b,c,d)
 #define vivify_defelem(a)      Perl_vivify_defelem(aTHX_ a)
 #define vivify_ref(a,b)                Perl_vivify_ref(aTHX_ a,b)
 #define wait4pid(a,b,c)                Perl_wait4pid(aTHX_ a,b,c)
@@ -2318,8 +2320,6 @@
 #define sv_usepvn_mg(a,b,c)    Perl_sv_usepvn_mg(aTHX_ a,b,c)
 #define get_vtbl(a)            Perl_get_vtbl(aTHX_ a)
 #define pv_display(a,b,c,d,e)  Perl_pv_display(aTHX_ a,b,c,d,e)
-#define pv_uni_display(a,b,c,d,e)      Perl_pv_uni_display(aTHX_ a,b,c,d,e)
-#define sv_uni_display(a,b,c,d)        Perl_sv_uni_display(aTHX_ a,b,c,d)
 #define dump_vindent(a,b,c,d)  Perl_dump_vindent(aTHX_ a,b,c,d)
 #define do_gv_dump(a,b,c,d)    Perl_do_gv_dump(aTHX_ a,b,c,d)
 #define do_gvgv_dump(a,b,c,d)  Perl_do_gvgv_dump(aTHX_ a,b,c,d)

==== //depot/perl/embed.pl#296 (xtext) ====
Index: perl/embed.pl
--- perl/embed.pl.~1~   Mon Nov 19 11:15:05 2001
+++ perl/embed.pl       Mon Nov 19 11:15:05 2001
@@ -1850,6 +1850,9 @@
 Adp    |UV     |utf8n_to_uvuni |U8 *s|STRLEN curlen|STRLEN* retlen|U32 flags
 Apd    |U8*    |uvchr_to_utf8  |U8 *d|UV uv
 Apd    |U8*    |uvuni_to_utf8  |U8 *d|UV uv
+Ap     |char*  |pv_uni_display |SV *dsv|U8 *spv|STRLEN len \
+                               |STRLEN pvlim|UV flags
+Ap     |char*  |sv_uni_display |SV *dsv|SV *ssv|STRLEN pvlim|UV flags
 p      |void   |vivify_defelem |SV* sv
 p      |void   |vivify_ref     |SV* sv|U32 to_what
 p      |I32    |wait4pid       |Pid_t pid|int* statusp|int flags
@@ -1908,9 +1911,6 @@
 Ap     |MGVTBL*|get_vtbl       |int vtbl_id
 p      |char*  |pv_display     |SV *dsv|char *pv|STRLEN cur|STRLEN len \
                                |STRLEN pvlim
-Ap     |char*  |pv_uni_display |SV *dsv|U8 *spv|STRLEN len \
-                               |STRLEN pvlim|UV flags
-Ap     |char*  |sv_uni_display |SV *dsv|SV *ssv|STRLEN pvlim|UV flags
 Afp    |void   |dump_indent    |I32 level|PerlIO *file|const char* pat|...
 Ap     |void   |dump_vindent   |I32 level|PerlIO *file|const char* pat \
                                |va_list *args

==== //depot/perl/global.sym#186 (text+w) ====
Index: perl/global.sym
--- perl/global.sym.~1~ Mon Nov 19 11:15:05 2001
+++ perl/global.sym     Mon Nov 19 11:15:05 2001
@@ -495,6 +495,8 @@
 Perl_utf8n_to_uvuni
 Perl_uvchr_to_utf8
 Perl_uvuni_to_utf8
+Perl_pv_uni_display
+Perl_sv_uni_display
 Perl_warn
 Perl_vwarn
 Perl_warner
@@ -530,8 +532,6 @@
 Perl_sv_setsv_mg
 Perl_sv_usepvn_mg
 Perl_get_vtbl
-Perl_pv_uni_display
-Perl_sv_uni_display
 Perl_dump_indent
 Perl_dump_vindent
 Perl_do_gv_dump

==== //depot/perl/proto.h#349 (text+w) ====
Index: perl/proto.h
--- perl/proto.h.~1~    Mon Nov 19 11:15:05 2001
+++ perl/proto.h        Mon Nov 19 11:15:05 2001
@@ -828,6 +828,8 @@
 PERL_CALLCONV UV       Perl_utf8n_to_uvuni(pTHX_ U8 *s, STRLEN curlen, STRLEN* 
retlen, U32 flags);
 PERL_CALLCONV U8*      Perl_uvchr_to_utf8(pTHX_ U8 *d, UV uv);
 PERL_CALLCONV U8*      Perl_uvuni_to_utf8(pTHX_ U8 *d, UV uv);
+PERL_CALLCONV char*    Perl_pv_uni_display(pTHX_ SV *dsv, U8 *spv, STRLEN len, STRLEN 
+pvlim, UV flags);
+PERL_CALLCONV char*    Perl_sv_uni_display(pTHX_ SV *dsv, SV *ssv, STRLEN pvlim, UV 
+flags);
 PERL_CALLCONV void     Perl_vivify_defelem(pTHX_ SV* sv);
 PERL_CALLCONV void     Perl_vivify_ref(pTHX_ SV* sv, U32 to_what);
 PERL_CALLCONV I32      Perl_wait4pid(pTHX_ Pid_t pid, int* statusp, int flags);
@@ -901,8 +903,6 @@
 PERL_CALLCONV void     Perl_sv_usepvn_mg(pTHX_ SV *sv, char *ptr, STRLEN len);
 PERL_CALLCONV MGVTBL*  Perl_get_vtbl(pTHX_ int vtbl_id);
 PERL_CALLCONV char*    Perl_pv_display(pTHX_ SV *dsv, char *pv, STRLEN cur, STRLEN 
len, STRLEN pvlim);
-PERL_CALLCONV char*    Perl_pv_uni_display(pTHX_ SV *dsv, U8 *spv, STRLEN len, STRLEN 
pvlim, UV flags);
-PERL_CALLCONV char*    Perl_sv_uni_display(pTHX_ SV *dsv, SV *ssv, STRLEN pvlim, UV 
flags);
 PERL_CALLCONV void     Perl_dump_indent(pTHX_ I32 level, PerlIO *file, const char* 
pat, ...)
 #ifdef CHECK_FORMAT
  __attribute__((format(printf,pTHX_3,pTHX_4)))

==== //depot/perl/utf8.c#114 (text) ====
Index: perl/utf8.c
--- perl/utf8.c.~1~     Mon Nov 19 11:15:05 2001
+++ perl/utf8.c Mon Nov 19 11:15:05 2001
@@ -1515,4 +1515,31 @@
     return UNI_TO_NATIVE(uv);
 }
 
+char *
+Perl_pv_uni_display(pTHX_ SV *dsv, U8 *spv, STRLEN len, STRLEN pvlim, UV flags)
+{
+    int truncated = 0;
+    char *s, *e;
 
+    sv_setpvn(dsv, "", 0);
+    for (s = (char *)spv, e = s + len; s < e; s += UTF8SKIP(s)) {
+        UV u;
+        if (pvlim && SvCUR(dsv) >= pvlim) {
+             truncated++;
+             break;
+        }
+        u = utf8_to_uvchr((U8*)s, 0);
+        Perl_sv_catpvf(aTHX_ dsv, "\\x{%"UVxf"}", u);
+    }
+    if (truncated)
+        sv_catpvn(dsv, "...", 3);
+    
+    return SvPVX(dsv);
+}
+
+char *
+Perl_sv_uni_display(pTHX_ SV *dsv, SV *ssv, STRLEN pvlim, UV flags)
+{
+  return Perl_pv_uni_display(aTHX_ dsv, (U8*)SvPVX(ssv), SvCUR(ssv),
+                            pvlim, flags);
+}
End of Patch.

Reply via email to