[PATCH] new applet: nmeter

Rich Felker dalias at aerifal.cx
Thu Jul 6 19:22:11 UTC 2006


On Thu, Jul 06, 2006 at 05:37:28PM +0200, Denis Vlasenko wrote:
> On Wednesday 05 July 2006 23:31, Bernhard Fischer wrote:
> > >> looks rather large relative to what it does.
> > >
> > >Biggest functions are:
> > >
> > >+00000040 t simple_itoa
> > 
> > erm, we already have *several* itoa in there:
> > msh, hush, ash?, lash, netstat
> 
> > Adding yet another impl stikes me as not really optimal. I can see that
> > they have different maximum supported lengths, but they should be
> > unified nevertheless. Please do not add yet another one..
> 
> It's a bit special. It puts string
> at the _end_ of provided buffer,
> and pads it with zeroes to specified width:

Yes, but this is an implementation detail. AFAIK the caller need not
rely on it working this way.

> Prototype is rather different from standard itoa.

There's no such thing as standard itoa.

> If I will switch to standard itoa, bloat will simply migrate
> to callsites instead (strlen, strncpy etc...). I prefer
> to have my own which does exactly what I need.

Eh? These functions are being linked anyway.

Rich




More information about the busybox mailing list