bc: unbreak read(), remove checks for nested read()
function old new delta zbc_parse_pushSTR - 65 +65 common_parse_expr - 32 +32 bc_error_nested_read_call 10 - -10 bc_parse_expr_empty_ok 1977 1963 -14 zdc_parse_expr 635 615 -20 zcommon_parse_expr 32 - -32 zbc_program_exec 4064 4023 -41 bc_parse_pushSTR 65 - -65 ------------------------------------------------------------------------------ (add/remove: 2/3 grow/shrink: 0/3 up/down: 97/-182) Total: -85 bytes text data bss dec hex filename 981661 485 7296 989442 f1902 busybox_old 981540 485 7296 989321 f1889 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@@ -31,6 +31,21 @@ testing "bc string 1" \
|
||||
"STR\n" \
|
||||
"" "\"STR\n\""
|
||||
|
||||
testing "bc read() 4<EOF>" \
|
||||
"bc input" \
|
||||
"4\n" \
|
||||
"read();halt" "4"
|
||||
|
||||
testing "bc read()^2" \
|
||||
"bc input" \
|
||||
"16\n" \
|
||||
"read()^2;halt" "4\n"
|
||||
|
||||
testing "bc read()*read()" \
|
||||
"bc input" \
|
||||
"20\n" \
|
||||
"read()*read();halt" "4\n5"
|
||||
|
||||
testing "bc if 0 else" \
|
||||
"bc" \
|
||||
"2\n9\n" \
|
||||
|
Reference in New Issue
Block a user