aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-04-26 17:24:34 +0200
committerThomas White <taw@physics.org>2010-04-26 17:24:34 +0200
commit409fd287a1c29a661b138a90b8b4334d502a1847 (patch)
tree3db8ab9bda6a7d8fac40daf7575f628c1b66f927
parentf178cdfec0bbdaf3b6d9ed09daacff87984561ee (diff)
hdfsee: Indicate when numbers are too big to represent
-rw-r--r--src/displaywindow.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/displaywindow.c b/src/displaywindow.c
index 82acb58d..a5141dab 100644
--- a/src/displaywindow.c
+++ b/src/displaywindow.c
@@ -643,7 +643,11 @@ static void numbers_update(DisplayWindow *dw)
}
if ( (x>0) && (y>0) && valid ) {
- snprintf(s, 31, "%.0f", val);
+ if ( log(val)/log(10) < 5 ) {
+ snprintf(s, 31, "%.0f", val);
+ } else {
+ snprintf(s, 31, "HUGE");
+ }
} else {
strcpy(s, "--");
}