aboutsummaryrefslogtreecommitdiff
path: root/src/utils.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-03-16 13:25:03 +0100
committerThomas White <taw@physics.org>2010-03-16 13:25:03 +0100
commitaf366ed37c7f5b53bc24ed729f02342f335806c2 (patch)
treea782f3133eb32abcf03c8e5ca2eba7474dccd221 /src/utils.c
parent589618b385568caa5ab862ce129261676a854422 (diff)
Don't splurge progress bar gunk into files
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/utils.c b/src/utils.c
index 7e6bf6ec..6abe6237 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -51,6 +51,8 @@ void progress_bar(int val, int total, const char *text)
char s[1024];
const int width = 50;
+ if ( !isatty(stderr) ) return;
+
frac = (double)val/total;
n = (int)(frac*width);