diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-12-03 16:06:02 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-12-05 15:43:35 +0100 |
commit | c1c2470f843c0b8218dd3611330a941b00d0cc34 (patch) | |
tree | 59dd8c0a1b3c31954bb699513e098b28f7e90798 /testsuite/paste/paste-separate | |
parent | d4744adf35c678554e609a74eeebc7b7603ee25d (diff) | |
download | busybox-c1c2470f843c0b8218dd3611330a941b00d0cc34.tar.gz |
bc: handle BIN_FILE and LEX_BAD_CHAR errors at the site of detection
The most informative message can be generated at the location
where error is detected. The "error codes" are stupid:
print error meesage immediately, then just return "there was an error"
indicator.
All error codes will be converted. For now, converting these two.
For now, this and following changes will degrade error messages
quality. For example, file name and line number printouts may be lost.
This will be re-added later.
This change anlso fixes handling of invalid stdin input:
this used to cause interactive bc to exit:
....
>>> ς
bc: illegal character 0xcf
bc: illegal character 0x82
>>> _
function old new delta
bc_error - 42 +42
bc_lex_token 1333 1369 +36
dc_lex_token 675 695 +20
bc_read_line 311 325 +14
bc_num_a 456 454 -2
bc_err_msgs 188 184 -4
bc_num_ulong 95 85 -10
bc_vm_run 1984 1955 -29
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 3/4 up/down: 112/-45) Total: 67 bytes
text data bss dec hex filename
987828 485 7296 995609 f3119 busybox_old
987929 485 7296 995710 f317e busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite/paste/paste-separate')
0 files changed, 0 insertions, 0 deletions