[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    RE: [Patch] ps: add support for real-time format specifiers
From:       AGATE Stephen <stephen.agate () uk ! thalesgroup ! com>
Date:       2016-06-27 7:01:51
Message-ID: e4bed782de8442c084dc571846151213 () XEXWIN0004 ! one-02-priv ! grp
[Download RAW message or body]

> -----Original Message-----
> From: Tito [mailto:farmatito@tiscali.it] 
> Sent: 19 June 2016 16:25
> To: busybox@busybox.net
> Subject: Re: [Patch] ps: add support for real-time format specifiers

<SNIP>

> Hi,
> why do we need 3 different functions here? Couldn't something like this do it?
> 
> static void sprint_it(char *buf, int size, unsigned int value) {
> 	sprintf(buf, "%*u", size, value);
> }
> 
> This could eventually also reduce size of the binary.
> Untested just a hint.
> 
> Ciao,
> Tito

We need the individual functions because the out_spec[] table uses it to decode the \
option. I can't see how to reduce the binary size without a major rewrite.

Cheers,
Stephen.

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic