Changeset 14401 for trunk/Ohana/src/opihi/dvo/cmd.c
- Timestamp:
- Aug 4, 2007, 10:15:51 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/dvo/cmd.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/dvo/cmd.c
r12332 r14401 3 3 int cmd (int argc, char **argv) { /* really need to think about upper limits & how to represent them */ 4 4 5 char *RegionName, *RegionList;6 5 double *M1, *M3; 7 6 int i, j, m, i1, i3, N1, N3, N; … … 12 11 Catalog catalog; 13 12 SkyList *skylist; 13 SkyRegionSelection *selection; 14 14 Vector *xvec, *yvec; 15 15 … … 18 18 catalog.secfilt = NULL; 19 19 catalog.measure = NULL; 20 RegionName = NULL;21 RegionList = NULL;22 20 skylist = NULL; 21 selection = NULL; 23 22 24 23 /* load photcode information */ … … 27 26 28 27 /* interpret command-line options */ 29 if ( !SetRegionSelection (&argc, argv, &RegionName, &RegionList)) goto escape;28 if ((selection = SetRegionSelection (&argc, argv)) == NULL) goto escape; 30 29 if (!SetPhotSelections (&argc, argv, 3)) goto usage; 31 30 … … 46 45 47 46 /* load region corresponding to selection above */ 48 if ((skylist = SelectRegions ( RegionName, RegionList)) == NULL) goto escape;47 if ((skylist = SelectRegions (selection)) == NULL) goto escape; 49 48 50 49 /* init vectors to save data */ … … 107 106 dvo_catalog_free (&catalog); 108 107 } 109 SkyListFree (skylist, ((RegionName != NULL) || (RegionList != NULL))); 108 110 109 xvec[0].Nelements = yvec[0].Nelements = Npts; 110 SkyListFree (skylist); 111 FreeSkyRegionSelection (selection); 111 112 return (TRUE); 112 113 … … 116 117 117 118 escape: 118 SkyListFree (skylist, ((RegionName != NULL) || (RegionList != NULL)));119 119 dvo_catalog_free (&catalog); 120 if (RegionName != NULL) free (RegionName);121 if (RegionList != NULL) free (RegionList);120 SkyListFree (skylist); 121 FreeSkyRegionSelection (selection); 122 122 return (FALSE); 123 123 }
Note:
See TracChangeset
for help on using the changeset viewer.
