From: Robin Barker Date: Wed, 19 Jan 2005 18:30:31 +0000 (+0000) Subject: Further follow-up to 23767 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=014ead4bccac5462b3a10654493980250e84b1d4;p=p5sagit%2Fp5-mst-13.2.git Further follow-up to 23767 Message-ID: <533D273D4014D411AB1D00062938C4D90849C57D@hotel.npl.co.uk> p4raw-id: //depot/perl@23824 --- diff --git a/XSUB.h b/XSUB.h index c940d77..8d8de8d 100644 --- a/XSUB.h +++ b/XSUB.h @@ -244,7 +244,7 @@ C. See L. if ( !sv_derived_from(_sv, "version") ) \ _sv = new_version(_sv); \ if ( vcmp(_sv,xssv) ) \ - Perl_croak(aTHX_ "%s object version %_ does not match %s%s%s%s %_",\ + Perl_croak(aTHX_ "%s object version %"SVf" does not match %s%s%s%s %"SVf,\ module, vstringify(xssv), \ vn ? "$" : "", vn ? module : "", vn ? "::" : "", \ vn ? vn : "bootstrap parameter", vstringify(_sv));\ diff --git a/gv.c b/gv.c index 0019f93..83ec0ee 100644 --- a/gv.c +++ b/gv.c @@ -673,7 +673,6 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags, register const char *namend; HV *stash = 0; I32 add = flags & ~SVf_UTF8; - I32 utf8 = flags & SVf_UTF8; if (*name == '*' && isALPHA(name[1])) /* accidental stringify on a GV? */ name++; diff --git a/perl.c b/perl.c index eb32c2f..f242dfe 100644 --- a/perl.c +++ b/perl.c @@ -2695,13 +2695,13 @@ Perl_moreswitches(pTHX_ char *s) (void *)upg_version(PL_patchlevel); #if !defined(DGUX) PerlIO_printf(PerlIO_stdout(), - Perl_form(aTHX_ "\nThis is perl, v%_ built for %s", + Perl_form(aTHX_ "\nThis is perl, v%"SVf" built for %s", vstringify(PL_patchlevel), ARCHNAME)); #else /* DGUX */ /* Adjust verbose output as in the perl that ships with the DG/UX OS from EMC */ PerlIO_printf(PerlIO_stdout(), - Perl_form(aTHX_ "\nThis is perl, v%_\n", + Perl_form(aTHX_ "\nThis is perl, v%"SVf"\n", vstringify(PL_patchlevel))); PerlIO_printf(PerlIO_stdout(), Perl_form(aTHX_ " built under %s at %s %s\n", diff --git a/perl.h b/perl.h index a36398a..b8a9642 100644 --- a/perl.h +++ b/perl.h @@ -2389,32 +2389,29 @@ typedef pthread_key_t perl_key; #ifndef SVf # ifdef CHECK_FORMAT # define SVf "-p" -# ifndef SVf256 -# define SVf256 "-256p" -# endif # else # define SVf "_" # endif #endif -#ifndef SVf256 -# define SVf256 ".256"SVf -#endif - -#ifndef UVf +#ifndef SVf_precision # ifdef CHECK_FORMAT -# define UVf UVuf +# define SVf_precision(n) "-" n "p" # else -# define UVf "Vu" +# define SVf_precision(n) "." n "_" # endif #endif -#ifndef VDf -# ifdef CHECK_FORMAT -# define VDf "-1p" -# else -# define VDf "vd" -# endif +#ifndef SVf32 +# define SVf32 SVf_precision("32") +#endif + +#ifndef SVf256 +# define SVf256 SVf_precision("256") +#endif + +#ifndef UVf +# define UVf UVuf #endif #ifndef DieNull @@ -3236,7 +3233,7 @@ EXTCONST char PL_no_wrongref[] EXTCONST char PL_no_symref[] INIT("Can't use string (\"%.32s\") as %s ref while \"strict refs\" in use"); EXTCONST char PL_no_symref_sv[] - INIT("Can't use string (\"%.32" SVf "\") as %s ref while \"strict refs\" in use"); + INIT("Can't use string (\"%" SVf32 "\") as %s ref while \"strict refs\" in use"); EXTCONST char PL_no_usym[] INIT("Can't use an undefined value as %s reference"); EXTCONST char PL_no_aelem[] diff --git a/pp_ctl.c b/pp_ctl.c index 447742d..829b655 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -3073,7 +3073,7 @@ PP(pp_require) if (!sv_derived_from(PL_patchlevel, "version")) (void *)upg_version(PL_patchlevel); if ( vcmp(sv,PL_patchlevel) > 0 ) - DIE(aTHX_ "Perl v%_ required--this is only v%_, stopped", + DIE(aTHX_ "Perl v%"SVf" required--this is only v%"SVf", stopped", vstringify(sv), vstringify(PL_patchlevel)); RETPUSHYES; diff --git a/sv.c b/sv.c index e6cbee1..c7211b7 100644 --- a/sv.c +++ b/sv.c @@ -9390,11 +9390,6 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV fill = *q++; EXPECT_NUMBER(q, width); -#ifdef CHECK_FORMAT - if ((*q == 'p') && left) { - vectorize = (width == 1); - } -#endif if (vectorize) { if (vectorarg) { if (args) @@ -9615,10 +9610,6 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV left = FALSE; if (!width) goto format_sv; /* %-p -> %_ */ - if (vectorize) { - width = 0; - goto format_d; /* %-1p -> %vd */ - } precis = width; has_precis = TRUE; width = 0; @@ -9637,9 +9628,6 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV #else intsize = 'l'; #endif -#ifdef CHECK_FORMAT - format_d: -#endif /* FALL THROUGH */ case 'd': case 'i': diff --git a/utf8.c b/utf8.c index 0eafd76..5c6f271 100644 --- a/utf8.c +++ b/utf8.c @@ -875,7 +875,7 @@ Perl_utf16_to_utf8(pTHX_ U8* p, U8* d, I32 bytelen, I32 *newlen) } if (bytelen & 1) - Perl_croak(aTHX_ "panic: utf16_to_utf8: odd bytelen %d", bytelen); + Perl_croak(aTHX_ "panic: utf16_to_utf8: odd bytelen %"UVf, (UV)bytelen); pend = p + bytelen;