This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SPRINTF()

I am using SPRINTF() function and it increase the code by 2.3K. Is there any method to reduce the code size.

Thanks,

Mashood

Parents
  • Or perhaps start with an implementation of sprintf() and strip it down to just what you need.

    Source code for FreeBSD C library:

    www.freebsd.org/.../

    Many compilers come with several partial implementations of the printf()-style functions along with the full one. Many of those are even smart enough to snoop the format strings, detect which formatting options you actually use, and link the most minimal implementation which has all the features in use. Keil is not, alas, one of these (so far as I know!)

Reply
  • Or perhaps start with an implementation of sprintf() and strip it down to just what you need.

    Source code for FreeBSD C library:

    www.freebsd.org/.../

    Many compilers come with several partial implementations of the printf()-style functions along with the full one. Many of those are even smart enough to snoop the format strings, detect which formatting options you actually use, and link the most minimal implementation which has all the features in use. Keil is not, alas, one of these (so far as I know!)

Children