diff options
author | Thomas White <taw@bitwiz.org.uk> | 2015-08-01 20:32:06 +0200 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2015-08-01 20:32:06 +0200 |
commit | 4ae1cc859bad66f611677ce34e87be44580b0929 (patch) | |
tree | 1ec84d1277cf3855f25b70a221e693741a03d1a7 /src/rejection.c | |
parent | f6f8c8046766b93f8be847fa2c71f0cbaf7c5919 (diff) |
partialator: Rationalise rejection diagnostics
Diffstat (limited to 'src/rejection.c')
-rw-r--r-- | src/rejection.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/rejection.c b/src/rejection.c index e49aaf19..cea43701 100644 --- a/src/rejection.c +++ b/src/rejection.c @@ -165,6 +165,34 @@ static void check_ccs(Crystal **crystals, int n_crystals, RefList *full) } + +static void show_duds(Crystal **crystals, int n_crystals) +{ + int j; + int bads[32]; + int any_bad = 0; + + for ( j=0; j<32; j++ ) bads[j] = 0; + + for ( j=0; j<n_crystals; j++ ) { + int flag; + flag = crystal_get_user_flag(crystals[j]); + assert(flag < 32); + bads[flag]++; + if ( flag != PRFLAG_OK ) any_bad++; + } + + if ( any_bad ) { + STATUS("%i bad crystals:\n", any_bad); + for ( j=0; j<32; j++ ) { + if ( bads[j] ) { + STATUS(" %i %s\n", bads[j], str_prflag(j)); + } + } + } +} + + void check_rejection(Crystal **crystals, int n, RefList *full) { int i; @@ -184,6 +212,8 @@ void check_rejection(Crystal **crystals, int n, RefList *full) } + show_duds(crystals, n); + if ( n_acc < 2 ) { ERROR("Not enough crystals left to proceed (%i). Sorry.\n", n_acc); |