patch: short form for unzip archive listing

Denys Vlasenko vda.linux at googlemail.com
Fri Sep 7 19:19:29 UTC 2007


On Thursday 06 September 2007 20:17, Paul Fox wrote:
> if you're dealing with zip archives in a script, it's useful to
> be able to get a script-friendly listing.  the current '-l'
> command is more like 'ls -l', i.e. lots of information, but not
> script-friendly.
> 
> this patch overloads the existing '-q' flag so that if '-l' and
> '-q' are used together, a "short form" listing (just pathnames)
> is generated.  (without this patch, the options make no sense to
> use together.)
> 
> i don't quite understand the bloatcheck, since i actually added a
> few characters to the usage message, but i guess overall it now
> compresses better?  odd.
> 
> function                                             old     new   delta
> unzip_main                                          1807    1858     +51
> packed_usage                                       23173   23151     -22
> .rodata                                           122070  122038     -32
> ------------------------------------------------------------------------------
> (add/remove: 0/0 grow/shrink: 1/2 up/down: 51/-54)             Total: -3 bytes
> 
> 
> i can commit in a day or two if no one objects.

> -	enum {v_silent, v_normal, v_list} verbosity = v_normal;
> +	int verbose = 1;
> +	int listing = 0;

I think smallint will give you some small additional win in bloatcheck.

--
vda



More information about the busybox mailing list