[PATCH] Refactor catv. Move visible from stty to libbb.

Denys Vlasenko vda.linux at googlemail.com
Tue Jul 30 04:31:27 UTC 2013


On Friday 26 July 2013 18:30, Bernhard Reutner-Fischer wrote:
> On 9 July 2013 20:58, Bartosz Gołaszewski <bartekgola at gmail.com> wrote:
> > 2013/7/9 Bartosz Gołaszewski <bartekgola at gmail.com>:
> >> 2013/7/9 Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>:
> >>> On 9 July 2013 20:22, Bartosz Golaszewski <bartekgola at gmail.com> wrote:
> >>>> Fixes the following TODO:
> >>>>
> >>>>   stty's visible() function and catv's guts are identical. Merge them into
> >>>>   an appropriate libbb function.
> >>>>
> >>>> Also makes catv behave exactly like coreutils' cat -v e.g. it'll print 'M-^I'
> >>>> instead of 'M-   '.
> >>>
> >>> Awesome. bloat-o-meter output, please?
> >>> thanks,
> 
> > ./scripts/bloat-o-meter ./busybox.old ./busybox.new
> > function                                             old     new   delta
> > .rodata                                           140405  140177    -228
> > ------------------------------------------------------------------------------
> > (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-228)           Total: -228 bytes
> 
> LGTM.

bloat-o-meter looks wrong. It should show something like

function                                             old     new   delta
visible                                                -      70     +70
do_display                                           431     379     -52
catv_main                                            306     250     -56
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/2 up/down: 70/-108)           Total: -38 bytes


Applied with significant tweaking. Thanks.
-- 
vda


More information about the busybox mailing list