Changeset 668 for trunk/psLib/src/collections/psVector.c
- Timestamp:
- May 13, 2004, 10:25:00 AM (22 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/collections/psVector.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/collections/psVector.c
r645 r668 19 19 * @author Ross Harman, MHPCC 20 20 * 21 * @version $Revision: 1. 1$ $Name: not supported by cvs2svn $22 * @date $Date: 2004-05-1 2 18:07:22$21 * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $ 22 * @date $Date: 2004-05-13 20:25:00 $ 23 23 * 24 24 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 91 91 /* FUNCTION IMPLEMENTATION - PUBLIC */ 92 92 /*****************************************************************************/ 93 psVector* psVectorAlloc(psType type, int nalloc) 94 { 93 psVector* psVectorAlloc(psElemType elemType, int nalloc) 94 { 95 psVector *psVec = NULL; 95 96 psElemType vecType = 0; 96 psDimen vecDim = 0; 97 psVector *psVec = NULL; 98 99 vecType = type.type; 100 vecDim = type.dimen; 97 98 vecType = elemType; 101 99 102 100 // Invalid nalloc … … 159 157 vecType = psVec->type.type; 160 158 159 // Invalid nalloc 160 if(nalloc < 0) { 161 psError(__func__, " : Line %d - Invalid value for nalloc. nalloc: %d\n", __LINE__, nalloc); 162 return NULL; 163 } 164 161 165 if(psVec == NULL) { // For creating new psVector 162 psVec = psVectorAlloc(psVec->type , nalloc);166 psVec = psVectorAlloc(psVec->type.type, nalloc); 163 167 } else if(psVec->nalloc != nalloc) { // No need to realloc to same size 164 168 switch (vecType) {
Note:
See TracChangeset
for help on using the changeset viewer.
