Changeset 5451 for trunk/Ohana/src/opihi/dvo/avextract.c
- Timestamp:
- Oct 27, 2005, 7:10:17 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/dvo/avextract.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/dvo/avextract.c
r5320 r5451 4 4 5 5 int i, j, m, N, NPTS, param; 6 int Nsec, Nregions,mode;7 char filename[256], catdir[256],*RegionName, *RegionList, *p;6 int Nsec, mode; 7 char *RegionName, *RegionList, *p; 8 8 9 9 Catalog catalog; 10 RegionFile *regions;10 SkyList *skylist; 11 11 PhotCode *code; 12 12 Vector *vec; 13 13 14 14 /* defaults */ 15 regions = NULL;16 15 catalog.average = NULL; 17 16 catalog.secfilt = NULL; … … 25 24 if (!InitPhotcodes ()) goto escape; 26 25 Nsec = GetPhotcodeNsecfilt (); 27 28 /* find CATDIR in config system */29 if (VarConfig ("CATDIR", "%s", catdir) == NULL) goto escape;30 26 31 27 /* interpret command-line options */ … … 50 46 51 47 /* load region corresponding to selection above */ 52 if (( regions = SelectRegions (RegionName, RegionList, &Nregions)) == NULL) goto escape;48 if ((skylist = SelectRegions (RegionName, RegionList)) == NULL) goto escape; 53 49 54 50 /* create storage vector */ … … 57 53 if ((vec = SelectVector (argv[1], ANYVECTOR, TRUE)) == NULL) goto escape; 58 54 59 for (i = 0; i < Nregions; i++) {55 for (i = 0; i < skylist[0].Nregions; i++) { 60 56 /* lock, load, unlock catalog */ 61 sprintf (filename, "%s/%s", catdir, regions[i].name); 62 catalog.filename = filename; 57 catalog.filename = (char *) skylist[0].regions[i][0].filename; 63 58 switch (lock_catalog (&catalog, LCK_SOFT)) { 64 59 case 2: … … 90 85 REALLOCATE (vec[0].elements, float, MAX(1,N)); 91 86 92 if (regions != NULL) free (regions);87 SkyListFree (skylist, ((RegionName != NULL) || (RegionList != NULL))); 93 88 return (TRUE); 94 89 … … 98 93 99 94 escape: 100 if (regions != NULL) free (regions);95 SkyListFree (skylist, ((RegionName != NULL) || (RegionList != NULL))); 101 96 if (catalog.average != NULL) free (catalog.average); 102 97 if (catalog.secfilt != NULL) free (catalog.secfilt);
Note:
See TracChangeset
for help on using the changeset viewer.
