aboutsummaryrefslogtreecommitdiff
path: root/src/utils.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2011-05-11 17:28:04 +0200
committerThomas White <taw@physics.org>2012-02-22 15:27:26 +0100
commitcd82a27f3c2f5eadc984c582e9a4a85768363759 (patch)
treed0afea8af194131eec23ad2f38f1222d3b6d947a /src/utils.c
parent2623cd5467550ef1850a6156df5220c3fda69c38 (diff)
Don't prefix progress bar with thread number
Diffstat (limited to 'src/utils.c')
-rw-r--r--src/utils.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/utils.c b/src/utils.c
index 02de3e14..7e61f250 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -110,9 +110,11 @@ void progress_bar(int val, int total, const char *text)
for ( i=0; i<n; i++ ) s[i] = '=';
for ( i=n; i<width; i++ ) s[i] = '.';
s[width] = '\0';
- STATUS("\r%s: |%s|", text, s);
- if ( val == total ) STATUS("\n");
+ pthread_mutex_lock(&stderr_lock);
+ fprintf(stderr, "\r%s: |%s|", text, s);
+ if ( val == total ) fprintf(stderr, "\n");
+ pthread_mutex_unlock(&stderr_lock);
fflush(stdout);
}