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>
This commit is contained in:
parent
32ec5f1705
commit
ac6ed11f8d
@ -1282,10 +1282,9 @@ static BcStatus bc_read_line(BcVec *vec)
|
|||||||
if (G_interrupt) { // ^C was pressed
|
if (G_interrupt) { // ^C was pressed
|
||||||
intr:
|
intr:
|
||||||
G_interrupt = 0;
|
G_interrupt = 0;
|
||||||
fputs(IS_BC
|
// GNU bc says "interrupted execution."
|
||||||
? "\ninterrupt (type \"quit\" to exit)\n"
|
// GNU dc says "Interrupt!"
|
||||||
: "\ninterrupt (type \"q\" to exit)\n"
|
fputs("\ninterrupted execution\n", stderr);
|
||||||
, stderr);
|
|
||||||
}
|
}
|
||||||
# if ENABLE_FEATURE_EDITING
|
# if ENABLE_FEATURE_EDITING
|
||||||
if (G_ttyin) {
|
if (G_ttyin) {
|
||||||
@ -7171,8 +7170,6 @@ static BcStatus bc_vm_stdin(void)
|
|||||||
// Non-debug builds do not come here, they exit.
|
// Non-debug builds do not come here, they exit.
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
fflush_and_check();
|
|
||||||
fputs("ready for more input\n", stderr);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bc_vec_pop_all(&buffer);
|
bc_vec_pop_all(&buffer);
|
||||||
@ -7403,13 +7400,8 @@ static BcStatus bc_vm_exec(void)
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IS_BC || (option_mask32 & BC_FLAG_I)) {
|
if (IS_BC || (option_mask32 & BC_FLAG_I))
|
||||||
if (s) {
|
|
||||||
fflush_and_check();
|
|
||||||
fputs("ready for more input\n", stderr);
|
|
||||||
}
|
|
||||||
s = bc_vm_stdin();
|
s = bc_vm_stdin();
|
||||||
}
|
|
||||||
|
|
||||||
if (!s && !BC_PARSE_CAN_EXEC(&G.prs))
|
if (!s && !BC_PARSE_CAN_EXEC(&G.prs))
|
||||||
s = bc_vm_process("");
|
s = bc_vm_process("");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user