aboutsummaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/bc.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/miscutils/bc.c b/miscutils/bc.c
index 5930caa32..a271a2040 100644
--- a/miscutils/bc.c
+++ b/miscutils/bc.c
@@ -717,8 +717,6 @@ struct globals {
717 IF_FEATURE_BC_SIGNALS(smallint ttyin;) 717 IF_FEATURE_BC_SIGNALS(smallint ttyin;)
718 IF_FEATURE_CLEAN_UP(smallint exiting;) 718 IF_FEATURE_CLEAN_UP(smallint exiting;)
719 smallint in_read; 719 smallint in_read;
720 char sbgn;
721 char send;
722 720
723 BcParse prs; 721 BcParse prs;
724 BcProgram prog; 722 BcProgram prog;
@@ -7075,10 +7073,9 @@ static BC_STATUS zbc_vm_stdin(void)
7075 while (*string) { 7073 while (*string) {
7076 char c = *string; 7074 char c = *string;
7077 if (string == buffer.v || string[-1] != '\\') { 7075 if (string == buffer.v || string[-1] != '\\') {
7078 // checking applet type is cheaper than accessing sbgn/send 7076 if (IS_BC)
7079 if (IS_BC) // bc: sbgn = send = '"'
7080 str ^= (c == '"'); 7077 str ^= (c == '"');
7081 else { // dc: sbgn = '[', send = ']' 7078 else {
7082 if (c == ']') 7079 if (c == ']')
7083 str -= 1; 7080 str -= 1;
7084 else if (c == '[') 7081 else if (c == '[')
@@ -7513,7 +7510,6 @@ int bc_main(int argc UNUSED_PARAM, char **argv)
7513 int is_tty; 7510 int is_tty;
7514 7511
7515 INIT_G(); 7512 INIT_G();
7516 G.sbgn = G.send = '"';
7517 7513
7518 is_tty = bc_vm_init("BC_LINE_LENGTH"); 7514 is_tty = bc_vm_init("BC_LINE_LENGTH");
7519 7515
@@ -7533,8 +7529,6 @@ int dc_main(int argc UNUSED_PARAM, char **argv)
7533 int noscript; 7529 int noscript;
7534 7530
7535 INIT_G(); 7531 INIT_G();
7536 G.sbgn = '[';
7537 G.send = ']';
7538 /* 7532 /*
7539 * TODO: dc (GNU bc 1.07.1) 1.4.1 seems to use width 7533 * TODO: dc (GNU bc 1.07.1) 1.4.1 seems to use width
7540 * 1 char wider than bc from the same package. 7534 * 1 char wider than bc from the same package.