bc: simplify, and restore ^C, fix ^D handling
authorDenys Vlasenko <vda.linux@googlemail.com>
Sun, 2 Dec 2018 13:35:32 +0000 (14:35 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Wed, 5 Dec 2018 14:43:35 +0000 (15:43 +0100)
commit5a9fef5b599b0e9c31d4e1dffbb3e3f9d19a9603
tree28f89868eec58b749cb3bae7e86aeb466996536d
parent00d7779a356f9827c0776ebbbe91c35f278b9a4c
bc: simplify, and restore ^C, fix ^D handling

^D used to enter infinite loop

function                                             old     new   delta
bc_read_line                                         342     359     +17
bc_args_opt                                            8       -      -8
dc_sig_msg                                            31       -     -31
bc_sig_msg                                            34       -     -34
bc_vm_run                                           2608    2569     -39
bc_args                                              123      83     -40
bc_args_lopt                                          81       -     -81
------------------------------------------------------------------------------
(add/remove: 0/4 grow/shrink: 1/2 up/down: 17/-233)          Total: -216 bytes
   text    data     bss     dec     hex filename
 989491     485    7336  997312   f37c0 busybox_old
 989425     485    7336  997246   f377e busybox_unstripped

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