EmbDev.net

Forum: ARM programming with GCC/GNU tools Replacement for itoa


Author: Sameer Patil (sameer_pat)
Posted on:

Rate this post
0 useful
not useful
hi,
        i have a old code which uses "itoa" of stdlib .....how can i
complie it with WINARM as newlib has no function named "itoa". Is there
any replacement for itoa in newlib?

Sameer.

Author: Martin Thomas (mthomas) (Moderator)
Posted on:

Rate this post
0 useful
not useful
Sameer Patil wrote:
>         i have a old code which uses "itoa" of stdlib .....how can i
> complie it with WINARM as newlib has no function named "itoa". Is there
> any replacement for itoa in newlib?

For some reason there is no itoa in newlib (yet), maybe because it's not
in the Standard. As a replacement there is always sprintf, but this by
cause an unacceptable memory-footprint if you do not use stdio already.
But there are a lot of itoa implementations freely available. Search for
example koders.com for itoa.c (check if the licenses match your needs).

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.