IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 27, 2004, 10:07:17 AM (22 years ago)
Author:
gusciora
Message:

I've been unifying the naming conventions for various macros that check
functions parameters for type, size, non-NULL ...

File:
1 edited

Legend:

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

    r2211 r2212  
    66 *  @author GLG, MHPCC
    77 *
    8  *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2004-10-27 19:58:54 $
     8 *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2004-10-27 20:07:17 $
    1010 *
    1111 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    9595
    9696/*****************************************************************************
    97  
     97Macros which take a generic psLib type and determine if it is NULL, or has
     98the wrong type.
    9899*****************************************************************************/
    99 #define PS_CHECK_NULL_PTR(NAME, RVAL) \
     100#define PS_PTR_CHECK_NULL(NAME, RVAL) \
    100101if (NAME == NULL) { \
    101102    psError(__func__,"Unallowable operation: %s is NULL.", #NAME); \
     
    103104}
    104105
    105 /*****************************************************************************
    106  
    107  *****************************************************************************/
    108 #define VECTOR_CHECK_TYPE_F32_OR_F64(VEC, RVAL) \
     106#define PS_PTR_CHECK_TYPE(NAME, TYPE, RVAL) \
     107if (NAME->type.type != TYPE) { \
     108    psError(__func__,"Unallowable operation: %s has incorrect type.", #NAME); \
     109    return(RVAL); \
     110}
     111/*****************************************************************************
     112 
     113 *****************************************************************************/
     114#define PS_VECTOR_CHECK_TYPE_F32_OR_F64(VEC, RVAL) \
    109115if ((VEC->type.type != PS_TYPE_F32) && (VEC->type.type != PS_TYPE_F64)) { \
    110116    psAbort(__func__, "Bad type for VEC (%d)", VEC->type.type); \
Note: See TracChangeset for help on using the changeset viewer.