IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 7818 for trunk/ppImage/src


Ignore:
Timestamp:
Jul 5, 2006, 12:57:39 PM (20 years ago)
Author:
Paul Price
Message:

API change to pmConfigRead.

Location:
trunk/ppImage/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppImage/src/ppFocusArguments.c

    r7738 r7818  
    1414
    1515    // load the site-wide configuration information
    16     pmConfig *config = pmConfigRead(argc, argv);
     16    pmConfig *config = pmConfigRead(&argc, argv);
    1717    if (config == NULL) {
    1818        psErrorStackPrint(stderr, "Can't find site configuration!\n");
     
    3030
    3131    // recipe option: -usemask : override MASK setting in phase2.recipe
    32     if ((N = psArgumentGet(config->argc, config->argv, "-usemask"))) {
    33         psArgumentRemove (N, &config->argc, config->argv);
     32    if ((N = psArgumentGet(argc, argv, "-usemask"))) {
     33        psArgumentRemove (N, &argc, argv);
    3434        psMetadataAddBool (options, PS_LIST_TAIL, "MASK", PS_META_REPLACE, "", true);
    35         psArgumentRemove (N, &config->argc, config->argv);
     35        psArgumentRemove (N, &argc, argv);
    3636    }
    3737
     
    5454
    5555    // chip selection is used to limit chips to be processed
    56     if ((N = psArgumentGet (config->argc, config->argv, "-chip"))) {
    57         psArgumentRemove (N, &config->argc, config->argv);
     56    if ((N = psArgumentGet (argc, argv, "-chip"))) {
     57        psArgumentRemove (N, &argc, argv);
    5858        psMetadataAddStr (config->arguments, PS_LIST_TAIL, "CHIP_SELECTIONS", PS_DATA_STRING, "",
    59                           config->argv[N]);
    60         psArgumentRemove (N, &config->argc, config->argv);
     59                          argv[N]);
     60        psArgumentRemove (N, &argc, argv);
    6161    }
    6262
    63     if (config->argc != 2) usage ();
     63    if (argc != 2) usage ();
    6464
    6565    // Add the input and output images (which remain on the command-line) to the arguments list
    6666    psMetadataAddStr(config->arguments, PS_LIST_TAIL, "OUTPUT", 0, "Name of the output image",
    67                      config->argv[1]);
     67                     argv[1]);
    6868
    6969    return config;
  • trunk/ppImage/src/ppImageArguments.c

    r7677 r7818  
    1414
    1515    // load the site-wide configuration information
    16     pmConfig *config = pmConfigRead(argc, argv);
     16    pmConfig *config = pmConfigRead(&argc, argv);
    1717    if (config == NULL) {
    1818        psErrorStackPrint(stderr, "Can't find site configuration!\n");
     
    3030
    3131    // recipe option: -usemask : override MASK setting in phase2.recipe
    32     if ((N = psArgumentGet(config->argc, config->argv, "-usemask"))) {
    33         psArgumentRemove (N, &config->argc, config->argv);
     32    if ((N = psArgumentGet(argc, argv, "-usemask"))) {
     33        psArgumentRemove (N, &argc, argv);
    3434        psMetadataAddBool (options, PS_LIST_TAIL, "MASK", PS_META_REPLACE, "", true);
    35         psArgumentRemove (N, &config->argc, config->argv);
     35        psArgumentRemove (N, &argc, argv);
    3636    }
    3737
     
    5454
    5555    // chip selection is used to limit chips to be processed
    56     if ((N = psArgumentGet (config->argc, config->argv, "-chip"))) {
    57         psArgumentRemove (N, &config->argc, config->argv);
     56    if ((N = psArgumentGet (argc, argv, "-chip"))) {
     57        psArgumentRemove (N, &argc, argv);
    5858        psMetadataAddStr (config->arguments, PS_LIST_TAIL, "CHIP_SELECTIONS", PS_DATA_STRING, "",
    59                           config->argv[N]);
    60         psArgumentRemove (N, &config->argc, config->argv);
     59                          argv[N]);
     60        psArgumentRemove (N, &argc, argv);
    6161    }
    6262
    63     if (config->argc != 2) usage ();
     63    if (argc != 2) usage ();
    6464
    6565    // Add the input and output images (which remain on the command-line) to the arguments list
    6666    psMetadataAddStr(config->arguments, PS_LIST_TAIL, "OUTPUT", 0, "Name of the output image",
    67                      config->argv[1]);
     67                     argv[1]);
    6868
    6969    return config;
  • trunk/ppImage/src/ppTest.c

    r7677 r7818  
    1111// ppImageConfig.c
    1212//////////////////////////////////////////////////////////////////////////////////////////////////////////////
    13     pmConfig *config = pmConfigRead(argc, argv);
     13    pmConfig *config = pmConfigRead(&argc, argv);
    1414    if (! config) {
    1515        psErrorStackPrint(stderr, "Can't find site configuration!\n");
     
    2727    psMetadataAddS32(config->arguments, PS_LIST_TAIL, "-chip", 0, "Chip number to process (if positive)", -1);
    2828
    29     if (! psArgumentParse(config->arguments, &config->argc, config->argv) || argc != 3) {
     29    if (! psArgumentParse(config->arguments, &argc, argv) || argc != 3) {
    3030        printf("\nPan-STARRS Phase 2 processing\n\n");
    31         printf("Usage: %s INPUT.fits OUTPUT.fits\n\n", config->argv[0]);
     31        printf("Usage: %s INPUT.fits OUTPUT.fits\n\n", argv[0]);
    3232        psArgumentHelp(config->arguments);
    3333        psFree(config->arguments);
     
    3636
    3737    // Add the input and output images (which remain on the command-line) to the arguments list
    38     psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-input",  0, "Name of the input image",
    39                      config->argv[1]);
    40     psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-output", 0, "Name of the output image",
    41                      config->argv[2]);
     38    psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-input",  0, "Name of the input image", argv[1]);
     39    psMetadataAddStr(config->arguments, PS_LIST_TAIL, "-output", 0, "Name of the output image", argv[2]);
    4240
    4341    // Define database handle, if used
Note: See TracChangeset for help on using the changeset viewer.