[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: strtonum(3) from OpenBSD?
Am 23.06.2009 um 16:58 schrieb Matthew Mondor:
On Tue, 23 Jun 2009 16:28:11 +0200
Marc Balmer <marc%msys.ch@localhost> wrote:
OpenBSD has the strtonum(3) function to reliably convert string
integer since the 3.6 release.
I don't personally remember the previous thread about it, but the
various immediate problems I see with it:
Instead of returning an error code it returns a string, assuming the
only consumers are humans; also this error string is non-localizable.
Also, although it claims to be safer this is only a utility wrapper
That said, if it is needed for portability because many programs
it in libc, it might be useful...
so why do we have strsuftoll? Looks like an over-engineered strtonum
we now have four copies of strtonum in the tree, btw.
Main Index |
Thread Index |