IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 24, 2006, 5:35:03 PM (20 years ago)
Author:
jhoblitt
Message:

cleanups:

all cli utils have thier own .h
make *Config() funcs consistent

File:
1 edited

Legend:

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

    r6670 r6978  
     1#ifdef HAVE_CONFIG_H
     2#include <config.h>
     3#endif
     4
    15#include <pmConfig.h>
    26
    37#include "pxtools.h"
    48
    5 bool pzsearchConfig(pxConfig *config, int argc, char **argv) {
    6     PS_ASSERT_PTR_NON_NULL(config, false);
     9pxConfig *pzsearchConfig(pxConfig *config, int argc, char **argv) {
     10    if (!config) {
     11        config = pxConfigAlloc();
     12    }
    713
    814    if (! pmConfigRead(&config->site, &config->camera, &config->recipe, &argc, argv, RECIPE)) {
     
    95101            psError(PS_ERR_UNKNOWN, false, "failed to add item exp_id");
    96102            psFree(where);
    97             return NULL;
     103            exit(EXIT_FAILURE);
    98104        }
    99105    }
     
    102108            psError(PS_ERR_UNKNOWN, false, "failed to add item class");
    103109            psFree(where);
    104             return NULL;
     110            exit(EXIT_FAILURE);
    105111        }
    106112    }
     
    109115            psError(PS_ERR_UNKNOWN, false, "failed to add item class_id");
    110116            psFree(where);
    111             return NULL;
     117            exit(EXIT_FAILURE);
    112118        }
    113119    }
     
    123129    config->dbh = pmConfigDB(config->site);
    124130
    125     return true;
     131    return config;
    126132}
Note: See TracChangeset for help on using the changeset viewer.