IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 23, 2008, 4:27:00 PM (18 years ago)
Author:
jhoblitt
Message:

add pztool -pending[exp|imfile] -desc flag

File:
1 edited

Legend:

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

    r18204 r18305  
    203203    PS_ASSERT_PTR_NON_NULL(config, false);
    204204
     205    PXOPT_LOOKUP_BOOL(desc, config->args, "-desc", false);
    205206    PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false);
    206207    PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false);
     
    225226    }
    226227
    227     psStringAppend(&query, " ORDER BY summitExp.dateobs DESC");
     228    psStringAppend(&query, " ORDER BY summitExp.dateobs");
     229    if (desc) {
     230        psStringAppend(&query, " DESC");
     231    }
    228232
    229233    // treat limit == 0 as "no limit"
     
    268272    PS_ASSERT_PTR_NON_NULL(config, false);
    269273
     274    PXOPT_LOOKUP_BOOL(desc, config->args, "-desc", false);
    270275    PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false);
    271276    PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false);
     
    296301            psStringAppend(&query, " AND %s", whereClause);
    297302            psFree(whereClause);
     303        }
     304
     305        psStringAppend(&query, " ORDER BY dateobs");
     306        if (desc) {
     307            psStringAppend(&query, " DESC");
    298308        }
    299309
Note: See TracChangeset for help on using the changeset viewer.