aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2018-12-08 21:39:10 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2018-12-08 21:39:10 +0100
commitac6ed11f8d432206dc0f8c8023df0962bc6b38ba (patch)
tree1919235f2268191c159c864d7dbdf4d284bd9588
parent32ec5f170589537ebec40ba334324ecf208009e7 (diff)
downloadbusybox-w32-ac6ed11f8d432206dc0f8c8023df0962bc6b38ba.tar.gz
busybox-w32-ac6ed11f8d432206dc0f8c8023df0962bc6b38ba.tar.bz2
busybox-w32-ac6ed11f8d432206dc0f8c8023df0962bc6b38ba.zip
bc: remove "ready for more input" message, GNU bc does not print that
function old new delta bc_read_line 285 268 -17 bc_vm_run 684 630 -54 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-71) Total: -71 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--miscutils/bc.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/miscutils/bc.c b/miscutils/bc.c
index cd38bfa42..772696a15 100644
--- a/miscutils/bc.c
+++ b/miscutils/bc.c
@@ -1282,10 +1282,9 @@ static BcStatus bc_read_line(BcVec *vec)
1282 if (G_interrupt) { // ^C was pressed 1282 if (G_interrupt) { // ^C was pressed
1283 intr: 1283 intr:
1284 G_interrupt = 0; 1284 G_interrupt = 0;
1285 fputs(IS_BC 1285 // GNU bc says "interrupted execution."
1286 ? "\ninterrupt (type \"quit\" to exit)\n" 1286 // GNU dc says "Interrupt!"
1287 : "\ninterrupt (type \"q\" to exit)\n" 1287 fputs("\ninterrupted execution\n", stderr);
1288 , stderr);
1289 } 1288 }
1290# if ENABLE_FEATURE_EDITING 1289# if ENABLE_FEATURE_EDITING
1291 if (G_ttyin) { 1290 if (G_ttyin) {
@@ -7171,8 +7170,6 @@ static BcStatus bc_vm_stdin(void)
7171 // Non-debug builds do not come here, they exit. 7170 // Non-debug builds do not come here, they exit.
7172 break; 7171 break;
7173 } 7172 }
7174 fflush_and_check();
7175 fputs("ready for more input\n", stderr);
7176 } 7173 }
7177 7174
7178 bc_vec_pop_all(&buffer); 7175 bc_vec_pop_all(&buffer);
@@ -7403,13 +7400,8 @@ static BcStatus bc_vm_exec(void)
7403 return s; 7400 return s;
7404 } 7401 }
7405 7402
7406 if (IS_BC || (option_mask32 & BC_FLAG_I)) { 7403 if (IS_BC || (option_mask32 & BC_FLAG_I))
7407 if (s) {
7408 fflush_and_check();
7409 fputs("ready for more input\n", stderr);
7410 }
7411 s = bc_vm_stdin(); 7404 s = bc_vm_stdin();
7412 }
7413 7405
7414 if (!s && !BC_PARSE_CAN_EXEC(&G.prs)) 7406 if (!s && !BC_PARSE_CAN_EXEC(&G.prs))
7415 s = bc_vm_process(""); 7407 s = bc_vm_process("");