IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 27, 2004, 11:55:09 AM (22 years ago)
Author:
gusciora
Message:

Added function parameter checking for psStats.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/math/psConstants.h

    r2218 r2220  
    66 *  @author GLG, MHPCC
    77 *
    8  *  @version $Revision: 1.26 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-10-27 21:25:52 $
     8 *  @version $Revision: 1.27 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2004-10-27 21:55:09 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    3535    return(RVAL); \
    3636}
     37
     38#define PS_INT_CHECK_POSITIVE(NAME, RVAL) \
     39if (NAME < 1) { \
     40    psError(__func__,"%s is 0 or less.", #NAME); \
     41    return(RVAL); \
     42}
     43
     44#define PS_INT_COMPARE(NAME1, NAME2, RVAL) \
     45if (NAME1 < NAME2) { \
     46    psError(__func__,"%s is less than %s (%d < %D).", #NAME1, #NAME2, NAME1, NAME2); \
     47    return(RVAL); \
     48}
     49
    3750
    3851#define PS_FLOAT_COMPARE(NAME1, NAME2, RVAL) \
Note: See TracChangeset for help on using the changeset viewer.