aboutsummaryrefslogtreecommitdiff
path: root/src/geoptimiser.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2016-07-01 11:18:32 +0200
committerThomas White <taw@physics.org>2016-07-01 11:18:32 +0200
commite3f3d4346fd88e570aef9b6462d7beba14526491 (patch)
treed06b51300eda629bb23d027f276f1b9b71759363 /src/geoptimiser.c
parent2f8a70c3a0f85509dbda25d5511cd0a615a174dc (diff)
geoptimiser: Improve status indicator when loading patterns
Because the status message is only printed after possibly skipping over a non-indexed pattern, if n_chunks is used it might skip entire messages. Better to use n_images, which is always incremented just before possibly printing the message.
Diffstat (limited to 'src/geoptimiser.c')
-rw-r--r--src/geoptimiser.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/geoptimiser.c b/src/geoptimiser.c
index 0a6885d0..6e1e3fbc 100644
--- a/src/geoptimiser.c
+++ b/src/geoptimiser.c
@@ -324,17 +324,20 @@ static struct image *read_patterns_from_stream(const char *infile,
images = images_new;
}
- if ( n_chunks % 1000 == 0 ) {
- STATUS("Loaded %i indexed patterns from %i "
- "total patterns.\n",
- n_images, n_chunks);
+ if ( n_images % 1000 == 0 ) {
+ STATUS("Loaded %i indexed patterns from %i total "
+ "patterns.\n", n_images, n_chunks);
}
+
} while ( 1 );
close_stream(st);
*n = n_images;
+ STATUS("Found %i indexed patterns in file %s (from a total of %i).\n",
+ n_images, infile, n_chunks);
+
return images;
}