diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-12-13 22:25:28 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-12-13 22:25:28 +0100 |
commit | e755e30402e1e8071563e03f442998cac162f295 (patch) | |
tree | 38a010253c40fa33681fd8cc39070873f0bc4b52 | |
parent | 89198a9e5d4e599a25a839c4d193f834bcd8c617 (diff) | |
download | busybox-w32-e755e30402e1e8071563e03f442998cac162f295.tar.gz busybox-w32-e755e30402e1e8071563e03f442998cac162f295.tar.bz2 busybox-w32-e755e30402e1e8071563e03f442998cac162f295.zip |
bc: unbreak "only bc" and "only dc" configs
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | miscutils/bc.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/miscutils/bc.c b/miscutils/bc.c index 5938e54ab..1f0802a4d 100644 --- a/miscutils/bc.c +++ b/miscutils/bc.c | |||
@@ -1360,7 +1360,8 @@ static void bc_read_line(BcVec *vec) | |||
1360 | if (n <= 0) { // read errors or EOF, or ^D, or ^C | 1360 | if (n <= 0) { // read errors or EOF, or ^D, or ^C |
1361 | if (n == 0) // ^C | 1361 | if (n == 0) // ^C |
1362 | goto intr; | 1362 | goto intr; |
1363 | break; | 1363 | bc_vec_pushZeroByte(vec); |
1364 | return; | ||
1364 | } | 1365 | } |
1365 | i = 0; | 1366 | i = 0; |
1366 | for (;;) { | 1367 | for (;;) { |
@@ -2913,8 +2914,8 @@ static void bc_lex_file(BcLex *l) | |||
2913 | l->newline = false; | 2914 | l->newline = false; |
2914 | } | 2915 | } |
2915 | 2916 | ||
2916 | static BC_STATUS zbc_lex_token(BcLex *l); | 2917 | IF_BC(static BC_STATUS zbc_lex_token(BcLex *l);) |
2917 | static BC_STATUS zdc_lex_token(BcLex *l); | 2918 | IF_DC(static BC_STATUS zdc_lex_token(BcLex *l);) |
2918 | 2919 | ||
2919 | static BC_STATUS zcommon_lex_token(BcLex *l) | 2920 | static BC_STATUS zcommon_lex_token(BcLex *l) |
2920 | { | 2921 | { |
@@ -3475,8 +3476,8 @@ static void bc_parse_number(BcParse *p, BcInst *prev, size_t *nexs) | |||
3475 | (*prev) = BC_INST_NUM; | 3476 | (*prev) = BC_INST_NUM; |
3476 | } | 3477 | } |
3477 | 3478 | ||
3478 | static BC_STATUS zbc_parse_parse(BcParse *p); | 3479 | IF_BC(static BC_STATUS zbc_parse_parse(BcParse *p);) |
3479 | static BC_STATUS zdc_parse_parse(BcParse *p); | 3480 | IF_DC(static BC_STATUS zdc_parse_parse(BcParse *p);) |
3480 | 3481 | ||
3481 | static BC_STATUS zcommon_parse(BcParse *p) | 3482 | static BC_STATUS zcommon_parse(BcParse *p) |
3482 | { | 3483 | { |