Changeset 14099 for trunk/ippTools/src/regtoolConfig.c
- Timestamp:
- Jul 10, 2007, 10:59:10 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/regtoolConfig.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/regtoolConfig.c
r14098 r14099 306 306 } 307 307 308 #define addWhereS16(name) \309 { \310 psS16 s16 = 0; \311 bool status = false; \312 if ((s16= psMetadataLookupS16(&status, config->args, "-" #name))) { \313 if (!psMetadataAddS16(config->where, PS_LIST_TAIL, #name, 0, "==", s16)) { \314 psError(PS_ERR_UNKNOWN, false, "failed to add item " #name); \315 psFree(config); \316 return NULL; \317 } \318 } \319 }320 321 308 // generate SQL where clause 322 309 config->where = psMetadataAlloc(); … … 335 322 } 336 323 } 324 337 325 addWhereStr(telescope); 338 326 addWhereStr(exp_type); … … 341 329 addWhereStr(tmp_class_id); 342 330 addWhereStr(filter); 343 addWhereS16(code); 331 332 // convert '-code' to 'fault' 333 { 334 psS16 fault = 0; 335 bool status = false; 336 if ((fault = psMetadataLookupS16(&status, config->args, "-code"))) { 337 if (!psMetadataAddS16(config->where, PS_LIST_TAIL, "fault", 0, "==", fault)) { 338 psError(PS_ERR_UNKNOWN, false, "failed to add item fault"); 339 psFree(config); 340 return NULL; 341 } 342 } 343 } 344 344 345 345 if (config->where->list->n < 1) {
Note:
See TracChangeset
for help on using the changeset viewer.
