doesn't take numbers

James LewisMoss jimdres@mindspring.com
31 Jul 2001 16:38:38 -0400


>>>>> On Tue, 31 Jul 2001 14:31:35 -0500, linas@linas.org (Linas Vepstas) said:

 Linas> On Tue, Jul 31, 2001 at 03:07:19AM -0400, James LewisMoss was
 Linas> heard to remark:
 James> [root@grizzly test]# foo sscanf failed [root@grizzly test]#
 >>
 >> In the foo.c file can you change the %lld to %qd and try to run it
 >> again?

 Linas> No one ever likes this when I say it, but ... in my
 Linas> experience, sscanf never quite works as well as one might
 Linas> think it should.  By contrast, finding the begining of a
 Linas> numeric string and passing it to atof, atod, atoll in this
 Linas> case, always works like a charm.  Note you don't have to
 Linas> terminate; if there is ascii garbage following the string, its
 Linas> ignored.

I honestly don't care one way or another what's used.  It's just
code.  It happens to be ssanf atm.  So you would suggest changing this
to atoll?  No biggee.  I'll do that.

Is atoll happy on other platforms (Solaris being the example I'm aware
gnucash is being used on)?

What's surprising is that a redhat 7.x machine is buggy with sscanf.
Just absurd.

Jim

-- 
@James LewisMoss <dres@debian.org>      |  Blessed Be!
@    http://jimdres.home.mindspring.com |  Linux is kewl!
@"Argue for your limitations and sure enough, they're yours." Bach