Index: /trunk/psLib/src/types/psArray.c
===================================================================
--- /trunk/psLib/src/types/psArray.c	(revision 11700)
+++ /trunk/psLib/src/types/psArray.c	(revision 11701)
@@ -9,6 +9,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.58 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-01-09 22:38:53 $
+ *  @version $Revision: 1.59 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-02-08 03:34:09 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -54,5 +54,8 @@
 
 // Allocate an array, deliberately leave size unset.
-static psArray *arrayAlloc(long nalloc)
+static psArray *arrayAlloc(const char *file,
+                           unsigned int lineno,
+                           const char *func,
+                           long nalloc)
 {
     if (nalloc < 0) {
@@ -77,7 +80,10 @@
   FUNCTION IMPLEMENTATION - PUBLIC
  *****************************************************************************/
-psArray* psArrayAlloc(long nalloc)
-{
-    psArray *array = arrayAlloc(nalloc);
+psArray* p_psArrayAlloc(const char *file,
+                        unsigned int lineno,
+                        const char *func,
+                        long nalloc)
+{
+    psArray *array = arrayAlloc(file, lineno, func, nalloc);
     if (!array) {
         return NULL;
@@ -87,7 +93,10 @@
 }
 
-psArray* psArrayAllocEmpty(long nalloc)
-{
-    psArray *array = arrayAlloc(nalloc);
+psArray* p_psArrayAllocEmpty(const char *file,
+                             unsigned int lineno,
+                             const char *func,
+                             long nalloc)
+{
+    psArray *array = arrayAlloc(file, lineno, func, nalloc);
     if (!array) {
         return NULL;
@@ -97,6 +106,9 @@
 }
 
-psArray* psArrayRealloc(psArray* in,
-                        long nalloc)
+psArray* p_psArrayRealloc(const char *file,
+                          unsigned int lineno,
+                          const char *func,
+                          psArray* in,
+                          long nalloc)
 {
     if (nalloc < 0) {
@@ -118,5 +130,5 @@
         // Realloc after decrementation to avoid accessing freed array elements
         long n = in->n;
-        in->data = psRealloc(in->data, nalloc * sizeof(psPtr));
+        in->data = p_psRealloc(file, lineno, func, in->data, nalloc * sizeof(psPtr));
         P_PSARRAY_SET_NALLOC(in,nalloc);
         for (long m = n; m < nalloc; m++) { //if array is grown, set grown data to NULL
Index: /trunk/psLib/src/types/psArray.h
===================================================================
--- /trunk/psLib/src/types/psArray.h	(revision 11700)
+++ /trunk/psLib/src/types/psArray.h	(revision 11701)
@@ -8,7 +8,8 @@
  *  @author Robert DeSonia, MHPCC
  *  @author Ross Harman, MHPCC
- *
- *  @version $Revision: 1.46 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-02-06 21:36:09 $
+ *  @author Joshua Hoblitt, University of Hawaii
+ *
+ *  @version $Revision: 1.47 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-02-08 03:34:09 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -40,20 +41,22 @@
 #define P_PSARRAY_SET_NALLOC(vec,n) *(long*)&vec->nalloc = n
 
-        /*****************************************************************************/
-
-        /* FUNCTION PROTOTYPES                                                       */
-
-        /*****************************************************************************/
-
-        /** Checks the type of a particular pointer.
-         *
-         *  Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
-         *
-         *  @return bool:       True if the pointer matches a psArray structure, false otherwise.
-         */
-        bool psMemCheckArray(
-            psPtr ptr                          ///< the pointer whose type to check
-        )
-        ;
+/*****************************************************************************/
+
+/* FUNCTION PROTOTYPES                                                       */
+
+/*****************************************************************************/
+
+/** Checks the type of a particular pointer.
+ *
+ *  Uses the appropriate deallocation function in psMemBlock to check the ptr
+ *  datatype.
+ *
+ *  @return bool:       True if the pointer matches a psArray structure, false
+ *  otherwise.
+ */
+bool psMemCheckArray(
+    psPtr ptr                          ///< the pointer whose type to check
+)
+;
 
 
@@ -66,7 +69,19 @@
  *
  */
+#ifdef DOXYGEN
 psArray* psArrayAlloc(
-    long nalloc                        ///< Total number of elements to make available.
-);
+    long nalloc                         ///< Total number of elements to make available.
+);
+#else // ifdef DOXYGEN
+psArray* p_psArrayAlloc(
+    const char *file,                   ///< File of caller
+    unsigned int lineno,                ///< Line number of caller
+    const char *func,                   ///< Function name of caller
+    long nalloc                         ///< Total number of elements to make available.
+);
+#define psArrayAlloc(nalloc) \
+      p_psArrayAlloc(__FILE__, __LINE__, __func__, nalloc)
+#endif // ifdef DOXYGEN
+
 
 /** Allocate an array, set the length to zero.
@@ -78,7 +93,19 @@
  *
  */
+#ifdef DOXYGEN
 psArray* psArrayAllocEmpty(
-    long nalloc                        ///< Total number of elements to make available.
-);
+    long nalloc                         ///< Total number of elements to make available.
+);
+#else // ifdef DOXYGEN
+psArray* p_psArrayAllocEmpty(
+    const char *file,                   ///< File of caller
+    unsigned int lineno,                ///< Line number of caller
+    const char *func,                   ///< Function name of caller
+    long nalloc                         ///< Total number of elements to make available.
+);
+#define psArrayAllocEmpty(nalloc) \
+      p_psArrayAllocEmpty(__FILE__, __LINE__, __func__, nalloc)
+#endif // ifdef DOXYGEN
+
 
 /** Reallocate an array.
@@ -90,8 +117,21 @@
  *
  */
+#ifdef DOXYGEN
 psArray* psArrayRealloc(
     psArray* array,                    ///< array to reallocate.
     long nalloc                        ///< Total number of elements to make available.
 );
+#else // ifdef DOXYGEN
+psArray* p_psArrayRealloc(
+    const char *file,                   ///< File of caller
+    unsigned int lineno,                ///< Line number of caller
+    const char *func,                   ///< Function name of caller
+    psArray* array,                    ///< array to reallocate.
+    long nalloc                        ///< Total number of elements to make available.
+);
+#define psArrayRealloc(array, nalloc) \
+      p_psArrayRealloc(__FILE__, __LINE__, __func__, array, nalloc)
+#endif // ifdef DOXYGEN
+
 
 /** Add an element to the end the array, expanding the array storage if
@@ -102,8 +142,8 @@
 psArray* psArrayAdd(
     psArray* array,                    ///< array to operate on
-    long delta,
-    ///< the amount to expand array, if necessary.  If less than one, 10 will be used.
+    long delta,                        ///< the amount to expand array, if necessary.  If less than one, 10 will be used.
     psPtr data                         ///< the data pointer to add to psArray
 );
+
 
 /** Remove an element from the array by it's pointer
@@ -120,4 +160,5 @@
 );
 
+
 /** Remove an element from the array
  *
@@ -133,4 +174,5 @@
 );
 
+
 /** Deallocate/Dereference elements of an array.
  *
@@ -144,4 +186,5 @@
 );
 
+
 /** Sort the array according to an external compare function.
  *
@@ -162,4 +205,5 @@
     psComparePtrFunc func                 ///< the compare function
 );
+
 
 /** Set an element in the array.  If the current element is non-NULL, the old
@@ -174,4 +218,5 @@
 );
 
+
 /** Get an element from the array.
  *
@@ -182,4 +227,5 @@
     long position                      ///< the element position to get
 );
+
 
 /** Get the number of elements in use from a specified psArray. (array.n)
