Mail Archives: djgpp-workers/2003/11/09/09:08:09
Hello.
Martin Str|mberg wrote:
> I posted the following and still no comment. I think they agree
> (silence is golden). The previous articles made their option
> clear. Anyone not thinking so, please follow-up the article or one of
> its siblings in the newsgroup. Hence we do have a bug in *scanf(). (No
> I'm not volunteering to correct it.)
After reading the C99 standard, I agree with what you wrote below.
I'm going to use the examples as a new set of test cases.
I'm trying to fix our sscanf.
[snip]
> Let's see if I got this now.
>
> ``sscanf("", "%*[0123456789]%*c");'' should return EOF (input
> failure).
>
> ``sscanf("X", "%*[0123456789]%*c");'' should return 0 as there's not
> an input failure but a matching failure.
>
> ``sscanf("1", "%*[0123456789]%*c");'' should return EOF as there's a
> input failure after matching ``1''.
>
> ``sscanf("1X2", "%*[0123456789]%*[0123456789]"'' should return 0 as
> there's a matching failure after matching ``1''.
[snip]
Bye, Rich =]
--
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]
"You can't evaluate a man by logic alone." -- McCoy, "I, Mudd", Star Trek
- Raw text -