diff options
author | B. Watson <urchlay@slackware.uk> | 2024-01-04 17:10:41 -0500 |
---|---|---|
committer | B. Watson <urchlay@slackware.uk> | 2024-01-04 17:10:41 -0500 |
commit | 96a07d81eebb9e4bd7b3e906162ddd1f8db4d367 (patch) | |
tree | 971132623ab1d5ad874267b99e2164acfe081836 | |
parent | 9efdae5fa5242e151a2e1a1dd24bc48081b28ec2 (diff) | |
download | hcalc-96a07d81eebb9e4bd7b3e906162ddd1f8db4d367.tar.gz |
Ring the bell on FP error.
-rw-r--r-- | input.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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) { |