Message-Id: <200105091919.PAA10002@delorie.com> Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com From: "Mark Paulus" To: "cygwin AT cygwin DOT com" , "R Clint Whaley" Cc: "atlas AT cs DOT utk DOT edu" , "ruheejih AT calvados DOT zrz DOT tu-berlin DOT de" Date: Wed, 09 May 2001 13:18:35 -0600 Reply-To: "Mark Paulus" X-Mailer: PMMail 2000 Professional (2.10.2010) For Windows 2000 (5.0.2195;1) In-Reply-To: <200105091801.OAA10216@enterprise.cs.utk.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Subject: Re: error in scanf handling of doubles Confirmed on a PII/300 running Win2K, as well as an AMD Thunderbird/1GHz running WinME.... On Wed, 9 May 2001 14:01:44 -0400 (EDT), R Clint Whaley wrote: >Hi, > >I'm using Win2000 on a P4, using cygwin 1.3.1, gcc 2.95.3-4, downloaded >and installed today. This version of cygwin does not perform correctly >with any of the scanf functions applied to floats. Here is an example >routine demonstrating the error: > >>#include >>#include >>main(int nargs, char **args) >>{ >> char *str="-1106.743501"; >> double mf0, mf1; >> if (nargs > 1) str = args[1]; >> assert(sscanf(str, "%lf", &mf1) == 1); >> fprintf(stderr, "mf = '%s', %lf\n", str, mf1); >> exit(0); >>} > >Here is a compile and run on any other machine: >>drteeth.cs.utk.edu. gcc -o xerr showerr.c >>drteeth.cs.utk.edu. ./xerr >>mf = '-1106.743501', -1106.743501 >>drteeth.cs.utk.edu. ./xerr 7.7 >>mf = '7.7', 7.700000 > >Here it is on the cygwin1.3.1 box: >>$ ./xerr >>mf = '-1106.743501', 1.000000 >>$ ./xerr 7.7 >>mf = '7.7', 77.000000 > >This worked under version 1.1.8 on the same machine/setup. Can you confirm >the problem, so it's not just my install? > >Any help much appreciated, >Clint > >-- >Want to unsubscribe from this list? >Check out: http://cygwin.com/ml/#unsubscribe-simple -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple