tech-userlevel archive

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

Re: strtonum(3) from OpenBSD?



Salut,

On Fri, Jun 26, 2009 at 01:15:11AM -0400, James K. Lowden wrote:
> I don't understand why atoi() keeps getting reinvented when we have a
> completely standard, easily extended alternative: sscanf(3).

I will simply suppose you are kidding here as anything else would just be
absurd. There's no reason whatsoever to use a string format definition
which is read and evaluated at runtime if there is no format being
processed in the first place. Converting a string to some type of integer
should not require such overhead and error-proneness, especially in an
operating system which promises speed and flexibility on embedded
platforms.

(Hey, did you know that 26-bit architectures are a bit limited in terms
of memory, and typically also execution speed?)

Also, from the rest of the thread it should be pretty clear what we want
and what our criteria are.

                                Tonnerre

Attachment: pgpcNy9lbWg4j.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index