diff options
author | Thomas White <taw@physics.org> | 2010-03-16 13:25:03 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2010-03-16 13:25:03 +0100 |
commit | af366ed37c7f5b53bc24ed729f02342f335806c2 (patch) | |
tree | a782f3133eb32abcf03c8e5ca2eba7474dccd221 | |
parent | 589618b385568caa5ab862ce129261676a854422 (diff) |
Don't splurge progress bar gunk into files
-rw-r--r-- | src/utils.c | 2 |
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); |