IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 12, 2005, 4:08:30 PM (22 years ago)
Author:
desonia
Message:

added test for psFitsGetExtNum/psFitsGetExtName.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/fileUtils/psFits.c

    r2965 r2967  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2005-01-13 01:54:25 $
     9 *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2005-01-13 02:08:30 $
    1111 *
    1212 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    313313int psFitsGetExtNum(psFits* fits)
    314314{
     315    int hdunum;
     316
    315317    if (fits == NULL) {
    316318        psError(PS_ERR_BAD_PARAMETER_NULL, true,
     
    319321    }
    320322
    321     int hdutype = ANY_HDU;
    322     int status = 0;
    323 
    324     if (fits_get_hdu_type(fits->p_fd, &hdutype, &status) != 0) {
    325         char fitsErr[MAX_STRING_LENGTH];
    326         fits_get_errstatus(status, fitsErr);
    327         psError(PS_ERR_LOCATION_INVALID, true,
    328                 PS_ERRORTEXT_psFits_GET_EXTNUM_FAILED,
    329                 fits->filename, fitsErr);
    330         return -1;
    331     }
    332 
    333     return hdutype;
     323
     324    return fits_get_hdu_num(fits->p_fd,&hdunum) - 1;
    334325}
    335326
Note: See TracChangeset for help on using the changeset viewer.