in reply to (s)printf question: eliminating plus sign before zeros

If it REALLY bugs you then you could always just patch the source (totally untested):

[root@devel3 perl-5.8.2]# diff uts/sprintf_wrap.c uts/sprintf_wrap.PAT +CH.c 114c114 < else if(Plus) *ob++ = '+'; --- > else if(Plus && ! Zero && ! AllZeroes ) *ob++ = '+'; 148c148 < if(Plus && (Ecvt[0] != '-')) { --- > if(Plus && (Ecvt[0] != '-') && ! Zero ) { [root@devel3 perl-5.8.2]#

cheers

tachyon

Replies are listed 'Best First'.
Re: Re: (s)printf question: eliminating plus sign before zeros
by ysth (Canon) on Dec 18, 2003 at 02:59 UTC
    Umm, that source is just used for UTS (whatever OS that is) presumably because of deficiencies in its native sprintf. A patch would need to be to Perl_sv_vcatpvfn in sv.c.

      It was just a joke!

      cheers

      tachyon