From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Ryde Newsgroups: gmane.lisp.guile.devel Subject: Re: ice-9 format doesn't typecheck Date: Fri, 08 Sep 2006 07:13:37 +1000 Message-ID: <87r6yn5qim.fsf@zip.com.au> References: <87zmjxkhjv.fsf@zip.com.au> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1157663703 30006 80.91.229.2 (7 Sep 2006 21:15:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 7 Sep 2006 21:15:03 +0000 (UTC) Cc: hanwen@lilypond.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Thu Sep 07 23:15:02 2006 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GLRCm-0005Iw-Fl for guile-devel@m.gmane.org; Thu, 07 Sep 2006 23:14:38 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GLRCl-00045z-Pv for guile-devel@m.gmane.org; Thu, 07 Sep 2006 17:14:35 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GLRC1-0002Pa-JS for guile-devel@gnu.org; Thu, 07 Sep 2006 17:13:49 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GLRBz-0002J4-6r for guile-devel@gnu.org; Thu, 07 Sep 2006 17:13:48 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GLRBy-0002Ig-TK for guile-devel@gnu.org; Thu, 07 Sep 2006 17:13:46 -0400 Original-Received: from [61.8.0.85] (helo=mailout2.pacific.net.au) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GLRCQ-0006Mk-OQ for guile-devel@gnu.org; Thu, 07 Sep 2006 17:14:15 -0400 Original-Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout2.pacific.net.au (Postfix) with ESMTP id A6AD010A097; Fri, 8 Sep 2006 07:13:43 +1000 (EST) Original-Received: from localhost (ppp2969.dyn.pacific.net.au [61.8.41.105]) by mailproxy2.pacific.net.au (8.13.4/8.13.4/Debian-3sarge3) with ESMTP id k87LDdg4019799; Fri, 8 Sep 2006 07:13:42 +1000 Original-Received: from gg by localhost with local (Exim 4.63) (envelope-from ) id 1GLRBq-00020O-0C; Fri, 08 Sep 2006 07:13:38 +1000 Original-To: guile-devel@gnu.org User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:6061 Archived-At: --=-=-= hanwen@byrd.xs4all.nl (Han-Wen Nienhuys) writes: > > guile> (format #f "~$" "02.4738") > "24.74" I found the bug, a one line fix in the stripping of leading zeros. It now gives "2.4738". --=-=-= Content-Disposition: attachment; filename=format.scm.leading-zeros.diff --- format.scm.~1.25.4.1.~ 2006-02-21 09:15:27.000000000 +1100 +++ format.scm 2006-09-07 17:58:49.000000000 +1000 @@ -1461,8 +1461,8 @@ (if (> format:fn-dot left-zeros) (begin ; norm 0{0}nn.mm to nn.mm (format:fn-shiftleft left-zeros) - (set! left-zeros 0) - (set! format:fn-dot (- format:fn-dot left-zeros))) + (set! format:fn-dot (- format:fn-dot left-zeros)) + (set! left-zeros 0)) (begin ; normalize 0{0}.nnn to .nnn (format:fn-shiftleft format:fn-dot) (set! left-zeros (- left-zeros format:fn-dot)) --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://lists.gnu.org/mailman/listinfo/guile-devel --=-=-=--