IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 27227 for trunk


Ignore:
Timestamp:
Mar 9, 2010, 2:28:05 PM (16 years ago)
Author:
Paul Price
Message:

Don't interpret I/O errors in reading the configuration as configuration errors.

Location:
trunk/pswarp/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/pswarp/src/pswarp.c

    r27135 r27227  
    1414#include "pswarpFileNames.h"
    1515
    16 static void usage (void) {
    17     fprintf(stderr, "USAGE: pswarp [-file image(s)] [-list imagelist] [options] (output) (skycell)\n");
    18     fprintf(stderr, "  options:\n");
    19     fprintf(stderr, "    [-astrom astrom.cmp] : provide an alternative astrometry calibration\n");
    20     fprintf(stderr, "    [-mask mask.fits] : provide a corresponding mask image\n");
    21     fprintf(stderr, "    [-variance variance.fits] : provide a corresponding variance image\n");
    22     psErrorStackPrint(stderr, "\n");
    23     exit(PS_EXIT_CONFIG_ERROR);
    24 }
    25 
    2616int main (int argc, char **argv)
    2717{
     
    3727
    3828    pmConfig *config = pswarpArguments(argc, argv);
    39     if (!config) usage();
     29    if (!config) {
     30        goto DIE;
     31    }
    4032
    4133    pswarpVersionPrint();
  • trunk/pswarp/src/pswarpArguments.c

    r27096 r27227  
    1414# include <glob.h>
    1515
     16
     17static void usage (void) {
     18    fprintf(stderr, "USAGE: pswarp [-file image(s)] [-list imagelist] [options] (output) (skycell)\n");
     19    fprintf(stderr, "  options:\n");
     20    fprintf(stderr, "    [-astrom astrom.cmp] : provide an alternative astrometry calibration\n");
     21    fprintf(stderr, "    [-mask mask.fits] : provide a corresponding mask image\n");
     22    fprintf(stderr, "    [-variance variance.fits] : provide a corresponding variance image\n");
     23    psErrorStackPrint(stderr, "\n");
     24    exit(PS_EXIT_CONFIG_ERROR);
     25}
     26
     27
    1628pmConfig *pswarpArguments (int argc, char **argv) {
    1729
     
    2032
    2133    if (argc == 1) {
    22         psError(PSWARP_ERR_ARGUMENTS, true, "No arguments supplied");
    23         return NULL;
     34        usage();
    2435    }
    2536
     
    91102
    92103    if (argc != 3) {
    93         psError(PSWARP_ERR_ARGUMENTS, true, "Incorrect arguments supplied");
    94         return NULL;
     104        usage();
    95105    }
    96106
Note: See TracChangeset for help on using the changeset viewer.