IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 4, 2006, 3:53:10 PM (20 years ago)
Author:
Paul Price
Message:

Code compiles now. Not yet tested.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppMerge/src/ppMergeCheckInputs.c

    r7061 r7067  
    44#include <psmodules.h>
    55
     6#include "ppMerge.h"
    67#include "ppMergeCheckInputs.h"
    78#include "ppMergeData.h"
     
    910// Check input files to make sure everything's consistent
    1011ppMergeData *ppMergeCheckInputs(ppMergeOptions *options, // Options
    11                                 const pmConfig *config // Configuration
     12                                pmConfig *config // Configuration
    1213    )
    1314{
     
    3435        psFits *inFile = psFitsOpen(filenames->data[i], "r"); // The FITS file to read
    3536        if (!inFile) {
    36             psErrorPrint(PS_ERR_IO, false, "Unable to open input file %s --- ignored.\n", name);
     37            psLogMsg(__func__, PS_LOG_WARN, "Unable to open input file %s --- ignored.\n", name);
    3738            // Kick it out
    3839            psFree(filenames->data[i]);
     
    5152            data->format = pmConfigCameraFormatFromHeader(config, header);
    5253            psFree(header);
    53             if (!options->format) {
     54            if (!data->format) {
    5455                psLogMsg(__func__, PS_LOG_WARN, "Unable to identify camera format for input file %s --- "
    5556                             "ignored.\n", name);
     
    5960                continue;
    6061            }
    61         } else if (!pmConfigValidateCameraFormat(options->format, header)) {
     62        } else if (!pmConfigValidateCameraFormat(data->format, header)) {
    6263            psLogMsg(__func__, PS_LOG_WARN, "Input file %s doesn't match camera format --- ignored.\n", name);
    6364            // Kick it out
     
    99100    data->numCells = numCells;
    100101
    101     return (numGood > 1);
     102    if (numGood > 1) {
     103        return data;
     104    }
     105
     106    psFree(data);
     107    return NULL;
    102108}
    103109
Note: See TracChangeset for help on using the changeset viewer.