Changeset 6060 for trunk/ippTools/src/chiptoolConfig.c
- Timestamp:
- Jan 19, 2006, 4:16:26 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/chiptoolConfig.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/chiptoolConfig.c
r5881 r6060 1 #include <pmConfig.h> 2 1 3 # include "p2search.h" 2 4 3 bool p2searchConfig (p sConfig *config, int argc, char **argv) {5 bool p2searchConfig (p2Config *config, int argc, char **argv) { 4 6 5 7 // Parse the configurations (re-org a la ppImage) … … 15 17 config->arguments = psMetadataAlloc(); // The arguments, with default values 16 18 19 int N; 17 20 config->mode = P2_MODE_NONE; 18 if ((N = psArgumentGet ( *argc, argv, "-quick"))) {19 psArgumentRemove (N,argc, argv);20 if (config->mode) psAbort ("p2search", "only one mode selection is allowed");21 config->mode = P2_MODE_QUICK;21 if ((N = psArgumentGet (argc, argv, "-quick"))) { 22 psArgumentRemove (N, &argc, argv); 23 if (config->mode) psAbort ("p2search", "only one mode selection is allowed"); 24 config->mode = P2_MODE_QUICK; 22 25 } 23 if ((N = psArgumentGet ( *argc, argv, "-define"))) {24 psArgumentRemove (N,argc, argv);25 if (config->mode) psAbort ("p2search", "only one mode selection is allowed");26 config->mode = P2_MODE_DEFINE;26 if ((N = psArgumentGet (argc, argv, "-define"))) { 27 psArgumentRemove (N, &argc, argv); 28 if (config->mode) psAbort ("p2search", "only one mode selection is allowed"); 29 config->mode = P2_MODE_DEFINE; 27 30 } 28 if ((N = psArgumentGet ( *argc, argv, "-pending"))) {29 psArgumentRemove (N,argc, argv);30 if (config->mode) psAbort ("p2search", "only one mode selection is allowed");31 config->mode = P2_MODE_PENDING;31 if ((N = psArgumentGet (argc, argv, "-pending"))) { 32 psArgumentRemove (N, &argc, argv); 33 if (config->mode) psAbort ("p2search", "only one mode selection is allowed"); 34 config->mode = P2_MODE_PENDING; 32 35 } 33 if ((N = psArgumentGet ( *argc, argv, "-update"))) {34 psArgumentRemove (N,argc, argv);35 if (config->mode) psAbort ("p2search", "only one mode selection is allowed");36 config->mode = P2_MODE_UPDATE;36 if ((N = psArgumentGet (argc, argv, "-update"))) { 37 psArgumentRemove (N, &argc, argv); 38 if (config->mode) psAbort ("p2search", "only one mode selection is allowed"); 39 config->mode = P2_MODE_UPDATE; 37 40 } 38 if ((N = psArgumentGet ( *argc, argv, "-done"))) {39 psArgumentRemove (N,argc, argv);40 if (config->mode) psAbort ("p2search", "only one mode selection is allowed");41 config->mode = P2_MODE_UPDATE;41 if ((N = psArgumentGet (argc, argv, "-done"))) { 42 psArgumentRemove (N, &argc, argv); 43 if (config->mode) psAbort ("p2search", "only one mode selection is allowed"); 44 config->mode = P2_MODE_UPDATE; 42 45 } 43 46 … … 47 50 psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-pending", 0, "examine pending image table, write ppImage output", ""); 48 51 psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-update", 0, "update pending image table", ""); 49 psMetadataAddS32(config->arguments, PS_LIST_TAIL, "-time", 0, "define time range of interest", "");50 psMetadataAddS32(config->arguments, PS_LIST_TAIL, "-camera", 0, "define camera of interest", "");51 psMetadataAddS32(config->arguments, PS_LIST_TAIL, "-filter", 0, "define filter of interest", "");52 psMetadataAddS32(config->arguments, PS_LIST_TAIL, "-time", 0, "define time range of interest", 0); 53 psMetadataAddS32(config->arguments, PS_LIST_TAIL, "-camera", 0, "define camera of interest", 0); 54 psMetadataAddS32(config->arguments, PS_LIST_TAIL, "-filter", 0, "define filter of interest", 0); 52 55 53 56 if (! psArgumentParse(config->arguments, &argc, argv) || argc != 2) {
Note:
See TracChangeset
for help on using the changeset viewer.
