bc: create a few common functions
authorDenys Vlasenko <vda.linux@googlemail.com>
Tue, 4 Dec 2018 20:46:47 +0000 (21:46 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Wed, 5 Dec 2018 14:43:35 +0000 (15:43 +0100)
commit7d62801db938c72ee629ebe133768e41ba3e4667
tree76c4a260fbfdf5bae08d3add503cbc55cb2a219b
parentd5f7703abb5a0868fd0e9fa3e8c0509ed99ce330
bc: create a few common functions

function                                             old     new   delta
bc_char_vec_init                                       -      12     +12
bc_vec_pop_all                                         -       8      +8
bc_program_index                                      64      66      +2
bc_vec_string                                         64      61      -3
bc_vec_free                                           27      24      -3
bc_read_line                                         317     314      -3
bc_program_execStr                                   564     561      -3
bc_program_exec                                     4153    4150      -3
bc_program_copyToVar                                 340     336      -4
bc_parse_create                                      175     170      -5
dc_lex_token                                         705     699      -6
bc_program_reset                                      78      72      -6
bc_lex_number                                        305     299      -6
bc_program_read                                      353     343     -10
bc_program_addFunc                                   225     209     -16
bc_vm_run                                           1942    1924     -18
bc_parse_reset                                       181     163     -18
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 1/14 up/down: 22/-104)          Total: -82 bytes
   text    data     bss     dec     hex filename
 987600     485    7296  995381   f3035 busybox_old
 987518     485    7296  995299   f2fe3 busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
miscutils/bc.c