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 23:57:02 -0400
"Greg A. Woods" <> wrote:

> If you read my earlier mail you'd also hopefully know that deviating
> from any of the restrictions imposed by my parseint() example requires
> re-writing some or all of the main conditions and checks and parameters
> used by my parseint().
> In other words the best function(s) for common use and inclusion in a
> system library is already there:  strtol(3) and friends.

Yes, and parsint can be used in the most common case of using strtol (where 
most of our utils use atoi without any error checking, ewww), at accepting 
numerical values from the command line with correct error checking.

Adam Hoka <>
Adam Hoka <>
Adam Hoka <>

Home | Main Index | Thread Index | Old Index