IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 10, 2007, 10:59:10 AM (19 years ago)
Author:
jhoblitt
Message:

add chiptool -revertprocessedimfile

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTools/src/regtoolConfig.c

    r14098 r14099  
    306306}
    307307
    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 
    321308    // generate SQL where clause
    322309    config->where = psMetadataAlloc();
     
    335322        }
    336323    }
     324
    337325    addWhereStr(telescope);
    338326    addWhereStr(exp_type);
     
    341329    addWhereStr(tmp_class_id);
    342330    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    }
    344344
    345345    if (config->where->list->n < 1) {
Note: See TracChangeset for help on using the changeset viewer.