aboutsummaryrefslogtreecommitdiff
path: root/input.c
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2024-01-04 17:10:41 -0500
committerB. Watson <urchlay@slackware.uk>2024-01-04 17:10:41 -0500
commit96a07d81eebb9e4bd7b3e906162ddd1f8db4d367 (patch)
tree971132623ab1d5ad874267b99e2164acfe081836 /input.c
parent9efdae5fa5242e151a2e1a1dd24bc48081b28ec2 (diff)
downloadhcalc-96a07d81eebb9e4bd7b3e906162ddd1f8db4d367.tar.gz
Ring the bell on FP error.
Diffstat (limited to 'input.c')
-rw-r--r--input.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/input.c b/input.c
index 26a5266..90b6232 100644
--- a/input.c
+++ b/input.c
@@ -83,8 +83,9 @@ show_value()
if(fetestexcept(FE_ALL_EXCEPT)) {
set_string("Err");
+ bell();
showing_err = 1;
- return;
+ return;
}
if (base == 2)
@@ -236,8 +237,10 @@ key(char c)
feclearexcept(FE_ALL_EXCEPT);
- if(showing_err && c != 27 && c != 'C')
+ if(showing_err && c != 27 && c != 'C') {
+ bell();
return;
+ }
switch (c)
{