From: Jarkko Hietaniemi Date: Thu, 9 Sep 1999 18:24:30 +0000 (+0000) Subject: Remove ill-designed %B introduced by change #4111. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7481bb52051f557e66a749903d91c3b51ae46e5c;p=p5sagit%2Fp5-mst-13.2.git Remove ill-designed %B introduced by change #4111. p4raw-link: @4111 on //depot/cfgperl: eda88b6dbdc5ca6a51d54f58740f0210e618beb7 p4raw-id: //depot/cfgperl@4117 --- diff --git a/sv.c b/sv.c index f6a793c..5be8a31 100644 --- a/sv.c +++ b/sv.c @@ -4959,7 +4959,6 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV base = 10; goto uns_integer; - case 'B': case 'b': base = 2; goto uns_integer; @@ -5036,7 +5035,7 @@ Perl_sv_vcatpvfn(pTHX_ SV *sv, const char *pat, STRLEN patlen, va_list *args, SV } while (uv >>= 1); if (alt) { esignbuf[esignlen++] = '0'; - esignbuf[esignlen++] = c; /* 'b' or 'B' */ + esignbuf[esignlen++] = 'b'; } break; default: /* it had better be ten or less */ diff --git a/t/op/sprintf.t b/t/op/sprintf.t index 582dfb4..70e55cb 100755 --- a/t/op/sprintf.t +++ b/t/op/sprintf.t @@ -14,8 +14,8 @@ $SIG{__WARN__} = sub { }; $w = 0; -$x = sprintf("%3s %-4s%%foo %.0d%5d %#x%c%3.1f %b %x %X %#b %#B %#x %#X","hi",123,0,456,0,ord('A'),3.0999,11,171,171,11,11,171,171); -if ($x eq ' hi 123 %foo 456 0A3.1 1011 ab AB 0b1011 0B1011 0xab 0XAB' && $w == 0) { +$x = sprintf("%3s %-4s%%foo %.0d%5d %#x%c%3.1f %b %x %X %#b %#x %#X","hi",123,0,456,0,ord('A'),3.0999,11,171,171,11,171,171); +if ($x eq ' hi 123 %foo 456 0A3.1 1011 ab AB 0b1011 0xab 0XAB' && $w == 0) { print "ok 1\n"; } else { print "not ok 1 '$x'\n";