IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 19, 2006, 4:16:26 PM (20 years ago)
Author:
jhoblitt
Message:

compilation fixes
switch to using the metadatadb API

File:
1 edited

Legend:

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

    r5881 r6060  
     1#include <pmConfig.h>
     2
    13# include "p2search.h"
    24
    3 bool p2searchConfig (psConfig *config, int argc, char **argv) {
     5bool p2searchConfig (p2Config *config, int argc, char **argv) {
    46
    57    // Parse the configurations (re-org a la ppImage)
     
    1517    config->arguments = psMetadataAlloc(); // The arguments, with default values
    1618
     19    int N;
    1720    config->mode = P2_MODE_NONE;
    18     if ((N = psArgumentGet (*argc, argv, "-quick"))) {
    19         psArgumentRemove (N, argc, argv);
    20         if (config->mode) psAbort ("p2search", "only one mode selection is allowed");
    21         config->mode = P2_MODE_QUICK;
     21    if ((N = psArgumentGet (argc, argv, "-quick"))) {
     22            psArgumentRemove (N, &argc, argv);
     23        if (config->mode) psAbort ("p2search", "only one mode selection is allowed");
     24        config->mode = P2_MODE_QUICK;
    2225    }
    23     if ((N = psArgumentGet (*argc, argv, "-define"))) {
    24         psArgumentRemove (N, argc, argv);
    25         if (config->mode) psAbort ("p2search", "only one mode selection is allowed");
    26         config->mode = P2_MODE_DEFINE;
     26    if ((N = psArgumentGet (argc, argv, "-define"))) {
     27        psArgumentRemove (N, &argc, argv);
     28        if (config->mode) psAbort ("p2search", "only one mode selection is allowed");
     29        config->mode = P2_MODE_DEFINE;
    2730    }
    28     if ((N = psArgumentGet (*argc, argv, "-pending"))) {
    29         psArgumentRemove (N, argc, argv);
    30         if (config->mode) psAbort ("p2search", "only one mode selection is allowed");
    31         config->mode = P2_MODE_PENDING;
     31    if ((N = psArgumentGet (argc, argv, "-pending"))) {
     32        psArgumentRemove (N, &argc, argv);
     33        if (config->mode) psAbort ("p2search", "only one mode selection is allowed");
     34        config->mode = P2_MODE_PENDING;
    3235    }
    33     if ((N = psArgumentGet (*argc, argv, "-update"))) {
    34         psArgumentRemove (N, argc, argv);
    35         if (config->mode) psAbort ("p2search", "only one mode selection is allowed");
    36         config->mode = P2_MODE_UPDATE;
     36    if ((N = psArgumentGet (argc, argv, "-update"))) {
     37        psArgumentRemove (N, &argc, argv);
     38        if (config->mode) psAbort ("p2search", "only one mode selection is allowed");
     39        config->mode = P2_MODE_UPDATE;
    3740    }
    38     if ((N = psArgumentGet (*argc, argv, "-done"))) {
    39         psArgumentRemove (N, argc, argv);
    40         if (config->mode) psAbort ("p2search", "only one mode selection is allowed");
    41         config->mode = P2_MODE_UPDATE;
     41    if ((N = psArgumentGet (argc, argv, "-done"))) {
     42        psArgumentRemove (N, &argc, argv);
     43        if (config->mode) psAbort ("p2search", "only one mode selection is allowed");
     44        config->mode = P2_MODE_UPDATE;
    4245    }
    4346
     
    4750    psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-pending", 0, "examine pending image table, write ppImage output", "");
    4851    psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-update",  0, "update pending image table", "");
    49     psMetadataAddS32(config->arguments, PS_LIST_TAIL, "-time",    0, "define time range of interest", "");
    50     psMetadataAddS32(config->arguments, PS_LIST_TAIL, "-camera",  0, "define camera of interest", "");
    51     psMetadataAddS32(config->arguments, PS_LIST_TAIL, "-filter",  0, "define filter of interest", "");
     52    psMetadataAddS32(config->arguments, PS_LIST_TAIL, "-time",    0, "define time range of interest", 0);
     53    psMetadataAddS32(config->arguments, PS_LIST_TAIL, "-camera",  0, "define camera of interest", 0);
     54    psMetadataAddS32(config->arguments, PS_LIST_TAIL, "-filter",  0, "define filter of interest", 0);
    5255
    5356    if (! psArgumentParse(config->arguments, &argc, argv) || argc != 2) {
Note: See TracChangeset for help on using the changeset viewer.