IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 1, 2006, 1:42:48 PM (20 years ago)
Author:
jhoblitt
Message:

attempt to fix where claus generation

File:
1 edited

Legend:

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

    r7022 r7024  
    132132    // setup search criterion
    133133#define addWhereStr(name) \
    134     if ((str = psMetadataLookupStr(&status, args, "-" #name))) { \
     134    if ((str = psMetadataLookupStr(&status, argSet, "-" #name))) { \
    135135        if (!psMetadataAddStr(where, PS_LIST_TAIL, #name, 0, "==", str)) {\
    136136            psError(PS_ERR_UNKNOWN, false, "failed to add item " #name); \
     
    147147    bool status = false;
    148148
     149    if ((str = psMetadataLookupStr(&status, argSet, "-exp_id"))) {
     150        if (!psMetadataAddStr(where, PS_LIST_TAIL, "-exp_id", 0, "==", str)) {
     151            psError(PS_ERR_UNKNOWN, false, "failed to add item -exp_id");
     152            psFree(where);
     153            exit(EXIT_FAILURE);
     154        }
     155    }
    149156    addWhereStr(exp_id);
    150157    // convert '-inst' to 'camera'
    151     if ((str = psMetadataLookupStr(&status, args, "-inst"))) {
     158    if ((str = psMetadataLookupStr(&status, argSet, "-inst"))) {
    152159        if (!psMetadataAddStr(where, PS_LIST_TAIL, "camera", 0, "==", str)) {
    153160            psError(PS_ERR_UNKNOWN, false, "failed to add item camera");
     
    158165    addWhereStr(telescope);
    159166    addWhereStr(exp_type);
    160     if ((n = psMetadataLookupS32(&status, args, "-imfiles"))) {
     167    if ((n = psMetadataLookupS32(&status, argSet, "-imfiles"))) {
    161168        if (!psMetadataAddS32(where, PS_LIST_TAIL, "imfiles", 0, "==", n)) {
    162169            psError(PS_ERR_UNKNOWN, false, "failed to add item imfiles");
     
    168175    addWhereStr(stats);
    169176    addWhereStr(recipe);
    170     if ((n = psMetadataLookupS32(&status, args, "-p1_version"))) {
     177    if ((n = psMetadataLookupS32(&status, argSet, "-p1_version"))) {
    171178        if (!psMetadataAddS32(where, PS_LIST_TAIL, "p1_version", 0, "==", n)) {
    172179            psError(PS_ERR_UNKNOWN, false, "failed to add item p1_version");
Note: See TracChangeset for help on using the changeset viewer.