Index: /trunk/psLib/src/mathtypes/psVector.c
===================================================================
--- /trunk/psLib/src/mathtypes/psVector.c	(revision 4596)
+++ /trunk/psLib/src/mathtypes/psVector.c	(revision 4597)
@@ -9,6 +9,6 @@
 *  @author Robert DeSonia, MHPCC
 *
-*  @version $Revision: 1.46 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-07-12 19:12:01 $
+*  @version $Revision: 1.47 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-07-22 22:18:23 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -30,5 +30,18 @@
 typedef struct
 {
-    p_psVectorData data; // need this first for psVectorSortIndex to work.
+    union {
+        psU8* U8;                      ///< Unsigned 8-bit integer data.
+        psU16* U16;                    ///< Unsigned 16-bit integer data.
+        psU32* U32;                    ///< Unsigned 32-bit integer data.
+        psU64* U64;                    ///< Unsigned 64-bit integer data.
+        psS8* S8;                      ///< Signed 8-bit integer data.
+        psS16* S16;                    ///< Signed 16-bit integer data.
+        psS32* S32;                    ///< Signed 32-bit integer data.
+        psS64* S64;                    ///< Signed 64-bit integer data.
+        psF32* F32;                    ///< Single-precision float data.
+        psF64* F64;                    ///< Double-precision float data.
+        psC32* C32;                    ///< Single-precision complex data.
+        psC64* C64;                    ///< Double-precision complex data.
+    } data;
     psU32 index;
 }
@@ -48,5 +61,6 @@
 // FUNCTION IMPLEMENTATION - PUBLIC
 
-psVector* psVectorAlloc( long nalloc, psElemType type)
+psVector* psVectorAlloc(long nalloc,
+                        psElemType type)
 {
     psVector* psVec = NULL;
@@ -76,5 +90,6 @@
 }
 
-psVector* psVectorRealloc(psVector* vector, long nalloc)
+psVector* psVectorRealloc(psVector* vector,
+                          long nalloc)
 {
     psS32 elementSize = 0;
@@ -99,5 +114,7 @@
 }
 
-psVector* psVectorRecycle(psVector* vector, long nalloc, psElemType type)
+psVector* psVectorRecycle(psVector* vector,
+                          long nalloc,
+                          psElemType type)
 {
     psS32 byteSize;
@@ -129,5 +146,7 @@
 }
 
-psVector *psVectorExtend(psVector *vector, long delta, long nExtend)
+psVector *psVectorExtend(psVector *vector,
+                         long delta,
+                         long nExtend)
 {
     // can't handle a NULL vector (don't know the data type to allocate)
@@ -166,5 +185,7 @@
 }
 
-psVector* psVectorCopy(psVector* output, const psVector* input, psElemType type)
+psVector* psVectorCopy(psVector* output,
+                       const psVector* input,
+                       psElemType type)
 {
     if (input == NULL) {
@@ -267,5 +288,6 @@
 }
 
-psVector* psVectorSort(psVector* outVector, const psVector* inVector)
+psVector* psVectorSort(psVector* outVector,
+                       const psVector* inVector)
 {
     psS32 N = 0;
@@ -353,5 +375,6 @@
 }
 
-psVector* psVectorSortIndex(psVector* outVector, const psVector* inVector)
+psVector* psVectorSortIndex(psVector* outVector,
+                            const psVector* inVector)
 {
     psS32 N = 0;
@@ -437,5 +460,6 @@
 }
 
-char* psVectorToString(psVector* vector, int maxLength)
+char* psVectorToString(psVector* vector,
+                       int maxLength)
 {
 
@@ -570,5 +594,7 @@
 }
 
-bool p_psVectorPrint (FILE *f, psVector *a, char *name)
+bool p_psVectorPrint (FILE *f,
+                      psVector *a,
+                      char *name)
 {
 
Index: /trunk/psLib/src/mathtypes/psVector.h
===================================================================
--- /trunk/psLib/src/mathtypes/psVector.h	(revision 4596)
+++ /trunk/psLib/src/mathtypes/psVector.h	(revision 4597)
@@ -11,6 +11,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.38 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-07-12 19:12:01 $
+ *  @version $Revision: 1.39 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-07-22 22:18:18 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -28,4 +28,5 @@
 
 ///< Union of psVector data types.
+/*
 typedef union {
     psU8* U8;                          ///< Unsigned 8-bit integer data.
@@ -43,5 +44,5 @@
 }
 p_psVectorData;
-
+*/
 /** An vector to support primitive types.
  *
@@ -54,5 +55,18 @@
     long n;                            ///< Number of elements in use.
     const long nalloc;                 ///< Total number of elements available.
-    p_psVectorData data;               ///< Union for data types.
+    union {
+        psU8* U8;                      ///< Unsigned 8-bit integer data.
+        psU16* U16;                    ///< Unsigned 16-bit integer data.
+        psU32* U32;                    ///< Unsigned 32-bit integer data.
+        psU64* U64;                    ///< Unsigned 64-bit integer data.
+        psS8* S8;                      ///< Signed 8-bit integer data.
+        psS16* S16;                    ///< Signed 16-bit integer data.
+        psS32* S32;                    ///< Signed 32-bit integer data.
+        psS64* S64;                    ///< Signed 64-bit integer data.
+        psF32* F32;                    ///< Single-precision float data.
+        psF64* F64;                    ///< Double-precision float data.
+        psC32* C32;                    ///< Single-precision complex data.
+        psC64* C64;                    ///< Double-precision complex data.
+    } data;
     void *lock;                        ///< Optional lock for thread safety.
 }
Index: /trunk/psLib/src/types/psArray.c
===================================================================
--- /trunk/psLib/src/types/psArray.c	(revision 4596)
+++ /trunk/psLib/src/types/psArray.c	(revision 4597)
@@ -9,6 +9,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.34 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-07-15 02:33:54 $
+ *  @version $Revision: 1.35 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-07-22 22:19:12 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -57,5 +57,5 @@
     psMemSetDeallocator(psArr, (psFreeFunc) arrayFree);
 
-    psArr->nalloc = nalloc;
+    *(long*)&psArr->nalloc = nalloc;
     psArr->n = nalloc;
 
@@ -80,5 +80,5 @@
         // Realloc after decrementation to avoid accessing freed array elements
         in->data = psRealloc(in->data, nalloc * sizeof(psPtr));
-        in->nalloc = nalloc;
+        *(long*)&in->nalloc = nalloc;
     }
 
Index: /trunk/psLib/src/types/psArray.h
===================================================================
--- /trunk/psLib/src/types/psArray.h	(revision 4596)
+++ /trunk/psLib/src/types/psArray.h	(revision 4597)
@@ -12,6 +12,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-07-15 02:33:54 $
+ *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-07-22 22:19:17 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -34,6 +34,6 @@
 typedef struct
 {
-    long nalloc;                       ///< Total number of elements available.
     long n;                            ///< Number of elements in use.
+    const long nalloc;                 ///< Total number of elements available.
     psPtr* data;                       ///< An Array of pointer elements
     void *lock;                        ///< Optional lock for thread safety
Index: /trunk/psLib/src/types/psPixels.c
===================================================================
--- /trunk/psLib/src/types/psPixels.c	(revision 4596)
+++ /trunk/psLib/src/types/psPixels.c	(revision 4597)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-07-15 02:33:54 $
+ *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-07-22 22:19:27 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -65,5 +65,5 @@
     }
     out->n = nalloc;
-    out->nalloc = nalloc;
+    *(long*)&out->nalloc = nalloc;
 
     psMemSetDeallocator(out, (psFreeFunc)pixelsFree);
@@ -85,5 +85,5 @@
     }
 
-    pixels->nalloc = nalloc;
+    *(long*)&pixels->nalloc = nalloc;
 
     if (pixels->n > pixels->nalloc) {
Index: /trunk/psLib/src/types/psPixels.h
===================================================================
--- /trunk/psLib/src/types/psPixels.h	(revision 4596)
+++ /trunk/psLib/src/types/psPixels.h	(revision 4597)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-07-15 02:33:54 $
+ *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-07-22 22:19:31 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -42,5 +42,5 @@
 {
     long n;                            ///< Number in usa
-    long nalloc;                       ///< Number allocated
+    const long nalloc;                 ///< Number allocated
     psPixelCoord* data;                ///< The pixel coordinates
     void *lock;                        ///< Option lock for thread safety
