IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 10, 2010, 8:17:41 AM (15 years ago)
Author:
eugene
Message:

re-organize ppStackLoop to make the steps clearer: add separate functions for UpdateHeader, JPEGs, Stats; move cluttered includes into ppStack.h; push DIE section of ppStack.c into ppStackCleanup (like ppImageCleanup); rename old ppStackCleanup to ppStackCleanupFiles; consolidate file cleanup block in ppStackLoop (for unconvolved outputs) into ppStackCleanupFiles; add options for stack type

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20101205/ppStack/src/ppStackArguments.c

    r30011 r30015  
    1 #ifdef HAVE_CONFIG_H
    2 #include <config.h>
    3 #endif
    4 
    5 #include <stdio.h>
    6 #include <string.h>
    7 #include <pslib.h>
    8 #include <psmodules.h>
    9 
    101#include "ppStack.h"
    112
     
    198189
    199190    // stack-type : used to define the stack for PSPS
    200     if ((N = psArgumentGet (argc, argv, "-stack-type"))) {
    201         if (argc <= N+1) {
    202           psErrorStackPrint(stderr, "Expected to see an argument for -stack-type");
    203           exit(PS_EXIT_CONFIG_ERROR);
     191    if ((argNum = psArgumentGet (argc, argv, "-stack-type"))) {
     192        if (argc <= argNum+1) {
     193            psErrorStackPrint(stderr, "Expected to see an argument for -stack-type");
     194            exit(PS_EXIT_CONFIG_ERROR);
    204195        }
    205         psArgumentRemove (N, &argc, argv);
    206         if (strcasecmp(argv[N], "NIGHTLY_STACK") && strcasecmp(argv[N], "DEEP_STACK") && strcasecmp(argv[N], "IQ_STACK")) {
    207           psErrorStackPrint(stderr, "Invalid option for -stack-type %s (must be one of NIGHTLY_STACK, DEEP_STACK, IQ_STACK)");
    208           exit(PS_EXIT_CONFIG_ERROR);
     196        psArgumentRemove (argNum, &argc, argv);
     197        if (strcasecmp(argv[argNum], "NIGHTLY_STACK") && strcasecmp(argv[argNum], "DEEP_STACK") && strcasecmp(argv[argNum], "IQ_STACK")) {
     198            psErrorStackPrint(stderr, "Invalid option for -stack-type %s (must be one of NIGHTLY_STACK, DEEP_STACK, IQ_STACK)", argv[argNum]);
     199            exit(PS_EXIT_CONFIG_ERROR);
    209200        }
    210         psMetadataAddStr (arguments, PS_LIST_TAIL, "STACK_TYPE", PS_META_REPLACE, "Stack Type", argv[N]);
    211         psArgumentRemove (N, &argc, argv);
     201        psMetadataAddStr (arguments, PS_LIST_TAIL, "STACK_TYPE", PS_META_REPLACE, "Stack Type", argv[argNum]);
     202        psArgumentRemove (argNum, &argc, argv);
    212203    } else {
    213204        psMetadataAddStr (arguments, PS_LIST_TAIL, "STACK_TYPE", PS_META_REPLACE, "Stack Type", "DEEP_STACK");
Note: See TracChangeset for help on using the changeset viewer.