This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi Corinna, > 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. Cheers, Jon
Attachment:
itoa3.patch
Description: Binary data
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |