diff options
author | Thomas White <taw@physics.org> | 2011-02-08 19:10:27 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:13 +0100 |
commit | e980ed54dc29e025587aba47390727c500aec8f1 (patch) | |
tree | a818f47cf8f00c034c59e7df8d825965d217d1c9 /src/partialator.c | |
parent | 606a2cd5432fe342d73ab8f37a1b383142c52fdb (diff) |
Work on making iteration work
Diffstat (limited to 'src/partialator.c')
-rw-r--r-- | src/partialator.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/partialator.c b/src/partialator.c index 37c8fbd6..3251f7e8 100644 --- a/src/partialator.c +++ b/src/partialator.c @@ -116,10 +116,11 @@ static void select_scalable_reflections(struct image *images, int n) for ( m=0; m<n; m++ ) { Reflection *refl; + RefListIterator *iter; - for ( refl = first_refl(images[m].reflections); + for ( refl = first_refl(images[m].reflections, &iter); refl != NULL; - refl = next_refl(refl) ) { + refl = next_refl(refl, iter) ) { int scalable = 1; double v; @@ -275,6 +276,7 @@ int main(int argc, char *argv[]) RefList *peaks; RefList *transfer; Reflection *refl; + RefListIterator *iter; if ( find_chunk(fh, &cell, &filename) == 1 ) { ERROR("Couldn't get all of the filenames and cells" @@ -327,9 +329,9 @@ int main(int argc, char *argv[]) transfer = find_intersections(&images[i], cell, 0); images[i].reflections = reflist_new(); - for ( refl = first_refl(transfer); + for ( refl = first_refl(transfer, &iter); refl != NULL; - refl = next_refl(refl) ) { + refl = next_refl(refl, iter) ) { Reflection *peak; Reflection *new; @@ -338,6 +340,8 @@ int main(int argc, char *argv[]) int clamp1, clamp2; get_indices(refl, &h, &k, &l); + STATUS("%3i %3i %3i\n", h, k, l); + peak = find_refl(peaks, h, k, l); if ( peak == NULL ) { if ( (h==0) && (k==0) && (l==0) ) continue; |