Changeset 1818
- Timestamp:
- Sep 16, 2004, 8:51:32 AM (22 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 9 edited
-
image/psImage.c (modified) (6 diffs)
-
image/psImageErrors.dat (modified) (1 diff)
-
image/psImageErrors.h (modified) (2 diffs)
-
mathtypes/psImage.c (modified) (6 diffs)
-
psErrorCodes.dat (modified) (1 diff)
-
sys/psErrorCodes.c (modified) (2 diffs)
-
sys/psErrorCodes.h (modified) (2 diffs)
-
sysUtils/psErrorCodes.c (modified) (2 diffs)
-
sysUtils/psErrorCodes.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/image/psImage.c
r1653 r1818 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1.4 2$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-0 8-28 01:18:28$12 * @version $Revision: 1.43 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-09-16 18:51:31 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 25 25 #include "psError.h" 26 26 #include "psImage.h" 27 28 #include "psImageErrors.h" 27 29 28 30 static void imageFree(psImage* image); … … 39 41 40 42 if (area < 1) { 41 psError (__func__,42 "Invalid value for number of rows or columns "43 "(numRows=%d, numCols=%d).",44 numRows, numCols);43 psErrorMsg(PS_ERRORNAME_DOMAIN "psImageAlloc", 44 PS_ERR_BAD_PARAMETER_VALUE, true, 45 PS_ERRORTEXT_psImage_AREA_NEGATIVE, 46 numRows, numCols); 45 47 return NULL; 46 48 } … … 128 130 129 131 if (old->type.dimen != PS_DIMEN_IMAGE) { 130 psError(__func__, 131 "Can not realloc image because input is not an image."); 132 psFree(old); 133 psErrorMsg(PS_ERRORNAME_DOMAIN "psImageRecycle", 134 PS_ERR_BAD_PARAMETER_TYPE, true, 135 PS_ERRORTEXT_psImage_NOT_AN_IMAGE); 132 136 return NULL; 133 137 } … … 214 218 215 219 if (input == NULL) { 216 psError(__func__, "Image can not be NULL."); 220 psErrorMsg(PS_ERRORNAME_DOMAIN "psImagePixelInterpolate", 221 PS_ERR_BAD_PARAMETER_NULL,true, 222 PS_ERRORTEXT_psImage_IMAGE_NULL); 217 223 return unexposedValue; 218 224 } 219 #define PSIMAGE_PIXEL_INTERPOLATE_CASE(TYPE) \ 220 case PS_TYPE_##TYPE: \ 221 switch (mode) { \ 222 case PS_INTERPOLATE_FLAT: \ 223 return p_psImagePixelInterpolateFLAT_##TYPE(input,x,y,unexposedValue); \ 224 break; \ 225 case PS_INTERPOLATE_BILINEAR: \ 226 return p_psImagePixelInterpolateBILINEAR_##TYPE(input,x,y,unexposedValue); \ 227 break; \ 228 default: \ 229 psError(__func__,"Unsupported interpolation mode (#%d)",mode); \ 230 } \ 225 226 #define PSIMAGE_PIXEL_INTERPOLATE_CASE(TYPE) \ 227 case PS_TYPE_##TYPE: \ 228 switch (mode) { \ 229 case PS_INTERPOLATE_FLAT: \ 230 return p_psImagePixelInterpolateFLAT_##TYPE(input, x, y, \ 231 unexposedValue); \ 232 break; \ 233 case PS_INTERPOLATE_BILINEAR: \ 234 return p_psImagePixelInterpolateBILINEAR_##TYPE(input,x,y, \ 235 unexposedValue); \ 236 break; \ 237 default: \ 238 psErrorMsg(PS_ERRORNAME_DOMAIN "psImagePixelInterpolate", \ 239 PS_ERR_BAD_PARAMETER_VALUE,true, \ 240 PS_ERRORTEXT_psImage_INTERPOLATE_METHOD_INVALID, \ 241 mode); \ 242 } \ 231 243 break 232 244 … … 245 257 PSIMAGE_PIXEL_INTERPOLATE_CASE(C64); 246 258 default: 247 psError(__func__, "Unsupported image datatype (%d)", input->type.type); 259 psErrorMsg(PS_ERRORNAME_DOMAIN "psImagePixelInterpolate", 260 PS_ERR_BAD_PARAMETER_TYPE,true, 261 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED, 262 input->type.type); 248 263 } 249 264 -
trunk/psLib/src/image/psImageErrors.dat
r1787 r1818 7 7 # N.B. in code, the ERRORNAME appears as PS_ERRORTEXT_ERRORNAME 8 8 #################################################################### 9 # psImage 10 psImage_AREA_NEGATIVE Specified number of rows (%d) or columns (%d) is invalid. 11 psImage_NOT_AN_IMAGE The input psImage must have a PS_DIMEN_IMAGE dimension type. 12 psImage_IMAGE_NULL Can not operate on a NULL psImage. 13 psImage_IMAGE_TYPE_UNSUPPORTED Specified psImage type (%d) is not supported. 14 psImage_INTERPOLATE_METHOD_INVALID Specified interpolation method (%d) is not supported. -
trunk/psLib/src/image/psImageErrors.h
r1787 r1818 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1. 1$ $Name: not supported by cvs2svn $10 * @date $Date: 2004-09-1 1 00:43:54$9 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2004-09-16 18:51:31 $ 11 11 * 12 12 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 30 30 31 31 //~Start #define PS_ERRORTEXT_$1 "$2" 32 #define PS_ERRORTEXT_psImage_AREA_NEGATIVE "Specified number of rows (%d) or columns (%d) is invalid." 33 #define PS_ERRORTEXT_psImage_NOT_AN_IMAGE "The input psImage must have a PS_DIMEN_IMAGE dimension type." 34 #define PS_ERRORTEXT_psImage_IMAGE_NULL "Can not operate on a NULL psImage." 35 #define PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED "Specified psImage type (%d) is not supported." 36 #define PS_ERRORTEXT_psImage_INTERPOLATE_METHOD_INVALID "Specified interpolation method (%d) is not supported." 32 37 //~End 33 38 -
trunk/psLib/src/mathtypes/psImage.c
r1653 r1818 10 10 * @author Ross Harman, MHPCC 11 11 * 12 * @version $Revision: 1.4 2$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-0 8-28 01:18:28$12 * @version $Revision: 1.43 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-09-16 18:51:31 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 25 25 #include "psError.h" 26 26 #include "psImage.h" 27 28 #include "psImageErrors.h" 27 29 28 30 static void imageFree(psImage* image); … … 39 41 40 42 if (area < 1) { 41 psError (__func__,42 "Invalid value for number of rows or columns "43 "(numRows=%d, numCols=%d).",44 numRows, numCols);43 psErrorMsg(PS_ERRORNAME_DOMAIN "psImageAlloc", 44 PS_ERR_BAD_PARAMETER_VALUE, true, 45 PS_ERRORTEXT_psImage_AREA_NEGATIVE, 46 numRows, numCols); 45 47 return NULL; 46 48 } … … 128 130 129 131 if (old->type.dimen != PS_DIMEN_IMAGE) { 130 psError(__func__, 131 "Can not realloc image because input is not an image."); 132 psFree(old); 133 psErrorMsg(PS_ERRORNAME_DOMAIN "psImageRecycle", 134 PS_ERR_BAD_PARAMETER_TYPE, true, 135 PS_ERRORTEXT_psImage_NOT_AN_IMAGE); 132 136 return NULL; 133 137 } … … 214 218 215 219 if (input == NULL) { 216 psError(__func__, "Image can not be NULL."); 220 psErrorMsg(PS_ERRORNAME_DOMAIN "psImagePixelInterpolate", 221 PS_ERR_BAD_PARAMETER_NULL,true, 222 PS_ERRORTEXT_psImage_IMAGE_NULL); 217 223 return unexposedValue; 218 224 } 219 #define PSIMAGE_PIXEL_INTERPOLATE_CASE(TYPE) \ 220 case PS_TYPE_##TYPE: \ 221 switch (mode) { \ 222 case PS_INTERPOLATE_FLAT: \ 223 return p_psImagePixelInterpolateFLAT_##TYPE(input,x,y,unexposedValue); \ 224 break; \ 225 case PS_INTERPOLATE_BILINEAR: \ 226 return p_psImagePixelInterpolateBILINEAR_##TYPE(input,x,y,unexposedValue); \ 227 break; \ 228 default: \ 229 psError(__func__,"Unsupported interpolation mode (#%d)",mode); \ 230 } \ 225 226 #define PSIMAGE_PIXEL_INTERPOLATE_CASE(TYPE) \ 227 case PS_TYPE_##TYPE: \ 228 switch (mode) { \ 229 case PS_INTERPOLATE_FLAT: \ 230 return p_psImagePixelInterpolateFLAT_##TYPE(input, x, y, \ 231 unexposedValue); \ 232 break; \ 233 case PS_INTERPOLATE_BILINEAR: \ 234 return p_psImagePixelInterpolateBILINEAR_##TYPE(input,x,y, \ 235 unexposedValue); \ 236 break; \ 237 default: \ 238 psErrorMsg(PS_ERRORNAME_DOMAIN "psImagePixelInterpolate", \ 239 PS_ERR_BAD_PARAMETER_VALUE,true, \ 240 PS_ERRORTEXT_psImage_INTERPOLATE_METHOD_INVALID, \ 241 mode); \ 242 } \ 231 243 break 232 244 … … 245 257 PSIMAGE_PIXEL_INTERPOLATE_CASE(C64); 246 258 default: 247 psError(__func__, "Unsupported image datatype (%d)", input->type.type); 259 psErrorMsg(PS_ERRORNAME_DOMAIN "psImagePixelInterpolate", 260 PS_ERR_BAD_PARAMETER_TYPE,true, 261 PS_ERRORTEXT_psImage_IMAGE_TYPE_UNSUPPORTED, 262 input->type.type); 248 263 } 249 264 -
trunk/psLib/src/psErrorCodes.dat
r1807 r1818 13 13 MEMORY_DEREF_USAGE dereferenced memory still used 14 14 BAD_PARAMETER_VALUE parameter is out-of-range 15 BAD_PARAMETER_TYPE parameter is of unsupported data-type15 BAD_PARAMETER_TYPE parameter is of unsupported type 16 16 BAD_PARAMETER_NULL parameter is null 17 17 BAD_PARAMETER_SIZE size of parameter's data is outside of acceptable range. -
trunk/psLib/src/sys/psErrorCodes.c
r1807 r1818 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $10 * @date $Date: 2004-09-1 4 20:01:52 $9 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2004-09-16 18:51:32 $ 11 11 * 12 12 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 38 38 {PS_ERR_MEMORY_DEREF_USAGE,"dereferenced memory still used"}, 39 39 {PS_ERR_BAD_PARAMETER_VALUE,"parameter is out-of-range"}, 40 {PS_ERR_BAD_PARAMETER_TYPE,"parameter is of unsupported data-type"},40 {PS_ERR_BAD_PARAMETER_TYPE,"parameter is of unsupported type"}, 41 41 {PS_ERR_BAD_PARAMETER_NULL,"parameter is null"}, 42 42 {PS_ERR_BAD_PARAMETER_SIZE,"size of parameter's data is outside of acceptable range."}, -
trunk/psLib/src/sys/psErrorCodes.h
r1807 r1818 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1. 8$ $Name: not supported by cvs2svn $10 * @date $Date: 2004-09-1 4 20:01:52 $9 * @version $Revision: 1.9 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2004-09-16 18:51:32 $ 11 11 * 12 12 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 47 47 PS_ERR_MEMORY_DEREF_USAGE, ///< dereferenced memory still used 48 48 PS_ERR_BAD_PARAMETER_VALUE, ///< parameter is out-of-range 49 PS_ERR_BAD_PARAMETER_TYPE, ///< parameter is of unsupported data-type49 PS_ERR_BAD_PARAMETER_TYPE, ///< parameter is of unsupported type 50 50 PS_ERR_BAD_PARAMETER_NULL, ///< parameter is null 51 51 PS_ERR_BAD_PARAMETER_SIZE, ///< size of parameter's data is outside of acceptable range. -
trunk/psLib/src/sysUtils/psErrorCodes.c
r1807 r1818 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1. 6$ $Name: not supported by cvs2svn $10 * @date $Date: 2004-09-1 4 20:01:52 $9 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2004-09-16 18:51:32 $ 11 11 * 12 12 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 38 38 {PS_ERR_MEMORY_DEREF_USAGE,"dereferenced memory still used"}, 39 39 {PS_ERR_BAD_PARAMETER_VALUE,"parameter is out-of-range"}, 40 {PS_ERR_BAD_PARAMETER_TYPE,"parameter is of unsupported data-type"},40 {PS_ERR_BAD_PARAMETER_TYPE,"parameter is of unsupported type"}, 41 41 {PS_ERR_BAD_PARAMETER_NULL,"parameter is null"}, 42 42 {PS_ERR_BAD_PARAMETER_SIZE,"size of parameter's data is outside of acceptable range."}, -
trunk/psLib/src/sysUtils/psErrorCodes.h
r1807 r1818 7 7 * @author Robert DeSonia, MHPCC 8 8 * 9 * @version $Revision: 1. 8$ $Name: not supported by cvs2svn $10 * @date $Date: 2004-09-1 4 20:01:52 $9 * @version $Revision: 1.9 $ $Name: not supported by cvs2svn $ 10 * @date $Date: 2004-09-16 18:51:32 $ 11 11 * 12 12 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 47 47 PS_ERR_MEMORY_DEREF_USAGE, ///< dereferenced memory still used 48 48 PS_ERR_BAD_PARAMETER_VALUE, ///< parameter is out-of-range 49 PS_ERR_BAD_PARAMETER_TYPE, ///< parameter is of unsupported data-type49 PS_ERR_BAD_PARAMETER_TYPE, ///< parameter is of unsupported type 50 50 PS_ERR_BAD_PARAMETER_NULL, ///< parameter is null 51 51 PS_ERR_BAD_PARAMETER_SIZE, ///< size of parameter's data is outside of acceptable range.
Note:
See TracChangeset
for help on using the changeset viewer.
