Tue Dec 9 10:45:00 GMT 2014
> Given that this is non-standard anyway, what about creating a safer
> alternative instead, along the lines of Craig's/Freddie's itoa_s/np?
> Also, shouldn't the functions start with an underscore so as not
> to pollute the standard namespace? itoa and utoa are very likely
> not uncommon as function names in existing projects.
Perhaps. I wrote it so that some existing code would compile though. In stdlib.h, it's in a #ifndef __STRICT_ANSI__ block next to dtoa() et al., which I presume are just as non-standard.
>> I've also modified it as per Freddie's suggestion.
> Did you test it? AFAICS, the itoa function never returns the sign:
Oops, not Freddie's version. Updated version attached.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 5057 bytes
Desc: not available
More information about the Newlib