Changeset 23704 for branches/pap/ppSub/src/ppSubData.c
- Timestamp:
- Apr 3, 2009, 11:58:24 AM (17 years ago)
- File:
-
- 1 edited
-
branches/pap/ppSub/src/ppSubData.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/pap/ppSub/src/ppSubData.c
r23688 r23704 20 20 21 21 22 static void sub OptionsFree(ppSubData *options)22 static void subDataFree(ppSubData *data) 23 23 { 24 psFree(options->stats); 24 if (data->statsFile) { 25 psString stats = psMetadataConfigFormat(data->stats); // Statistics to output 26 if (!stats || strlen(stats) == 0) { 27 psWarning("Unable to generate statistics file."); 28 } else { 29 fprintf(data->statsFile, "%s", stats); 30 } 31 psFree(stats); 32 fclose(data->statsFile); 33 } 34 psFree(data->stats); 25 35 return; 26 36 } … … 28 38 ppSubData *ppSubDataAlloc(void) 29 39 { 30 ppSubData * options= psAlloc(sizeof(ppSubData)); // Processing data, to return31 psMemSetDeallocator( options, (psFreeFunc)subOptionsFree);40 ppSubData *data = psAlloc(sizeof(ppSubData)); // Processing data, to return 41 psMemSetDeallocator(data, (psFreeFunc)subDataFree); 32 42 33 options->quality = 0; 34 options->stats = psMetadataAlloc(); 35 psMetadataAddS32(options->stats, PS_LIST_TAIL, "QUALITY", 0, "Data quality", 0); 43 data->quality = 0; 44 data->photometry = false; 45 data->inverse = false; 46 data->statsFile = NULL; 47 data->stats = psMetadataAlloc(); 48 psMetadataAddS32(data->stats, PS_LIST_TAIL, "QUALITY", 0, "Data quality", 0); 36 49 37 50 return options;
Note:
See TracChangeset
for help on using the changeset viewer.
