- Timestamp:
- May 3, 2010, 8:41:49 AM (16 years ago)
- Location:
- branches/tap_branches
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/tap_branches
- Property svn:mergeinfo changed
-
branches/tap_branches/Ohana
-
Property svn:mergeinfo
set to (toggle deleted branches)
/trunk/Ohana merged eligible /branches/eam_branches/Ohana.20100407 27635-27772 /branches/pap_delete/Ohana 27530-27595
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
branches/tap_branches/Ohana/src/imregister/imreg/unique.c
r16045 r27838 2 2 # include "imreg.h" 3 3 4 void sortstr (char **S, int *X, int N) {4 void sortstr (char **S, off_t *X, off_t N) { 5 5 6 6 # define SWAPFUNC(A,B){ \ 7 char *tmp = S[A]; S[A] = S[B]; S[B] = tmp; \8 intitmp = X[A]; X[A] = X[B]; X[B] = itmp; \7 char *tmp = S[A]; S[A] = S[B]; S[B] = tmp; \ 8 off_t itmp = X[A]; X[A] = X[B]; X[B] = itmp; \ 9 9 } 10 10 # define COMPARE(A,B)(strcmp(S[A], S[B]) < 0) … … 18 18 19 19 /* input is a subset index of image list, output is a new subset */ 20 int *unique_entries (RegImage *image, int Nimage, int *subset, int *Nmatch) {20 off_t *unique_entries (RegImage *image, off_t Nimage, off_t *subset, off_t *Nmatch) { 21 21 22 int i, j, k, m, Nsubset;23 int N, NMATCH;24 int *match, *entry;22 off_t i, j, k, m, Nsubset; 23 off_t N, NMATCH; 24 off_t *match, *entry; 25 25 char idxline[128]; 26 26 char **index; … … 31 31 N = 0; 32 32 NMATCH = 1000; 33 ALLOCATE (match, int, NMATCH);33 ALLOCATE (match, off_t, NMATCH); 34 34 35 35 Nsubset = *Nmatch; … … 37 37 /* index = filename.ccd */ 38 38 ALLOCATE (index, char *, Nsubset); 39 ALLOCATE (entry, int, Nsubset);39 ALLOCATE (entry, off_t, Nsubset); 40 40 for (i = 0; i < Nsubset; i++) { 41 41 sprintf (idxline, "%s.%02d", image[subset[i]].filename, image[subset[i]].ccd); … … 63 63 if (N == NMATCH) { 64 64 NMATCH += 1000; 65 REALLOCATE (match, int, NMATCH);65 REALLOCATE (match, off_t, NMATCH); 66 66 } 67 67
Note:
See TracChangeset
for help on using the changeset viewer.
