IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 11848


Ignore:
Timestamp:
Feb 16, 2007, 10:46:05 AM (19 years ago)
Author:
Paul Price
Message:

Help has to come before parsing everything else.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStac/src/ppStacOptions.c

    r11631 r11848  
    5555    PS_ASSERT_PTR_NON_NULL(argv, NULL);
    5656
     57    if (*argc <= 1 || psArgumentGet(*argc, argv, "-help") || psArgumentGet(*argc, argv, "-h")) {
     58        fprintf(stderr,
     59                "ppStac: Combine multiple registered images.\n\n"
     60                "Usage: %s OUT.fits IN1.fits IN2.fits ... [-recipe NAME FILE]\n\n",
     61                argv[0]);
     62        exit(PS_EXIT_SUCCESS);
     63    }
     64
    5765    ppStacOptions *options = ppStacOptionsAlloc(); // Options, to be returned
    5866
     
    6472        psFree(options);
    6573        return NULL;
    66     }
    67 
    68     if (*argc <= 1 || psArgumentGet(*argc, argv, "-help") || psArgumentGet(*argc, argv, "-h")) {
    69         fprintf(stderr,
    70                 "ppStac: Combine multiple registered images.\n\n"
    71                 "Usage: %s OUT.fits IN1.fits IN2.fits ... [-recipe NAME FILE]\n\n",
    72                 argv[0]);
    73         psFree(options);
    74         exit(PS_EXIT_SUCCESS);
    7574    }
    7675
Note: See TracChangeset for help on using the changeset viewer.