From owner-freebsd-hackers Wed Jan 18 10:25:51 1995 Return-Path: hackers-owner Received: (from root@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id KAA10922 for hackers-outgoing; Wed, 18 Jan 1995 10:25:51 -0800 Received: from sovcom.kiae.su (sovcom.kiae.su [144.206.136.1]) by freefall.cdrom.com (8.6.9/8.6.6) with SMTP id KAA10916 for ; Wed, 18 Jan 1995 10:25:47 -0800 Received: by sovcom.kiae.su id AA17468 (5.65.kiae-2 ); Wed, 18 Jan 1995 21:18:47 +0300 Received: by sovcom.KIAE.su (UUMAIL/2.0); Wed, 18 Jan 95 21:18:46 +0300 Received: (from ache@localhost) by astral.msk.su (8.6.8/8.6.6) id VAA00335; Wed, 18 Jan 1995 21:12:23 +0300 To: Doug Rabson Cc: freebsd-hackers@freefall.cdrom.com, "Paul F. Werkowski" References: In-Reply-To: ; from Doug Rabson at Wed, 18 Jan 1995 17:57:53 +0000 (GMT) Message-Id: Organization: Olahm Ha-Yetzirah Date: Wed, 18 Jan 1995 21:12:23 +0300 X-Mailer: Mail/@ [v2.31 FreeBSD] From: "Andrew A. Chernov, Black Mage" X-Class: Fast Subject: Re: old vfprintf bug back again in 2.x Lines: 44 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Length: 1652 Sender: hackers-owner@FreeBSD.org Precedence: bulk In message Doug Rabson writes: >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. This 2 lines of code is inactive, because prec != -1 there (it resetted above if -1). -- Andrew A. Chernov : And I rest so composedly, /Now, in my bed, ache@astral.msk.su : That any beholder /Might fancy me dead - FidoNet: 2:5020/230.3 : Might start at beholding me, /Thinking me dead. RELCOM Team,FreeBSD Team : E.A.Poe From "For Annie" 1849