diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2018-12-19 12:47:45 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2018-12-19 12:48:16 +0100 |
commit | 4796a1d5375aac790564a38289d5b238a81e8efb (patch) | |
tree | 38f3b15973a5cecf0709d1724a0f5dd3a907cd44 | |
parent | b80d7aad1b001479942c314690e6979d8290bdfb (diff) | |
download | busybox-w32-4796a1d5375aac790564a38289d5b238a81e8efb.tar.gz busybox-w32-4796a1d5375aac790564a38289d5b238a81e8efb.tar.bz2 busybox-w32-4796a1d5375aac790564a38289d5b238a81e8efb.zip |
bc: delete G.prog.strmb for real
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | miscutils/bc.c | 36 |
1 files changed, 15 insertions, 21 deletions
diff --git a/miscutils/bc.c b/miscutils/bc.c index 92bf1df57..8ddedf337 100644 --- a/miscutils/bc.c +++ b/miscutils/bc.c | |||
@@ -362,15 +362,13 @@ typedef enum BcResultType { | |||
362 | 362 | ||
363 | BC_RESULT_STR, | 363 | BC_RESULT_STR, |
364 | 364 | ||
365 | BC_RESULT_IBASE, | 365 | //code uses "inst - BC_INST_IBASE + BC_RESULT_IBASE" construct, |
366 | BC_RESULT_SCALE, | 366 | BC_RESULT_IBASE, // relative order should match for: BC_INST_IBASE |
367 | BC_RESULT_LAST, | 367 | BC_RESULT_SCALE, // relative order should match for: BC_INST_SCALE |
368 | 368 | BC_RESULT_LAST, // relative order should match for: BC_INST_LAST | |
369 | // These are between to calculate ibase, obase, and last from instructions. | ||
370 | BC_RESULT_CONSTANT, | 369 | BC_RESULT_CONSTANT, |
371 | BC_RESULT_ONE, | 370 | BC_RESULT_ONE, |
372 | 371 | BC_RESULT_OBASE, // relative order should match for: BC_INST_OBASE | |
373 | BC_RESULT_OBASE, | ||
374 | } BcResultType; | 372 | } BcResultType; |
375 | 373 | ||
376 | typedef union BcResultData { | 374 | typedef union BcResultData { |
@@ -485,12 +483,13 @@ typedef enum BcLexType { | |||
485 | BC_LEX_ASCIIFY, | 483 | BC_LEX_ASCIIFY, |
486 | BC_LEX_PRINT_STREAM, | 484 | BC_LEX_PRINT_STREAM, |
487 | 485 | ||
488 | BC_LEX_STORE_IBASE, | 486 | // code uses "t - BC_LEX_STORE_IBASE + BC_INST_IBASE" construct, |
489 | BC_LEX_STORE_SCALE, | 487 | BC_LEX_STORE_IBASE, // relative order should match for: BC_INST_IBASE |
488 | BC_LEX_STORE_SCALE, // relative order should match for: BC_INST_SCALE | ||
490 | BC_LEX_LOAD, | 489 | BC_LEX_LOAD, |
491 | BC_LEX_LOAD_POP, | 490 | BC_LEX_LOAD_POP, |
492 | BC_LEX_STORE_PUSH, | 491 | BC_LEX_STORE_PUSH, |
493 | BC_LEX_STORE_OBASE, | 492 | BC_LEX_STORE_OBASE, // relative order should match for: BC_INST_OBASE |
494 | BC_LEX_PRINT_POP, | 493 | BC_LEX_PRINT_POP, |
495 | BC_LEX_NQUIT, | 494 | BC_LEX_NQUIT, |
496 | BC_LEX_SCALE_FACTOR, | 495 | BC_LEX_SCALE_FACTOR, |
@@ -641,7 +640,6 @@ dc_parse_insts[] = { | |||
641 | }; | 640 | }; |
642 | #endif // ENABLE_DC | 641 | #endif // ENABLE_DC |
643 | 642 | ||
644 | |||
645 | typedef struct BcLex { | 643 | typedef struct BcLex { |
646 | const char *buf; | 644 | const char *buf; |
647 | size_t i; | 645 | size_t i; |
@@ -655,13 +653,13 @@ typedef struct BcLex { | |||
655 | } t; | 653 | } t; |
656 | } BcLex; | 654 | } BcLex; |
657 | 655 | ||
658 | #define BC_PARSE_STREND ((char) UCHAR_MAX) | 656 | #define BC_PARSE_STREND (0xff) |
659 | 657 | ||
660 | #define BC_PARSE_REL (1 << 0) | 658 | #define BC_PARSE_REL (1 << 0) |
661 | #define BC_PARSE_PRINT (1 << 1) | 659 | #define BC_PARSE_PRINT (1 << 1) |
662 | #define BC_PARSE_NOCALL (1 << 2) | 660 | #define BC_PARSE_NOCALL (1 << 2) |
663 | #define BC_PARSE_NOREAD (1 << 3) | 661 | #define BC_PARSE_NOREAD (1 << 3) |
664 | #define BC_PARSE_ARRAY (1 << 4) | 662 | #define BC_PARSE_ARRAY (1 << 4) |
665 | 663 | ||
666 | typedef struct BcParse { | 664 | typedef struct BcParse { |
667 | BcLex l; | 665 | BcLex l; |
@@ -685,10 +683,6 @@ typedef struct BcProgram { | |||
685 | size_t ob_t; | 683 | size_t ob_t; |
686 | BcNum ob; | 684 | BcNum ob; |
687 | 685 | ||
688 | #if ENABLE_DC | ||
689 | BcNum strmb; | ||
690 | #endif | ||
691 | |||
692 | BcVec results; | 686 | BcVec results; |
693 | BcVec exestack; | 687 | BcVec exestack; |
694 | 688 | ||