Changeset 10751
- Timestamp:
- Dec 15, 2006, 12:33:53 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/warptoolConfig.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/warptoolConfig.c
r10690 r10751 84 84 psMetadataAddStr(towarpedimfileArgs, PS_LIST_TAIL, "-p4_id", 0, 85 85 "search by p4 ID", NULL); 86 psMetadataAddBool(towarpedimfileArgs, PS_LIST_TAIL, "-simple", 0, 87 "use the simple output format", false); 86 88 87 89 // -addwarpedimfile … … 106 108 psMetadataAddStr(warpedimfileArgs, PS_LIST_TAIL, "-p4_id", 0, 107 109 "search by p4 ID", NULL); 110 psMetadataAddBool(warpedimfileArgs, PS_LIST_TAIL, "-simple", 0, 111 "use the simple output format", false); 108 112 109 113 // -tostackedimfile … … 111 115 psMetadataAddStr(tostackedimfileArgs, PS_LIST_TAIL, "-p4_id", 0, 112 116 "search by p4 ID", NULL); 117 psMetadataAddBool(tostackedimfileArgs, PS_LIST_TAIL, "-simple", 0, 118 "use the simple output format", false); 113 119 114 120 // -addstackedimfile … … 133 139 psMetadataAddStr(stackedimfileArgs, PS_LIST_TAIL, "-p4_id", 0, 134 140 "search by p4 ID", NULL); 141 psMetadataAddBool(stackedimfileArgs, PS_LIST_TAIL, "-simple", 0, 142 "use the simple output format", false); 135 143 136 144 // -todiffimfile … … 138 146 psMetadataAddStr(todiffimfileArgs, PS_LIST_TAIL, "-p4_id", 0, 139 147 "search by p4 ID", NULL); 148 psMetadataAddBool(todiffimfileArgs, PS_LIST_TAIL, "-simple", 0, 149 "use the simple output format", false); 140 150 141 151 // -adddiffimfile … … 160 170 psMetadataAddStr(diffimfileArgs, PS_LIST_TAIL, "-p4_id", 0, 161 171 "search by p4 ID", NULL); 172 psMetadataAddBool(diffimfileArgs, PS_LIST_TAIL, "-simple", 0, 173 "use the simple output format", false); 162 174 163 175 psFree(now); … … 240 252 } 241 253 254 #define addWhereS32(name) \ 255 { \ 256 psS32 s32 = 0; \ 257 bool status = false; \ 258 if ((s32= psMetadataLookupS32(&status, config->args, "-" #name))) { \ 259 if (!psMetadataAddS32(config->where, PS_LIST_TAIL, #name, 0, "==", s32)) { \ 260 psError(PS_ERR_UNKNOWN, false, "failed to add item " #name); \ 261 goto FAIL; \ 262 } \ 263 } \ 264 } 265 266 242 267 // generate SQL where clause 243 268 config->where = psMetadataAlloc(); 244 269 245 addWhereStr(det_id); 246 { 247 int n = 0; 248 bool status = false; 249 if ((n = psMetadataLookupS32(&status, config->args, "-iteration"))) { 250 if (!psMetadataAddS32(config->where, PS_LIST_TAIL, "iteration", 0, "==", n)) { 251 psError(PS_ERR_UNKNOWN, false, "failed to add item iteration"); 252 goto FAIL; 253 } 254 } 255 } 256 addWhereStr(det_type); 257 addWhereStr(exp_tag); 258 addWhereStr(class_id); 259 // convert '-inst' to 'camera' 260 { 261 psString str = NULL; 262 bool status = false; 263 if ((str = psMetadataLookupStr(&status, config->args, "-inst"))) { 264 if (!psMetadataAddStr(config->where, PS_LIST_TAIL, "camera", 0, "==", str)) { 265 psError(PS_ERR_UNKNOWN, false, "failed to add item camera"); 266 goto FAIL; 267 } 268 } 269 } 270 addWhereStr(telescope); 271 addWhereStr(exp_type); 272 { 273 int n = 0; 274 bool status = false; 275 if ((n = psMetadataLookupS32(&status, config->args, "-imfiles"))) { 276 if (!psMetadataAddS32(config->where, PS_LIST_TAIL, "imfiles", 0, "==", n)) { 277 psError(PS_ERR_UNKNOWN, false, "failed to add item imfiles"); 278 goto FAIL; 279 } 280 } 281 } 282 addWhereStr(filter); 283 addWhereStr(recipe); 284 { 285 int n = 0; 286 bool status = false; 287 if ((n = psMetadataLookupS32(&status, config->args, "-p1_version"))) { 288 if (!psMetadataAddS32(config->where, PS_LIST_TAIL, "p1_version", 0, "==", n)) { 289 psError(PS_ERR_UNKNOWN, false, "failed to add item p1_version"); 290 goto FAIL; 291 } 292 } 293 } 294 { 295 bool boolean = false; 296 bool status = false; 297 298 // map reject -> !accept 299 if ((boolean = psMetadataLookupBool(&status, config->args, "-reject"))) { 300 if (!psMetadataAddBool(config->where, PS_LIST_TAIL, "accept", 0, "==", !boolean)) { 301 psError(PS_ERR_UNKNOWN, false, "failed to add item reject"); 302 goto FAIL; 303 } 304 } 305 } 270 addWhereS32(p4_id); 306 271 307 272 if (config->where->list->n < 1) {
Note:
See TracChangeset
for help on using the changeset viewer.
