Changeset 5976 for trunk/ppImage/src/ppImageConfig.c
- Timestamp:
- Jan 13, 2006, 5:14:07 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ppImage/src/ppImageConfig.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/ppImageConfig.c
r5858 r5976 1 # include "ppImage.h"1 #include "ppImage.h" 2 2 3 bool ppImageConfig (ppConfig *config, int argc, char **argv) { 3 bool ppImageConfig(ppConfig *config, int argc, char **argv) 4 { 5 // Initialise the configuration 6 config->site = NULL; // Site configuration 7 config->camera = NULL; // Camera configuration 8 config->recipe = NULL; // Recipe configuration 9 config->arguments = NULL; // The command-line arguments 10 config->database = NULL; // Database handle 4 11 5 // Parse the configurations 6 config->site = NULL; // Site configuration 7 config->camera = NULL; // Camera configuration 8 config->recipe = NULL; // Recipe configuration 9 10 // XXX - this should be split into a function to parse argc,argv 11 // and a second to read the config files. 12 // XXX - this should be split into a function to parse argc,argv 13 // and a second to read the config files. 12 14 // all argc,argv should be interpretted before work is done. 13 15 if (! pmConfigRead(&config->site, &config->camera, &config->recipe, &argc, argv, RECIPE)) { … … 23 25 psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-flat", 0, "Name of the flat-field image", ""); 24 26 psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-mask", 0, "Name of the mask image", ""); 27 psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-fringe", 0, "Name of the fringe image", ""); 25 28 psMetadataAddS32(config->arguments, PS_LIST_TAIL, "-chip", 0, "Chip number to process (if positive)", -1); 26 29 … … 33 36 } 34 37 35 // add the input and output imagesto the arguments list36 psMetadataAddStr (config->arguments, PS_LIST_TAIL, "-input", 0, "Name of the input image", argv[1]);37 psMetadataAddStr (config->arguments, PS_LIST_TAIL, "-output", 0, "Name of the output image", argv[2]);38 // Add the input and output images (which remain on the command-line) to the arguments list 39 psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-input", 0, "Name of the input image", argv[1]); 40 psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-output", 0, "Name of the output image", argv[2]); 38 41 39 // define Database handle, if used 42 // Define database handle, if used 43 #if 0 40 44 config->database = pmConfigDB(config->site); 45 #endif 46 41 47 return true; 42 } 48 }
Note:
See TracChangeset
for help on using the changeset viewer.
