aboutsummaryrefslogtreecommitdiff
path: root/contrib/bc/src/args.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bc/src/args.c')
-rw-r--r--contrib/bc/src/args.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/bc/src/args.c b/contrib/bc/src/args.c
index b26062c6caec..9c26b7c18790 100644
--- a/contrib/bc/src/args.c
+++ b/contrib/bc/src/args.c
@@ -89,7 +89,7 @@ static void bc_args_file(const char *file) {
free(buf);
}
-void bc_args(int argc, char *argv[]) {
+void bc_args(int argc, char *argv[], bool exit_exprs) {
int c;
size_t i;
@@ -109,6 +109,7 @@ void bc_args(int argc, char *argv[]) {
if (vm.no_exit_exprs)
bc_vm_verr(BC_ERR_FATAL_OPTION, "-e (--expression)");
bc_args_exprs(opts.optarg);
+ vm.exit_exprs = (exit_exprs || vm.exit_exprs);
break;
}
@@ -119,6 +120,7 @@ void bc_args(int argc, char *argv[]) {
if (vm.no_exit_exprs)
bc_vm_verr(BC_ERR_FATAL_OPTION, "-f (--file)");
bc_args_file(opts.optarg);
+ vm.exit_exprs = (exit_exprs || vm.exit_exprs);
}
break;
}