From owner-freebsd-hackers Wed Jan 18 09:59:34 1995 Return-Path: hackers-owner Received: (from root@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id JAA10398 for hackers-outgoing; Wed, 18 Jan 1995 09:59:34 -0800 Received: from minnow.render.com (render.demon.co.uk [158.152.30.118]) by freefall.cdrom.com (8.6.9/8.6.6) with ESMTP id JAA10392 for ; Wed, 18 Jan 1995 09:59:23 -0800 Received: (from dfr@localhost) by minnow.render.com (8.6.9/8.6.9) id RAA00607; Wed, 18 Jan 1995 17:57:56 GMT Date: Wed, 18 Jan 1995 17:57:53 +0000 (GMT) From: Doug Rabson To: "Andrew A. Chernov, Black Mage" cc: "Paul F. Werkowski" , freebsd-hackers@freefall.cdrom.com Subject: Re: old vfprintf bug back again in 2.x In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: hackers-owner@FreeBSD.org Precedence: bulk On Wed, 18 Jan 1995, Andrew A. Chernov, Black Mage wrote: > In message > 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