Mail Archives: djgpp-workers/2002/12/17/10:37:28
Hello.
Martin Stromberg wrote:
>
> > Please find below a patch to add strtof. The code is based on strtod.
>
> Thanks.
>
> But is there any reason not to call strtod() followed by two
> comparisions for overflow detection (or four, underflow too) and
> returning that?
[snip]
No particular reason. I did think about that.
The behaviour of the functions will change, when we do some C99 updates. For
instance, strtof is supposed to return HUGE_VALF (a float version of HUGE_VAL)
instead of HUGE_VAL, like it's coded right now. strtold is supposed to do
something similar, returning HUGE_VALL.
So it's possible that C99 will not allow us to do what you suggest. But if it
does, then we can do that, when we're making the strto* functions
C99-compliant.
Bye, Rich =]
--
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]
- Raw text -