avr-libc-dev
[Top][All Lists]
Advanced

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

[avr-libc-dev] Re: [avr-gcc-list] Poll: Who uses itoa() & co with base !


From: Joerg Wunsch
Subject: [avr-libc-dev] Re: [avr-gcc-list] Poll: Who uses itoa() & co with base != {2, 8, 10, 16}?
Date: Sat, 19 Nov 2005 07:57:24 +0100
User-agent: Mutt/1.4.2.1i

As Anton Erasmus wrote:

> > ..., so I'm inclined to replace the existing itoa() family by
> > Dmitry's submission.  When doing so, I'll probably rename the
> > existing implementations to itoa_full() etc. to preserve them in
> > case anyone really needs that functionality.

> > Opinions?

> I think it would be a good move. In most C libraries the itoa
> function is extremely slow because it caters for all bases from 2 to
> 36. I think having a library compile option that compiles the full
> version in stead of the faster version would be better than renaming
> it.

I'd rather use something like

#define _USE_FULL_ITOA
#include <stdlib.h>

... itoa(x, s, 13);

-- 
cheers, J"org               .-.-.   --... ...--   -.. .  DL8DTL

http://www.sax.de/~joerg/                        NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]