libbb: factor out code which queries screen width
authorDenys Vlasenko <vda.linux@googlemail.com>
Thu, 22 Oct 2015 23:44:22 +0000 (01:44 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Thu, 22 Oct 2015 23:44:22 +0000 (01:44 +0200)
commit641caaec3d495f3a92f652f12ab70b02ba9312ac
tree2a1aeb78c4344d1cd4423cdd96b581a797392b58
parenta96074874857b31361d02ead97a1152164568918
libbb: factor out code which queries screen width

function                                             old     new   delta
get_terminal_width                                     -      17     +17
stty_main                                           1196    1197      +1
pstree_main                                          321     319      -2
ls_main                                              735     731      -4
watch_main                                           232     225      -7
bb_progress_update                                   714     706      -8
ps_main                                              555     543     -12
run_applet_and_exit                                  708     695     -13
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/6 up/down: 18/-46)            Total: -28 byte

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
coreutils/ls.c
coreutils/stty.c
include/libbb.h
libbb/appletlib.c
libbb/progress.c
libbb/xfuncs.c
procps/ps.c
procps/pstree.c
procps/watch.c