Index: trunk/psLib/src/collections/psArray.c
===================================================================
--- trunk/psLib/src/collections/psArray.c	(revision 1807)
+++ trunk/psLib/src/collections/psArray.c	(revision 1920)
@@ -9,6 +9,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-14 20:01:52 $
+ *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-28 23:26:48 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -21,4 +21,5 @@
 /******************************************************************************/
 #include<stdlib.h>                         // for qsort, etc.
+#include<string.h>
 
 #include "psMemory.h"
@@ -58,5 +59,5 @@
 }
 
-psArray* psArrayRealloc(unsigned int nalloc, psArray* restrict in)
+psArray* psArrayRealloc(psArray* restrict in, unsigned int nalloc)
 {
     if (in == NULL) {
@@ -88,4 +89,27 @@
 }
 
+bool psArrayRemove(psArray* psArr,
+                   psPTR data)
+{
+    bool success = false;
+
+    if (psArr == NULL) {
+        return success;
+    }
+
+    int n = psArr->n;
+    psPTR* psArrData = psArr->data;
+    for (int i = n-1; i<0; i--) {
+        if (psArrData[i] == data) {
+            memmove(psArrData[i],psArrData[i+1],(n-i-1)*sizeof(psPTR));
+            n--;
+            success = true;
+        }
+    }
+    psArr->n = n; // reset the array size to indicate the removed item(s)
+
+    return success;
+}
+
 void psArrayElementFree(psArray* restrict psArr)
 {
