diff options
author | Thomas White <taw@physics.org> | 2009-11-19 12:12:47 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2009-11-19 12:12:47 +0100 |
commit | 2f01e52d0248f769b88aee6067ab2f0ab094f115 (patch) | |
tree | aa17617928aaf4c4c72e1c3d5d8b57967b485683 | |
parent | 10753755e7d6648f5a2b2bb6f6403caeb6d59f2f (diff) |
Progress bar improvements
-rw-r--r-- | src/diffraction.c | 1 | ||||
-rw-r--r-- | src/utils.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/diffraction.c b/src/diffraction.c index 32047ccc..0fd8dea9 100644 --- a/src/diffraction.c +++ b/src/diffraction.c @@ -177,6 +177,7 @@ void get_diffraction(struct image *image, UnitCell *cell) image->sfacs = malloc(image->width * image->height * sizeof(double complex)); + progress_bar(0, image->width-1); for ( x=0; x<image->width; x++ ) { for ( y=0; y<image->height; y++ ) { diff --git a/src/utils.c b/src/utils.c index d456ec70..2868ef08 100644 --- a/src/utils.c +++ b/src/utils.c @@ -174,4 +174,6 @@ void progress_bar(int val, int total) printf("\r|%s|", s); if ( val == total ) printf("\n"); + + fflush(stdout); } |