This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [Q@ping.be: Scanf with a long long.]


Christopher Faylor wrote:
> 
> Wow, 1997, huh?  Why doesn't someone fix this crucial problem?
> 
> Whassamadda with you guys?
>
  
  It is a known deficiency (i.e. scanf does not have any long long support).
I am working on an enhancement as we speak and should have something tested by
early next week.

-- Jeff J.
 
 
> ----- Forwarded message from Kurt Roeckx <Q@ping.be> -----
> 
> From: Kurt Roeckx <Q@ping.be>
> To: cygwin@cygwin.com
> Subject: Scanf with a long long.
> Date: Thu, 6 Sep 2001 00:54:13 +0200
> 
> I need use a 64 bit number, and int64_t is defined as a long
> long.
> 
> The problem is that scanf doesn't like numbers bigger then
> 0xFFFFFFFF, and always returns that number in that case.  printf
> works fine with them.
> 
> An example is doing this:
> 
>         long long int   i;
> 
>         sscanf("123456789", "%Lx", &i);
>         printf("%llx\n%llx\n", i, i + 1);
> 
> it will print:
> 
> ffffffff
> 100000000
> 
> This problem seems to be reported once before in 1997, but still
> doesn't seem to be fixed.
> I'm using cygwin 1.3.2 on win98.
> 
> Kurt
> 
> ----- End forwarded message -----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]