/* # This file is part of the Astrometry.net suite. # Licensed under a 3-clause BSD style license - see LICENSE */ #include "bl.h" #include "healpix.h" #include "mathutil.h" #include "starutil.h" #include ll* healpix_region_search(int seed, ll* seeds, int Nside, ll* accepted, ll* rejected, int (*accept)(int hp, void* token), void* token, int depth) { ll* frontier; anbool allocd_rej = FALSE; int d; if (!accepted) accepted = ll_new(256); if (!rejected) { rejected = ll_new(256); allocd_rej = TRUE; } if (seeds) //frontier = seeds; frontier = ll_dupe(seeds); else { frontier = ll_new(256); ll_append(frontier, seed); } for (d=0; !depth || dN, *indices); } else { fprintf(stderr, "malloc failed\n"); n_pixels = -1; } ll_free(hps); return n_pixels; }