Changeset 5956 for trunk/Ohana/src/libdvo/src/skyregion_ops.c
- Timestamp:
- Jan 9, 2006, 6:22:57 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/libdvo/src/skyregion_ops.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/libdvo/src/skyregion_ops.c
r5945 r5956 51 51 ALLOCATE (list, SkyList, 1); 52 52 ALLOCATE (list[0].regions, SkyRegion *, NREGIONS); 53 ALLOCATE (list[0].filename, char *, NREGIONS); 53 54 list[0].Nregions = N; 54 55 … … 71 72 72 73 list[0].regions[N] = ®ion[No]; 74 list[0].filename[N] = table[0].filename[No]; 73 75 N++; 74 if (N == NREGIONS) { 75 NREGIONS += 10; 76 REALLOCATE (list[0].regions, SkyRegion *, NREGIONS); 77 } 76 CHECK_REALLOCATE (list[0].regions, SkyRegion *, NREGIONS, N, 10); 77 CHECK_REALLOCATE (list[0].filename, char *, NREGIONS, N, 10); 78 78 list[0].Nregions = N; 79 79 … … 167 167 extra = SkyListChildrenByBounds (table, -1, depth, Rmin, 360.0, Dmin, Dmax); 168 168 REALLOCATE (list[0].regions, SkyRegion *, list[0].Nregions + extra[0].Nregions); 169 REALLOCATE (list[0].filename, char *, list[0].Nregions + extra[0].Nregions); 169 170 Ns = list[0].Nregions; 170 171 for (i = 0; i < extra[0].Nregions; i++) { 171 172 list[0].regions[i + Ns] = extra[0].regions[i]; 173 list[0].filename[i + Ns] = extra[0].filename[i]; 172 174 } 173 175 list[0].Nregions += extra[0].Nregions; … … 192 194 ALLOCATE (list, SkyList, 1); 193 195 ALLOCATE (list[0].regions, SkyRegion *, NNEW); 196 ALLOCATE (list[0].filename, char *, NNEW); 194 197 195 198 region = table[0].regions; … … 221 224 NNEW = Nnew + children[0].Nregions + 50; 222 225 REALLOCATE (list[0].regions, SkyRegion *, NNEW); 226 REALLOCATE (list[0].filename, char *, NNEW); 223 227 } 224 228 for (j = 0; j < children[0].Nregions; j++) { 225 229 list[0].regions[Nnew + j] = children[0].regions[j]; 230 list[0].filename[Nnew + j] = children[0].filename[j]; 226 231 } 227 232 Nnew += children[0].Nregions; … … 229 234 } else { 230 235 list[0].regions[Nnew] = ®ion[i]; 236 list[0].filename[Nnew] = table[0].filename[i]; 231 237 Nnew ++; 232 238 CHECK_REALLOCATE (list[0].regions, SkyRegion *, NNEW, Nnew, 50); 239 CHECK_REALLOCATE (list[0].filename, char *, NNEW, Nnew, 50); 233 240 } 234 241 }
Note:
See TracChangeset
for help on using the changeset viewer.
