Index: trunk/archive/pslib/include/psStdArrays.h
===================================================================
--- trunk/archive/pslib/include/psStdArrays.h	(revision 206)
+++ trunk/archive/pslib/include/psStdArrays.h	(revision 210)
@@ -19,4 +19,5 @@
     PS_TYPE_DOUBLE,			//!< Double-precision floating point
     PS_TYPE_COMPLEX			//!< Complex numbers consisting of floating point
+    PS_TYPE_OTHER			//!< Something else that's not supported for arithmetic
 } psElemType;
 
@@ -25,5 +26,6 @@
     PS_DIMEN_SCALAR,			//!< Scalar
     PS_DIMEN_VECTOR,			//!< A vector
-    PS_DIMEN_MATRIX			//!< A matrix
+    PS_DIMEN_MATRIX,			//!< A matrix
+    PS_DIMEN_OTHER			//!< Something else that's not supported for arithmetic
 } psDimen;
 
@@ -34,7 +36,9 @@
 } psType;
 
+/************************************************************************************************************/
+
 /**
- * ps- typedefs so that array names comply with the standard naming convention. These should NOT be used
- * generally.
+ * ps- typedefs. These should NOT be used generally, but only where the number of bits in a type must be
+ * guaranteed, or for use in macros to preserve the standard naming conventions.
  */
 typedef float          psFloat;         ///< BITPIX -32 (float)
@@ -63,21 +67,123 @@
 typedef uint64_t       psUlong;		
 
+/************************************************************************************************************/
+
 /** An array of real numbers */
-PS_DECLARE_ARRAY_TYPE(psFloat);
-PS_CREATE_ARRAY_TYPE(psFloat);
+typedef struct {
+    enum psType type;			//!< Type of data.  THIS STRUCT ELEMENT MUST BE FIRST IN THE STRUCT!
+    int size;				//!< Total number of elements available
+    int n;				//!< Number of elements in use
+    float *arr;				//!< The array data
+} psFloatArray;
+
+/** Constructor */
+psFloatArray *psFloatArrayAlloc(int s,	//!< Total number of elements to make available
+				int n	//!< Number of elements that will be used
+    );
+/** Reallocator */
+psFloatArray *psFloatArrayRealloc(psFloatArray *myArray, //!< Array to reallocate
+				  int s	//!< Total number of elements to make available
+    );
+/** Destructor */
+void psFloatArrayFree(psFloatArray *restrict myArray //!< Array to free
+    );
+
+/************************************************************************************************************/
 
 /** Define a vector as an array of real numbers */
 typedef psFloatArray psVector;
+#define psVectorAlloc(S,N) psFloatArrayAlloc(S,N) //!< Constructor
+#define psVectorRealloc(A,S) psFloatArrayRealloc(A,S) //!< Reallocator
+#define psVectorFree(A) psFloatArrayFree(A) //!< Destructor
+
+/************************************************************************************************************/
 
 /** An array of complex numbers */
-PS_DECLARE_ARRAY_TYPE(psComplex);
+typedef struct {
+    enum psType type;			//!< Type of data.  THIS STRUCT ELEMENT MUST BE FIRST IN THE STRUCT!
+    int size;				//!< Total number of elements available
+    int n;				//!< Number of elements in use
+    complex float *arr;			//!< The array data
+} psComplexArray;
+
+/** Constructor */
+psComplexArray *psComplexArrayAlloc(int s, //!< Total number of elements to make available
+				    int n	//!< Number of elements that will be used
+    );
+/** Reallocator */
+psComplexArray *psComplexArrayRealloc(psComplexArray *myArray, //!< Array to reallocate
+				      int s	//!< Total number of elements to make available
+    );
+/** Destructor */
+void psComplexArrayFree(psComplexArray *restrict myArray //!< Array to free
+    );
+
+/************************************************************************************************************/
 
 /** An array of integers */
-PS_DECLARE_ARRAY_TYPE(psInt);
+typedef struct {
+    enum psType type;			//!< Type of data.  THIS STRUCT ELEMENT MUST BE FIRST IN THE STRUCT!
+    int size;				//!< Total number of elements available
+    int n;				//!< Number of elements in use
+    int *arr;				//!< The array data
+} psIntArray;
+
+/** Constructor */
+psIntArray *psIntArrayAlloc(int s,	//!< Total number of elements to make available
+			    int n	//!< Number of elements that will be used
+    );
+/** Reallocator */
+psIntArray *psIntArrayRealloc(psIntArray *myArray, //!< Array to reallocate
+			      int s	//!< Total number of elements to make available
+    );
+/** Destructor */
+void psIntArrayFree(psIntArray *restrict myArray //!< Array to free
+    );
+
+/************************************************************************************************************/
 
 /** An array of double-precision real numbers */
-PS_DECLARE_ARRAY_TYPE(psDouble);
+typedef struct {
+    enum psType type;			//!< Type of data.  THIS STRUCT ELEMENT MUST BE FIRST IN THE STRUCT!
+    int size;				//!< Total number of elements available
+    int n;				//!< Number of elements in use
+    double *arr;			//!< The array data
+} psDoubleArray;
 
-PS_DECLARE_ARRAY_TYPE(psFloatArray);	///< Declare an array of real vectors (psFloatArrayArray).
+/** Constructor */
+psDoubleArray *psDoubleArrayAlloc(int s, //!< Total number of elements to make available
+				  int n	//!< Number of elements that will be used
+    );
+/** Reallocator */
+psDoubleArray *psDoubleArrayRealloc(psDoubleArray *myArray, //!< Array to reallocate
+				    int s	//!< Total number of elements to make available
+    );
+/** Destructor */
+void psDoubleArrayFree(psDoubleArray *restrict myArray //!< Array to free
+    );
+
+/************************************************************************************************************/
+
+/** An array of real vectors */
+typedef struct {
+    enum psType type;			//!< Type of data.  THIS STRUCT ELEMENT MUST BE FIRST IN THE STRUCT!
+    int size;				//!< Total number of elements available
+    int n;				//!< Number of elements in use
+    psFloatArray *arr;			//!< The array data
+} psVectorArray;
+
+/** Constructor */
+psVectorArray *psVectorArrayAlloc(int s, //!< Total number of elements to make available
+				  int n	//!< Number of elements that will be used
+    );
+/** Reallocator */
+psVectorArray *psVectorArrayRealloc(psVectorArray *myArray, //!< Array to reallocate
+				    int s	//!< Total number of elements to make available
+    );
+/** Destructor */
+void psVectorArrayFree(psVectorArray *restrict myArray //!< Array to free
+    );
+
+/************************************************************************************************************/
 
 #endif
