getopt32: factor out code to treat all args as options
authorDenys Vlasenko <vda.linux@googlemail.com>
Fri, 4 Aug 2017 14:23:42 +0000 (16:23 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Fri, 4 Aug 2017 14:33:23 +0000 (16:33 +0200)
commit727948e585cb133c32c8d42570e5524c58190307
treef2beb48ded47f9d8ebef707516e7bbb00335b1a8
parent7f9d62d7f5b67b6b1cc7e0b94826ba2a6e193586
getopt32: factor out code to treat all args as options

Working towards making getopt32() xmalloc-free

function                                             old     new   delta
make_all_argv_opts                                     -      58     +58
top_main                                             914     912      -2
getopt32                                            1517    1458     -59
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 0/2 up/down: 58/-61)             Total: -3 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
include/libbb.h
libbb/Kbuild.src
libbb/getopt32.c
libbb/getopt_allopts.c [new file with mode: 0644]
procps/ps.c
procps/top.c