Changeset 7393
- Timestamp:
- Jun 7, 2006, 7:20:35 AM (20 years ago)
- Location:
- trunk/Ohana/src/delstar
- Files:
-
- 4 edited
-
Makefile (modified) (2 diffs)
-
include/delstar.h (modified) (3 diffs)
-
src/orphans.c (modified) (1 diff)
-
src/sort_lists.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/delstar/Makefile
r6677 r7393 28 28 $(SRC)/delete_times.$(ARCH).o \ 29 29 $(SRC)/gimages.$(ARCH).o \ 30 $(SRC)/gregion_image.$(ARCH).o \31 $(SRC)/gregion_patch.$(ARCH).o \32 $(SRC)/RegionOps.$(ARCH).o \33 30 $(SRC)/gcatalog.$(ARCH).o \ 34 31 $(SRC)/wcatalog.$(ARCH).o \ … … 39 36 $(SRC)/check_permissions.$(ARCH).o \ 40 37 $(SRC)/Shutdown.$(ARCH).o 38 39 OLD = \ 40 $(SRC)/gregion_image.$(ARCH).o \ 41 $(SRC)/gregion_patch.$(ARCH).o \ 42 $(SRC)/RegionOps.$(ARCH).o 41 43 42 44 default: $(PROGRAM) -
trunk/Ohana/src/delstar/include/delstar.h
r5451 r7393 39 39 void ConfigInit PROTO((int *argc, char **argv)); 40 40 int FindDecBand PROTO((double dec, double *DEC0, double *DEC1)); 41 int FindRegionByPoint PROTO((GSCRegion *region, double ra, double dec, GSCRegion *gsc, int Ngsc));42 int FindRegionDecBandStart PROTO((GSCRegion *region, int Nregion, double dec));43 int FindRegionDecBandStop PROTO((GSCRegion *region, int Nregion, double dec));44 41 FILE *GetDB PROTO((int *state)); 45 42 Image *GetImages PROTO((int *nimage)); 46 GSCRegion *LoadRegions PROTO((int *nregions));47 43 int SetImages PROTO((Image *new, int Nnew)); 48 44 void SetProtect PROTO((int mode)); … … 62 58 int gcatalog PROTO((Catalog *catalog)); 63 59 Image *gimages PROTO((char *filename)); 64 GSCRegion *gregion_image PROTO((Image *image, int *Nregions));65 GSCRegion *gregion_patch PROTO((GSCRegion *patch, int *nregions));66 60 Image *gtimes PROTO((int *NIMAGE)); 67 61 void help PROTO(()); … … 73 67 int save_image_db PROTO(()); 74 68 void sort_lists PROTO((float *X, float *Y, int *S, int N)); 75 void sort_regions PROTO((GSCRegion *region, int N));76 69 void unlock_image_db PROTO((FITS_DB *db)); 77 70 void usage PROTO(()); -
trunk/Ohana/src/delstar/src/orphans.c
r4607 r7393 1 // this file is a stub : fix up / clean up 1 2 2 3 delete_orphans () { 3 ALLOCATE (region, GSCRegion, 1);4 ALLOCATE (region, SkyRegion, 1); 4 5 catalog.filename = argv[1]; 5 6 gcatalog (&catalog); -
trunk/Ohana/src/delstar/src/sort_lists.c
r4680 r7393 46 46 } 47 47 48 void sort_regions (GSCRegion *region, int N) {49 50 int l,j,ir,i;51 GSCRegion tmp;52 53 l = N >> 1;54 ir = N - 1;55 for (;;) {56 if (l > 0) {57 l--;58 tmp = region[l];59 } else {60 tmp = region[ir];61 region[ir] = region[0];62 if (--ir == 0) {63 region[0] = tmp;64 return;65 }66 }67 i = l;68 j = (l << 1) + 1;69 while (j <= ir) {70 if (j < ir && region[j].DEC[0] < region[j+1].DEC[0]) j++;71 if (tmp.DEC[0] < region[j].DEC[0]) {72 region[i] = region[j];73 j += (i=j) + 1;74 }75 else j = ir + 1;76 }77 region[i] = tmp;78 }79 }80
Note:
See TracChangeset
for help on using the changeset viewer.
