Changeset 23268 for trunk/psModules/src/detrend/pmDetrendDB.c
- Timestamp:
- Mar 11, 2009, 10:54:22 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/detrend/pmDetrendDB.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/detrend/pmDetrendDB.c
r20401 r23268 20 20 21 21 // 22 static void pmDetrendSelectOptionsFree (pmDetrendSelectOptions *options)23 { 24 25 if (!options) 22 static void pmDetrendSelectOptionsFree(pmDetrendSelectOptions *options) 23 { 24 25 if (!options) { 26 26 return; 27 28 psFree (options->camera); 29 psFree (options->filter); 30 psFree (options->dettype); 31 psFree (options->version); 27 } 28 29 psFree(options->camera); 30 psFree(options->filter); 31 psFree(options->dettype); 32 psFree(options->version); 32 33 33 34 return; … … 37 38 pmDetrendSelectOptions *pmDetrendSelectOptionsAlloc(const char *camera, psTime time, pmDetrendType type) 38 39 { 39 40 40 pmDetrendSelectOptions *options = psAlloc(sizeof(pmDetrendSelectOptions)); 41 41 psMemSetDeallocator(options, (psFreeFunc) pmDetrendSelectOptionsFree); … … 63 63 } 64 64 65 static void pmDetrendSelectResultsFree (pmDetrendSelectResults *results)66 { 67 68 if (!results) 65 static void pmDetrendSelectResultsFree(pmDetrendSelectResults *results) 66 { 67 68 if (!results) { 69 69 return; 70 71 psFree (results->detID); 70 } 71 72 psFree(results->detID); 72 73 psFree(results->level); 73 74 … … 75 76 } 76 77 77 pmDetrendSelectResults *pmDetrendSelectResultsAlloc ()78 pmDetrendSelectResults *pmDetrendSelectResultsAlloc(void) 78 79 { 79 80 … … 87 88 } 88 89 89 psString pmDetrendTypeToString (pmDetrendType type)90 { 91 92 # define DETREND_STRING_CASE(TTT) \93 case PM_DETREND_TYPE_##TTT: \94 return psStringCopy (#TTT);90 psString pmDetrendTypeToString(pmDetrendType type) 91 { 92 93 #define DETREND_STRING_CASE(TYPE) \ 94 case PM_DETREND_TYPE_##TYPE: \ 95 return psStringCopy(#TYPE); 95 96 96 97 switch (type) { 97 DETREND_STRING_CASE (MASK); 98 DETREND_STRING_CASE (BIAS); 99 DETREND_STRING_CASE (DARK); 100 DETREND_STRING_CASE (FLAT); 101 DETREND_STRING_CASE (FLATCORR); 102 DETREND_STRING_CASE (SHUTTER); 103 DETREND_STRING_CASE (FRINGE); 104 DETREND_STRING_CASE (ASTROM); 98 DETREND_STRING_CASE(NONE); 99 DETREND_STRING_CASE(MASK); 100 DETREND_STRING_CASE(BIAS); 101 DETREND_STRING_CASE(DARK); 102 DETREND_STRING_CASE(FLAT); 103 DETREND_STRING_CASE(FLATCORR); 104 DETREND_STRING_CASE(SHUTTER); 105 DETREND_STRING_CASE(FRINGE); 106 DETREND_STRING_CASE(ASTROM); 105 107 default: 106 108 return NULL; … … 111 113 // detselect -camera (camera) -time (time) -type (type) [others] 112 114 // returns: (type) (class) (exp_flag) DONE 113 pmDetrendSelectResults *pmDetrendSelect (const pmDetrendSelectOptions *options, 114 const pmConfig *config) 115 pmDetrendSelectResults *pmDetrendSelect(const pmDetrendSelectOptions *options, const pmConfig *config) 115 116 { 116 117 PS_ASSERT_PTR_NON_NULL(options, NULL);
Note:
See TracChangeset
for help on using the changeset viewer.
