IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 1995


Ignore:
Timestamp:
Oct 6, 2004, 4:16:36 PM (22 years ago)
Author:
evanalst
Message:

Update conditional logic for valid extName and extNum not equal to -1.

Location:
trunk/psLib/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/astronomy/psMetadataIO.c

    r1986 r1995  
    99*  @author Ross Harman, MHPCC
    1010*
    11 *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2004-10-06 22:51:15 $
     11*  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2004-10-07 02:16:36 $
    1313*
    1414*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3636
    3737/** Check for FITS errors */
    38 #define FITS_ERROR(STRING,PS_ERROR)                                                                          \
    39 fits_get_errstatus(status, fitsErr);                                                                         \
    40 psError(__func__, STRING, PS_ERROR, fitsErr);                                                                \
    41 status = 0;                                                                                                  \
    42 fits_close_file(fd, &status);                                                                                \
    43 if(status){                                                                                                  \
    44     fits_get_errstatus(status, fitsErr);                                                                     \
    45     psError(__func__, "Couldn't close FITS file. FITS error: %s", fitsErr);                                  \
    46 }                                                                                                            \
    47 status = 0;                                                                                                  \
    48 return output;
     38#define FITS_ERROR(STRING,PS_ERROR) \
     39fits_get_errstatus(status, fitsErr); \
     40psError(__func__, STRING, PS_ERROR, fitsErr); \
     41status = 0; \
     42fits_close_file(fd, &status); \
     43if(status){ \
     44    fits_get_errstatus(status, fitsErr); \
     45    psError(__func__, "Couldn't close FITS file. FITS error: %s", fitsErr); \
     46} \
     47status = 0; \
     48psFree(output); \
     49return NULL;
    4950
    5051/** Free and null temporary variables used by config file parser */
     
    372373        psError(__func__, "Null extName and extNum = 0 not allowed");
    373374        return NULL;
    374     } else if (extName && extNum) {
    375         psError(__func__, "Both extName and extNum arguments should not have non zero values.");
     375    } else if (extName && (extNum != -1) ) {
     376        psError(__func__, "If extName specified, extNum arguments should be -1.");
    376377        return NULL;
    377378    }
  • trunk/psLib/src/collections/psMetadataIO.c

    r1986 r1995  
    99*  @author Ross Harman, MHPCC
    1010*
    11 *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2004-10-06 22:51:15 $
     11*  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2004-10-07 02:16:36 $
    1313*
    1414*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3636
    3737/** Check for FITS errors */
    38 #define FITS_ERROR(STRING,PS_ERROR)                                                                          \
    39 fits_get_errstatus(status, fitsErr);                                                                         \
    40 psError(__func__, STRING, PS_ERROR, fitsErr);                                                                \
    41 status = 0;                                                                                                  \
    42 fits_close_file(fd, &status);                                                                                \
    43 if(status){                                                                                                  \
    44     fits_get_errstatus(status, fitsErr);                                                                     \
    45     psError(__func__, "Couldn't close FITS file. FITS error: %s", fitsErr);                                  \
    46 }                                                                                                            \
    47 status = 0;                                                                                                  \
    48 return output;
     38#define FITS_ERROR(STRING,PS_ERROR) \
     39fits_get_errstatus(status, fitsErr); \
     40psError(__func__, STRING, PS_ERROR, fitsErr); \
     41status = 0; \
     42fits_close_file(fd, &status); \
     43if(status){ \
     44    fits_get_errstatus(status, fitsErr); \
     45    psError(__func__, "Couldn't close FITS file. FITS error: %s", fitsErr); \
     46} \
     47status = 0; \
     48psFree(output); \
     49return NULL;
    4950
    5051/** Free and null temporary variables used by config file parser */
     
    372373        psError(__func__, "Null extName and extNum = 0 not allowed");
    373374        return NULL;
    374     } else if (extName && extNum) {
    375         psError(__func__, "Both extName and extNum arguments should not have non zero values.");
     375    } else if (extName && (extNum != -1) ) {
     376        psError(__func__, "If extName specified, extNum arguments should be -1.");
    376377        return NULL;
    377378    }
  • trunk/psLib/src/types/psMetadataConfig.c

    r1986 r1995  
    99*  @author Ross Harman, MHPCC
    1010*
    11 *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2004-10-06 22:51:15 $
     11*  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2004-10-07 02:16:36 $
    1313*
    1414*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3636
    3737/** Check for FITS errors */
    38 #define FITS_ERROR(STRING,PS_ERROR)                                                                          \
    39 fits_get_errstatus(status, fitsErr);                                                                         \
    40 psError(__func__, STRING, PS_ERROR, fitsErr);                                                                \
    41 status = 0;                                                                                                  \
    42 fits_close_file(fd, &status);                                                                                \
    43 if(status){                                                                                                  \
    44     fits_get_errstatus(status, fitsErr);                                                                     \
    45     psError(__func__, "Couldn't close FITS file. FITS error: %s", fitsErr);                                  \
    46 }                                                                                                            \
    47 status = 0;                                                                                                  \
    48 return output;
     38#define FITS_ERROR(STRING,PS_ERROR) \
     39fits_get_errstatus(status, fitsErr); \
     40psError(__func__, STRING, PS_ERROR, fitsErr); \
     41status = 0; \
     42fits_close_file(fd, &status); \
     43if(status){ \
     44    fits_get_errstatus(status, fitsErr); \
     45    psError(__func__, "Couldn't close FITS file. FITS error: %s", fitsErr); \
     46} \
     47status = 0; \
     48psFree(output); \
     49return NULL;
    4950
    5051/** Free and null temporary variables used by config file parser */
     
    372373        psError(__func__, "Null extName and extNum = 0 not allowed");
    373374        return NULL;
    374     } else if (extName && extNum) {
    375         psError(__func__, "Both extName and extNum arguments should not have non zero values.");
     375    } else if (extName && (extNum != -1) ) {
     376        psError(__func__, "If extName specified, extNum arguments should be -1.");
    376377        return NULL;
    377378    }
  • trunk/psLib/src/xml/psXML.c

    r1986 r1995  
    99*  @author Ross Harman, MHPCC
    1010*
    11 *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2004-10-06 22:51:15 $
     11*  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2004-10-07 02:16:36 $
    1313*
    1414*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3636
    3737/** Check for FITS errors */
    38 #define FITS_ERROR(STRING,PS_ERROR)                                                                          \
    39 fits_get_errstatus(status, fitsErr);                                                                         \
    40 psError(__func__, STRING, PS_ERROR, fitsErr);                                                                \
    41 status = 0;                                                                                                  \
    42 fits_close_file(fd, &status);                                                                                \
    43 if(status){                                                                                                  \
    44     fits_get_errstatus(status, fitsErr);                                                                     \
    45     psError(__func__, "Couldn't close FITS file. FITS error: %s", fitsErr);                                  \
    46 }                                                                                                            \
    47 status = 0;                                                                                                  \
    48 return output;
     38#define FITS_ERROR(STRING,PS_ERROR) \
     39fits_get_errstatus(status, fitsErr); \
     40psError(__func__, STRING, PS_ERROR, fitsErr); \
     41status = 0; \
     42fits_close_file(fd, &status); \
     43if(status){ \
     44    fits_get_errstatus(status, fitsErr); \
     45    psError(__func__, "Couldn't close FITS file. FITS error: %s", fitsErr); \
     46} \
     47status = 0; \
     48psFree(output); \
     49return NULL;
    4950
    5051/** Free and null temporary variables used by config file parser */
     
    372373        psError(__func__, "Null extName and extNum = 0 not allowed");
    373374        return NULL;
    374     } else if (extName && extNum) {
    375         psError(__func__, "Both extName and extNum arguments should not have non zero values.");
     375    } else if (extName && (extNum != -1) ) {
     376        psError(__func__, "If extName specified, extNum arguments should be -1.");
    376377        return NULL;
    377378    }
Note: See TracChangeset for help on using the changeset viewer.