Changeset 1807 for trunk/psLib/src/collections/psScalar.c
- Timestamp:
- Sep 14, 2004, 10:01:52 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/collections/psScalar.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/collections/psScalar.c
r1648 r1807 1 2 1 /** @file psScalar.c 3 2 * … … 9 8 * @author Ross Harman, MHPCC 10 9 * 11 * @version $Revision: 1. 9$ $Name: not supported by cvs2svn $12 * @date $Date: 2004-0 8-27 23:34:05$10 * @version $Revision: 1.10 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2004-09-14 20:01:52 $ 13 12 * 14 13 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii 15 14 */ 16 15 17 /******************************************************************************/18 19 /* INCLUDE FILES */20 21 /******************************************************************************/22 16 #include "psMemory.h" 23 17 #include "psError.h" … … 26 20 #include "psAbort.h" 27 21 28 /******************************************************************************/ 22 #include "psCollectionsErrors.h" 29 23 30 /* DEFINE STATEMENTS */31 32 /******************************************************************************/33 34 // None35 36 /******************************************************************************/37 38 /* TYPE DEFINITIONS */39 40 /******************************************************************************/41 42 // None43 44 /*****************************************************************************/45 46 /* GLOBAL VARIABLES */47 48 /*****************************************************************************/49 50 // None51 52 /*****************************************************************************/53 54 /* FILE STATIC VARIABLES */55 56 /*****************************************************************************/57 58 // None59 60 /*****************************************************************************/61 62 /* FUNCTION IMPLEMENTATION - LOCAL */63 64 /*****************************************************************************/65 66 // None67 68 /*****************************************************************************/69 70 /* FUNCTION IMPLEMENTATION - PUBLIC */71 72 /*****************************************************************************/73 24 psScalar* psScalarAlloc(psC64 value, psElemType dataType) 74 25 { … … 77 28 // Create scalar 78 29 scalar = (psScalar* ) psAlloc(sizeof(psScalar)); 79 if (scalar == NULL) {80 psAbort(__func__, " : Line %d - Failed to allocate memory", __LINE__);81 }82 30 83 31 scalar->type.dimen = PS_DIMEN_SCALAR; … … 122 70 break; 123 71 default: 124 psError(__func__, ": Line %d - Invalid PS_TYPE: %d", __LINE__, dataType); 72 psErrorMsg(PS_ERRORNAME_DOMAIN "psScalarAlloc", 73 PS_ERR_BAD_PARAMETER_TYPE, true, 74 PS_ERRORTEXT_psScalar_UNSUPPORTED_TYPE, 75 dataType); 125 76 } 126 77 … … 134 85 135 86 if (scalar == NULL) { 136 psError(__func__, "Null scalar not allowed"); 87 psErrorMsg(PS_ERRORNAME_DOMAIN "psScalarCopy", 88 PS_ERR_BAD_PARAMETER_NULL, true, 89 PS_ERRORTEXT_psScalar_COPY_NULL); 90 return NULL; 137 91 } 138 92 … … 176 130 break; 177 131 default: 178 psError(__func__, ": Line %d - Invalid PS_TYPE: %d", __LINE__, dataType); 132 psErrorMsg(PS_ERRORNAME_DOMAIN "psScalarCopy", 133 PS_ERR_BAD_PARAMETER_TYPE, true, 134 PS_ERRORTEXT_psScalar_UNSUPPORTED_TYPE, 135 dataType); 179 136 } 180 137
Note:
See TracChangeset
for help on using the changeset viewer.
