bc: do not perform domr limit checks when they can't work (e.g. on 32-bit arches)
authorDenys Vlasenko <vda.linux@googlemail.com>
Fri, 7 Dec 2018 14:50:14 +0000 (15:50 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Fri, 7 Dec 2018 14:50:14 +0000 (15:50 +0100)
commit64074a1767f69b186ce58cafb7eb95bc1aa0dda9
tree026187a294956fcab7b6c6b543fd1b10f57b5400
parentffdcebdffe8a2b6261e3eb468d7c19fd0b454a87
bc: do not perform domr limit checks when they can't work (e.g. on 32-bit arches)

Also, optimize printing of messages with fixed limit strings
by including limits as strings.

function                                             old     new   delta
bc_num_ulong                                         103      95      -8
bc_lex_number                                        296     281     -15
dc_lex_token                                         701     684     -17
bc_lex_name                                           90      73     -17
bc_num_shift                                          72      54     -18
bc_lex_token                                        1299    1280     -19
bc_parse_stmt                                       1868    1768    -100
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/7 up/down: 0/-194)           Total: -194 bytes
   text    data     bss     dec     hex filename
 985814     485    7296  993595   f293b busybox_old
 985526     485    7296  993307   f281b busybox_unstripped

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