Index: /trunk/psLib/src/sysUtils/psMemory.c
===================================================================
--- /trunk/psLib/src/sysUtils/psMemory.c	(revision 4443)
+++ /trunk/psLib/src/sysUtils/psMemory.c	(revision 4444)
@@ -8,6 +8,6 @@
 *  @author Robert Lupton, Princeton University
 *
-*  @version $Revision: 1.57 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-06-27 20:38:12 $
+*  @version $Revision: 1.58 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-07-01 03:57:39 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -84,11 +84,11 @@
 /*
  * Default callback for both allocate and free. Note that the
- * value of p_psMemAllocateID/p_psMemFreeID is incremented
+ * value of p_psMemAllocID/p_psMemFreeID is incremented
  * by the return value (so returning 0 means that the callback
  * isn't resignalled)
  */
-static psMemId memAllocateCallbackDefault(const psMemBlock* ptr)
-{
-    static psMemId incr = 0; // "p_psMemAllocateID += incr"
+static psMemId memAllocCallbackDefault(const psMemBlock* ptr)
+{
+    static psMemId incr = 0; // "p_psMemAllocID += incr"
 
     return incr;
@@ -102,5 +102,5 @@
 }
 
-static void memProblemCallbackDefault(const psMemBlock* ptr, const char *file, psS32 lineno)
+static void memProblemCallbackDefault( psMemBlock* ptr, const char *file, unsigned int lineno)
 {
     if (ptr->refCounter < 1) {
@@ -158,5 +158,5 @@
  * The default callbacks
  */
-static psMemAllocateCallback memAllocateCallback = memAllocateCallbackDefault;
+static psMemAllocCallback memAllocCallback = memAllocCallbackDefault;
 static psMemFreeCallback memFreeCallback = memFreeCallbackDefault;
 static psMemProblemCallback memProblemCallback = memProblemCallbackDefault;
@@ -194,12 +194,12 @@
  * Call the callbacks when these IDs are allocated/freed
  */
-psMemId p_psMemAllocateID = 0;       // notify user this block is allocated
+psMemId p_psMemAllocID = 0;       // notify user this block is allocated
 psMemId p_psMemFreeID = 0;   // notify user this block is freed
 
-psMemId psMemAllocateCallbackSetID(psMemId id)
-{
-    psMemId old = p_psMemAllocateID;
-
-    p_psMemAllocateID = id;
+psMemId psMemAllocCallbackSetID(psMemId id)
+{
+    psMemId old = p_psMemAllocID;
+
+    p_psMemAllocID = id;
 
     return old;
@@ -215,12 +215,12 @@
 }
 
-psMemAllocateCallback psMemAllocateCallbackSet(psMemAllocateCallback func)
-{
-    psMemFreeCallback old = memAllocateCallback;
+psMemAllocCallback psMemAllocCallbackSet(psMemAllocCallback func)
+{
+    psMemFreeCallback old = memAllocCallback;
 
     if (func != NULL) {
-        memAllocateCallback = func;
+        memAllocCallback = func;
     } else {
-        memAllocateCallback = memAllocateCallbackDefault;
+        memAllocCallback = memAllocCallbackDefault;
     }
 
@@ -286,5 +286,5 @@
 }
 
-psPtr p_psAlloc(size_t size, const char *file, psS32 lineno)
+psPtr p_psAlloc(size_t size, const char *file, unsigned int lineno)
 {
 
@@ -363,6 +363,6 @@
 
     // Did the user ask to be informed about this allocation?
-    if (ptr->id == p_psMemAllocateID) {
-        p_psMemAllocateID += memAllocateCallback(ptr);
+    if (ptr->id == p_psMemAllocID) {
+        p_psMemAllocID += memAllocCallback(ptr);
     }
     // And return the user the memory that they allocated
@@ -370,5 +370,5 @@
 }
 
-psPtr p_psRealloc(psPtr vptr, size_t size, const char *file, psS32 lineno)
+psPtr p_psRealloc(psPtr vptr, size_t size, const char *file, unsigned int lineno)
 {
     size = (size < recycleBinSize[0]) ? recycleBinSize[0] : size; // set the minimum size to allocate
@@ -416,6 +416,6 @@
 
         // Did the user ask to be informed about this allocation?
-        if (ptr->id == p_psMemAllocateID) {
-            p_psMemAllocateID += memAllocateCallback(ptr);
+        if (ptr->id == p_psMemAllocID) {
+            p_psMemAllocID += memAllocCallback(ptr);
         }
 
@@ -424,5 +424,5 @@
 }
 
-void p_psFree(psPtr vptr, const char *file, psS32 lineno)
+void p_psFree(psPtr vptr, const char *file, unsigned int lineno)
 {
     if (vptr == NULL) {
Index: /trunk/psLib/src/sysUtils/psMemory.h
===================================================================
--- /trunk/psLib/src/sysUtils/psMemory.h	(revision 4443)
+++ /trunk/psLib/src/sysUtils/psMemory.h	(revision 4444)
@@ -12,6 +12,6 @@
  *  @ingroup MemoryManagement
  *
- *  @version $Revision: 1.44 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-27 20:38:12 $
+ *  @version $Revision: 1.45 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-07-01 03:57:39 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -49,11 +49,11 @@
 
 /// typedef for memory identification numbers.  Guaranteed to be some variety of integer.
-typedef psU64 psMemId;
+typedef unsigned long psMemId;
 
 /// typedef for a memory block's reference count. Guaranteed to be some variety of integer.
-typedef psU64 psReferenceCount;
+typedef unsigned long psReferenceCount;
 
 /// typedef for deallocator.
-typedef void (*psFreeFunc) (psPtr ptr);
+typedef void (*psFreeFunc) (void* ptr);
 
 /** Book-keeping data for storage allocator.
@@ -64,5 +64,5 @@
 typedef struct psMemBlock
 {
-    const psPtr startblock;            ///< initialised to p_psMEMMAGIC
+    const void* startblock;            ///< initialised to p_psMEMMAGIC
     struct psMemBlock* previousBlock;  ///< previous block in allocation list
     struct psMemBlock* nextBlock;      ///< next block allocation list
@@ -71,9 +71,9 @@
     const psMemId id;                  ///< a unique ID for this allocation
     const char *file;                  ///< set from __FILE__ in e.g. p_psAlloc
-    const psS32 lineno;                ///< set from __LINE__ in e.g. p_psAlloc
+    const unsigned int lineno;         ///< set from __LINE__ in e.g. p_psAlloc
     pthread_mutex_t refCounterMutex;   ///< mutex to ensure exclusive access to reference counter
     psReferenceCount refCounter;       ///< how many times pointer is referenced
-    psBool persistent;                 ///< marks if this non-user persistent data like error stack, etc.
-    const psPtr endblock;              ///< initialised to p_psMEMMAGIC
+    bool persistent;                   ///< marks if this non-user persistent data like error stack, etc.
+    const void* endblock;              ///< initialised to p_psMEMMAGIC
 }
 psMemBlock;
@@ -81,8 +81,8 @@
 /** prototype of a basic callback used by memory functions
  *
- *  @see psMemAllocateCallbackSet
- *  @ingroup memCallback
- */
-typedef psMemId(*psMemAllocateCallback) (
+ *  @see psMemAllocCallbackSet
+ *  @ingroup memCallback
+ */
+typedef psMemId(*psMemAllocCallback) (
     const psMemBlock* ptr              ///< the psMemBlock just allocated
 );
@@ -105,7 +105,7 @@
  */
 typedef void (*psMemProblemCallback) (
-    const psMemBlock* ptr,             ///< the pointer to the problematic memory block.
-    const char *file,                  ///< the file in which the problem originated
-    psS32 lineno                         ///< the line number in which the problem originated
+    psMemBlock* ptr,                   ///< the pointer to the problematic memory block.
+    const char *filename,                    ///< the file in which the problem originated
+    unsigned int lineno                ///< the line number in which the problem originated
 );
 
@@ -118,5 +118,5 @@
  *  @ingroup memCallback
  */
-typedef psPtr (*psMemExhaustedCallback) (
+typedef void* (*psMemExhaustedCallback) (
     size_t size                        ///< the size of buffer required
 );
@@ -128,11 +128,15 @@
  */
 #ifdef DOXYGEN
-psPtr psAlloc(size_t size       ///< Size required
-             );
+
+psPtr psAlloc(
+    size_t size                        ///< Size required
+);
+
 #else // #ifdef DOXYGEN
-psPtr p_psAlloc(size_t size,    ///< Size required
-                const char *file,       ///< File of call
-                psS32 lineno      ///< Line number of call
-               );
+psPtr p_psAlloc(
+    size_t size,                       ///< Size required
+    const char *filename,              ///< File of call
+    unsigned int lineno                ///< Line number of call
+);
 
 /// Memory allocation. psAlloc sends file and line number to p_psAlloc.
@@ -203,14 +207,16 @@
  */
 #ifdef DOXYGEN
+
 psPtr psRealloc(
-    psPtr ptr,                          ///< Pointer to re-allocate
-    size_t size                         ///< Size required
+    psPtr ptr,                         ///< Pointer to re-allocate
+    size_t size                        ///< Size required
 );
 #else // #ifdef DOXYGEN
+
 psPtr p_psRealloc(
     psPtr ptr,                         ///< Pointer to re-allocate
     size_t size,                       ///< Size required
-    const char *file,                  ///< File of call
-    psS32 lineno                       ///< Line number of call
+    const char *filename,              ///< File of call
+    unsigned int lineno                ///< Line number of call
 );
 
@@ -234,5 +240,5 @@
     psPtr ptr,                         ///< Pointer to free
     const char *file,                  ///< File of call
-    psS32 lineno                       ///< Line number of call
+    unsigned int lineno                ///< Line number of call
 );
 
@@ -259,5 +265,5 @@
  */
 psS32 psMemCheckLeaks(
-    psMemId id0,                    ///< don't list blocks with id < id0
+    psMemId id0,                       ///< don't list blocks with id < id0
     psMemBlock* ** arr,                ///< pointer to array of pointers to leaked blocks, or NULL
     FILE * fd,                         ///< print list of leaks to fd (or NULL)
@@ -288,5 +294,5 @@
 #ifdef DOXYGEN
 psPtr psMemIncrRefCounter(
-    const psPtr ptr                         ///< Pointer to increment refCounter, and return
+    const psPtr ptr                    ///< Pointer to increment refCounter, and return
 );
 #else
@@ -294,5 +300,5 @@
     psPtr vptr,                        ///< Pointer to increment refCounter, and return
     const char *file,                  ///< File of call
-    psS32 lineno                         ///< Line number of call
+    psS32 lineno                       ///< Line number of call
 );
 
@@ -318,5 +324,5 @@
     psPtr vptr,                        ///< Pointer to decrement refCounter, and return
     const char *file,                  ///< File of call
-    psS32 lineno                         ///< Line number of call
+    psS32 lineno                       ///< Line number of call
 );
 
@@ -362,15 +368,15 @@
 /** Set call back for when a particular memory block is allocated
  *
- *  A private variable, p_psMemAllocateID, can be used to trace the allocation
- *  and freeing of specific memory blocks. If p_psMemAllocateID is set and a
- *  memory block with that ID is allocated, psMemAllocateCallback is called
+ *  A private variable, p_psMemAllocID, can be used to trace the allocation
+ *  and freeing of specific memory blocks. If p_psMemAllocID is set and a
+ *  memory block with that ID is allocated, psMemAllocCallback is called
  *  just before memory is returned to the calling function.
  *
  *  @ingroup memCallback
  *
- *  @return psMemAllocateCallback      old psMemAllocateCallback function
- */
-psMemAllocateCallback psMemAllocateCallbackSet(
-    psMemAllocateCallback func       ///< Function to run at memory allocation of specific mem block
+ *  @return psMemAllocCallback      old psMemAllocCallback function
+ */
+psMemAllocCallback psMemAllocCallbackSet(
+    psMemAllocCallback func            ///< Function to run at memory allocation of specific mem block
 );
 
@@ -398,9 +404,9 @@
 psMemId psMemGetId(void);
 
-/** set p_psMemAllocateID to specific id
- *
- *  A private variable, p_psMemAllocateID, can be used to trace the allocation
- *  and freeing of specific memory blocks. If p_psMemAllocateID is set and a
- *  memory block with that ID is allocated, psMemAllocateCallback is called
+/** set p_psMemAllocID to specific id
+ *
+ *  A private variable, p_psMemAllocID, can be used to trace the allocation
+ *  and freeing of specific memory blocks. If p_psMemAllocID is set and a
+ *  memory block with that ID is allocated, psMemAllocCallback is called
  *  just before memory is returned to the calling function.
  *
@@ -409,8 +415,8 @@
  *  @return psMemId
  *
- *  @see psMemAllocateCallbackSet
- */
-psMemId psMemAllocateCallbackSetID(
-    psMemId id                      ///< ID to set
+ *  @see psMemAllocCallbackSet
+ */
+psMemId psMemAllocCallbackSetID(
+    psMemId id                         ///< ID to set
 );
 
@@ -429,5 +435,5 @@
  */
 psMemId psMemFreeCallbackSetID(
-    psMemId id                      ///< ID to set
+    psMemId id                         ///< ID to set
 );
 
Index: /trunk/psLib/src/sysUtils/psType.h
===================================================================
--- /trunk/psLib/src/sysUtils/psType.h	(revision 4443)
+++ /trunk/psLib/src/sysUtils/psType.h	(revision 4444)
@@ -10,6 +10,6 @@
 *  @author Ross Harman, MHPCC
 *
-*  @version $Revision: 1.35 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-06-22 02:05:41 $
+*  @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-07-01 03:57:39 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -94,4 +94,50 @@
 } psElemType;
 
+/** Enumeration primarily used with metadata which defines a data structure
+ *  e.g., list, array, FITS file, etc.
+*/
+typedef enum {
+    PS_DATA_S32  = PS_TYPE_S32,        ///< psS32
+    PS_DATA_F32  = PS_TYPE_F32,        ///< psF32
+    PS_DATA_F64  = PS_TYPE_F64,        ///< psF64
+    PS_DATA_BOOL = PS_TYPE_BOOL,       ///< psBool
+    PS_DATA_STRING = 0x10000,          ///< psString (char *)
+    PS_DATA_ARRAY,                     ///< psArray
+    PS_DATA_BITSET,                    ///< psBitSet
+    PS_DATA_CELL,                      ///< psCell
+    PS_DATA_CHIP,                      ///< psChip
+    PS_DATA_CUBE,                      ///< psCube
+    PS_DATA_FITS,                      ///< psFits
+    PS_DATA_HASH,                      ///< psHash
+    PS_DATA_HISTOGRAM,                 ///< psHistogram
+    PS_DATA_IMAGE,                     ///< psImage
+    PS_DATA_KERNEL,                    ///< psKernel
+    PS_DATA_LIST,                      ///< psList
+    PS_DATA_LOOKUPTABLE,               ///< psLookupTable
+    PS_DATA_METADATA,                  ///< psMetadata
+    PS_DATA_METADATAITEM,              ///< psMetadataItem
+    PS_DATA_MINIMIZATION,              ///< psMinimization
+    PS_DATA_PIXELS,                    ///< psPixels
+    PS_DATA_PLANE,                     ///< psPlane
+    PS_DATA_PLANEDISTORT,              ///< psPlaneDistort
+    PS_DATA_PLANETRANSFORM,            ///< psPlaneTransform
+    PS_DATA_POLYNOMIAL1D,              ///< psPolynomial1D
+    PS_DATA_POLYNOMIAL2D,              ///< psPolynomial2D
+    PS_DATA_POLYNOMIAL3D,              ///< psPolynomial3D
+    PS_DATA_POLYNOMIAL4D,              ///< psPolynomial4D
+    PS_DATA_PROJECTION,                ///< psProjection
+    PS_DATA_READOUT,                   ///< psReadout
+    PS_DATA_REGION,                    ///< psRegion
+    PS_DATA_SCALAR,                    ///< psScalar
+    PS_DATA_SPHERE,                    ///< psSphere
+    PS_DATA_SPHERETRANSFORM,           ///< psSphereTransform
+    PS_DATA_SPLINE1D,                  ///< psSpline1D
+    PS_DATA_STATS,                     ///< psStats
+    PS_DATA_TIME,                      ///< psTime
+    PS_DATA_VECTOR,                    ///< psVector
+    PS_DATA_UNKNOWN,                   ///< Other data of an unknown type
+    PS_DATA_METADATA_MULTI             ///< Used internally for metadata; not a 'real' type
+} psDataType;
+
 #define PS_TYPE_MASK PS_TYPE_U8        /**< the psElemType to use for mask image */
 #define PS_TYPE_MASK_DATA U8           /**< the data member to use for mask image */
Index: /trunk/psLib/test/sysUtils/tst_psMemory.c
===================================================================
--- /trunk/psLib/test/sysUtils/tst_psMemory.c	(revision 4443)
+++ /trunk/psLib/test/sysUtils/tst_psMemory.c	(revision 4444)
@@ -6,6 +6,6 @@
 *  @author Robert DeSonia, MHPCC
 *
-*  @version $Revision: 1.34 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-06-25 03:32:42 $
+*  @version $Revision: 1.35 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-07-01 03:57:42 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -30,10 +30,10 @@
 static psS32 TPrealloc( void );
 static psS32 TPallocCallback( void );
-static psMemId memAllocateCallback( const psMemBlock *ptr );
+static psMemId memAllocCallback( const psMemBlock *ptr );
 static psMemId memFreeCallback( const psMemBlock *ptr );
 static psS32 TPcheckLeaks( void );
 static psS32 TPmemCorruption( void );
 static psS32 TPmultipleFree( void );
-void memProblemCallback( const psMemBlock *ptr, const char *file, psS32 lineno );
+void memProblemCallback( psMemBlock *ptr, const char *filename, unsigned int lineno );
 
 static psS32 problemCallbackCalled = 0;
@@ -289,8 +289,8 @@
     allocCallbackCalled = 0;
     freeCallbackCalled = 0;
-    psMemAllocateCallbackSet( memAllocateCallback );
+    psMemAllocCallbackSet( memAllocCallback );
     psMemFreeCallbackSet( memFreeCallback );
 
-    psMemAllocateCallbackSetID( currentId + 1 );
+    psMemAllocCallbackSetID( currentId + 1 );
     psMemFreeCallbackSetID( currentId + 1 );
 
@@ -320,5 +320,5 @@
     mem1 = ( psS32* ) psAlloc( initialSize * sizeof( psS32 ) );
 
-    psMemAllocateCallbackSetID( mark );
+    psMemAllocCallbackSetID( mark );
 
     mem1 = ( psS32* ) psRealloc( mem1, initialSize * 2 * sizeof( psS32 ) );
@@ -489,5 +489,5 @@
 }
 
-void memProblemCallback( const psMemBlock *ptr, const char *file, psS32 lineno )
+void memProblemCallback( psMemBlock *ptr, const char *file, unsigned int lineno )
 {
     psLogMsg( __func__, PS_LOG_INFO, "memory callback called for id %lld (%s:%d).",
@@ -497,5 +497,5 @@
 }
 
-psMemId memAllocateCallback( const psMemBlock *ptr )
+psMemId memAllocCallback( const psMemBlock *ptr )
 {
     psLogMsg( __func__, PS_LOG_INFO, "block %lld was (re)allocated", ptr->id );
Index: /trunk/psLib/test/sysUtils/verified/tst_psMemory.stderr
===================================================================
--- /trunk/psLib/test/sysUtils/verified/tst_psMemory.stderr	(revision 4443)
+++ /trunk/psLib/test/sysUtils/verified/tst_psMemory.stderr	(revision 4444)
@@ -63,7 +63,7 @@
 <DATE><TIME>|<HOST>|I|TPallocCallback
     call to psAlloc/psRealloc shall generate a callback if specified memory ID is allocated.
-<DATE><TIME>|<HOST>|I|memAllocateCallback
+<DATE><TIME>|<HOST>|I|memAllocCallback
     block 2 was (re)allocated
-<DATE><TIME>|<HOST>|I|memAllocateCallback
+<DATE><TIME>|<HOST>|I|memAllocCallback
     block 3 was (re)allocated
 <DATE><TIME>|<HOST>|I|memFreeCallback
@@ -71,7 +71,7 @@
 <DATE><TIME>|<HOST>|I|memFreeCallback
     block 3 was freed
-<DATE><TIME>|<HOST>|I|memAllocateCallback
+<DATE><TIME>|<HOST>|I|memAllocCallback
     block 4 was (re)allocated
-<DATE><TIME>|<HOST>|I|memAllocateCallback
+<DATE><TIME>|<HOST>|I|memAllocCallback
     block 4 was (re)allocated
 <DATE><TIME>|<HOST>|I|memFreeCallback
