- Timestamp:
- May 3, 2010, 8:45:22 AM (16 years ago)
- Location:
- branches/simmosaic_branches
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/simmosaic_branches
- Property svn:mergeinfo changed
-
branches/simmosaic_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/simmosaic_branches/Ohana/src/delstar/src/delete_orphans.c
r17198 r27839 3 3 delete_orphans (char *name) { 4 4 5 int i, j, k, n, m, N, M, found;6 int *N1, *N2, *next, *next_miss, *ave_miss, last, last_miss;7 int Nave, NAVE, Nmeas, NMEAS, Nmiss, NMISS, Nmatch;8 int start, end, Nmeasfound, Nsecfilt;5 off_t i, j, k, n, m, Nmeasfound, Nsecfilt, N, M, found; 6 off_t *next_meas, *next_miss, *ave_miss, last, last_miss; 7 off_t Nave, NAVE, Nmeas, NMEAS, Nmiss, NMISS, Nmatch; 8 e_time start, end; 9 9 unsigned int flags; 10 10 Measure *tmpmeasure; … … 26 26 27 27 Nmeas = catalog.Nmeasure; 28 ALLOCATE (next , int, Nmeas);28 ALLOCATE (next_meas, int, Nmeas); 29 29 30 30 Nmiss = catalog.Nmissing; … … 36 36 /* set up pointers for linked list of measure */ 37 37 for (i = 0; i < Nmeas - 1; i++) { 38 next [i] = i+1;39 } 40 next [i] = -1;38 next_meas[i] = i+1; 39 } 40 next_meas[i] = -1; 41 41 last = i; 42 42 /* set up pointers for linked list of missing */ … … 60 60 /* this star is an orphan */ 61 61 Nmeasfound ++; 62 next [i] = -2; /* we delete this one */62 next_meas[i] = -2; /* we delete this one */ 63 63 /* fix the list links: connect the previous valid link to the next valid link */ 64 for (j = i; (j >= 0) && (next [j] == -2); j--); /* find previous entry to fix link */64 for (j = i; (j >= 0) && (next_meas[j] == -2); j--); /* find previous entry to fix link */ 65 65 if (j >= 0) { /* if j < 0, there is no previous valid link, ignore this step */ 66 if (next [j] != i) {66 if (next_meas[j] != i) { 67 67 fprintf (stderr, "error? this link seems to have been lost\n"); 68 68 exit (1); 69 69 } 70 70 /* find next valid entry to fix link */ 71 for (k = i; (k < Nmeas) && (next [k] == -2); k++);71 for (k = i; (k < Nmeas) && (next_meas[k] == -2); k++); 72 72 if (k < Nmeas) 73 next [j] = k;73 next_meas[j] = k; 74 74 else 75 next [j] = -1; /* last link in list gets a -1 */75 next_meas[j] = -1; /* last link in list gets a -1 */ 76 76 } 77 77 … … 111 111 m = catalog.average[n].offset; 112 112 /* find next valid entry -- notice lack of error checking... */ 113 for (j = 0; (j < Nmeas) && (next [m+j] == -2); j++);113 for (j = 0; (j < Nmeas) && (next_meas[m+j] == -2); j++); 114 114 catalog.average[n].offset = m + j; 115 115 } … … 218 218 tmpmeasure[N] = catalog.measure[n]; 219 219 tmpmeasure[N].averef = i; 220 n = next [n];220 n = next_meas[n]; 221 221 } 222 222 }
Note:
See TracChangeset
for help on using the changeset viewer.
