IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 20, 2008, 3:48:37 PM (18 years ago)
Author:
eugene
Message:

merging changes from JHs end_stage branch (new end_stage field and related features; substantial cleanup via macros)

File:
1 edited

Legend:

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

    r15091 r16170  
    6969    PS_ASSERT_PTR_NON_NULL(config, NULL);
    7070
    71     bool status = false;
    72     psString camera = psMetadataLookupStr(&status, config->args, "-inst");
    73     if (!status) {
    74         psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -inst");
    75         return false;
    76     }
    77     if (!camera) {
    78         psError(PS_ERR_UNKNOWN, true, "-inst is required");
    79         return false;
    80     }
    81 
    82     psString telescope = psMetadataLookupStr(&status, config->args, "-telescope");
    83     if (!status) {
    84         psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -telescope");
    85         return false;
    86     }
    87     if (!telescope) {
    88         psError(PS_ERR_UNKNOWN, true, "-telescope is required");
    89         return false;
    90     }
     71    // required
     72    PXOPT_LOOKUP_STR(camera, config->args, "-inst", true, false);
     73    PXOPT_LOOKUP_STR(telescope, config->args, "-telescope", true, false);
     74    PXOPT_LOOKUP_STR(uri, config->args, "-uri", true, false);
    9175
    9276    // find last fileset/exp_name (if we have one)
     
    119103    // invoke dsproductls
    120104    // dsproductls --uri <> --last_fileset <>
    121     psString uri = psMetadataLookupStr(&status, config->args, "-uri");
    122105    psString cmd = NULL;
    123106    if (haveLastFileSet) {
     
    275258    // these are constants for all records parsed -- look them up before we do
    276259    // any work
    277     bool status = false;
    278     char *camera = psMetadataLookupStr(&status, config->args, "-inst");
    279     if (!status) {
    280         psError(PS_ERR_UNKNOWN, false, "failed to lookup item '-inst'");
    281         return NULL;
    282     }
    283     char *telescope = psMetadataLookupStr(&status, config->args, "-telescope");
    284     if (!status) {
    285         psError(PS_ERR_UNKNOWN, false, "failed to lookup item '-telescope'");
    286         return NULL;
    287     }
     260    // required
     261    PXOPT_LOOKUP_STR(camera, config->args, "-inst", true, false);
     262    PXOPT_LOOKUP_STR(telescope, config->args, "-telescope", true, false);
    288263
    289264    // split the string into lines
Note: See TracChangeset for help on using the changeset viewer.