tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: strtonum(3) from OpenBSD?



On Wed, 24 Jun 2009, Marc Balmer wrote:

> what I find amusing is that people come up with their own implemetation
> of such a function

I find that strange too, when it is actually not that complicated to use
the C89/C99 functions directly in the first place. Even the check for
errno==ERANGE is unneccessary in the vast majority of cases where the
range of valid values is smaller than the range of the type (I've never
had to use it at least)

> instead of simply accept the fact that there is  a function
> in OpenBSD and FreeBSD that is accepted by many good folks...

Well now, I did a google search for strtonum() and found objections to
including it in FreeBSD for all the same reasons as mentioned here and yet
it was included anyway shortly afterwards with no fanfare..  I don't have
a FreeBSD source tree though to see if it is in general use or just for
compatibility-with-OpenBSD-sources purposes.

iain


Home | Main Index | Thread Index | Old Index