Date: Wed, 18 Jan 1995 17:57:53 +0000 (GMT) From: Doug Rabson <dfr@render.com> To: "Andrew A. Chernov, Black Mage" <ache@astral.msk.su> Cc: "Paul F. Werkowski" <pw@snoopy.MV.COM>, freebsd-hackers@freefall.cdrom.com Subject: Re: old vfprintf bug back again in 2.x Message-ID: <Pine.BSF.3.91.950118175500.527B-100000@minnow.render.com> In-Reply-To: <gCDvJ7lGH1@astral.msk.su>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 18 Jan 1995, Andrew A. Chernov, Black Mage wrote: > In message <Pine.BSF.3.91.950118110149.3845C-100000@minnow.render.com> > Doug Rabson writes: > > >I looked into this and I believe that this patch does the same job: > > >*** /usr/src/lib/libc/stdio/vfprintf.c Fri May 27 05:57:31 1994 > >--- vfprintf.c Mon Dec 19 16:46:42 1994 > >*************** > >*** 507,512 **** > >--- 507,514 ---- > > prec = (prec == -1) ? > > DEFPREC + 1 : prec + 1; > > /* FALLTHROUGH */ > >+ if (prec != 0) > >+ flags |= ALT; > > goto fp_begin; > > case 'f': /* always print trailing zeroes */ > > if (prec != 0) > > >It certainly helps GCL anyway. Unless you have any objections, I will > >commit this smaller patch as it seems to be a bit less intrusive. > > I think this patch can be even smaller (only one line affected), > just remove "goto fp_begin" > after FALLTHROUGH (which really means it without goto fp_begin). The "goto fp_begin" skips 2 lines of code for the 'g' format which fiddles with the precision. I am not sure whether this is a problem or not, so to be on the safe side I left the goto in. -- Doug Rabson, RenderMorphics Ltd. Mail: dfr@render.com Phone: +44 71 251 4411 FAX: +44 71 251 0939
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.950118175500.527B-100000>