delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/04/27/15:37:11

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Fri, 27 Apr 2001 13:58:39 -0400
From: Ashok Vadekar <avadekar AT certicom DOT com>
To: Mark Schamberger <Mark_Schamberger-A11451 AT email DOT mot DOT com>
Cc: cygwin AT cygwin DOT com
Subject: Re: bug report: sscanf problem with cygwin 1.3.1-1
Message-ID: <20010427135839.G4114@volta.certicom.com>
Reply-To: avadekar AT certicom DOT com
References: <3AE9A1EA DOT EC0961C6 AT labs DOT mot DOT com>
Mime-Version: 1.0
X-Mailer: Mutt 1.0i
In-Reply-To: <3AE9A1EA.EC0961C6@labs.mot.com>; from Mark_Schamberger-A11451@email.mot.com on Fri, Apr 27, 2001 at 11:44:26AM -0500

Might this be a locale issue?  I believe that you can specify the scanf
parsing rules such that either of:
	1,234.567
	1.234,567
gets parsed as "one thousand, two hundred thirty-four decimal ..."

If cygwin's code base includes locale support, maybe the default local
has changed.

On Fri, Apr 27, 2001 at 11:44:26AM -0500, Mark Schamberger wrote:
> I have verified this problem on three different machines, each with the
> complete "current" installation of cygwin.  (Windows NT4.0 sp6, Windows
> 2000 sp1)
> 
> When using sscanf to read double values from a string, the resulting
> value is incorrect.  The following piece of code demonstrates the
> problem:
> 
> >>>>>>>>>>>>>>>>>>>>>
> #include <stdio.h>
> 
> int main(int argc, char *argv[])
> {
>         double d;
> 
>         sscanf("12.345","%lg",&d);
>         printf("%lg\n",d);
> }
> >>>>>>>>>>>>>>>>>>>>>
> 
> Instead of the expected 12.345, it results in 12345 (it appears that
> decimal points and exponents are not understood properly).
> 
> If I revert FROM cygwin 1.3.1-1 back TO cygwin 1.1.8-2, the bug
> disappears.
> 
> Anyone else experience this problem?
> 
> Thanks, Mark Schamberger
> mas AT labs DOT mot DOT com
> 
> --
> 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019