Changeset 12354
- Timestamp:
- Mar 8, 2007, 3:38:06 PM (19 years ago)
- Location:
- trunk/ppStats/src
- Files:
-
- 4 edited
-
ppStatsData.c (modified) (1 diff)
-
ppStatsData.h (modified) (1 diff)
-
ppStatsSetupFromArgs.c (modified) (2 diffs)
-
ppStatsStandAlone.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppStats/src/ppStatsData.c
r8749 r12354 41 41 data->stats = psStatsAlloc(0); 42 42 data->doStats = false; 43 data->fileLevel = false; 43 44 44 45 data->sample = 0; -
trunk/ppStats/src/ppStatsData.h
r8346 r12354 13 13 psStats *stats; // Statistics to calculate 14 14 bool doStats; // Do statistics? 15 bool fileLevel; // Output file level? 15 16 psList *headers; // Headers to read 16 17 psList *concepts; // Concepts to read -
trunk/ppStats/src/ppStatsSetupFromArgs.c
r11322 r12354 109 109 psMetadataAddF32(arguments, PS_LIST_TAIL, "-rej", 0, "Clipping level", 0.0); 110 110 psMetadataAddF32(arguments, PS_LIST_TAIL, "-sample", 0, "Sampling fraction", 0.0); 111 psMetadataAddBool(arguments, PS_LIST_TAIL, "-level", 0, "File level", 0); 111 112 112 113 if (*config->argc == 1) { … … 145 146 data->stats->clipIter = psMetadataLookupS32(NULL, arguments, "-iter"); 146 147 data->sample = psMetadataLookupF32(NULL, arguments, "-sample"); 147 148 data->fileLevel = psMetadataLookupBool(NULL, arguments, "-level"); 148 149 149 150 // Open the input file, determine the camera -
trunk/ppStats/src/ppStatsStandAlone.c
r11486 r12354 43 43 if (!outFile) { 44 44 psLogMsg("ppStats", PS_LOG_ERROR, "Unable to open output file %s\n", outName); 45 // XXX this could be a system or config error, but not a data error45 // XXX this could be a system or config error, but not a data error 46 46 status = PS_EXIT_CONFIG_ERROR; 47 47 goto die; … … 61 61 status = PS_EXIT_DATA_ERROR; 62 62 goto die; 63 } 64 65 if (data->fileLevel) { 66 const char *level = pmFPALevelToName(pmFPAPHULevel(config->format)); // Level for file 67 psMetadataAddStr(results, PS_LIST_HEAD, "FILE.LEVEL", 0, "File level", level); 63 68 } 64 69 … … 83 88 die: 84 89 if (status) { 85 psErrorStackPrint (stderr, "failure in %s", __func__);90 psErrorStackPrint (stderr, "failure in %s", __func__); 86 91 } 87 92 psFree(data);
Note:
See TracChangeset
for help on using the changeset viewer.
