Index: trunk/psLib/src/collections/psVector.c
===================================================================
--- trunk/psLib/src/collections/psVector.c	(revision 4392)
+++ trunk/psLib/src/collections/psVector.c	(revision 4409)
@@ -9,6 +9,6 @@
 *  @author Robert DeSonia, MHPCC
 *
-*  @version $Revision: 1.44 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-06-25 02:02:05 $
+*  @version $Revision: 1.45 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-06-28 20:17:52 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -48,13 +48,13 @@
 // FUNCTION IMPLEMENTATION - PUBLIC
 
-psVector* psVectorAlloc(psU32 nalloc, psElemType elemType)
+psVector* psVectorAlloc(unsigned long nalloc, psElemType type)
 {
     psVector* psVec = NULL;
     psS32 elementSize = 0;
 
-    elementSize = PSELEMTYPE_SIZEOF(elemType);
+    elementSize = PSELEMTYPE_SIZEOF(type);
     if (elementSize < 1) {
         psError(PS_ERR_BAD_PARAMETER_TYPE, true,
-                PS_ERRORTEXT_psVector_UNSUPPORTED_TYPE, elemType);
+                PS_ERRORTEXT_psVector_UNSUPPORTED_TYPE, type);
         return NULL;
     }
@@ -66,5 +66,5 @@
 
     psVec->type.dimen = PS_DIMEN_VECTOR;
-    psVec->type.type = elemType;
+    psVec->type.type = type;
     *(int*)&psVec->nalloc = nalloc;
     psVec->n = nalloc;
@@ -76,38 +76,38 @@
 }
 
-psVector* psVectorRealloc(psVector* in, psU32 nalloc)
+psVector* psVectorRealloc(psVector* vector, unsigned long nalloc)
 {
     psS32 elementSize = 0;
     psElemType elemType;
 
-    if (in == NULL) {
+    if (vector == NULL) {
         psError(PS_ERR_BAD_PARAMETER_NULL, true,
                 PS_ERRORTEXT_psVector_REALLOC_NULL);
         return NULL;
-    } else if (in->nalloc != nalloc) {     // No need to realloc to same size
-        elemType = in->type.type;
+    } else if (vector->nalloc != nalloc) {     // No need to realloc to same size
+        elemType = vector->type.type;
         elementSize = PSELEMTYPE_SIZEOF(elemType);
-        if (nalloc < in->n) {
-            in->n = nalloc;
+        if (nalloc < vector->n) {
+            vector->n = nalloc;
         }
         // Realloc after decrementation to avoid accessing freed array elements
-        in->data.U8 = psRealloc(in->data.U8, nalloc * elementSize);
-        *(int*)&in->nalloc = nalloc;
-    }
-
-    return in;
-}
-
-psVector* psVectorRecycle(psVector* in, psU32 n, psElemType type)
+        vector->data.U8 = psRealloc(vector->data.U8, nalloc * elementSize);
+        *(int*)&vector->nalloc = nalloc;
+    }
+
+    return vector;
+}
+
+psVector* psVectorRecycle(psVector* vector, unsigned long nalloc, psElemType type)
 {
     psS32 byteSize;
 
-    if (in == NULL) {
-        return psVectorAlloc(n, type);
-    }
-
-    if (in->type.dimen !=  PS_DIMEN_VECTOR &&
-            in->type.dimen !=  PS_DIMEN_TRANSV) {
-        psFree(in);
+    if (vector == NULL) {
+        return psVectorAlloc(nalloc, type);
+    }
+
+    if (vector->type.dimen !=  PS_DIMEN_VECTOR &&
+            vector->type.dimen !=  PS_DIMEN_TRANSV) {
+        psFree(vector);
         psError(PS_ERR_BAD_PARAMETER_TYPE, true,
                 PS_ERRORTEXT_psVector_NOT_A_VECTOR);
@@ -115,16 +115,16 @@
     }
 
-    byteSize = n * PSELEMTYPE_SIZEOF(type);
+    byteSize = nalloc * PSELEMTYPE_SIZEOF(type);
 
     // need to increase data buffer?
-    if (byteSize > in->nalloc*PSELEMTYPE_SIZEOF(in->type.type)) {
-        in->data.U8 = psRealloc(in->data.U8, byteSize);
-        *(int*)&in->nalloc = n;
-    }
-
-    in->type.dimen = PS_DIMEN_VECTOR;
-    in->type.type = type;
-    in->n = n;
-    return in;
+    if (byteSize > vector->nalloc*PSELEMTYPE_SIZEOF(vector->type.type)) {
+        vector->data.U8 = psRealloc(vector->data.U8, byteSize);
+        *(int*)&vector->nalloc = nalloc;
+    }
+
+    vector->type.dimen = PS_DIMEN_VECTOR;
+    vector->type.type = type;
+    vector->n = nalloc;
+    return vector;
 }
 
