diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-12-17 21:14:05 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-12-18 03:30:23 +0100 |
commit | 57734c926bbfe69d1c3bb6096fbdf428628ed838 (patch) | |
tree | 390a8423cce5c4c62dce4f555b8c6ae48c42bc51 | |
parent | f6e3f8511e3257022302ad82a6dd6951ff1eae52 (diff) | |
download | busybox-w32-57734c926bbfe69d1c3bb6096fbdf428628ed838.tar.gz busybox-w32-57734c926bbfe69d1c3bb6096fbdf428628ed838.tar.bz2 busybox-w32-57734c926bbfe69d1c3bb6096fbdf428628ed838.zip |
bc: fold zbc_num_stream() into its single caller
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | miscutils/bc.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/miscutils/bc.c b/miscutils/bc.c index c65555fe2..e5ad0ed86 100644 --- a/miscutils/bc.c +++ b/miscutils/bc.c | |||
@@ -5486,14 +5486,6 @@ static BC_STATUS zbc_num_printBase(BcNum *n) | |||
5486 | } | 5486 | } |
5487 | #define zbc_num_printBase(...) (zbc_num_printBase(__VA_ARGS__) COMMA_SUCCESS) | 5487 | #define zbc_num_printBase(...) (zbc_num_printBase(__VA_ARGS__) COMMA_SUCCESS) |
5488 | 5488 | ||
5489 | #if ENABLE_DC | ||
5490 | static BC_STATUS zbc_num_stream(BcNum *n, BcNum *base) | ||
5491 | { | ||
5492 | RETURN_STATUS(zbc_num_printNum(n, base, 1, bc_num_printChar)); | ||
5493 | } | ||
5494 | #define zbc_num_stream(...) (zbc_num_stream(__VA_ARGS__) COMMA_SUCCESS) | ||
5495 | #endif | ||
5496 | |||
5497 | static BC_STATUS zbc_num_print(BcNum *n, bool newline) | 5489 | static BC_STATUS zbc_num_print(BcNum *n, bool newline) |
5498 | { | 5490 | { |
5499 | BcStatus s = BC_STATUS_SUCCESS; | 5491 | BcStatus s = BC_STATUS_SUCCESS; |
@@ -6259,9 +6251,9 @@ static BC_STATUS zbc_program_printStream(void) | |||
6259 | s = zbc_program_num(r, &n, false); | 6251 | s = zbc_program_num(r, &n, false); |
6260 | if (s) RETURN_STATUS(s); | 6252 | if (s) RETURN_STATUS(s); |
6261 | 6253 | ||
6262 | if (BC_PROG_NUM(r, n)) | 6254 | if (BC_PROG_NUM(r, n)) { |
6263 | s = zbc_num_stream(n, &G.prog.strmb); | 6255 | s = zbc_num_printNum(n, &G.prog.strmb, 1, bc_num_printChar); |
6264 | else { | 6256 | } else { |
6265 | idx = (r->t == BC_RESULT_STR) ? r->d.id.idx : n->rdx; | 6257 | idx = (r->t == BC_RESULT_STR) ? r->d.id.idx : n->rdx; |
6266 | str = *bc_program_str(idx); | 6258 | str = *bc_program_str(idx); |
6267 | printf("%s", str); | 6259 | printf("%s", str); |