bc: fix EOF handling in bc_program_read()
authorDenys Vlasenko <vda.linux@googlemail.com>
Tue, 11 Dec 2018 21:26:38 +0000 (22:26 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Tue, 11 Dec 2018 21:45:15 +0000 (22:45 +0100)
commit4dd3652c2fa782ac25a0cb59df060275e6384908
tree0a7ff3ac2b769f241d7f2537184de2962adbf6f3
parent2c6f563216da4fd38626b59cbd01774bbc0e2a71
bc: fix EOF handling in bc_program_read()

$ bc -q
read()
2^D^D2
     ^ prints the result of read()'ed expression

function                                             old     new   delta
zbc_program_print                                    629     642     +13
bc_program_read                                      322     312     -10
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 13/-10)              Total: 3 bytes

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