Index: /trunk/psLib/pslib.kdevses
===================================================================
--- /trunk/psLib/pslib.kdevses	(revision 4492)
+++ /trunk/psLib/pslib.kdevses	(revision 4493)
@@ -2,17 +2,20 @@
 <!DOCTYPE KDevPrjSession>
 <KDevPrjSession>
- <DocsAndViews NumberOfDocuments="4" >
-  <Doc0 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/dataManip/psFunctions.h" >
-   <View0 line="263" Type="Source" />
+ <DocsAndViews NumberOfDocuments="5" >
+  <Doc0 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/sysUtils/psType.h" >
+   <View0 line="296" Type="Source" />
   </Doc0>
-  <Doc1 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/dataManip/psFunctions.c" >
-   <View0 line="1597" Type="Source" />
+  <Doc1 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/collections/psVector.h" >
+   <View0 line="102" Type="Source" />
   </Doc1>
-  <Doc2 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/collections/psVector.h" >
-   <View0 line="53" Type="Source" />
+  <Doc2 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/collections/psVector.c" >
+   <View0 line="130" Type="Source" />
   </Doc2>
   <Doc3 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/image/psImage.h" >
-   <View0 line="79" Type="Source" />
+   <View0 line="149" Type="Source" />
   </Doc3>
+  <Doc4 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/psLib/src/image/psImage.c" >
+   <View0 line="151" Type="Source" />
+  </Doc4>
  </DocsAndViews>
  <pluginList>
Index: /trunk/psLib/src/collections/psScalar.h
===================================================================
--- /trunk/psLib/src/collections/psScalar.h	(revision 4492)
+++ /trunk/psLib/src/collections/psScalar.h	(revision 4493)
@@ -11,6 +11,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-28 20:17:52 $
+ *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-07-07 02:17:53 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -32,5 +32,5 @@
 typedef struct
 {
-    psType type;                ///< Type of data.
+    psMathType type;            ///< Type of data.
 
     union {
Index: /trunk/psLib/src/collections/psVector.c
===================================================================
--- /trunk/psLib/src/collections/psVector.c	(revision 4492)
+++ /trunk/psLib/src/collections/psVector.c	(revision 4493)
@@ -9,6 +9,6 @@
 *  @author Robert DeSonia, MHPCC
 *
-*  @version $Revision: 1.45 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-06-28 20:17:52 $
+*  @version $Revision: 1.46 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-07-07 02:17:53 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -48,5 +48,5 @@
 // FUNCTION IMPLEMENTATION - PUBLIC
 
-psVector* psVectorAlloc(unsigned long nalloc, psElemType type)
+psVector* psVectorAlloc( long nalloc, psElemType type)
 {
     psVector* psVec = NULL;
@@ -67,5 +67,5 @@
     psVec->type.dimen = PS_DIMEN_VECTOR;
     psVec->type.type = type;
-    *(int*)&psVec->nalloc = nalloc;
+    *(long*)&psVec->nalloc = nalloc;
     psVec->n = nalloc;
 
@@ -76,5 +76,5 @@
 }
 
-psVector* psVectorRealloc(psVector* vector, unsigned long nalloc)
+psVector* psVectorRealloc(psVector* vector, long nalloc)
 {
     psS32 elementSize = 0;
@@ -93,5 +93,5 @@
         // Realloc after decrementation to avoid accessing freed array elements
         vector->data.U8 = psRealloc(vector->data.U8, nalloc * elementSize);
-        *(int*)&vector->nalloc = nalloc;
+        *(long*)&vector->nalloc = nalloc;
     }
 
@@ -99,5 +99,5 @@
 }
 
-psVector* psVectorRecycle(psVector* vector, unsigned long nalloc, psElemType type)
+psVector* psVectorRecycle(psVector* vector, long nalloc, psElemType type)
 {
     psS32 byteSize;
@@ -120,5 +120,5 @@
     if (byteSize > vector->nalloc*PSELEMTYPE_SIZEOF(vector->type.type)) {
         vector->data.U8 = psRealloc(vector->data.U8, byteSize);
-        *(int*)&vector->nalloc = nalloc;
+        *(long*)&vector->nalloc = nalloc;
     }
 
Index: /trunk/psLib/src/collections/psVector.h
===================================================================
--- /trunk/psLib/src/collections/psVector.h	(revision 4492)
+++ /trunk/psLib/src/collections/psVector.h	(revision 4493)
@@ -11,6 +11,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.37 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-28 20:17:52 $
+ *  @version $Revision: 1.38 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-07-07 02:17:53 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -51,8 +51,9 @@
 typedef struct
 {
-    psType type;                       ///< Type of data.
-    int n;                             ///< Number of elements in use.
-    const int nalloc;                  ///< Total number of elements available.
+    psMathType type;                       ///< Type of data.
+    long n;                            ///< Number of elements in use.
+    const long nalloc;                 ///< Total number of elements available.
     p_psVectorData data;               ///< Union for data types.
+    void *lock;                        ///< Optional lock for thread safety.
 }
 psVector;
@@ -73,7 +74,8 @@
  */
 psVector* psVectorAlloc(
-    unsigned long nalloc,              ///< Total number of elements to make available.
+    long nalloc,                       ///< Total number of elements to make available.
     psElemType type                    ///< Type of data to be held by vector.
-);
+)
+;
 
 /** Reallocate a vector.
@@ -88,5 +90,5 @@
 psVector* psVectorRealloc(
     psVector* vector,                  ///< Vector to reallocate.
-    unsigned long nalloc               ///< Total number of elements to make available.
+    long nalloc                        ///< Total number of elements to make available.
 );
 
@@ -120,5 +122,5 @@
     ///< taken to preserve the values.
 
-    unsigned long nalloc,              ///< Total number of elements to make available.
+    long nalloc,                       ///< Total number of elements to make available.
     psElemType type                    ///< the datatype of the returned vector
 );
Index: /trunk/psLib/src/image/psImage.c
===================================================================
--- /trunk/psLib/src/image/psImage.c	(revision 4492)
+++ /trunk/psLib/src/image/psImage.c	(revision 4493)
@@ -9,6 +9,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.72 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-28 20:17:52 $
+ *  @version $Revision: 1.73 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-07-07 02:17:53 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -91,8 +91,8 @@
 }
 
-psRegion psRegionSet(psF32 x0,
-                     psF32 x1,
-                     psF32 y0,
-                     psF32 y1)
+psRegion psRegionSet(float x0,
+                     float x1,
+                     float y0,
+                     float y1)
 {
     psRegion out;
Index: /trunk/psLib/src/image/psImage.h
===================================================================
--- /trunk/psLib/src/image/psImage.h	(revision 4492)
+++ /trunk/psLib/src/image/psImage.h	(revision 4493)
@@ -11,6 +11,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.59 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-28 20:17:52 $
+ *  @version $Revision: 1.60 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-07-07 02:17:53 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -51,5 +51,5 @@
 typedef struct psImage
 {
-    const psType type;                 ///< Image data type and dimension.
+    const psMathType type;                 ///< Image data type and dimension.
     const psU32 numCols;               ///< Number of columns in image
     const psU32 numRows;               ///< Number of rows in image.
@@ -87,8 +87,8 @@
 typedef struct
 {
-    psF32 x0;                         ///< the first column of the region.
-    psF32 x1;                         ///< the last column of the region.
-    psF32 y0;                         ///< the first row of the region.
-    psF32 y1;                         ///< the last row of the region.
+    float x0;                         ///< the first column of the region.
+    float x1;                         ///< the last column of the region.
+    float y0;                         ///< the first row of the region.
+    float y1;                         ///< the last row of the region.
 }
 psRegion;
@@ -113,8 +113,8 @@
  */
 psRegion psRegionSet(
-    psF32 x0,                         ///< the first column of the region.
-    psF32 x1,                         ///< the last column of the region + 1.
-    psF32 y0,                         ///< the first row of the region.
-    psF32 y1                          ///< the last row of the region + 1.
+    float x0,                         ///< the first column of the region.
+    float x1,                         ///< the last column of the region + 1.
+    float y0,                         ///< the first row of the region.
+    float y1                          ///< the last row of the region + 1.
 );
 
@@ -152,5 +152,5 @@
 
 /** Copy an image to a new buffer
- *  
+ *
  *  @return True if image copied or false if error
  */
Index: /trunk/psLib/src/image/psImageStructManip.c
===================================================================
--- /trunk/psLib/src/image/psImageStructManip.c	(revision 4492)
+++ /trunk/psLib/src/image/psImageStructManip.c	(revision 4493)
@@ -8,6 +8,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-05-19 05:18:20 $
+ *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-07-07 02:17:53 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -94,5 +94,5 @@
 
     out->data.V = psRealloc(out->data.V,sizeof(psPtr)*numRows); // resize row pointer array
-    *(psType*)&out->type = image->type;
+    *(psMathType*)&out->type = image->type;
     *(psU32*)&out->numCols = numCols;
     *(psU32*)&out->numRows = numRows;
Index: /trunk/psLib/src/sysUtils/psType.h
===================================================================
--- /trunk/psLib/src/sysUtils/psType.h	(revision 4492)
+++ /trunk/psLib/src/sysUtils/psType.h	(revision 4493)
@@ -10,6 +10,6 @@
 *  @author Ross Harman, MHPCC
 *
-*  @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-07-01 03:57:39 $
+*  @version $Revision: 1.37 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-07-07 02:17:53 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -278,8 +278,16 @@
 typedef struct
 {
-    psElemType type;            ///< Primitive type.
-    psDimen dimen;              ///< Dimensionality.
+    psElemType type;                   ///< Primitive type.
+    psDimen dimen;                     ///< Dimensionality.
 }
 psType;
+
+typedef struct
+{
+    psElemType type;                   ///< The type
+    psDimen dimen;                     ///< The dimensionality.
+    //    psElemType type;                   ///< The type
+}
+psMathType;
 
 /** The type of a basic data type
@@ -291,5 +299,5 @@
 typedef struct
 {
-    psType  type;              ///< Data type information
+    psMathType type;              ///< Data type information
 }
 psMath;
Index: /trunk/psLib/test/collections/tst_psVector.c
===================================================================
--- /trunk/psLib/test/collections/tst_psVector.c	(revision 4492)
+++ /trunk/psLib/test/collections/tst_psVector.c	(revision 4493)
@@ -14,6 +14,6 @@
  *  @author  Ross Harman, MHPCC
  *
- *  @version $Revision: 1.9 $  $Name: not supported by cvs2svn $
- *  @date  $Date: 2005-06-10 21:46:46 $
+ *  @version $Revision: 1.10 $  $Name: not supported by cvs2svn $
+ *  @date  $Date: 2005-07-07 02:17:53 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -54,9 +54,9 @@
     }
     if (psVec->nalloc != 5) {
-        fprintf(stderr,"Vector size = %d\n", psVec->nalloc);
+        fprintf(stderr,"Vector size = %ld\n", psVec->nalloc);
         return 1;
     }
     if (psVec->n != psVec->nalloc) {
-        fprintf(stderr,"Vector population = %d\n", psVec->n);
+        fprintf(stderr,"Vector population = %ld\n", psVec->n);
         return 2;
     }
@@ -82,9 +82,9 @@
     }
     if (vecZero->nalloc != 0) {
-        fprintf(stderr,"Vector size = %d\n", vecZero->nalloc);
+        fprintf(stderr,"Vector size = %ld\n", vecZero->nalloc);
         return 6;
     }
     if (vecZero->n != vecZero->nalloc) {
-        fprintf(stderr,"Vector population = %d\n", vecZero->n);
+        fprintf(stderr,"Vector population = %ld\n", vecZero->n);
         return 7;
     }
@@ -122,9 +122,9 @@
     }
     if (psVec->nalloc != 10) {
-        fprintf(stderr,"Vector size = %d\n", psVec->nalloc);
+        fprintf(stderr,"Vector size = %ld\n", psVec->nalloc);
         return 1;
     }
     if (psVec->n != 5) {
-        fprintf(stderr,"Vector population = %d\n", psVec->n);
+        fprintf(stderr,"Vector population = %ld\n", psVec->n);
         return 2;
     }
@@ -158,9 +158,9 @@
     }
     if (psVec->nalloc != 3) {
-        fprintf(stderr,"Vector size = %d\n", psVec->nalloc);
+        fprintf(stderr,"Vector size = %ld\n", psVec->nalloc);
         return 10;
     }
     if (psVec->n != 3) {
-        fprintf(stderr,"Vector population = %d\n", psVec->n);
+        fprintf(stderr,"Vector population = %ld\n", psVec->n);
         return 11;
     }
@@ -179,9 +179,9 @@
     }
     if (psVec->nalloc != 0) {
-        fprintf(stderr,"Vector size = %d\n", psVec->nalloc);
+        fprintf(stderr,"Vector size = %ld\n", psVec->nalloc);
         return 21;
     }
     if (psVec->n != 0) {
-        fprintf(stderr,"Vector population = %d\n", psVec->n);
+        fprintf(stderr,"Vector population = %ld\n", psVec->n);
         return 22;
     }
@@ -216,9 +216,9 @@
     }
     if (psVec->nalloc != 5) { // no growth should occur
-        fprintf(stderr,"Vector size = %d\n", psVec->nalloc);
+        fprintf(stderr,"Vector size = %ld\n", psVec->nalloc);
         return 3;
     }
     if (psVec->n != 2) {
-        fprintf(stderr,"Vector population = %d\n", psVec->n);
+        fprintf(stderr,"Vector population = %ld\n", psVec->n);
         return 4;
     }
@@ -230,9 +230,9 @@
     }
     if (psVec->nalloc != 15) { // growth should occur
-        fprintf(stderr,"Vector size = %d\n", psVec->nalloc);
+        fprintf(stderr,"Vector size = %ld\n", psVec->nalloc);
         return 11;
     }
     if (psVec->n != 4) {
-        fprintf(stderr,"Vector population = %d\n", psVec->n);
+        fprintf(stderr,"Vector population = %ld\n", psVec->n);
         return 12;
     }
@@ -244,9 +244,9 @@
     }
     if (psVec->nalloc != 15) { // no growth
-        fprintf(stderr,"Vector size = %d\n", psVec->nalloc);
+        fprintf(stderr,"Vector size = %ld\n", psVec->nalloc);
         return 21;
     }
     if (psVec->n != 2) {
-        fprintf(stderr,"Vector population = %d\n", psVec->n);
+        fprintf(stderr,"Vector population = %ld\n", psVec->n);
         return 22;
     }
@@ -258,9 +258,9 @@
     }
     if (psVec->nalloc != 15) { // no growth
-        fprintf(stderr,"Vector size = %d\n", psVec->nalloc);
+        fprintf(stderr,"Vector size = %ld\n", psVec->nalloc);
         return 31;
     }
     if (psVec->n != 0) {
-        fprintf(stderr,"Vector population = %d\n", psVec->n);
+        fprintf(stderr,"Vector population = %ld\n", psVec->n);
         return 32;
     }
Index: /trunk/psLib/test/dataManip/tst_psHist00.c
===================================================================
--- /trunk/psLib/test/dataManip/tst_psHist00.c	(revision 4492)
+++ /trunk/psLib/test/dataManip/tst_psHist00.c	(revision 4493)
@@ -40,10 +40,10 @@
 
         if (myHist->nums->n != numBins) {
-            printf("ERROR: myHist->nums->n is wrong size (%d)\n", myHist->nums->n);
+            printf("ERROR: myHist->nums->n is wrong size (%ld)\n", myHist->nums->n);
             testStatus = false;
         }
 
         if (myHist->bounds->n != numBins+1) {
-            printf("ERROR: myHist->bounds->n is wrong size (%d)\n", myHist->bounds->n);
+            printf("ERROR: myHist->bounds->n is wrong size (%ld)\n", myHist->bounds->n);
             testStatus = false;
         }
Index: /trunk/psLib/test/dataManip/tst_psHist01.c
===================================================================
--- /trunk/psLib/test/dataManip/tst_psHist01.c	(revision 4492)
+++ /trunk/psLib/test/dataManip/tst_psHist01.c	(revision 4493)
@@ -46,10 +46,10 @@
 
         if (myHist->nums->n != numBins) {
-            printf("ERROR: myHist->nums->n is wrong size (%d)\n", myHist->nums->n);
+            printf("ERROR: myHist->nums->n is wrong size (%ld)\n", myHist->nums->n);
             testStatus = false;
         }
 
         if (myHist->bounds->n != numBins+1) {
-            printf("ERROR: myHist->bounds->n is wrong size (%d)\n", myHist->bounds->n);
+            printf("ERROR: myHist->bounds->n is wrong size (%ld)\n", myHist->bounds->n);
             testStatus = false;
         }
Index: /trunk/psLib/test/dataManip/tst_psHist03.c
===================================================================
--- /trunk/psLib/test/dataManip/tst_psHist03.c	(revision 4492)
+++ /trunk/psLib/test/dataManip/tst_psHist03.c	(revision 4493)
@@ -57,10 +57,10 @@
 
         if (myHist->nums->n != numBins) {
-            printf("ERROR: myHist->nums->n is wrong size (%d)\n", myHist->nums->n);
+            printf("ERROR: myHist->nums->n is wrong size (%ld)\n", myHist->nums->n);
             testStatus = false;
         }
 
         if (myHist->bounds->n != numBins+1) {
-            printf("ERROR: myHist->bounds->n is wrong size (%d)\n", myHist->bounds->n);
+            printf("ERROR: myHist->bounds->n is wrong size (%ld)\n", myHist->bounds->n);
             testStatus = false;
         }
