Changeset 6161 for trunk/ippTools/src/chiptoolConfig.c
- Timestamp:
- Jan 21, 2006, 9:17:19 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/chiptoolConfig.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/chiptoolConfig.c
r6155 r6161 7 7 8 8 // Parse the configurations (re-org a la ppImage) 9 config->site = NULL; // Site configuration 10 config->camera = NULL; // Camera configuration (unused) 11 config->recipe = NULL; // Recipe configuration 12 config->camera_name = NULL; // Camera name 13 config->filter = NULL; // Filter name 9 config->site = NULL; // Site configuration 10 config->camera = NULL; // Camera configuration (unused) 11 config->recipe = NULL; // Recipe configuration 12 config->camera_name = NULL; // Camera name 13 config->filter = NULL; // Filter name 14 config->exp_id = NULL; // Exposure ID 15 config->class = NULL; 16 config->class_id = NULL; 17 config->url = NULL; 14 18 15 19 if (! pmConfigRead(&config->site, &config->camera, &config->recipe, &argc, argv, RECIPE)) { … … 94 98 config->camera_name = psMetadataLookupStr(&status, config->arguments, 95 99 "-inst"); 96 // XXX why is "" being returned when -inst is missing?97 if (strcmp(config->camera_name, "") == 0) {98 config->camera_name = NULL;99 }100 100 config->exp_id = psMetadataLookupStr(&status, config->arguments, "-exp_id"); 101 101 config->class = psMetadataLookupStr(&status, config->arguments, "-class"); … … 103 103 "-class_id"); 104 104 config->url = psMetadataLookupStr(&status, config->arguments, "-url"); 105 106 // XXX why is "" being returned when -[foo] isn't specified? 107 #define EMPTY_TO_NULL_STRING(var) \ 108 if (strcmp(var, "") == 0) { \ 109 var = NULL; \ 110 } 111 112 EMPTY_TO_NULL_STRING(config->camera_name); 113 EMPTY_TO_NULL_STRING(config->exp_id); 114 EMPTY_TO_NULL_STRING(config->class); 115 EMPTY_TO_NULL_STRING(config->class_id); 116 EMPTY_TO_NULL_STRING(config->url); 105 117 106 118 // add the input and output images to the arguments list
Note:
See TracChangeset
for help on using the changeset viewer.
