IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 3805


Ignore:
Timestamp:
Apr 29, 2005, 8:38:32 AM (21 years ago)
Author:
rhl
Message:

1/ Factor poisConfigAlloc() out of poisParseConfig()
2/ help() can and should be static (and not declared in pois.h)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pois/src/poisParseConfig.c

    r3792 r3805  
    44#include "pois.h"
    55
    6 void help(void)
     6static void help(void)
    77{
    88    fprintf (stderr, "POIS: Pan-STARRS (or Pricey's) Optimal Image Subtraction\n"
     
    2626}
    2727
    28 poisConfig *poisParseConfig(int argc, // Number of command-line arguments
    29                             char **argv // Command-line arguments
    30     )
     28poisConfig *restrict poisConfigAlloc(void)
    3129{
    32     poisConfig *config;                 // Configuration values
    33 
    34     /* Variables for getopt */
    35     int opt;   /* Option, from getopt */
    36     extern char *optarg;   /* Argument accompanying switch */
    37     extern int optind;   /* getopt variables */
    38 
    39     /* Initialise configuration */
    40     config = (poisConfig *) psAlloc(sizeof(poisConfig));
     30    poisConfig *config = (poisConfig *) psAlloc(sizeof(poisConfig));
    4131    config->verbose = 0;
    4232    config->refFile = NULL;
     
    5747    config->sigmaRej = 2.5;
    5848    config->penalty = 0.0;
     49
     50    return config;
     51}
     52
     53
     54poisConfig *poisParseConfig(int argc, // Number of command-line arguments
     55                            char **argv // Command-line arguments
     56    )
     57{
     58    poisConfig *config  = poisConfigAlloc(); // Configuration values
     59
     60    /* Variables for getopt */
     61    int opt;   /* Option, from getopt */
     62    extern char *optarg;   /* Argument accompanying switch */
     63    extern int optind;   /* getopt variables */
     64
     65    /* Initialise configuration */
    5966
    6067    /* Parse command-line arguments using getopt */
Note: See TracChangeset for help on using the changeset viewer.