Changeset 2206 for trunk/psLib/src/math/psConstants.h
- Timestamp:
- Oct 26, 2004, 3:15:47 PM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/math/psConstants.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/math/psConstants.h
r2204 r2206 6 6 * @author GLG, MHPCC 7 7 * 8 * @version $Revision: 1.1 4$ $Name: not supported by cvs2svn $9 * @date $Date: 2004-10-27 0 0:57:31$8 * @version $Revision: 1.15 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2004-10-27 01:15:47 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 94 94 95 95 /** Preprocessor macro to generate error on an incorrect type */ 96 #define PS_CHECK_VECTOR_TYPE _RETURN_NULL(NAME, TYPE) \96 #define PS_CHECK_VECTOR_TYPE(NAME, TYPE, RVAL) \ 97 97 if (NAME->type.type != TYPE) { \ 98 98 psError(__func__,"Unallowable operation: %s has incorrect type.", #NAME); \ 99 return( NULL); \99 return(RVAL); \ 100 100 } 101 101 102 102 /** Preprocessor macro to generate error on a NULL vector */ 103 #define PS_CHECK_NULL_VECTOR _RETURN_NULL(NAME) \103 #define PS_CHECK_NULL_VECTOR(NAME, RVAL) \ 104 104 if (NAME == NULL || NAME->data.V == NULL) { \ 105 105 psError(__func__,"Unallowable operation: %s or its data is NULL.", #NAME); \ 106 return(NULL); \ 107 } \ 108 109 /** Preprocessor macro to generate error on a NULL vector */ 110 #define PS_CHECK_NULL_VECTOR_RETURN_F0(NAME) \ 111 if (NAME == NULL || NAME->data.V == NULL) { \ 112 psError(__func__,"Unallowable operation: %s or its data is NULL.", #NAME); \ 113 return(0.0); \ 106 return(RVAL); \ 114 107 } \ 115 108 116 109 /** Preprocessor macro to generate error on a NULL poniter */ 117 #define PS_CHECK_NULL_PTR _RETURN_NULL(NAME) \110 #define PS_CHECK_NULL_PTR(NAME, RVAL) \ 118 111 if (NAME == NULL) { \ 119 112 psError(__func__,"Unallowable operation: %s is NULL.", #NAME); \ 120 return(NULL); \ 121 } 122 123 /** Preprocessor macro to generate error on a NULL poniter */ 124 #define PS_CHECK_NULL_PTR_RETURN_F0(NAME) \ 125 if (NAME == NULL) { \ 126 psError(__func__,"Unallowable operation: %s is NULL.", #NAME); \ 127 return(0.0); \ 128 } 129 130 /** Preprocessor macro to generate error on a NULL poniter */ 131 #define PS_CHECK_NULL_PTR_RETURN_ZERO(NAME) \ 132 if (NAME == NULL) { \ 133 psError(__func__,"Unallowable operation: %s is NULL.", #NAME); \ 134 return(0); \ 135 } 113 return(RVAL); \ 114 } 115 116 136 117 137 118 /** Preprocessor macro to generate error for zero length vector */
Note:
See TracChangeset
for help on using the changeset viewer.
