Re: [PATCH] Fix newly exposed bug [was RE: RFC: Fix partial NaN-parsing problem [was RE: sscanf problem]]

2005-04-29 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Dave Korn on 4/28/2005 12:41 PM: > Heh, actually we probably have to talk about that. The k should IIUIC be > swallowed by the %lf and the %c should fail; this is the production > described as NAN(n-char-sequence opt) in the C language

RE: [PATCH] Fix newly exposed bug [was RE: RFC: Fix partial NaN-parsing problem [was RE: sscanf problem]]

2005-04-28 Thread Gary R. Van Sickle
> Heh, actually we probably have to talk about that. The k > should IIUIC be swallowed by the %lf and the %c should fail; > this is the production described as NAN(n-char-sequence opt) > in the C language spec, strtod documentation (that's > 7.20.1.3.3 in WG14/N843 draft, I don't have the fi

RE: [PATCH] Fix newly exposed bug [was RE: RFC: Fix partial NaN-parsing problem [was RE: sscanf problem]]

2005-04-28 Thread Dave Korn
Original Message >From: Jeff Johnston >Sent: 28 April 2005 19:33 > Hi Dave, > >Thanks for looking into this. Your patch wasn't quite correct. It > ended up breaking nan-support which isn't tested in the accompanying > testcase. It needed to verify that x & multiple_flags_ored_toget

Re: [PATCH] Fix newly exposed bug [was RE: RFC: Fix partial NaN-parsing problem [was RE: sscanf problem]]

2005-04-28 Thread Jeff Johnston
Hi Dave, Thanks for looking into this. Your patch wasn't quite correct. It ended up breaking nan-support which isn't tested in the accompanying testcase. It needed to verify that x & multiple_flags_ored_together == multiple_flags_ored_together. Anyway, I have checked a patch in and verifie

[PATCH] Fix newly exposed bug [was RE: RFC: Fix partial NaN-parsing problem [was RE: sscanf problem]]

2005-04-28 Thread Dave Korn
Original Message >From: Jean-Christophe Kablitz >Sent: 27 April 2005 00:22 > Hello, > > I have noticed, that, while parsing {a float_value immediately followed by > 'n' or 'N'} with the "%f%c" format, the sscanf function of cygwin-1.5.16-1 > behaves differently from the scanf function of

RE: RFC: Fix partial NaN-parsing problem [was RE: sscanf problem]

2005-04-27 Thread Dave Korn
Original Message >From: Jean-Christophe Kablitz >Sent: 27 April 2005 00:22 > Maybe I have been misusing sscanf. Or there is a relationship with the > NaN-parsing problem of the "newlib". > > Best regards. > Jean-Christophe K. Almost certainly so; thanks for the test case, I'll get on

Re: RFC: Fix partial NaN-parsing problem [was RE: sscanf problem]

2005-04-26 Thread Jean-Christophe Kablitz
\n", i, x, m); return 0; } jck:/sscanf> gcc -O0 ssn.c -o ssn.exe jck:/sscanf> ./ssn.exe i=2 x=1 m=a i=1 x=1 m=_ --- end of test case --- - Original Message - From: "Jeff Johnston" To: "Dave Korn" Cc: ; Sent: Tuesday, April 05, 2005 8:47 PM Subject: Re:

Re: RFC: Fix partial NaN-parsing problem [was RE: sscanf problem]

2005-04-05 Thread Jeff Johnston
Patch checked in. Thanks. -- Jeff J. Dave Korn wrote: Original Message From: Dave Korn Sent: 04 April 2005 19:07 Original Message From: Dave Korn Sent: 04 April 2005 18:51 Original Message From: Michael Hines Sent: 04 April 2005 19:43 The following program prints i=1 x=0

RFC: Fix partial NaN-parsing problem [was RE: sscanf problem]

2005-04-04 Thread Dave Korn
Original Message >From: Dave Korn >Sent: 04 April 2005 19:07 > Original Message >> From: Dave Korn >> Sent: 04 April 2005 18:51 > >> Original Message >>> From: Michael Hines >>> Sent: 04 April 2005 19:43 >> >>> The following program prints >>> i=1 x=0 >>> instead of >>> i

RE: sscanf problem

2005-04-04 Thread Dave Korn
Original Message >From: Dave Korn >Sent: 04 April 2005 18:51 > Original Message >> From: Michael Hines >> Sent: 04 April 2005 19:43 > >> The following program prints >> i=1 x=0 >> instead of >> i=0 x=10 >> when using the latest version of cygwin1.dll. >> >> >> #include >> int m

Re: sscanf problem

2005-04-04 Thread Christopher Faylor
On Mon, Apr 04, 2005 at 06:51:00PM +0100, Dave Korn wrote: > Heh, the interminable newlib-sscanf-bug strikes again! It's mis-parsing >the n as being the first letter of 'nan', which is a valid input to %f. CV >sent a patch upstream to the newlib maintainers last week but I guess it >hasn't made

RE: sscanf problem

2005-04-04 Thread Dave Korn
Original Message >From: Michael Hines >Sent: 04 April 2005 19:43 > The following program prints > i=1 x=0 > instead of > i=0 x=10 > when using the latest version of cygwin1.dll. > > > #include > int main() { > int i; > double x; > x = 10; > i = sscanf