Index: /trunk/psLib/psLib.kdevses
===================================================================
--- /trunk/psLib/psLib.kdevses	(revision 1806)
+++ /trunk/psLib/psLib.kdevses	(revision 1807)
@@ -2,31 +2,5 @@
 <!DOCTYPE KDevPrjSession>
 <KDevPrjSession>
- <DocsAndViews NumberOfDocuments="5" >
-  <Doc0 NumberOfViews="1" URL="file:/home/desonia/psLib/src/collections/psCollectionsErrors.dat" >
-   <View0 line="8" Type="???" >
-    <AdditionalSettings Top="2" Width="1229" Attach="1" Height="705" Left="2" MinMaxMode="0" />
-   </View0>
-  </Doc0>
-  <Doc1 NumberOfViews="1" URL="file:/home/desonia/psLib/src/collections/Makefile" >
-   <View0 line="62" Type="???" >
-    <AdditionalSettings Top="2" Width="1229" Attach="1" Height="705" Left="2" MinMaxMode="0" />
-   </View0>
-  </Doc1>
-  <Doc2 NumberOfViews="1" URL="file:/home/desonia/psLib/src/sysUtils/Makefile" >
-   <View0 line="55" Type="???" >
-    <AdditionalSettings Top="2" Width="1229" Attach="1" Height="705" Left="2" MinMaxMode="0" />
-   </View0>
-  </Doc2>
-  <Doc3 NumberOfViews="1" URL="file:/home/desonia/psLib/src/collections/psVector.c" >
-   <View0 line="39" Type="???" >
-    <AdditionalSettings Top="2" Width="1229" Attach="1" Height="705" Left="2" MinMaxMode="0" />
-   </View0>
-  </Doc3>
-  <Doc4 NumberOfViews="1" URL="file:/home/desonia/psLib/src/collections/psCollectionsErrors.h" >
-   <View0 line="0" Type="???" >
-    <AdditionalSettings Top="2" Width="1229" Attach="1" Height="705" Left="2" MinMaxMode="0" />
-   </View0>
-  </Doc4>
- </DocsAndViews>
+ <DocsAndViews NumberOfDocuments="0" />
  <pluginList>
   <kdevbookmarks>
Index: /trunk/psLib/src/collections/psArray.c
===================================================================
--- /trunk/psLib/src/collections/psArray.c	(revision 1806)
+++ /trunk/psLib/src/collections/psArray.c	(revision 1807)
@@ -9,6 +9,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-08-27 23:54:33 $
+ *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-14 20:01:52 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -26,4 +26,6 @@
 #include "psArray.h"
 #include "psLogMsg.h"
+
+#include "psCollectionsErrors.h"
 
 /*****************************************************************************/
@@ -43,9 +45,4 @@
     psArray* psArr = NULL;
 
-    // Invalid nalloc
-    if (nalloc < 1) {
-        psError(__func__, "Invalid value for nalloc. nalloc: %d\n", nalloc);
-        return NULL;
-    }
     // Create vector struct
     psArr = (psArray* ) psAlloc(sizeof(psArray));
@@ -63,10 +60,4 @@
 psArray* psArrayRealloc(unsigned int nalloc, psArray* restrict in)
 {
-    // Invalid nalloc
-    if (nalloc < 1) {
-        psError(__func__, "Invalid value for realloc (%d)\n", nalloc);
-        return NULL;
-    }
-
     if (in == NULL) {
         return psArrayAlloc(nalloc);
Index: /trunk/psLib/src/collections/psBitSet.c
===================================================================
--- /trunk/psLib/src/collections/psBitSet.c	(revision 1806)
+++ /trunk/psLib/src/collections/psBitSet.c	(revision 1807)
@@ -1,3 +1,2 @@
-
 /** @file  psBitSet.c
  *
@@ -10,16 +9,12 @@
  *
  *  @author Ross Harman, MHPCC
- *
- *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-08-09 23:34:57 $
+ *  @author Robert DeSonia, MHPCC
+ *
+ *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-14 20:01:52 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
  */
 
-/******************************************************************************/
-
-/*  INCLUDE FILES                                                             */
-
-/******************************************************************************/
 #include <string.h>
 #include <stdio.h>
@@ -32,43 +27,17 @@
 #include "psError.h"
 #include "psAbort.h"
-
-/******************************************************************************/
-
-/*  DEFINE STATEMENTS                                                         */
-
-/******************************************************************************/
-
-// None
-
-/******************************************************************************/
-
-/*  TYPE DEFINITIONS                                                          */
-
-/******************************************************************************/
-
-// None
-
-/*****************************************************************************/
-
-/*  GLOBAL VARIABLES                                                         */
-
-/*****************************************************************************/
-
-// None
-
-/*****************************************************************************/
-
-/*  FILE STATIC VARIABLES                                                    */
-
-/*****************************************************************************/
-
-// None
-
-/*****************************************************************************/
-
-/*  FUNCTION IMPLEMENTATION - LOCAL                                          */
-
-/*****************************************************************************/
-static void psBitSetFree(psBitSet* restrict inBitSet);
+#include "psString.h"
+
+#include "psCollectionsErrors.h"
+
+enum {
+    UNKNOWN_OP,
+    AND_OP,
+    OR_OP,
+    XOR_OP,
+    NOT_OP
+};
+
+static void bitSetFree(psBitSet* restrict inBitSet);
 
 /** Private function to create a mask.
@@ -90,9 +59,12 @@
 }
 
-/*****************************************************************************/
-
-/* FUNCTION IMPLEMENTATION - PUBLIC                                          */
-
-/*****************************************************************************/
+static void bitSetFree(psBitSet* restrict inBitSet)
+{
+    if (inBitSet == NULL) {
+        return;
+    }
+    psFree(inBitSet->bits);
+}
+
 psBitSet* psBitSetAlloc(int n)
 {
@@ -100,15 +72,15 @@
     psBitSet* newObj = NULL;
 
-    if (n <= 0) {
-        psError(__func__, " : Line %d - Allocation size must be > 0: size = %d", __LINE__, n);
-        return 0;
+    if (n < 0) {
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psBitSetAlloc",
+                   PS_ERR_BAD_PARAMETER_VALUE, true,
+                   PS_ERRORTEXT_psBitSet_ALLOC_NEG_SIZE,
+                   n);
+        return NULL;
     }
 
     numBytes = ceil(n / 8.0);
     newObj = psAlloc(sizeof(psBitSet));
-    if (newObj == NULL) {
-        psAbort(__func__, " : Line %d - Failed to allocate memory", __LINE__);
-    }
-    p_psMemSetDeallocator(newObj, (psFreeFcn) psBitSetFree);
+    p_psMemSetDeallocator(newObj, (psFreeFcn) bitSetFree);
     newObj->n = numBytes;
 
@@ -116,22 +88,10 @@
     /* @i@ */
     newObj->bits = psAlloc(sizeof(char) * numBytes);
-    if (newObj->bits == NULL) {
-        psAbort(__func__, " : Line %d - Failed to allocate memory", __LINE__);
-    }
-
-    memset(newObj->bits, numBytes, 0);
+
+    memset(newObj->bits, 0, numBytes);
 
     return newObj;
 }
 
-static void psBitSetFree(psBitSet* restrict inBitSet)
-{
-    if (inBitSet == NULL) {
-        psError(__func__, " : Line %d - Null psBitSet for inBitSet argument", __LINE__);
-        return;
-    }
-    psFree(inBitSet->bits);
-}
-
 psBitSet* psBitSetSet(psBitSet* inBitSet, int bit)
 {
@@ -139,11 +99,14 @@
 
     if (inBitSet == NULL) {
-        psError(__func__, " : Line %d - Null psBitSet for inBitSet argument", __LINE__);
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psBitSetSet",
+                   PS_ERR_BAD_PARAMETER_NULL, true,
+                   PS_ERRORTEXT_psBitSet_SET_NULL);
         return inBitSet;
-    } else if (bit < 0) {
-        psError(__func__, " : Line %d - Bit position too small: %d", __LINE__, bit);
-        return inBitSet;
-    } else if (bit > inBitSet->n * 8 - 1) {
-        psError(__func__, " : Line %d - Bit position too large: %d", __LINE__, bit);
+    } else if ( (bit < 0) ||
+                (bit > inBitSet->n * 8 - 1) ) {
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psBitSetSet",
+                   PS_ERR_BAD_PARAMETER_VALUE, true,
+                   PS_ERRORTEXT_psBitSet_BIT_OUTOFRANGE,
+                   bit,inBitSet->n * 8 - 1);
         return inBitSet;
     }
@@ -155,4 +118,28 @@
 }
 
+psBitSet* psBitSetClear(psBitSet* inBitSet, int bit)
+{
+    char *byte = NULL;
+
+    if (inBitSet == NULL) {
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psBitSetClear",
+                   PS_ERR_BAD_PARAMETER_NULL, true,
+                   PS_ERRORTEXT_psBitSet_SET_NULL);
+        return inBitSet;
+    } else if ( (bit < 0) ||
+                (bit > inBitSet->n * 8 - 1) ) {
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psBitSetClear",
+                   PS_ERR_BAD_PARAMETER_VALUE, true,
+                   PS_ERRORTEXT_psBitSet_BIT_OUTOFRANGE,
+                   bit,inBitSet->n * 8 - 1);
+        return inBitSet;
+    }
+    // Variable byte is the byte in the array that contains the bit to be set
+    byte = inBitSet->bits + bit / 8;
+    *byte &= ! mask(bit);
+
+    return inBitSet;
+}
+
 bool psBitSetTest(const psBitSet* inBitSet, int bit)
 {
@@ -160,20 +147,20 @@
 
     if (inBitSet == NULL) {
-        psError(__func__, " : Line %d - Null psBitSet for inBitSet argument", __LINE__);
-        return 0;
-    } else if (bit < 0) {
-        psError(__func__, " : Line %d - Bit position too small: %d", __LINE__, bit);
-        return 0;
-    } else if (bit > inBitSet->n * 8 - 1) {
-        psError(__func__, " : Line %d - Bit position too large: %d", __LINE__, bit);
-        return 0;
-    }
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psBitSetTest",
+                   PS_ERR_BAD_PARAMETER_NULL, true,
+                   PS_ERRORTEXT_psBitSet_SET_NULL);
+        return false;
+    } else if ( (bit < 0) ||
+                (bit > inBitSet->n * 8 - 1) ) {
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psBitSetTest",
+                   PS_ERR_BAD_PARAMETER_VALUE, true,
+                   PS_ERRORTEXT_psBitSet_BIT_OUTOFRANGE,
+                   bit,inBitSet->n * 8 - 1);
+        return false;
+    }
+
     // Variable byte is the byte in the array that contains the bit to be tested
     byte = inBitSet->bits + bit / 8;
-    if ((int)(*byte & mask(bit)) == 0) {
-        return 0;
-    }
-
-    return 1;
+    return ((*byte & mask(bit)) != 0);
 }
 
@@ -183,57 +170,108 @@
     int i = 0;
     int n = 0;
-    char tempChar = '0';
-    char *outBits = NULL;
-    char *inBits1 = NULL;
-    char *inBits2 = NULL;
+    char* outBits = NULL;
+    char* inBits1 = NULL;
+    char* inBits2 = NULL;
+    int op = UNKNOWN_OP;
 
     if (inBitSet1 == NULL) {
-        psError(__func__, " : Line %d - Null psBitSet for inBitSet1 argument", __LINE__);
-        return outBitSet;
-    }
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psBitSetOp",
+                   PS_ERR_BAD_PARAMETER_NULL, true,
+                   PS_ERRORTEXT_psBitSet_FIRST_OPERAND_NULL);
+        psFree(outBitSet);
+        return NULL;
+    }
+    inBits1 = inBitSet1->bits;
 
     if (operator == NULL) {
-        psError(__func__, " : Line %d - Null input operator\n", __LINE__);
-        return outBitSet;
-    }
-
-    if (inBitSet2 == NULL) {
-        psError(__func__, " : Line %d - Null psBitSet for inBitSet2 argument", __LINE__);
-        return outBitSet;
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psBitSetOp",
+                   PS_ERR_BAD_PARAMETER_NULL, true,
+                   PS_ERRORTEXT_psBitSet_OPERATOR_NULL);
+        psFree(outBitSet);
+        return NULL;
+    }
+
+    // make operator all caps
+    int tempStrLen = strlen(operator);
+    char* tempStr = psAlloc(tempStrLen+1);
+
+    for (int lcv=0;lcv<tempStrLen;lcv++) {
+        tempStr[lcv] = (char)toupper(operator[lcv]);
+    }
+    tempStr[tempStrLen] = '\0';
+
+    // parse the operator
+    if (strcmp(operator,"AND")==0) {
+        op = AND_OP;
+    } else if (strcmp(operator,"OR")==0) {
+        op = OR_OP;
+    } else if (strcmp(operator,"XOR")==0) {
+        op = XOR_OP;
+    } else if (strcmp(operator,"NOT")==0) {
+        op = NOT_OP;
+    } else {
+        psFree(tempStr);
+        psFree(outBitSet);
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psBitSetOp",
+                   PS_ERR_BAD_PARAMETER_VALUE, true,
+                   PS_ERRORTEXT_psBitSet_OPERATOR_INVALID,
+                   operator);
+        return NULL;
+    }
+    psFree(tempStr);
+
+    if (op != NOT_OP) {
+        if (inBitSet2 == NULL) {
+            psErrorMsg(PS_ERRORNAME_DOMAIN "psBitSetOp",
+                       PS_ERR_BAD_PARAMETER_NULL, true,
+                       PS_ERRORTEXT_psBitSet_SECOND_OPERAND_NULL);
+            psFree(outBitSet);
+            return NULL;
+        }
+
+        if (inBitSet1->n != inBitSet2->n) {
+            psErrorMsg(PS_ERRORNAME_DOMAIN "psBitSetOp",
+                       PS_ERR_BAD_PARAMETER_SIZE, true,
+                       PS_ERRORTEXT_psBitSet_OPERANDS_SIZE_DIFFER);
+            psFree(outBitSet);
+            return NULL;
+        }
+        inBits2 = inBitSet2->bits;
     }
 
     if (outBitSet == NULL) {
-        outBitSet = psBitSetAlloc(inBitSet1->n * 8);
-    }
-
-    if (inBitSet1->n != inBitSet2->n || outBitSet->n != inBitSet1->n) {
-        psError(__func__, " : Line %d - psBitSet sizes not the same", __LINE__);
-        return outBitSet;
+        outBitSet = psBitSetAlloc(inBitSet1->n*8);
+    } else if (outBitSet->n != inBitSet1->n) {
+        outBitSet->n = inBitSet1->n;
+        outBitSet->bits = psRealloc(outBitSet->bits, inBitSet1->n);
     }
 
     n = outBitSet->n;
     outBits = outBitSet->bits;
-    inBits1 = inBitSet1->bits;
-    inBits2 = inBitSet2->bits;
-
-    tempChar = toupper(operator[0]);
-    switch (tempChar) {
-    case 'A':
+
+    switch (op) {
+    case AND_OP:
         for (i = 0; i < n; i++) {
             outBits[i] = inBits1[i] & inBits2[i];
         }
         break;
-    case 'O':
+    case OR_OP:
         for (i = 0; i < n; i++) {
             outBits[i] = inBits1[i] | inBits2[i];
         }
         break;
-    case 'X':
+    case XOR_OP:
         for (i = 0; i < n; i++) {
             outBits[i] = inBits1[i] ^ inBits2[i];
         }
         break;
+    case NOT_OP:
+        for (i = 0; i < n; i++) {
+            outBits[i] = ~inBits1[i];
+        }
+        break;
     default:
-        psError(__func__, " : Line %d - Invalid psBitMask binary operation: %s", __LINE__, operator);
+        psAbort(PS_ERRORNAME_DOMAIN "psBitSetOp",
+                "Unexpected error - operator parsed successfully but not valid?");
     }
 
@@ -243,34 +281,18 @@
 psBitSet* psBitSetNot(psBitSet* outBitSet, const psBitSet* restrict inBitSet)
 {
-    int i = 0;
-    int n = 0;
-    char *outBits = NULL;
-    char *inBits = NULL;
-
-    if (inBitSet == NULL) {
-        psError(__func__, " : Line %d - Null psBitSet for inBitSet argument", __LINE__);
-        return outBitSet;
-    }
-
-    n = inBitSet->n;
-    if (n == 0) {
-        psError(__func__, " : Line %d - No elements in inBitSet", __LINE__);
-        return outBitSet;
-    }
+    if (inBitSet == NULL) {
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psBitSetNot",
+                   PS_ERR_BAD_PARAMETER_NULL, true,
+                   PS_ERRORTEXT_psBitSet_OPERAND_NULL);
+        psFree(outBitSet);
+        return NULL;
+    }
+
+    outBitSet = psBitSetOp(outBitSet,inBitSet,"NOT",NULL);
 
     if (outBitSet == NULL) {
-        outBitSet = psBitSetAlloc(n * 8);
-    }
-
-    if (inBitSet->n != outBitSet->n) {
-        psError(__func__, " : Line %d - psBitSet sizes not the same", __LINE__);
-        return outBitSet;
-    }
-
-    outBits = outBitSet->bits;
-    inBits = inBitSet->bits;
-
-    for (i = 0; i < n; i++) {
-        outBits[i] = ~inBits[i];
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psBitSetNot",
+                   PS_ERR_UNKNOWN, false,
+                   PS_ERRORTEXT_psBitSet_NOT_OP_FAILED);
     }
 
@@ -284,10 +306,6 @@
     char *outString = psAlloc((size_t) numBits + 1);
 
-    if (outString == NULL) {
-        psAbort(__func__, " : Line %d - Failed to allocate memory", __LINE__);
-    }
-
     for (i = 0; i < numBits; i++) {
-        outString[numBits - i - 1] = (psBitSetTest(inBitSet, i) == 1) ? '1' : '0';
+        outString[numBits - i - 1] = psBitSetTest(inBitSet, i) ? '1' : '0';
     }
 
Index: /trunk/psLib/src/collections/psBitSet.h
===================================================================
--- /trunk/psLib/src/collections/psBitSet.h	(revision 1806)
+++ /trunk/psLib/src/collections/psBitSet.h	(revision 1807)
@@ -1,3 +1,2 @@
-
 /** @file  psBitSet.h
  *
@@ -13,6 +12,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-08-11 19:53:33 $
+ *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-14 20:01:52 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -26,7 +25,5 @@
 
 /******************************************************************************/
-
 /*  TYPE DEFINITIONS                                                          */
-
 /******************************************************************************/
 
@@ -44,7 +41,5 @@
 
 /*****************************************************************************/
-
 /* FUNCTION PROTOTYPES                                                       */
-
 /*****************************************************************************/
 
@@ -64,5 +59,5 @@
 /** Set a bit.
  *
- *  Sets a bit at a given bit location, either one or zero. The bit is set based on a zero index with the
+ *  Sets a bit at a given bit location. The bit is set based on a zero index with the
  *  first bit set in the zero bit slot of the zero element of the byte array. As an example, setting bit 3 in
  *  an array with two elements would result in an psBitSet that looks like 00000000 00001000.
@@ -74,4 +69,18 @@
     psBitSet* restrict inMask,         ///< Pointer to psBitSet to be set.
     int bit                            ///< Bit to be set.
+);
+
+/** Clear a bit.
+ *
+ *  Clear a bit at a given bit location. The bit is cleared based on a zero 
+ *  index with the first bit set in the zero bit slot of the zero element of 
+ *  the byte array. 
+ *
+ *  @return  psBitSet* : Pointer to struct containing psBitSet.
+ */
+psBitSet* psBitSetClear(
+    /* @returned@ */
+    psBitSet* restrict inMask,         ///< Pointer to psBitSet to be cleared.
+    int bit                            ///< Bit to be cleared.
 );
 
Index: /trunk/psLib/src/collections/psCollectionsErrors.dat
===================================================================
--- /trunk/psLib/src/collections/psCollectionsErrors.dat	(revision 1806)
+++ /trunk/psLib/src/collections/psCollectionsErrors.dat	(revision 1807)
@@ -7,3 +7,20 @@
 #  N.B. in code, the ERRORNAME appears as PS_ERRORTEXT_ERRORNAME
 ####################################################################
-psVector_NALLOC_NOT_POSITIVE    Parameter nalloc (%d) must be positive.
+#
+psVector_REALLOC_NULL                  psVectorRealloc must a given a non-NULL psVector to resize.  Desired datatype unknown.
+psVector_SORT_NULL                     psVectorSort can not sort a NULL psVector.
+psVector_UNSUPPORTED_TYPE              Input psVector is an unsupported type (%d).
+#
+psBitSet_ALLOC_NEG_SIZE                The number of bit in a psBitSet (%d) must be greater than zero.
+psBitSet_SET_NULL                      Can not operate on a NULL psBitSet.
+psBitSet_BIT_OUTOFRANGE                The specified bit position (%d) is invalid.  Position must be between 0 and %d.
+psBitSet_OPERATOR_NULL                 Specified operator is NULL.  Must specify desired operator.
+psBitSet_OPERATOR_INVALID              Specified operator, %s, is invalid.  Valid operators are AND, OR, and XOR.
+psBitSet_FIRST_OPERAND_NULL            First psBitSet operand can not be NULL.
+psBitSet_SECOND_OPERAND_NULL           Second psBitSet operand can not be NULL.
+psBitSet_OPERANDS_SIZE_DIFFER          The psBitSet operand must be the same size.
+psBitSet_NOT_OP_FAILED                 Could not perform NOT operation.
+psBitSet_OPERAND_NULL                  Operand can not be NULL.
+#
+psScalar_UNSUPPORTED_TYPE              Specified datatype (%d) is unsupported by psScalar.
+psScalar_COPY_NULL                     Can not copy a NULL psScalar.
Index: /trunk/psLib/src/collections/psCollectionsErrors.h
===================================================================
--- /trunk/psLib/src/collections/psCollectionsErrors.h	(revision 1806)
+++ /trunk/psLib/src/collections/psCollectionsErrors.h	(revision 1807)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-11 00:43:54 $
+ *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-14 20:01:52 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -30,5 +30,19 @@
 
 //~Start #define PS_ERRORTEXT_$1 "$2"
-#define PS_ERRORTEXT_psVector_NALLOC_NOT_POSITIVE "Parameter nalloc (%d) must be positive"
+#define PS_ERRORTEXT_psVector_REALLOC_NULL "psVectorRealloc must a given a non-NULL psVector to resize.  Desired datatype unknown."
+#define PS_ERRORTEXT_psVector_SORT_NULL "psVectorSort can not sort a NULL psVector."
+#define PS_ERRORTEXT_psVector_UNSUPPORTED_TYPE "Input psVector is an unsupported type (%d)."
+#define PS_ERRORTEXT_psBitSet_ALLOC_NEG_SIZE "The number of bit in a psBitSet (%d) must be greater than zero."
+#define PS_ERRORTEXT_psBitSet_SET_NULL "Can not operate on a NULL psBitSet."
+#define PS_ERRORTEXT_psBitSet_BIT_OUTOFRANGE "The specified bit position (%d) is invalid.  Position must be between 0 and %d."
+#define PS_ERRORTEXT_psBitSet_OPERATOR_NULL "Specified operator is NULL.  Must specify desired operator."
+#define PS_ERRORTEXT_psBitSet_OPERATOR_INVALID "Specified operator, %s, is invalid.  Valid operators are AND, OR, and XOR."
+#define PS_ERRORTEXT_psBitSet_FIRST_OPERAND_NULL "First psBitSet operand can not be NULL."
+#define PS_ERRORTEXT_psBitSet_SECOND_OPERAND_NULL "Second psBitSet operand can not be NULL."
+#define PS_ERRORTEXT_psBitSet_OPERANDS_SIZE_DIFFER "The psBitSet operand must be the same size."
+#define PS_ERRORTEXT_psBitSet_NOT_OP_FAILED "Could not perform NOT operation."
+#define PS_ERRORTEXT_psBitSet_OPERAND_NULL "Operand can not be NULL."
+#define PS_ERRORTEXT_psScalar_UNSUPPORTED_TYPE "Specified datatype (%d) is unsupported by psScalar."
+#define PS_ERRORTEXT_psScalar_COPY_NULL "Can not copy a NULL psScalar."
 //~End
 
Index: /trunk/psLib/src/collections/psList.c
===================================================================
--- /trunk/psLib/src/collections/psList.c	(revision 1806)
+++ /trunk/psLib/src/collections/psList.c	(revision 1807)
@@ -1,3 +1,2 @@
-
 /** @file psList.c
  *  @brief Support for doubly linked lists
@@ -7,6 +6,6 @@
  *  @author Robert Daniel DeSonia, MHPCC
  *
- *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-09 02:23:27 $
+ *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-14 20:01:52 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -24,4 +23,6 @@
 #include "psTrace.h"
 #include "psLogMsg.h"
+
+#include "psCollectionsErrors.h"
 
 #define ITER_INIT_HEAD ((void *)1)         // next iteration should return head
Index: /trunk/psLib/src/collections/psScalar.c
===================================================================
--- /trunk/psLib/src/collections/psScalar.c	(revision 1806)
+++ /trunk/psLib/src/collections/psScalar.c	(revision 1807)
@@ -1,3 +1,2 @@
-
 /** @file  psScalar.c
  *
@@ -9,15 +8,10 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-08-27 23:34:05 $
+ *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-14 20:01:52 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
  */
 
-/******************************************************************************/
-
-/*  INCLUDE FILES                                                             */
-
-/******************************************************************************/
 #include "psMemory.h"
 #include "psError.h"
@@ -26,49 +20,6 @@
 #include "psAbort.h"
 
-/******************************************************************************/
+#include "psCollectionsErrors.h"
 
-/*  DEFINE STATEMENTS                                                         */
-
-/******************************************************************************/
-
-// None
-
-/******************************************************************************/
-
-/*  TYPE DEFINITIONS                                                          */
-
-/******************************************************************************/
-
-// None
-
-/*****************************************************************************/
-
-/*  GLOBAL VARIABLES                                                         */
-
-/*****************************************************************************/
-
-// None
-
-/*****************************************************************************/
-
-/*  FILE STATIC VARIABLES                                                    */
-
-/*****************************************************************************/
-
-// None
-
-/*****************************************************************************/
-
-/*  FUNCTION IMPLEMENTATION - LOCAL                                          */
-
-/*****************************************************************************/
-
-// None
-
-/*****************************************************************************/
-
-/* FUNCTION IMPLEMENTATION - PUBLIC                                          */
-
-/*****************************************************************************/
 psScalar* psScalarAlloc(psC64 value, psElemType dataType)
 {
@@ -77,7 +28,4 @@
     // Create scalar
     scalar = (psScalar* ) psAlloc(sizeof(psScalar));
-    if (scalar == NULL) {
-        psAbort(__func__, " : Line %d - Failed to allocate memory", __LINE__);
-    }
 
     scalar->type.dimen = PS_DIMEN_SCALAR;
@@ -122,5 +70,8 @@
         break;
     default:
-        psError(__func__, ": Line %d - Invalid PS_TYPE: %d", __LINE__, dataType);
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psScalarAlloc",
+                   PS_ERR_BAD_PARAMETER_TYPE, true,
+                   PS_ERRORTEXT_psScalar_UNSUPPORTED_TYPE,
+                   dataType);
     }
 
@@ -134,5 +85,8 @@
 
     if (scalar == NULL) {
-        psError(__func__, "Null scalar not allowed");
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psScalarCopy",
+                   PS_ERR_BAD_PARAMETER_NULL, true,
+                   PS_ERRORTEXT_psScalar_COPY_NULL);
+        return NULL;
     }
 
@@ -176,5 +130,8 @@
         break;
     default:
-        psError(__func__, ": Line %d - Invalid PS_TYPE: %d", __LINE__, dataType);
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psScalarCopy",
+                   PS_ERR_BAD_PARAMETER_TYPE, true,
+                   PS_ERRORTEXT_psScalar_UNSUPPORTED_TYPE,
+                   dataType);
     }
 
Index: /trunk/psLib/src/collections/psVector.c
===================================================================
--- /trunk/psLib/src/collections/psVector.c	(revision 1806)
+++ /trunk/psLib/src/collections/psVector.c	(revision 1807)
@@ -10,6 +10,6 @@
 *  @author Robert DeSonia, MHPCC
 *
-*  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-09-09 21:59:03 $
+*  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-09-14 20:01:52 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -25,7 +25,18 @@
 #include "psLogMsg.h"
 #include "psCompare.h"
+
 #include "psCollectionsErrors.h"
 
 static void vectorFree(psVector* restrict psVec);
+
+
+static void vectorFree(psVector* restrict psVec)
+{
+    if (psVec == NULL) {
+        return;
+    }
+
+    psFree(psVec->data.V);
+}
 
 // FUNCTION IMPLEMENTATION - PUBLIC
@@ -35,10 +46,4 @@
     psVector* psVec = NULL;
     int elementSize = 0;
-
-    // Invalid nalloc
-    if (nalloc < 1) {
-        psError(__func__, "Invalid value for nalloc. nalloc: %d\n", nalloc);
-        return NULL;
-    }
 
     elementSize = PSELEMTYPE_SIZEOF(elemType);
@@ -64,12 +69,8 @@
     psElemType elemType;
 
-    // Invalid nalloc
-    if (nalloc < 1) {
-        psError(__func__, "Invalid value for realloc (%d)\n", nalloc);
-        return NULL;
-    }
-
     if (in == NULL) {
-        psError(__func__, "Null input vector\n");
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psVectorRealloc",
+                   PS_ERR_BAD_PARAMETER_NULL, true,
+                   PS_ERRORTEXT_psVector_REALLOC_NULL);
         return NULL;
     } else if (in->nalloc != nalloc) {     // No need to realloc to same size
@@ -101,10 +102,4 @@
         return in;
     }
-    // Invalid nalloc
-    if (nalloc < 1) {
-        psError(__func__, "Invalid value for nalloc (%d)\n", nalloc);
-        psFree(in);
-        return NULL;
-    }
 
     in->data.V = psRealloc(in->data.V, nalloc * PSELEMTYPE_SIZEOF(type));
@@ -119,6 +114,5 @@
 psVector* psVectorSort(psVector* restrict outVector, const psVector* restrict inVector)
 {
-    int inN = 0;
-    int outN = 0;
+    int N = 0;
     int elSize = 0;
     void *inVec = NULL;
@@ -127,79 +121,76 @@
 
     if (inVector == NULL) {
-        psError(__func__, " : Line %d - Null input vector\n", __LINE__);
-        return outVector;
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psVectorSort",
+                   PS_ERR_BAD_PARAMETER_NULL, true,
+                   PS_ERRORTEXT_psVector_SORT_NULL);
+        psFree(outVector);
+        return NULL;
     }
 
     inType = inVector->type.type;
-    inN = inVector->n;
+    N = inVector->n;
     inVec = inVector->data.V;
     elSize = PSELEMTYPE_SIZEOF(inType);
 
     if (outVector == NULL) {
-        outVector = psVectorAlloc(inN, inType);
-        outVector->n = inVector->n;
-    }
-
-    outN = outVector->n;
+        outVector = psVectorAlloc(N, inType);
+    }
+
+    // check to see if output vector needs to be resized/retyped
+    if ( (N > outVector->nalloc) ||
+            (inType != outVector->type.type) ) {
+        // reshape the output vector to match the input vector's size/type.
+        outVector = psVectorRecycle(outVector,N,inType);
+    }
+    outVector->n = N;
     outVec = outVector->data.V;
 
-    if (inN != outN) {
-        psError(__func__, " : Line %d - Input and output vector sizes are not equal: in=%d out=%d\n",
-                __LINE__, inN, outN);
+    if (N == 0) {
+        // no need to sort anything, as there are no elements in input vector.
         return outVector;
     }
 
-    if (inType != outVector->type.type) {
-        psError(__func__, " : Line %d - Input and output vectors are not same type: in=%d out=%d\n", __LINE__,
-                inType, outVector->type.type);
-        return outVector;
-    }
-
-    if (inN == 0) {
-        psError(__func__, " : Line %d - No elements in use for input vector\n", __LINE__);
-        return outVector;
-    }
-
-    if (outN == 0) {
-        psError(__func__, " : Line %d - No elements in use for output vector\n", __LINE__);
-        return outVector;
-    }
-    // Copy input vector values into output vector
-    memcpy(outVec, inVec, elSize * outN);
+    // Copy input vector values into output vector if not in-place sorting
+    if (inVector != outVector) {
+        memcpy(outVec, inVec, elSize * N);
+    }
 
     // Sort output vector
     switch (inType) {
     case PS_TYPE_U8:
-        qsort(outVec, inN, elSize, psCompareU8);
+        qsort(outVec, N, elSize, psCompareU8);
         break;
     case PS_TYPE_U16:
-        qsort(outVec, inN, elSize, psCompareU16);
+        qsort(outVec, N, elSize, psCompareU16);
         break;
     case PS_TYPE_U32:
-        qsort(outVec, inN, elSize, psCompareU32);
+        qsort(outVec, N, elSize, psCompareU32);
         break;
     case PS_TYPE_U64:
-        qsort(outVec, inN, elSize, psCompareU64);
+        qsort(outVec, N, elSize, psCompareU64);
         break;
     case PS_TYPE_S8:
-        qsort(outVec, inN, elSize, psCompareS8);
+        qsort(outVec, N, elSize, psCompareS8);
         break;
     case PS_TYPE_S16:
-        qsort(outVec, inN, elSize, psCompareS16);
+        qsort(outVec, N, elSize, psCompareS16);
         break;
     case PS_TYPE_S32:
-        qsort(outVec, inN, elSize, psCompareS32);
+        qsort(outVec, N, elSize, psCompareS32);
         break;
     case PS_TYPE_S64:
-        qsort(outVec, inN, elSize, psCompareS64);
+        qsort(outVec, N, elSize, psCompareS64);
         break;
     case PS_TYPE_F32:
-        qsort(outVec, inN, elSize, psCompareF32);
+        qsort(outVec, N, elSize, psCompareF32);
         break;
     case PS_TYPE_F64:
-        qsort(outVec, inN, elSize, psCompareF64);
+        qsort(outVec, N, elSize, psCompareF64);
         break;
     default:
-        psError(__func__, " : Line %d - Invalid psType\n", __LINE__);
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psVectorSort",
+                   PS_ERR_BAD_PARAMETER_TYPE, true,
+                   PS_ERRORTEXT_psVector_UNSUPPORTED_TYPE,
+                   inType);
     }
 
@@ -207,94 +198,99 @@
 }
 
-#define SORT_INDICES(TYPE)                                                                                   \
-for(i=0; i<inN; i++) {                                                                                       \
-    for(j=0; j<inN; j++) {                                                                                   \
-        diff = fabs((double)tmpVector->data.TYPE[i] - inVec[j]);                                             \
-        if(diff < FLT_EPSILON) {                                                                             \
-            outVec[i] = j;                                                                                   \
-            break;                                                                                           \
-        }                                                                                                    \
-    }                                                                                                        \
-}
-
 psVector* psVectorSortIndex(psVector* restrict outVector, const psVector* restrict inVector)
 {
-    int inN = 0;
-    int outN = 0;
-    int i = 0;
-    int j = 0;
-    float *inVec = NULL;
-    int *outVec = NULL;
-    double diff = 0.0f;
+    int N = 0;
     psVector* tmpVector = NULL;
     psElemType inType = 0;
+    psU32* outVec;
 
     if (inVector == NULL) {
-        psError(__func__, " : Line %d - Null input vector\n", __LINE__);
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psVectorSortIndex",
+                   PS_ERR_BAD_PARAMETER_NULL, true,
+                   PS_ERRORTEXT_psVector_SORT_NULL);
+        psFree(outVector);
+        return NULL;
+    }
+
+    N = inVector->n;
+
+    if (outVector == NULL) {
+        outVector = psVectorAlloc(N, PS_TYPE_U32);
+    }
+
+    // check to see if output vector needs to be resized/retyped
+    if ( (N > outVector->nalloc) ||
+            (outVector->type.type != PS_TYPE_U32) ) {
+        // reshape the output vector to match the input vector's size/type.
+        outVector = psVectorRecycle(outVector,N,PS_TYPE_U32);
+    }
+    outVector->n = N;
+    outVec = outVector->data.U32;
+
+    if (N == 0) {
+        // no need to sort anything, as there are no elements in input vector.
         return outVector;
     }
 
-    inN = inVector->n;
-    inVec = inVector->data.V;
-    inType = inVector->type.type;
-
-    if (outVector == NULL) {
-        outVector = psVectorAlloc(inN, PS_TYPE_U32);
-        outVector->n = inN;
-    }
-
-    outN = outVector->n;
-    outVec = outVector->data.V;
-
-    if (inN != outN) {
-        psError(__func__, " : Line %d - Input and output vector sizes are not equal: in=%d out=%d\n",
-                __LINE__, inN, outN);
-        return outVector;
-    }
-
-    if (outVector->type.type != PS_TYPE_U32) {
-        psError(__func__, " : Line %d - Output vector is not of type U32: out=%d\n",
-                __LINE__, outVector->type.type);
-        return outVector;
-    }
-
-    tmpVector = psVectorAlloc(inN, inType);
-    tmpVector->n = inN;
     tmpVector = psVectorSort(tmpVector, inVector);
+
+    #define SORT_INDICES(TYPE,absfcn,maxError) {                              \
+        ps##TYPE* inVec = inVector->data.TYPE;                                \
+        ps##TYPE* tmpVec = tmpVector->data.TYPE;                              \
+        ps##TYPE  diff;                                                       \
+        for(int i=0; i<N; i++) {                                              \
+            for(int j=0; j<N; j++) {                                          \
+                diff = absfcn(tmpVec[i] - inVec[j]);                          \
+                if(diff < maxError) {                                         \
+                    outVec[i] = j;                                            \
+                    break;                                                    \
+                }                                                             \
+            }                                                                 \
+        }                                                                     \
+    }
 
     // Sort output vector
     switch (inType) {
     case PS_TYPE_U8:
-        SORT_INDICES(U8);
+        SORT_INDICES(U8,/* no absfcn needed */,1);
         break;
     case PS_TYPE_U16:
-        SORT_INDICES(U16);
+        SORT_INDICES(U16,/* no absfcn needed */,1);
         break;
     case PS_TYPE_U32:
-        SORT_INDICES(U32);
+        SORT_INDICES(U32,/* no absfcn needed */,1);
         break;
     case PS_TYPE_U64:
-        SORT_INDICES(U64);
+        SORT_INDICES(U64,/* no absfcn needed */,1);
         break;
     case PS_TYPE_S8:
-        SORT_INDICES(S8);
+        SORT_INDICES(S8,/* no absfcn needed */,1);
         break;
     case PS_TYPE_S16:
-        SORT_INDICES(S16);
+        SORT_INDICES(S16,/* no absfcn needed */,1);
         break;
     case PS_TYPE_S32:
-        SORT_INDICES(S32);
+        SORT_INDICES(S32,/* no absfcn needed */,1);
         break;
     case PS_TYPE_S64:
-        SORT_INDICES(S64);
+        SORT_INDICES(S64,/* no absfcn needed */,1);
         break;
     case PS_TYPE_F32:
-        SORT_INDICES(F32);
+        SORT_INDICES(F32,fabsf,FLT_EPSILON);
         break;
     case PS_TYPE_F64:
-        SORT_INDICES(F64);
+        SORT_INDICES(F64,fabs,DBL_EPSILON);
+        break;
+    case PS_TYPE_C32:
+        SORT_INDICES(F64,cabsf,FLT_EPSILON);
+        break;
+    case PS_TYPE_C64:
+        SORT_INDICES(F64,cabs,DBL_EPSILON);
         break;
     default:
-        psError(__func__, " : Line %d - Invalid psType\n", __LINE__);
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psVectorSortIndex",
+                   PS_ERR_BAD_PARAMETER_TYPE, true,
+                   PS_ERRORTEXT_psVector_UNSUPPORTED_TYPE,
+                   inType);
     }
 
@@ -304,11 +300,2 @@
     return outVector;
 }
-
-static void vectorFree(psVector* restrict psVec)
-{
-    if (psVec == NULL) {
-        return;
-    }
-
-    psFree(psVec->data.V);
-}
Index: /trunk/psLib/src/mathtypes/psScalar.c
===================================================================
--- /trunk/psLib/src/mathtypes/psScalar.c	(revision 1806)
+++ /trunk/psLib/src/mathtypes/psScalar.c	(revision 1807)
@@ -1,3 +1,2 @@
-
 /** @file  psScalar.c
  *
@@ -9,15 +8,10 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-08-27 23:34:05 $
+ *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-14 20:01:52 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
  */
 
-/******************************************************************************/
-
-/*  INCLUDE FILES                                                             */
-
-/******************************************************************************/
 #include "psMemory.h"
 #include "psError.h"
@@ -26,49 +20,6 @@
 #include "psAbort.h"
 
-/******************************************************************************/
+#include "psCollectionsErrors.h"
 
-/*  DEFINE STATEMENTS                                                         */
-
-/******************************************************************************/
-
-// None
-
-/******************************************************************************/
-
-/*  TYPE DEFINITIONS                                                          */
-
-/******************************************************************************/
-
-// None
-
-/*****************************************************************************/
-
-/*  GLOBAL VARIABLES                                                         */
-
-/*****************************************************************************/
-
-// None
-
-/*****************************************************************************/
-
-/*  FILE STATIC VARIABLES                                                    */
-
-/*****************************************************************************/
-
-// None
-
-/*****************************************************************************/
-
-/*  FUNCTION IMPLEMENTATION - LOCAL                                          */
-
-/*****************************************************************************/
-
-// None
-
-/*****************************************************************************/
-
-/* FUNCTION IMPLEMENTATION - PUBLIC                                          */
-
-/*****************************************************************************/
 psScalar* psScalarAlloc(psC64 value, psElemType dataType)
 {
@@ -77,7 +28,4 @@
     // Create scalar
     scalar = (psScalar* ) psAlloc(sizeof(psScalar));
-    if (scalar == NULL) {
-        psAbort(__func__, " : Line %d - Failed to allocate memory", __LINE__);
-    }
 
     scalar->type.dimen = PS_DIMEN_SCALAR;
@@ -122,5 +70,8 @@
         break;
     default:
-        psError(__func__, ": Line %d - Invalid PS_TYPE: %d", __LINE__, dataType);
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psScalarAlloc",
+                   PS_ERR_BAD_PARAMETER_TYPE, true,
+                   PS_ERRORTEXT_psScalar_UNSUPPORTED_TYPE,
+                   dataType);
     }
 
@@ -134,5 +85,8 @@
 
     if (scalar == NULL) {
-        psError(__func__, "Null scalar not allowed");
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psScalarCopy",
+                   PS_ERR_BAD_PARAMETER_NULL, true,
+                   PS_ERRORTEXT_psScalar_COPY_NULL);
+        return NULL;
     }
 
@@ -176,5 +130,8 @@
         break;
     default:
-        psError(__func__, ": Line %d - Invalid PS_TYPE: %d", __LINE__, dataType);
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psScalarCopy",
+                   PS_ERR_BAD_PARAMETER_TYPE, true,
+                   PS_ERRORTEXT_psScalar_UNSUPPORTED_TYPE,
+                   dataType);
     }
 
Index: /trunk/psLib/src/mathtypes/psVector.c
===================================================================
--- /trunk/psLib/src/mathtypes/psVector.c	(revision 1806)
+++ /trunk/psLib/src/mathtypes/psVector.c	(revision 1807)
@@ -10,6 +10,6 @@
 *  @author Robert DeSonia, MHPCC
 *
-*  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-09-09 21:59:03 $
+*  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-09-14 20:01:52 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -25,7 +25,18 @@
 #include "psLogMsg.h"
 #include "psCompare.h"
+
 #include "psCollectionsErrors.h"
 
 static void vectorFree(psVector* restrict psVec);
+
+
+static void vectorFree(psVector* restrict psVec)
+{
+    if (psVec == NULL) {
+        return;
+    }
+
+    psFree(psVec->data.V);
+}
 
 // FUNCTION IMPLEMENTATION - PUBLIC
@@ -35,10 +46,4 @@
     psVector* psVec = NULL;
     int elementSize = 0;
-
-    // Invalid nalloc
-    if (nalloc < 1) {
-        psError(__func__, "Invalid value for nalloc. nalloc: %d\n", nalloc);
-        return NULL;
-    }
 
     elementSize = PSELEMTYPE_SIZEOF(elemType);
@@ -64,12 +69,8 @@
     psElemType elemType;
 
-    // Invalid nalloc
-    if (nalloc < 1) {
-        psError(__func__, "Invalid value for realloc (%d)\n", nalloc);
-        return NULL;
-    }
-
     if (in == NULL) {
-        psError(__func__, "Null input vector\n");
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psVectorRealloc",
+                   PS_ERR_BAD_PARAMETER_NULL, true,
+                   PS_ERRORTEXT_psVector_REALLOC_NULL);
         return NULL;
     } else if (in->nalloc != nalloc) {     // No need to realloc to same size
@@ -101,10 +102,4 @@
         return in;
     }
-    // Invalid nalloc
-    if (nalloc < 1) {
-        psError(__func__, "Invalid value for nalloc (%d)\n", nalloc);
-        psFree(in);
-        return NULL;
-    }
 
     in->data.V = psRealloc(in->data.V, nalloc * PSELEMTYPE_SIZEOF(type));
@@ -119,6 +114,5 @@
 psVector* psVectorSort(psVector* restrict outVector, const psVector* restrict inVector)
 {
-    int inN = 0;
-    int outN = 0;
+    int N = 0;
     int elSize = 0;
     void *inVec = NULL;
@@ -127,79 +121,76 @@
 
     if (inVector == NULL) {
-        psError(__func__, " : Line %d - Null input vector\n", __LINE__);
-        return outVector;
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psVectorSort",
+                   PS_ERR_BAD_PARAMETER_NULL, true,
+                   PS_ERRORTEXT_psVector_SORT_NULL);
+        psFree(outVector);
+        return NULL;
     }
 
     inType = inVector->type.type;
-    inN = inVector->n;
+    N = inVector->n;
     inVec = inVector->data.V;
     elSize = PSELEMTYPE_SIZEOF(inType);
 
     if (outVector == NULL) {
-        outVector = psVectorAlloc(inN, inType);
-        outVector->n = inVector->n;
-    }
-
-    outN = outVector->n;
+        outVector = psVectorAlloc(N, inType);
+    }
+
+    // check to see if output vector needs to be resized/retyped
+    if ( (N > outVector->nalloc) ||
+            (inType != outVector->type.type) ) {
+        // reshape the output vector to match the input vector's size/type.
+        outVector = psVectorRecycle(outVector,N,inType);
+    }
+    outVector->n = N;
     outVec = outVector->data.V;
 
-    if (inN != outN) {
-        psError(__func__, " : Line %d - Input and output vector sizes are not equal: in=%d out=%d\n",
-                __LINE__, inN, outN);
+    if (N == 0) {
+        // no need to sort anything, as there are no elements in input vector.
         return outVector;
     }
 
-    if (inType != outVector->type.type) {
-        psError(__func__, " : Line %d - Input and output vectors are not same type: in=%d out=%d\n", __LINE__,
-                inType, outVector->type.type);
-        return outVector;
-    }
-
-    if (inN == 0) {
-        psError(__func__, " : Line %d - No elements in use for input vector\n", __LINE__);
-        return outVector;
-    }
-
-    if (outN == 0) {
-        psError(__func__, " : Line %d - No elements in use for output vector\n", __LINE__);
-        return outVector;
-    }
-    // Copy input vector values into output vector
-    memcpy(outVec, inVec, elSize * outN);
+    // Copy input vector values into output vector if not in-place sorting
+    if (inVector != outVector) {
+        memcpy(outVec, inVec, elSize * N);
+    }
 
     // Sort output vector
     switch (inType) {
     case PS_TYPE_U8:
-        qsort(outVec, inN, elSize, psCompareU8);
+        qsort(outVec, N, elSize, psCompareU8);
         break;
     case PS_TYPE_U16:
-        qsort(outVec, inN, elSize, psCompareU16);
+        qsort(outVec, N, elSize, psCompareU16);
         break;
     case PS_TYPE_U32:
-        qsort(outVec, inN, elSize, psCompareU32);
+        qsort(outVec, N, elSize, psCompareU32);
         break;
     case PS_TYPE_U64:
-        qsort(outVec, inN, elSize, psCompareU64);
+        qsort(outVec, N, elSize, psCompareU64);
         break;
     case PS_TYPE_S8:
-        qsort(outVec, inN, elSize, psCompareS8);
+        qsort(outVec, N, elSize, psCompareS8);
         break;
     case PS_TYPE_S16:
-        qsort(outVec, inN, elSize, psCompareS16);
+        qsort(outVec, N, elSize, psCompareS16);
         break;
     case PS_TYPE_S32:
-        qsort(outVec, inN, elSize, psCompareS32);
+        qsort(outVec, N, elSize, psCompareS32);
         break;
     case PS_TYPE_S64:
-        qsort(outVec, inN, elSize, psCompareS64);
+        qsort(outVec, N, elSize, psCompareS64);
         break;
     case PS_TYPE_F32:
-        qsort(outVec, inN, elSize, psCompareF32);
+        qsort(outVec, N, elSize, psCompareF32);
         break;
     case PS_TYPE_F64:
-        qsort(outVec, inN, elSize, psCompareF64);
+        qsort(outVec, N, elSize, psCompareF64);
         break;
     default:
-        psError(__func__, " : Line %d - Invalid psType\n", __LINE__);
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psVectorSort",
+                   PS_ERR_BAD_PARAMETER_TYPE, true,
+                   PS_ERRORTEXT_psVector_UNSUPPORTED_TYPE,
+                   inType);
     }
 
@@ -207,94 +198,99 @@
 }
 
-#define SORT_INDICES(TYPE)                                                                                   \
-for(i=0; i<inN; i++) {                                                                                       \
-    for(j=0; j<inN; j++) {                                                                                   \
-        diff = fabs((double)tmpVector->data.TYPE[i] - inVec[j]);                                             \
-        if(diff < FLT_EPSILON) {                                                                             \
-            outVec[i] = j;                                                                                   \
-            break;                                                                                           \
-        }                                                                                                    \
-    }                                                                                                        \
-}
-
 psVector* psVectorSortIndex(psVector* restrict outVector, const psVector* restrict inVector)
 {
-    int inN = 0;
-    int outN = 0;
-    int i = 0;
-    int j = 0;
-    float *inVec = NULL;
-    int *outVec = NULL;
-    double diff = 0.0f;
+    int N = 0;
     psVector* tmpVector = NULL;
     psElemType inType = 0;
+    psU32* outVec;
 
     if (inVector == NULL) {
-        psError(__func__, " : Line %d - Null input vector\n", __LINE__);
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psVectorSortIndex",
+                   PS_ERR_BAD_PARAMETER_NULL, true,
+                   PS_ERRORTEXT_psVector_SORT_NULL);
+        psFree(outVector);
+        return NULL;
+    }
+
+    N = inVector->n;
+
+    if (outVector == NULL) {
+        outVector = psVectorAlloc(N, PS_TYPE_U32);
+    }
+
+    // check to see if output vector needs to be resized/retyped
+    if ( (N > outVector->nalloc) ||
+            (outVector->type.type != PS_TYPE_U32) ) {
+        // reshape the output vector to match the input vector's size/type.
+        outVector = psVectorRecycle(outVector,N,PS_TYPE_U32);
+    }
+    outVector->n = N;
+    outVec = outVector->data.U32;
+
+    if (N == 0) {
+        // no need to sort anything, as there are no elements in input vector.
         return outVector;
     }
 
-    inN = inVector->n;
-    inVec = inVector->data.V;
-    inType = inVector->type.type;
-
-    if (outVector == NULL) {
-        outVector = psVectorAlloc(inN, PS_TYPE_U32);
-        outVector->n = inN;
-    }
-
-    outN = outVector->n;
-    outVec = outVector->data.V;
-
-    if (inN != outN) {
-        psError(__func__, " : Line %d - Input and output vector sizes are not equal: in=%d out=%d\n",
-                __LINE__, inN, outN);
-        return outVector;
-    }
-
-    if (outVector->type.type != PS_TYPE_U32) {
-        psError(__func__, " : Line %d - Output vector is not of type U32: out=%d\n",
-                __LINE__, outVector->type.type);
-        return outVector;
-    }
-
-    tmpVector = psVectorAlloc(inN, inType);
-    tmpVector->n = inN;
     tmpVector = psVectorSort(tmpVector, inVector);
+
+    #define SORT_INDICES(TYPE,absfcn,maxError) {                              \
+        ps##TYPE* inVec = inVector->data.TYPE;                                \
+        ps##TYPE* tmpVec = tmpVector->data.TYPE;                              \
+        ps##TYPE  diff;                                                       \
+        for(int i=0; i<N; i++) {                                              \
+            for(int j=0; j<N; j++) {                                          \
+                diff = absfcn(tmpVec[i] - inVec[j]);                          \
+                if(diff < maxError) {                                         \
+                    outVec[i] = j;                                            \
+                    break;                                                    \
+                }                                                             \
+            }                                                                 \
+        }                                                                     \
+    }
 
     // Sort output vector
     switch (inType) {
     case PS_TYPE_U8:
-        SORT_INDICES(U8);
+        SORT_INDICES(U8,/* no absfcn needed */,1);
         break;
     case PS_TYPE_U16:
-        SORT_INDICES(U16);
+        SORT_INDICES(U16,/* no absfcn needed */,1);
         break;
     case PS_TYPE_U32:
-        SORT_INDICES(U32);
+        SORT_INDICES(U32,/* no absfcn needed */,1);
         break;
     case PS_TYPE_U64:
-        SORT_INDICES(U64);
+        SORT_INDICES(U64,/* no absfcn needed */,1);
         break;
     case PS_TYPE_S8:
-        SORT_INDICES(S8);
+        SORT_INDICES(S8,/* no absfcn needed */,1);
         break;
     case PS_TYPE_S16:
-        SORT_INDICES(S16);
+        SORT_INDICES(S16,/* no absfcn needed */,1);
         break;
     case PS_TYPE_S32:
-        SORT_INDICES(S32);
+        SORT_INDICES(S32,/* no absfcn needed */,1);
         break;
     case PS_TYPE_S64:
-        SORT_INDICES(S64);
+        SORT_INDICES(S64,/* no absfcn needed */,1);
         break;
     case PS_TYPE_F32:
-        SORT_INDICES(F32);
+        SORT_INDICES(F32,fabsf,FLT_EPSILON);
         break;
     case PS_TYPE_F64:
-        SORT_INDICES(F64);
+        SORT_INDICES(F64,fabs,DBL_EPSILON);
+        break;
+    case PS_TYPE_C32:
+        SORT_INDICES(F64,cabsf,FLT_EPSILON);
+        break;
+    case PS_TYPE_C64:
+        SORT_INDICES(F64,cabs,DBL_EPSILON);
         break;
     default:
-        psError(__func__, " : Line %d - Invalid psType\n", __LINE__);
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psVectorSortIndex",
+                   PS_ERR_BAD_PARAMETER_TYPE, true,
+                   PS_ERRORTEXT_psVector_UNSUPPORTED_TYPE,
+                   inType);
     }
 
@@ -304,11 +300,2 @@
     return outVector;
 }
-
-static void vectorFree(psVector* restrict psVec)
-{
-    if (psVec == NULL) {
-        return;
-    }
-
-    psFree(psVec->data.V);
-}
Index: /trunk/psLib/src/parseErrorCodes.pl
===================================================================
--- /trunk/psLib/src/parseErrorCodes.pl	(revision 1806)
+++ /trunk/psLib/src/parseErrorCodes.pl	(revision 1807)
@@ -34,11 +34,13 @@
     }
     else {
-        /^\s*(\w+)\s+([\%\w].*)/;
-        my $ErrorCode        = $1;
-        my $ErrorDescription = $2;
-        print "  $ErrorCode: '$ErrorDescription'\n" if $verbose;
-        push( @ErrorCodes,        $ErrorCode );
-        push( @ErrorDescriptions, $ErrorDescription );
-
+        if (/^\s*(\w+)\s+([\%\w].*)/) {
+            my $ErrorCode        = $1;
+            my $ErrorDescription = $2;
+            print "  $ErrorCode: '$ErrorDescription'\n" if $verbose;
+            push( @ErrorCodes,        $ErrorCode );
+            push( @ErrorDescriptions, $ErrorDescription );
+        } else {
+            print "I $_\n" if $verbose;
+        }
     }
 }
Index: /trunk/psLib/src/psErrorCodes.dat
===================================================================
--- /trunk/psLib/src/psErrorCodes.dat	(revision 1806)
+++ /trunk/psLib/src/psErrorCodes.dat	(revision 1807)
@@ -13,5 +13,6 @@
 MEMORY_DEREF_USAGE             dereferenced memory still used
 BAD_PARAMETER_VALUE            parameter is out-of-range
+BAD_PARAMETER_TYPE             parameter is of unsupported data-type
 BAD_PARAMETER_NULL             parameter is null
-BAD_PARAMETER_LENGTH           parameter string is too long
+BAD_PARAMETER_SIZE             size of parameter's data is outside of acceptable range.
 UNEXPECTED_NULL                unexpected NULL found
Index: /trunk/psLib/src/sys/psError.c
===================================================================
--- /trunk/psLib/src/sys/psError.c	(revision 1806)
+++ /trunk/psLib/src/sys/psError.c	(revision 1807)
@@ -10,6 +10,6 @@
  *  @author Eric Van Alst, MHPCC
  *   
- *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-07 19:05:07 $
+ *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-14 20:01:52 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -96,17 +96,17 @@
     va_list argPtr;             // variable list arguement pointer
 
-    // Get the variable list parameters to pass to logging function
-    va_start(argPtr, fmt);
-
-    // Call logging function with PS_LOG_ERROR level
-    psLogMsgV(name, PS_LOG_ERROR, fmt, argPtr);
-
     if (new) {
         psErrorClear();
     }
 
+    // Get the variable list parameters to pass to logging function
+    va_start(argPtr, fmt);
+
     vsnprintf(errMsg,1024,fmt,argPtr);
     err = psErrAlloc(name,code,errMsg);
     pushErrorStack(err);
+
+    // Call logging function with PS_LOG_ERROR level
+    psLogMsg(name, PS_LOG_ERROR, errMsg);
 
     // Clean up stack after variable argument has been used
@@ -116,5 +116,5 @@
 }
 
-const psErr* psErrorGet(int which)
+psErr* psErrorGet(int which)
 {
     psErr* result;
@@ -134,5 +134,5 @@
 }
 
-const psErr* psErrorLast(void)
+psErr* psErrorLast(void)
 {
     return psErrorGet(0);
Index: /trunk/psLib/src/sys/psError.h
===================================================================
--- /trunk/psLib/src/sys/psError.h	(revision 1806)
+++ /trunk/psLib/src/sys/psError.h	(revision 1807)
@@ -12,6 +12,6 @@
  *  @author Eric Van Alst, MHPCC
  *
- *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-10 23:20:35 $
+ *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-14 20:01:52 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -50,5 +50,5 @@
  *  @return    Error message object at 'which'
  */
-const psErr* psErrorGet(
+psErr* psErrorGet(
     int which                          ///< position in the error stack. 0 is last error on stack.
 );
@@ -61,5 +61,5 @@
  *  @return psErr*     Reference to last error message on error stack
  */
-const psErr* psErrorLast(void);
+psErr* psErrorLast(void);
 
 /** Clears the error stack.
Index: /trunk/psLib/src/sys/psErrorCodes.c
===================================================================
--- /trunk/psLib/src/sys/psErrorCodes.c	(revision 1806)
+++ /trunk/psLib/src/sys/psErrorCodes.c	(revision 1807)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-11 00:43:54 $
+ *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-14 20:01:52 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -38,6 +38,7 @@
             {PS_ERR_MEMORY_DEREF_USAGE,"dereferenced memory still used"},
             {PS_ERR_BAD_PARAMETER_VALUE,"parameter is out-of-range"},
+            {PS_ERR_BAD_PARAMETER_TYPE,"parameter is of unsupported data-type"},
             {PS_ERR_BAD_PARAMETER_NULL,"parameter is null"},
-            {PS_ERR_BAD_PARAMETER_LENGTH,"parameter string is too long"},
+            {PS_ERR_BAD_PARAMETER_SIZE,"size of parameter's data is outside of acceptable range."},
             {PS_ERR_UNEXPECTED_NULL,"unexpected NULL foun"},
             //~End
Index: /trunk/psLib/src/sys/psErrorCodes.h
===================================================================
--- /trunk/psLib/src/sys/psErrorCodes.h	(revision 1806)
+++ /trunk/psLib/src/sys/psErrorCodes.h	(revision 1807)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-11 00:43:54 $
+ *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-14 20:01:52 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -47,6 +47,7 @@
     PS_ERR_MEMORY_DEREF_USAGE,   ///< dereferenced memory still used
     PS_ERR_BAD_PARAMETER_VALUE,   ///< parameter is out-of-range
+    PS_ERR_BAD_PARAMETER_TYPE,   ///< parameter is of unsupported data-type
     PS_ERR_BAD_PARAMETER_NULL,   ///< parameter is null
-    PS_ERR_BAD_PARAMETER_LENGTH,   ///< parameter string is too long
+    PS_ERR_BAD_PARAMETER_SIZE,   ///< size of parameter's data is outside of acceptable range.
     PS_ERR_UNEXPECTED_NULL,   ///< unexpected NULL foun
     //~End
Index: /trunk/psLib/src/sys/psLogMsg.c
===================================================================
--- /trunk/psLib/src/sys/psLogMsg.c	(revision 1806)
+++ /trunk/psLib/src/sys/psLogMsg.c	(revision 1807)
@@ -11,6 +11,6 @@
  *  @author George Gusciora, MHPCC
  *
- *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-11 03:03:36 $
+ *  @version $Revision: 1.33 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-14 20:01:52 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -383,2 +383,10 @@
     va_end(ap);
 }
+void psWarning(const char* name, const char* fmt, ...)
+{
+    va_list ap;
+
+    va_start(ap, fmt);
+    psLogMsgV(name, PS_LOG_WARN, fmt, ap);
+    va_end(ap);
+}
Index: /trunk/psLib/src/sys/psLogMsg.h
===================================================================
--- /trunk/psLib/src/sys/psLogMsg.h	(revision 1806)
+++ /trunk/psLib/src/sys/psLogMsg.h	(revision 1807)
@@ -11,6 +11,6 @@
  *  @author George Gusciora, MHPCC
  *
- *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-11 03:03:36 $
+ *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-14 20:01:52 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -99,4 +99,17 @@
 };
 
+/** Logs a warning message.
+ *
+ *  This procedure logs a message to the destination set by a prior
+ *  call to psLogSetDestination(), This is equivalent to calling
+ *  psLogMsg with a level of PS_LOG_WARN.
+ *
+ */
+void psWarning(
+    const char* name,
+    const char* fmt,
+    ...
+);
+
 /// @}
 
Index: /trunk/psLib/src/sysUtils/psError.c
===================================================================
--- /trunk/psLib/src/sysUtils/psError.c	(revision 1806)
+++ /trunk/psLib/src/sysUtils/psError.c	(revision 1807)
@@ -10,6 +10,6 @@
  *  @author Eric Van Alst, MHPCC
  *   
- *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-07 19:05:07 $
+ *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-14 20:01:52 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -96,17 +96,17 @@
     va_list argPtr;             // variable list arguement pointer
 
-    // Get the variable list parameters to pass to logging function
-    va_start(argPtr, fmt);
-
-    // Call logging function with PS_LOG_ERROR level
-    psLogMsgV(name, PS_LOG_ERROR, fmt, argPtr);
-
     if (new) {
         psErrorClear();
     }
 
+    // Get the variable list parameters to pass to logging function
+    va_start(argPtr, fmt);
+
     vsnprintf(errMsg,1024,fmt,argPtr);
     err = psErrAlloc(name,code,errMsg);
     pushErrorStack(err);
+
+    // Call logging function with PS_LOG_ERROR level
+    psLogMsg(name, PS_LOG_ERROR, errMsg);
 
     // Clean up stack after variable argument has been used
@@ -116,5 +116,5 @@
 }
 
-const psErr* psErrorGet(int which)
+psErr* psErrorGet(int which)
 {
     psErr* result;
@@ -134,5 +134,5 @@
 }
 
-const psErr* psErrorLast(void)
+psErr* psErrorLast(void)
 {
     return psErrorGet(0);
Index: /trunk/psLib/src/sysUtils/psError.h
===================================================================
--- /trunk/psLib/src/sysUtils/psError.h	(revision 1806)
+++ /trunk/psLib/src/sysUtils/psError.h	(revision 1807)
@@ -12,6 +12,6 @@
  *  @author Eric Van Alst, MHPCC
  *
- *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-10 23:20:35 $
+ *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-14 20:01:52 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -50,5 +50,5 @@
  *  @return    Error message object at 'which'
  */
-const psErr* psErrorGet(
+psErr* psErrorGet(
     int which                          ///< position in the error stack. 0 is last error on stack.
 );
@@ -61,5 +61,5 @@
  *  @return psErr*     Reference to last error message on error stack
  */
-const psErr* psErrorLast(void);
+psErr* psErrorLast(void);
 
 /** Clears the error stack.
Index: /trunk/psLib/src/sysUtils/psErrorCodes.c
===================================================================
--- /trunk/psLib/src/sysUtils/psErrorCodes.c	(revision 1806)
+++ /trunk/psLib/src/sysUtils/psErrorCodes.c	(revision 1807)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-11 00:43:54 $
+ *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-14 20:01:52 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -38,6 +38,7 @@
             {PS_ERR_MEMORY_DEREF_USAGE,"dereferenced memory still used"},
             {PS_ERR_BAD_PARAMETER_VALUE,"parameter is out-of-range"},
+            {PS_ERR_BAD_PARAMETER_TYPE,"parameter is of unsupported data-type"},
             {PS_ERR_BAD_PARAMETER_NULL,"parameter is null"},
-            {PS_ERR_BAD_PARAMETER_LENGTH,"parameter string is too long"},
+            {PS_ERR_BAD_PARAMETER_SIZE,"size of parameter's data is outside of acceptable range."},
             {PS_ERR_UNEXPECTED_NULL,"unexpected NULL foun"},
             //~End
Index: /trunk/psLib/src/sysUtils/psErrorCodes.h
===================================================================
--- /trunk/psLib/src/sysUtils/psErrorCodes.h	(revision 1806)
+++ /trunk/psLib/src/sysUtils/psErrorCodes.h	(revision 1807)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-11 00:43:54 $
+ *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-14 20:01:52 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -47,6 +47,7 @@
     PS_ERR_MEMORY_DEREF_USAGE,   ///< dereferenced memory still used
     PS_ERR_BAD_PARAMETER_VALUE,   ///< parameter is out-of-range
+    PS_ERR_BAD_PARAMETER_TYPE,   ///< parameter is of unsupported data-type
     PS_ERR_BAD_PARAMETER_NULL,   ///< parameter is null
-    PS_ERR_BAD_PARAMETER_LENGTH,   ///< parameter string is too long
+    PS_ERR_BAD_PARAMETER_SIZE,   ///< size of parameter's data is outside of acceptable range.
     PS_ERR_UNEXPECTED_NULL,   ///< unexpected NULL foun
     //~End
Index: /trunk/psLib/src/sysUtils/psLogMsg.c
===================================================================
--- /trunk/psLib/src/sysUtils/psLogMsg.c	(revision 1806)
+++ /trunk/psLib/src/sysUtils/psLogMsg.c	(revision 1807)
@@ -11,6 +11,6 @@
  *  @author George Gusciora, MHPCC
  *
- *  @version $Revision: 1.32 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-11 03:03:36 $
+ *  @version $Revision: 1.33 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-14 20:01:52 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -383,2 +383,10 @@
     va_end(ap);
 }
+void psWarning(const char* name, const char* fmt, ...)
+{
+    va_list ap;
+
+    va_start(ap, fmt);
+    psLogMsgV(name, PS_LOG_WARN, fmt, ap);
+    va_end(ap);
+}
Index: /trunk/psLib/src/sysUtils/psLogMsg.h
===================================================================
--- /trunk/psLib/src/sysUtils/psLogMsg.h	(revision 1806)
+++ /trunk/psLib/src/sysUtils/psLogMsg.h	(revision 1807)
@@ -11,6 +11,6 @@
  *  @author George Gusciora, MHPCC
  *
- *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-11 03:03:36 $
+ *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-14 20:01:52 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -99,4 +99,17 @@
 };
 
+/** Logs a warning message.
+ *
+ *  This procedure logs a message to the destination set by a prior
+ *  call to psLogSetDestination(), This is equivalent to calling
+ *  psLogMsg with a level of PS_LOG_WARN.
+ *
+ */
+void psWarning(
+    const char* name,
+    const char* fmt,
+    ...
+);
+
 /// @}
 
Index: /trunk/psLib/src/types/psArray.c
===================================================================
--- /trunk/psLib/src/types/psArray.c	(revision 1806)
+++ /trunk/psLib/src/types/psArray.c	(revision 1807)
@@ -9,6 +9,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-08-27 23:54:33 $
+ *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-14 20:01:52 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -26,4 +26,6 @@
 #include "psArray.h"
 #include "psLogMsg.h"
+
+#include "psCollectionsErrors.h"
 
 /*****************************************************************************/
@@ -43,9 +45,4 @@
     psArray* psArr = NULL;
 
-    // Invalid nalloc
-    if (nalloc < 1) {
-        psError(__func__, "Invalid value for nalloc. nalloc: %d\n", nalloc);
-        return NULL;
-    }
     // Create vector struct
     psArr = (psArray* ) psAlloc(sizeof(psArray));
@@ -63,10 +60,4 @@
 psArray* psArrayRealloc(unsigned int nalloc, psArray* restrict in)
 {
-    // Invalid nalloc
-    if (nalloc < 1) {
-        psError(__func__, "Invalid value for realloc (%d)\n", nalloc);
-        return NULL;
-    }
-
     if (in == NULL) {
         return psArrayAlloc(nalloc);
Index: /trunk/psLib/src/types/psBitSet.c
===================================================================
--- /trunk/psLib/src/types/psBitSet.c	(revision 1806)
+++ /trunk/psLib/src/types/psBitSet.c	(revision 1807)
@@ -1,3 +1,2 @@
-
 /** @file  psBitSet.c
  *
@@ -10,16 +9,12 @@
  *
  *  @author Ross Harman, MHPCC
- *
- *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-08-09 23:34:57 $
+ *  @author Robert DeSonia, MHPCC
+ *
+ *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-14 20:01:52 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
  */
 
-/******************************************************************************/
-
-/*  INCLUDE FILES                                                             */
-
-/******************************************************************************/
 #include <string.h>
 #include <stdio.h>
@@ -32,43 +27,17 @@
 #include "psError.h"
 #include "psAbort.h"
-
-/******************************************************************************/
-
-/*  DEFINE STATEMENTS                                                         */
-
-/******************************************************************************/
-
-// None
-
-/******************************************************************************/
-
-/*  TYPE DEFINITIONS                                                          */
-
-/******************************************************************************/
-
-// None
-
-/*****************************************************************************/
-
-/*  GLOBAL VARIABLES                                                         */
-
-/*****************************************************************************/
-
-// None
-
-/*****************************************************************************/
-
-/*  FILE STATIC VARIABLES                                                    */
-
-/*****************************************************************************/
-
-// None
-
-/*****************************************************************************/
-
-/*  FUNCTION IMPLEMENTATION - LOCAL                                          */
-
-/*****************************************************************************/
-static void psBitSetFree(psBitSet* restrict inBitSet);
+#include "psString.h"
+
+#include "psCollectionsErrors.h"
+
+enum {
+    UNKNOWN_OP,
+    AND_OP,
+    OR_OP,
+    XOR_OP,
+    NOT_OP
+};
+
+static void bitSetFree(psBitSet* restrict inBitSet);
 
 /** Private function to create a mask.
@@ -90,9 +59,12 @@
 }
 
-/*****************************************************************************/
-
-/* FUNCTION IMPLEMENTATION - PUBLIC                                          */
-
-/*****************************************************************************/
+static void bitSetFree(psBitSet* restrict inBitSet)
+{
+    if (inBitSet == NULL) {
+        return;
+    }
+    psFree(inBitSet->bits);
+}
+
 psBitSet* psBitSetAlloc(int n)
 {
@@ -100,15 +72,15 @@
     psBitSet* newObj = NULL;
 
-    if (n <= 0) {
-        psError(__func__, " : Line %d - Allocation size must be > 0: size = %d", __LINE__, n);
-        return 0;
+    if (n < 0) {
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psBitSetAlloc",
+                   PS_ERR_BAD_PARAMETER_VALUE, true,
+                   PS_ERRORTEXT_psBitSet_ALLOC_NEG_SIZE,
+                   n);
+        return NULL;
     }
 
     numBytes = ceil(n / 8.0);
     newObj = psAlloc(sizeof(psBitSet));
-    if (newObj == NULL) {
-        psAbort(__func__, " : Line %d - Failed to allocate memory", __LINE__);
-    }
-    p_psMemSetDeallocator(newObj, (psFreeFcn) psBitSetFree);
+    p_psMemSetDeallocator(newObj, (psFreeFcn) bitSetFree);
     newObj->n = numBytes;
 
@@ -116,22 +88,10 @@
     /* @i@ */
     newObj->bits = psAlloc(sizeof(char) * numBytes);
-    if (newObj->bits == NULL) {
-        psAbort(__func__, " : Line %d - Failed to allocate memory", __LINE__);
-    }
-
-    memset(newObj->bits, numBytes, 0);
+
+    memset(newObj->bits, 0, numBytes);
 
     return newObj;
 }
 
-static void psBitSetFree(psBitSet* restrict inBitSet)
-{
-    if (inBitSet == NULL) {
-        psError(__func__, " : Line %d - Null psBitSet for inBitSet argument", __LINE__);
-        return;
-    }
-    psFree(inBitSet->bits);
-}
-
 psBitSet* psBitSetSet(psBitSet* inBitSet, int bit)
 {
@@ -139,11 +99,14 @@
 
     if (inBitSet == NULL) {
-        psError(__func__, " : Line %d - Null psBitSet for inBitSet argument", __LINE__);
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psBitSetSet",
+                   PS_ERR_BAD_PARAMETER_NULL, true,
+                   PS_ERRORTEXT_psBitSet_SET_NULL);
         return inBitSet;
-    } else if (bit < 0) {
-        psError(__func__, " : Line %d - Bit position too small: %d", __LINE__, bit);
-        return inBitSet;
-    } else if (bit > inBitSet->n * 8 - 1) {
-        psError(__func__, " : Line %d - Bit position too large: %d", __LINE__, bit);
+    } else if ( (bit < 0) ||
+                (bit > inBitSet->n * 8 - 1) ) {
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psBitSetSet",
+                   PS_ERR_BAD_PARAMETER_VALUE, true,
+                   PS_ERRORTEXT_psBitSet_BIT_OUTOFRANGE,
+                   bit,inBitSet->n * 8 - 1);
         return inBitSet;
     }
@@ -155,4 +118,28 @@
 }
 
+psBitSet* psBitSetClear(psBitSet* inBitSet, int bit)
+{
+    char *byte = NULL;
+
+    if (inBitSet == NULL) {
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psBitSetClear",
+                   PS_ERR_BAD_PARAMETER_NULL, true,
+                   PS_ERRORTEXT_psBitSet_SET_NULL);
+        return inBitSet;
+    } else if ( (bit < 0) ||
+                (bit > inBitSet->n * 8 - 1) ) {
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psBitSetClear",
+                   PS_ERR_BAD_PARAMETER_VALUE, true,
+                   PS_ERRORTEXT_psBitSet_BIT_OUTOFRANGE,
+                   bit,inBitSet->n * 8 - 1);
+        return inBitSet;
+    }
+    // Variable byte is the byte in the array that contains the bit to be set
+    byte = inBitSet->bits + bit / 8;
+    *byte &= ! mask(bit);
+
+    return inBitSet;
+}
+
 bool psBitSetTest(const psBitSet* inBitSet, int bit)
 {
@@ -160,20 +147,20 @@
 
     if (inBitSet == NULL) {
-        psError(__func__, " : Line %d - Null psBitSet for inBitSet argument", __LINE__);
-        return 0;
-    } else if (bit < 0) {
-        psError(__func__, " : Line %d - Bit position too small: %d", __LINE__, bit);
-        return 0;
-    } else if (bit > inBitSet->n * 8 - 1) {
-        psError(__func__, " : Line %d - Bit position too large: %d", __LINE__, bit);
-        return 0;
-    }
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psBitSetTest",
+                   PS_ERR_BAD_PARAMETER_NULL, true,
+                   PS_ERRORTEXT_psBitSet_SET_NULL);
+        return false;
+    } else if ( (bit < 0) ||
+                (bit > inBitSet->n * 8 - 1) ) {
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psBitSetTest",
+                   PS_ERR_BAD_PARAMETER_VALUE, true,
+                   PS_ERRORTEXT_psBitSet_BIT_OUTOFRANGE,
+                   bit,inBitSet->n * 8 - 1);
+        return false;
+    }
+
     // Variable byte is the byte in the array that contains the bit to be tested
     byte = inBitSet->bits + bit / 8;
-    if ((int)(*byte & mask(bit)) == 0) {
-        return 0;
-    }
-
-    return 1;
+    return ((*byte & mask(bit)) != 0);
 }
 
@@ -183,57 +170,108 @@
     int i = 0;
     int n = 0;
-    char tempChar = '0';
-    char *outBits = NULL;
-    char *inBits1 = NULL;
-    char *inBits2 = NULL;
+    char* outBits = NULL;
+    char* inBits1 = NULL;
+    char* inBits2 = NULL;
+    int op = UNKNOWN_OP;
 
     if (inBitSet1 == NULL) {
-        psError(__func__, " : Line %d - Null psBitSet for inBitSet1 argument", __LINE__);
-        return outBitSet;
-    }
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psBitSetOp",
+                   PS_ERR_BAD_PARAMETER_NULL, true,
+                   PS_ERRORTEXT_psBitSet_FIRST_OPERAND_NULL);
+        psFree(outBitSet);
+        return NULL;
+    }
+    inBits1 = inBitSet1->bits;
 
     if (operator == NULL) {
-        psError(__func__, " : Line %d - Null input operator\n", __LINE__);
-        return outBitSet;
-    }
-
-    if (inBitSet2 == NULL) {
-        psError(__func__, " : Line %d - Null psBitSet for inBitSet2 argument", __LINE__);
-        return outBitSet;
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psBitSetOp",
+                   PS_ERR_BAD_PARAMETER_NULL, true,
+                   PS_ERRORTEXT_psBitSet_OPERATOR_NULL);
+        psFree(outBitSet);
+        return NULL;
+    }
+
+    // make operator all caps
+    int tempStrLen = strlen(operator);
+    char* tempStr = psAlloc(tempStrLen+1);
+
+    for (int lcv=0;lcv<tempStrLen;lcv++) {
+        tempStr[lcv] = (char)toupper(operator[lcv]);
+    }
+    tempStr[tempStrLen] = '\0';
+
+    // parse the operator
+    if (strcmp(operator,"AND")==0) {
+        op = AND_OP;
+    } else if (strcmp(operator,"OR")==0) {
+        op = OR_OP;
+    } else if (strcmp(operator,"XOR")==0) {
+        op = XOR_OP;
+    } else if (strcmp(operator,"NOT")==0) {
+        op = NOT_OP;
+    } else {
+        psFree(tempStr);
+        psFree(outBitSet);
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psBitSetOp",
+                   PS_ERR_BAD_PARAMETER_VALUE, true,
+                   PS_ERRORTEXT_psBitSet_OPERATOR_INVALID,
+                   operator);
+        return NULL;
+    }
+    psFree(tempStr);
+
+    if (op != NOT_OP) {
+        if (inBitSet2 == NULL) {
+            psErrorMsg(PS_ERRORNAME_DOMAIN "psBitSetOp",
+                       PS_ERR_BAD_PARAMETER_NULL, true,
+                       PS_ERRORTEXT_psBitSet_SECOND_OPERAND_NULL);
+            psFree(outBitSet);
+            return NULL;
+        }
+
+        if (inBitSet1->n != inBitSet2->n) {
+            psErrorMsg(PS_ERRORNAME_DOMAIN "psBitSetOp",
+                       PS_ERR_BAD_PARAMETER_SIZE, true,
+                       PS_ERRORTEXT_psBitSet_OPERANDS_SIZE_DIFFER);
+            psFree(outBitSet);
+            return NULL;
+        }
+        inBits2 = inBitSet2->bits;
     }
 
     if (outBitSet == NULL) {
-        outBitSet = psBitSetAlloc(inBitSet1->n * 8);
-    }
-
-    if (inBitSet1->n != inBitSet2->n || outBitSet->n != inBitSet1->n) {
-        psError(__func__, " : Line %d - psBitSet sizes not the same", __LINE__);
-        return outBitSet;
+        outBitSet = psBitSetAlloc(inBitSet1->n*8);
+    } else if (outBitSet->n != inBitSet1->n) {
+        outBitSet->n = inBitSet1->n;
+        outBitSet->bits = psRealloc(outBitSet->bits, inBitSet1->n);
     }
 
     n = outBitSet->n;
     outBits = outBitSet->bits;
-    inBits1 = inBitSet1->bits;
-    inBits2 = inBitSet2->bits;
-
-    tempChar = toupper(operator[0]);
-    switch (tempChar) {
-    case 'A':
+
+    switch (op) {
+    case AND_OP:
         for (i = 0; i < n; i++) {
             outBits[i] = inBits1[i] & inBits2[i];
         }
         break;
-    case 'O':
+    case OR_OP:
         for (i = 0; i < n; i++) {
             outBits[i] = inBits1[i] | inBits2[i];
         }
         break;
-    case 'X':
+    case XOR_OP:
         for (i = 0; i < n; i++) {
             outBits[i] = inBits1[i] ^ inBits2[i];
         }
         break;
+    case NOT_OP:
+        for (i = 0; i < n; i++) {
+            outBits[i] = ~inBits1[i];
+        }
+        break;
     default:
-        psError(__func__, " : Line %d - Invalid psBitMask binary operation: %s", __LINE__, operator);
+        psAbort(PS_ERRORNAME_DOMAIN "psBitSetOp",
+                "Unexpected error - operator parsed successfully but not valid?");
     }
 
@@ -243,34 +281,18 @@
 psBitSet* psBitSetNot(psBitSet* outBitSet, const psBitSet* restrict inBitSet)
 {
-    int i = 0;
-    int n = 0;
-    char *outBits = NULL;
-    char *inBits = NULL;
-
-    if (inBitSet == NULL) {
-        psError(__func__, " : Line %d - Null psBitSet for inBitSet argument", __LINE__);
-        return outBitSet;
-    }
-
-    n = inBitSet->n;
-    if (n == 0) {
-        psError(__func__, " : Line %d - No elements in inBitSet", __LINE__);
-        return outBitSet;
-    }
+    if (inBitSet == NULL) {
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psBitSetNot",
+                   PS_ERR_BAD_PARAMETER_NULL, true,
+                   PS_ERRORTEXT_psBitSet_OPERAND_NULL);
+        psFree(outBitSet);
+        return NULL;
+    }
+
+    outBitSet = psBitSetOp(outBitSet,inBitSet,"NOT",NULL);
 
     if (outBitSet == NULL) {
-        outBitSet = psBitSetAlloc(n * 8);
-    }
-
-    if (inBitSet->n != outBitSet->n) {
-        psError(__func__, " : Line %d - psBitSet sizes not the same", __LINE__);
-        return outBitSet;
-    }
-
-    outBits = outBitSet->bits;
-    inBits = inBitSet->bits;
-
-    for (i = 0; i < n; i++) {
-        outBits[i] = ~inBits[i];
+        psErrorMsg(PS_ERRORNAME_DOMAIN "psBitSetNot",
+                   PS_ERR_UNKNOWN, false,
+                   PS_ERRORTEXT_psBitSet_NOT_OP_FAILED);
     }
 
@@ -284,10 +306,6 @@
     char *outString = psAlloc((size_t) numBits + 1);
 
-    if (outString == NULL) {
-        psAbort(__func__, " : Line %d - Failed to allocate memory", __LINE__);
-    }
-
     for (i = 0; i < numBits; i++) {
-        outString[numBits - i - 1] = (psBitSetTest(inBitSet, i) == 1) ? '1' : '0';
+        outString[numBits - i - 1] = psBitSetTest(inBitSet, i) ? '1' : '0';
     }
 
Index: /trunk/psLib/src/types/psBitSet.h
===================================================================
--- /trunk/psLib/src/types/psBitSet.h	(revision 1806)
+++ /trunk/psLib/src/types/psBitSet.h	(revision 1807)
@@ -1,3 +1,2 @@
-
 /** @file  psBitSet.h
  *
@@ -13,6 +12,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-08-11 19:53:33 $
+ *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-14 20:01:52 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -26,7 +25,5 @@
 
 /******************************************************************************/
-
 /*  TYPE DEFINITIONS                                                          */
-
 /******************************************************************************/
 
@@ -44,7 +41,5 @@
 
 /*****************************************************************************/
-
 /* FUNCTION PROTOTYPES                                                       */
-
 /*****************************************************************************/
 
@@ -64,5 +59,5 @@
 /** Set a bit.
  *
- *  Sets a bit at a given bit location, either one or zero. The bit is set based on a zero index with the
+ *  Sets a bit at a given bit location. The bit is set based on a zero index with the
  *  first bit set in the zero bit slot of the zero element of the byte array. As an example, setting bit 3 in
  *  an array with two elements would result in an psBitSet that looks like 00000000 00001000.
@@ -74,4 +69,18 @@
     psBitSet* restrict inMask,         ///< Pointer to psBitSet to be set.
     int bit                            ///< Bit to be set.
+);
+
+/** Clear a bit.
+ *
+ *  Clear a bit at a given bit location. The bit is cleared based on a zero 
+ *  index with the first bit set in the zero bit slot of the zero element of 
+ *  the byte array. 
+ *
+ *  @return  psBitSet* : Pointer to struct containing psBitSet.
+ */
+psBitSet* psBitSetClear(
+    /* @returned@ */
+    psBitSet* restrict inMask,         ///< Pointer to psBitSet to be cleared.
+    int bit                            ///< Bit to be cleared.
 );
 
Index: /trunk/psLib/src/types/psList.c
===================================================================
--- /trunk/psLib/src/types/psList.c	(revision 1806)
+++ /trunk/psLib/src/types/psList.c	(revision 1807)
@@ -1,3 +1,2 @@
-
 /** @file psList.c
  *  @brief Support for doubly linked lists
@@ -7,6 +6,6 @@
  *  @author Robert Daniel DeSonia, MHPCC
  *
- *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-09 02:23:27 $
+ *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-14 20:01:52 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -24,4 +23,6 @@
 #include "psTrace.h"
 #include "psLogMsg.h"
+
+#include "psCollectionsErrors.h"
 
 #define ITER_INIT_HEAD ((void *)1)         // next iteration should return head
Index: /trunk/psLib/test/collections/Makefile
===================================================================
--- /trunk/psLib/test/collections/Makefile	(revision 1806)
+++ /trunk/psLib/test/collections/Makefile	(revision 1807)
@@ -3,6 +3,6 @@
 ##  Makefile:   test/collections
 ##
-##  $Revision: 1.22 $  $Name: not supported by cvs2svn $
-##  $Date: 2004-08-09 20:42:24 $
+##  $Revision: 1.23 $  $Name: not supported by cvs2svn $
+##  $Date: 2004-09-14 20:01:52 $
 ##
 ##  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -21,12 +21,5 @@
 TARGET = tst_psVector          \
          tst_psArray           \
-         tst_psBitSet_01       \
-         tst_psBitSet_02       \
-         tst_psBitSet_03       \
-         tst_psBitSet_04       \
-         tst_psBitSet_05       \
-         tst_psBitSet_06       \
-         tst_psBitSet_07       \
-         tst_psBitSet_08       \
+         tst_psBitSet          \
          tst_psVectorSort_01   \
          tst_psVectorSort_02   \
Index: /trunk/psLib/test/collections/tst_psBitSet.c
===================================================================
--- /trunk/psLib/test/collections/tst_psBitSet.c	(revision 1807)
+++ /trunk/psLib/test/collections/tst_psBitSet.c	(revision 1807)
@@ -0,0 +1,647 @@
+/** @file  tst_psBitSet_01.c
+ *
+ *  @brief Test driver for psBitSet functions
+ *
+ *  This test driver contains the following tests for psBitSet test point 1:
+ *     A)  Create psBitSet
+ *     B)  Set bits
+ *     C)  Test bits
+ *     D)  Attempt to test negative bit
+ *     E)  Attempt to test bit to large
+ *     F)  Attempt to test bit in null BitSet
+ *     G)  Attempt to set negative bit
+ *     H)  Attempt to set bit to large
+ *     I)  Attempt to set bit in null BitSet
+ *     J)  Free psBitSet
+ *
+ *  @author  Ross Harman, MHPCC
+ *
+ *  @version $Revision: 1.1 $  $Name: not supported by cvs2svn $
+ *  @date  $Date: 2004-09-14 20:01:52 $
+ *
+ *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
+ *
+ */
+
+#include "pslib.h"
+#include "psTest.h"
+
+static int testBitSet01a(void);
+static int testBitSet01b(void);
+static int testBitSet01c(void);
+static int testBitSet02(void);
+static int testBitSet03(void);
+static int testBitSet04(void);
+static int testBitSet05(void);
+static int testBitSet06(void);
+
+testDescription tests[] = {
+                              {testBitSet01a, 1, "psBitSetAlloc", 0, false},
+                              {testBitSet01b, 2, "psBitSetSet/psBitSetClear", 0, false},
+                              {testBitSet01c, 3, "psBitSetTest", 0, false},
+                              {testBitSet06, 4, "psBitSetOp", 0, false},
+                              {testBitSet02, 5, "psBitSetOp AND Operator", 0, false},
+                              {testBitSet03, 6, "psBitSetOp OR Operator", 0, false},
+                              {testBitSet04, 7, "psBitSetOp XOR Operator", 0, false},
+                              {testBitSet05, 8, "psBitSetNot", 0, false},
+
+                              {NULL}
+                          };
+
+
+int main( int argc, char* argv[] )
+{
+    psLogSetLevel( PS_LOG_INFO );
+
+    return ( ! runTestSuite( stderr, "psBitSet", tests, argc, argv ) );
+}
+
+int testBitSet01a(void)
+{
+    psErr* err;
+
+    // Test A - Create psBitSet
+    fprintf(stderr,"Creating psBitSet with 24 bits...\n");
+    psBitSet* bs = psBitSetAlloc(24);
+
+    if (bs == NULL) {
+        psAbort(__func__,"Failed to create a psBitSet");
+    }
+
+    if (bs->n != 3) {
+        psAbort(__func__,"Number of bytes for psBitSet incorrect (%d vs 3)",bs->n);
+    }
+
+    if (bs->bits[0] != 0 || bs->bits[1] != 0 || bs->bits[2] != 0) {
+        psAbort(__func__,"psBitSetAlloc didn't clear out the bits by default (%x%x%x).",
+                bs->bits[2],bs->bits[1],bs->bits[0]);
+    }
+
+    psFree(bs);
+
+    // Test A - Create psBitSet
+    fprintf(stderr,"Creating psBitSet with 25 bits...\n");
+    bs = psBitSetAlloc(25);
+
+    if (bs == NULL) {
+        psAbort("testBitSet01a","Failed to create a psBitSet with 25 bits");
+    }
+
+    if (bs->n != 4) {
+        psAbort("testBitSet01a","Number of bytes for psBitSet incorrect (%d vs 4)",bs->n);
+    }
+    psFree(bs);
+
+    psErrorClear();
+    psLogMsg(__func__,PS_LOG_INFO,"Following is an error.");
+    bs = psBitSetAlloc(-4);
+    if (bs != NULL) {
+        psAbort(__func__,"psBitSetAlloc returned something in case of a negative sized psBitSet.");
+    }
+    err = psErrorLast();
+    if (err->code != PS_ERR_BAD_PARAMETER_VALUE) {
+        psErrorStackPrint(stderr,"Error Stack:");
+        psAbort(__func__,"psBitSetAlloc didn't generate expected error with size = -4.");
+    }
+    psFree(err);
+
+    return 0;
+}
+
+int testBitSet01b(void)
+{
+    char *binOut = NULL;
+    psBitSet *tempBs = NULL;
+    psErr* err = NULL;
+
+    psBitSet* bs = psBitSetAlloc(24);
+
+    if (psBitSetTest(bs,0) ||
+            psBitSetTest(bs,2) ||
+            psBitSetTest(bs,23) ) {
+
+        psAbort("testBitSet01b","psBitSetAlloc failed to clear all bits at allocation.");
+    }
+
+    // Test B - Set bits
+    tempBs = bs;
+    fprintf(stderr,"Setting first bit...\n");
+    bs = psBitSetSet(bs, 0);
+    fprintf(stderr,"Setting third bit...\n");
+    bs = psBitSetSet(bs, 2);
+    fprintf(stderr,"Setting last bit...\n");
+    bs = psBitSetSet(bs, 23);
+    if(bs != tempBs) {
+        psAbort("testBitSet01b",
+                "Return pointer not equal to output argument pointer.");
+    }
+    if(bs->bits[0] != 0x05) {
+        psAbort(__func__,
+                "Unexpected value for first byte (%d vs 5).",
+                bs->bits[0]);
+    }
+
+
+    binOut = psBitSetToString(bs);
+    fprintf(stderr,"%s\n\n", binOut);
+    psFree(binOut);
+
+    // Test C - Test bits
+    if (! psBitSetTest(bs,0) ||
+            ! psBitSetTest(bs,2) ||
+            ! psBitSetTest(bs,23) ) {
+
+        psAbort("testBitSet01b","Failed to set a bit.");
+    }
+
+    fprintf(stderr,"Clearing first bit...\n");
+    bs = psBitSetClear(bs, 0);
+    fprintf(stderr,"Clearing third bit...\n");
+    bs = psBitSetClear(bs, 2);
+    fprintf(stderr,"Clearing last bit...\n");
+    bs = psBitSetClear(bs, 23);
+
+    binOut = psBitSetToString(bs);
+    fprintf(stderr,"%s\n\n", binOut);
+    psFree(binOut);
+
+
+    if (psBitSetTest(bs,0) ||
+            psBitSetTest(bs,2) ||
+            psBitSetTest(bs,23) ) {
+
+        psAbort("testBitSet01b","Failed to clear a bit.");
+    }
+
+    psLogMsg("testBitSet01b",PS_LOG_INFO,"Following should be an error");
+    psErrorClear();
+    psBitSetSet(bs, -4);
+
+    err = psErrorLast();
+    if (err->code != PS_ERR_BAD_PARAMETER_VALUE) {
+        psErrorStackPrint(stderr,"Error Stack:");
+        psAbort("testBitSet01c","psBitSetSet(bs, -4) didn't generate expected error.\n");
+    }
+    psFree(err);
+
+    psLogMsg("testBitSet01b",PS_LOG_INFO,"Following should be an error");
+    psErrorClear();
+    psBitSetSet(bs, 200);
+
+    err = psErrorLast();
+    if (err->code != PS_ERR_BAD_PARAMETER_VALUE) {
+        psErrorStackPrint(stderr,"Error Stack:");
+        psAbort("testBitSet01c","psBitSetSet(bs, 200) didn't generate expected error.\n");
+    }
+    psFree(err);
+
+    psLogMsg("testBitSet01b",PS_LOG_INFO,"Following should be an error");
+    psErrorClear();
+    psBitSetSet(NULL, 0);
+
+    err = psErrorLast();
+    if (err->code != PS_ERR_BAD_PARAMETER_NULL) {
+        psErrorStackPrint(stderr,"Error Stack:");
+        psAbort("testBitSet01c","psBitSetSet(NULL,0) didn't generate expected error.\n");
+    }
+    psFree(err);
+
+    psFree(bs);
+
+    return 0;
+}
+
+static int testBitSet01c(void)
+{
+    psBitSet* bs = psBitSetAlloc(24);
+    psErr* err = NULL;
+
+    fprintf(stderr,"Setting first bit...\n");
+    bs = psBitSetSet(bs, 0);
+    fprintf(stderr,"Setting third bit...\n");
+    bs = psBitSetSet(bs, 2);
+    fprintf(stderr,"Setting last bit...\n");
+    bs = psBitSetSet(bs, 23);
+
+    if (! psBitSetTest(bs,0) ||
+            ! psBitSetTest(bs,2) ||
+            ! psBitSetTest(bs,23) ) {
+
+        psAbort("testBitSet01c","Set bits returned false.");
+    }
+
+    psLogMsg("testBitSet01c",PS_LOG_INFO,"Following should be an error");
+    psErrorClear();
+    if(psBitSetTest(bs, -4)) {
+        psAbort("testBitSet01c","psBitSetTest returned true with negative bit position.\n");
+    }
+
+    err = psErrorLast();
+    if (err->code != PS_ERR_BAD_PARAMETER_VALUE) {
+        psErrorStackPrint(stderr,"Error Stack:");
+        psAbort("testBitSet01c","psBitSetTest(bs, -4) didn't generate proper error.\n");
+    }
+    psFree(err);
+
+    psLogMsg("testBitSet01c",PS_LOG_INFO,"Following should be an error");
+    psErrorClear();
+    if(psBitSetTest(bs, 200)) {
+        psAbort("testBitSet01c","psBitSetTest returned true with too-large bit position.\n");
+    }
+
+    err = psErrorLast();
+    if (err->code != PS_ERR_BAD_PARAMETER_VALUE) {
+        psErrorStackPrint(stderr,"Error Stack:");
+        psAbort("testBitSet01c","psBitSetTest(bs, 200) didn't generate proper error.\n");
+    }
+    psFree(err);
+
+    psLogMsg("testBitSet01c",PS_LOG_INFO,"Following should be an error");
+    psErrorClear();
+    if (psBitSetTest(NULL, 0)) {
+        psAbort("testBitSet01c","psBitSetTest returned true with NULL psBitSet.\n");
+    }
+
+    err = psErrorLast();
+    if (err->code != PS_ERR_BAD_PARAMETER_NULL) {
+        psErrorStackPrint(stderr,"Error Stack:");
+        psAbort("testBitSet01c","psBitSetTest(NULL, 0) didn't generate proper error.\n");
+    }
+    psFree(err);
+
+    psFree(bs);
+
+    return 0;
+}
+
+int testBitSet02()
+{
+    char *binOut1 = NULL;
+    char *binOut2 = NULL;
+    char *binOut3 = NULL;
+
+    psBitSet* bs1 = psBitSetAlloc(24);
+    psBitSet* bs2 = psBitSetAlloc(24);
+    psBitSet* and = psBitSetAlloc(24);
+    for(int i=0; i<24; i++) {
+        if ((i & 2) == 0) {
+            bs1 = psBitSetSet(bs1, i);
+        }
+        if ((i & 1) == 0) {
+            bs2 = psBitSetSet(bs2, i);
+        }
+        if (((i & 1) == 0) && ((i & 2) == 0) ) {
+            and = psBitSetSet(and, i);
+        }
+    }
+    binOut1 = psBitSetToString(bs1);
+    binOut2 = psBitSetToString(bs2);
+    binOut3 = psBitSetToString(and);
+    fprintf(stderr,"psBitSetOp input is %s, %s.  Truth is %s.\n",
+            binOut1,binOut2,binOut3);
+    psFree(binOut1);
+    psFree(binOut2);
+    psFree(binOut3);
+
+    // Test B - Perform binary AND with psBitSets
+    psLogMsg(__func__,PS_LOG_INFO,"Perform binary AND with psBitSets");
+    psBitSet* outbs = psBitSetAlloc(24);
+    outbs = psBitSetOp(outbs, bs1, "AND", bs2);
+    if (outbs == NULL) {
+        psAbort(__func__,"psBitSetOp returned a NULL result for AND operation");
+    }
+
+    for(int i=0; i<24; i++) {
+        bool truth = psBitSetTest(and,i);
+        bool res = psBitSetTest(outbs,i);
+        if ( res != truth) {
+            binOut1 = psBitSetToString(bs1);
+            binOut2 = psBitSetToString(bs2);
+            binOut3 = psBitSetToString(outbs);
+            psAbort(__func__,"psBitSetOp with AND operator failed.\nInput was %s, %s.  Output was %s",
+                    binOut1,binOut2,binOut3);
+        }
+    }
+    psFree(outbs);
+
+    // Test C - Perform binary AND and auto allocate output
+    psLogMsg(__func__,PS_LOG_INFO,"Perform binary AND and auto allocate output");
+    outbs = psBitSetOp(NULL, bs1, "AND", bs2);
+    if (outbs == NULL) {
+        psAbort(__func__,"psBitSetOp failed to create a new psBitSet for the result");
+    }
+    for(int i=0; i<24; i++) {
+        bool truth = psBitSetTest(and,i);
+        bool res = psBitSetTest(outbs,i);
+        if ( res != truth) {
+            binOut1 = psBitSetToString(bs1);
+            binOut2 = psBitSetToString(bs2);
+            binOut3 = psBitSetToString(outbs);
+            psAbort(__func__,"psBitSetOp with AND operator failed.\nInput was %s, %s.  Output was %s",
+                    binOut1,binOut2,binOut3);
+        }
+    }
+    psFree(outbs);
+
+    psFree(bs1);
+    psFree(bs2);
+    psFree(and);
+
+    return 0;
+}
+
+static int testBitSet03(void)
+{
+    char *binOut1 = NULL;
+    char *binOut2 = NULL;
+    char *binOut3 = NULL;
+
+    psBitSet* bs1 = psBitSetAlloc(24);
+    psBitSet* bs2 = psBitSetAlloc(24);
+    psBitSet* or = psBitSetAlloc(24);
+    for(int i=0; i<24; i++) {
+        if ((i/2) % 2) {
+            bs1 = psBitSetSet(bs1, i);
+        }
+        if ((i) % 2) {
+            bs2 = psBitSetSet(bs2, i);
+        }
+        if ( ((i/2) % 2) || ((i) % 2) ) {
+            or = psBitSetSet(or, i);
+        }
+    }
+
+    binOut1 = psBitSetToString(bs1);
+    binOut2 = psBitSetToString(bs2);
+    binOut3 = psBitSetToString(or);
+    fprintf(stderr,"psBitSetOp input is %s, %s.  Truth is %s.\n",
+            binOut1,binOut2,binOut3);
+    psFree(binOut1);
+    psFree(binOut2);
+    psFree(binOut3);
+
+    // Test B - Perform binary AND with psBitSets
+    psLogMsg(__func__,PS_LOG_INFO,"Perform binary OR with psBitSets");
+    psBitSet* outbs = psBitSetAlloc(24);
+    outbs = psBitSetOp(outbs, bs1, "OR", bs2);
+    if (outbs == NULL) {
+        psAbort(__func__,"psBitSetOp returned a NULL result for OR operation");
+    }
+
+    for(int i=0; i<24; i++) {
+        bool truth = psBitSetTest(or,i);
+        bool res = psBitSetTest(outbs,i);
+        if ( res != truth) {
+            binOut1 = psBitSetToString(bs1);
+            binOut2 = psBitSetToString(bs2);
+            binOut3 = psBitSetToString(outbs);
+            psAbort(__func__,"psBitSetOp with OR operator failed.\nInput was %s, %s.  Output was %s",
+                    binOut1,binOut2,binOut3);
+        }
+    }
+    psFree(outbs);
+
+    // Test C - Perform binary AND and auto allocate output
+    psLogMsg(__func__,PS_LOG_INFO,"Perform binary OR and auto allocate output");
+    outbs = psBitSetOp(NULL, bs1, "OR", bs2);
+    if (outbs == NULL) {
+        psAbort(__func__,"psBitSetOp failed to create a new psBitSet for the result");
+    }
+    for(int i=0; i<24; i++) {
+        bool truth = psBitSetTest(or,i);
+        bool res = psBitSetTest(outbs,i);
+        if ( res != truth) {
+            binOut1 = psBitSetToString(bs1);
+            binOut2 = psBitSetToString(bs2);
+            binOut3 = psBitSetToString(outbs);
+            psAbort(__func__,"psBitSetOp with OR operator failed.\nInput was %s, %s.  Output was %s",
+                    binOut1,binOut2,binOut3);
+        }
+    }
+    psFree(outbs);
+    outbs = NULL;
+
+    psFree(bs1);
+    psFree(bs2);
+    psFree(or);
+
+    return 0;
+}
+
+static int testBitSet04(void)
+{
+    char *binOut1 = NULL;
+    char *binOut2 = NULL;
+    char *binOut3 = NULL;
+
+    psBitSet* bs1 = psBitSetAlloc(24);
+    psBitSet* bs2 = psBitSetAlloc(24);
+    psBitSet* xor = psBitSetAlloc(24);
+    for(int i=0; i<24; i++) {
+        if ((i/2) % 2) {
+            bs1 = psBitSetSet(bs1, i);
+        }
+        if ((i) % 2) {
+            bs2 = psBitSetSet(bs2, i);
+        }
+        if ( ((i/2) % 2) != ((i) % 2) ) {
+            xor = psBitSetSet(xor, i);
+        }
+    }
+
+    binOut1 = psBitSetToString(bs1);
+    binOut2 = psBitSetToString(bs2);
+    binOut3 = psBitSetToString(xor);
+    fprintf(stderr,"psBitSetOp input is %s, %s.  Truth is %s.\n",
+            binOut1,binOut2,binOut3);
+    psFree(binOut1);
+    psFree(binOut2);
+    psFree(binOut3);
+
+    // Test B - Perform binary AND with psBitSets
+    psLogMsg(__func__,PS_LOG_INFO,"Perform binary XOR with psBitSets");
+    psBitSet* outbs = psBitSetAlloc(24);
+    outbs = psBitSetOp(outbs, bs1, "XOR", bs2);
+    if (outbs == NULL) {
+        psAbort(__func__,"psBitSetOp returned a NULL result for XOR operation");
+    }
+
+    for(int i=0; i<24; i++) {
+        bool truth = psBitSetTest(xor,i);
+        bool res = psBitSetTest(outbs,i);
+        if ( res != truth) {
+            binOut1 = psBitSetToString(bs1);
+            binOut2 = psBitSetToString(bs2);
+            binOut3 = psBitSetToString(outbs);
+            psAbort(__func__,"psBitSetOp with XOR operator failed.\nInput was %s, %s.  Output was %s",
+                    binOut1,binOut2,binOut3);
+        }
+    }
+    psFree(outbs);
+
+    // Test C - Perform binary AND and auto allocate output
+    psLogMsg(__func__,PS_LOG_INFO,"Perform binary XOR and auto allocate output");
+    outbs = psBitSetOp(NULL, bs1, "XOR", bs2);
+    if (outbs == NULL) {
+        psAbort(__func__,"psBitSetOp failed to create a new psBitSet for the result");
+    }
+    for(int i=0; i<24; i++) {
+        bool truth = psBitSetTest(xor,i);
+        bool res = psBitSetTest(outbs,i);
+        if ( res != truth) {
+            binOut1 = psBitSetToString(bs1);
+            binOut2 = psBitSetToString(bs2);
+            binOut3 = psBitSetToString(outbs);
+            psAbort(__func__,"psBitSetOp with XOR operator failed.\nInput was %s, %s.  Output was %s",
+                    binOut1,binOut2,binOut3);
+        }
+    }
+    psFree(outbs);
+    outbs = NULL;
+
+    psFree(bs1);
+    psFree(bs2);
+    psFree(xor);
+
+    return 0;
+}
+
+static int testBitSet05(void)
+{
+    char *binOut1 = NULL;
+    char *binOut2 = NULL;
+
+    psBitSet* bs1 = psBitSetAlloc(24);
+    psBitSet* not = psBitSetAlloc(24);
+    for(int i=0; i<24; i++) {
+        if (i % 2) {
+            bs1 = psBitSetSet(bs1, i);
+        }
+        if (i % 2 == 0) {
+            not = psBitSetSet(not, i);
+        }
+    }
+
+    binOut1 = psBitSetToString(bs1);
+    binOut2 = psBitSetToString(not);
+    fprintf(stderr,"psBitSetOp input is %s.  Truth is %s.\n",
+            binOut1,binOut2);
+    psFree(binOut1);
+    psFree(binOut2);
+
+    // Test B - Perform binary AND with psBitSets
+    psLogMsg(__func__,PS_LOG_INFO,"Perform binary NOT with psBitSets");
+    psBitSet* outbs = psBitSetAlloc(24);
+    outbs = psBitSetNot(outbs, bs1);
+    if (outbs == NULL) {
+        psAbort(__func__,"psBitSetOp returned a NULL result for NOT operation");
+    }
+
+    for(int i=0; i<24; i++) {
+        bool truth = psBitSetTest(not,i);
+        bool res = psBitSetTest(outbs,i);
+        if ( res != truth) {
+            binOut1 = psBitSetToString(bs1);
+            binOut2 = psBitSetToString(outbs);
+            psAbort(__func__,"psBitSetOp with NOT operator failed.\nInput was %s.  Output was %s",
+                    binOut1,binOut2);
+        }
+    }
+    psFree(outbs);
+
+    // Test C - Perform binary AND and auto allocate output
+    psLogMsg(__func__,PS_LOG_INFO,"Perform binary NOT and auto allocate output");
+    outbs = psBitSetNot(NULL, bs1);
+    if (outbs == NULL) {
+        psAbort(__func__,"psBitSetOp failed to create a new psBitSet for the result");
+    }
+    for(int i=0; i<24; i++) {
+        bool truth = psBitSetTest(not,i);
+        bool res = psBitSetTest(outbs,i);
+        if ( res != truth) {
+            binOut1 = psBitSetToString(bs1);
+            binOut2 = psBitSetToString(outbs);
+            psAbort(__func__,"psBitSetOp with NOT operator failed.\nInput was %s.  Output was %s",
+                    binOut1,binOut2);
+        }
+    }
+    psFree(outbs);
+    outbs = NULL;
+
+    psFree(bs1);
+    psFree(not);
+
+    return 0;
+}
+
+static int testBitSet06(void)
+{
+    psErr* err;
+
+    psBitSet* bs1 = psBitSetAlloc(24);
+    psBitSet* bs2 = psBitSetAlloc(40);
+
+    psLogMsg(__func__,PS_LOG_INFO,"Following should be an error");
+    psBitSet* outbs = psBitSetOp(NULL, bs1, "XOR", bs2);
+    if (outbs != NULL) {
+        psAbort(__func__,"psBitSetOp did not return a NULL result when input sizes differ");
+    }
+
+    err = psErrorLast();
+    if (err->code != PS_ERR_BAD_PARAMETER_SIZE) {
+        psErrorStackPrint(stderr,"Error Stack:");
+        psAbort(__func__,"psBitSetOp didn't generate expected error with operands' sizes differed.");
+    }
+    psFree(err);
+    psFree(bs1);
+    psFree(bs2);
+
+    bs1 = psBitSetAlloc(24);
+    bs2 = psBitSetAlloc(24);
+
+    outbs = psBitSetAlloc(40);
+    psBitSet* outbs2 = psBitSetOp(outbs, bs1, "XOR", bs2);
+    if (outbs2 == NULL) {
+        psAbort(__func__,"psBitSetOp failed when input size and output size differed (a recoverable error).");
+    }
+    if (outbs2 != outbs) {
+        psAbort(__func__,"psBitSetOp didn't reuse the given output struct.");
+    }
+    if (outbs2->n != bs1->n) {
+        psAbort(__func__,"psBitSetOp did properly adjust the output psBitSet size.");
+    }
+
+    psErrorClear();
+    psLogMsg(__func__,PS_LOG_INFO,"Following is an error.");
+    outbs = psBitSetOp(outbs, bs1, "FOO", bs2);
+    if (outbs != NULL) {
+        psAbort(__func__,"psBitSetOp returned something in case of a bogus operation.");
+    }
+    err = psErrorLast();
+    if (err->code != PS_ERR_BAD_PARAMETER_VALUE) {
+        psErrorStackPrint(stderr,"Error Stack:");
+        psAbort(__func__,"psBitSetOp didn't generate expected error with bogus operator.");
+    }
+    psFree(err);
+
+
+    // try again, though give a valid output bitset -- should free the out upon error to avoid leak.
+    outbs = psBitSetAlloc(24);
+    psErrorClear();
+    psLogMsg(__func__,PS_LOG_INFO,"Following is an error.");
+    outbs = psBitSetOp(outbs, bs1, "FOO", bs2);
+
+    err = psErrorLast();
+    if (err->code != PS_ERR_BAD_PARAMETER_VALUE) {
+        psErrorStackPrint(stderr,"Error Stack:");
+        psAbort(__func__,"psBitSetOp didn't generate expected error with bogus operator.");
+    }
+    psFree(err);
+
+
+    psFree(bs1);
+    psFree(bs2);
+    psFree(outbs);
+
+    return 0;
+}
Index: unk/psLib/test/collections/tst_psBitSet_01.c
===================================================================
--- /trunk/psLib/test/collections/tst_psBitSet_01.c	(revision 1806)
+++ 	(revision )
@@ -1,133 +1,0 @@
-/** @file  tst_psBitSet_01.c
- *
- *  @brief Test driver for psBitSet functions
- *
- *  This test driver contains the following tests for psBitSet test point 1:
- *     A)  Create psBitSet
- *     B)  Set bits
- *     C)  Test bits
- *     D)  Attempt to test negative bit
- *     E)  Attempt to test bit to large
- *     F)  Attempt to test bit in null BitSet
- *     G)  Attempt to set negative bit
- *     H)  Attempt to set bit to large
- *     I)  Attempt to set bit in null BitSet
- *     J)  Free psBitSet
- *
- *  @author  Ross Harman, MHPCC
- *
- *  @version $Revision: 1.7 $  $Name: not supported by cvs2svn $
- *  @date  $Date: 2004-08-06 22:34:05 $
- *
- *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
- *
- */
-
-#include "pslib.h"
-#include "psTest.h"
-
-int main(int argc,
-         char* argv[])
-{
-    char *binOut = NULL;
-    psBitSet *tempBs = NULL;
-
-
-    // Test A - Create psBitSet
-    printPositiveTestHeader(stdout,"psBitSet", "Create psBitSet");
-    printf("Creating psBitSet with 24 bits...\n");
-    psBitSet* bs = psBitSetAlloc(24);
-    binOut = psBitSetToString(bs);
-    printf("%s\n\n", binOut);
-    psFree(binOut);
-    printFooter(stdout, "psBitSet", "Create psBitSet", true);
-
-
-    // Test B - Set bits
-    printPositiveTestHeader(stdout, "psBitSet", "Set bits");
-    tempBs = bs;
-    printf("Setting first bit...\n");
-    bs = psBitSetSet(bs, 0);
-    printf("Setting third bit...\n");
-    bs = psBitSetSet(bs, 2);
-    printf("Setting last bit...\n");
-    bs = psBitSetSet(bs, 23);
-    if(bs != tempBs) {
-        printf("Error: Return pointer not equal to output argument pointer\n");
-    }
-    binOut = psBitSetToString(bs);
-    printf("%s\n\n", binOut);
-    psFree(binOut);
-    printFooter(stdout, "psBitSet", "Set bits", true);
-
-
-    // Test C - Test bits
-    printPositiveTestHeader(stdout, "psBitSet", "Test bits");
-    printf("Testing first bit...\n");
-    printf("Result: %d\n", psBitSetTest(bs, 0));
-    printf("Testing third bit...\n");
-    printf("Result: %d\n", psBitSetTest(bs, 2));
-    printf("Testing last bit...\n");
-    printf("Result: %d\n", psBitSetTest(bs, 23));
-    printFooter(stdout, "psBitSet", "Test bits", true);
-
-
-    // Test D - Attempt to test negative bit
-    printNegativeTestHeader(stdout,"psBitSet", "Attempt to test negative bit",
-                            "Bit position too small: -4", 0);
-    if(psBitSetTest(bs, -4)) {
-        printf("Error: Return value should be zero\n");
-    }
-    printFooter(stdout, "psBitSet", "Attempt to test negative bit", true);
-
-
-    // Test E - Attempt to test bit to large
-    printNegativeTestHeader(stdout,"psBitSet", "Attempt to test bit to large",
-                            "Bit position too large: 200", 0);
-    if(psBitSetTest(bs, 200)) {
-        printf("Error: Return value should be zero\n");
-    }
-    printFooter(stdout, "psBitSet", "Attempt to test bit to large", true);
-
-
-    // Test F - Attempt to test bit in null BitSet
-    printNegativeTestHeader(stdout,"psBitSet", "Attempt to test bit in null BitSet",
-                            "Null psBitSet for inBitSet argument", 0);
-    psBitSetTest(NULL, 0);
-    printFooter(stdout, "psBitSet", "Attempt to test bit in null BitSet", true);
-
-
-    // Test G - Attempt to set negative bit
-    printNegativeTestHeader(stdout,"psBitSet", "Attempt to set negative bit",
-                            "Bit position too small: -4", 0);
-    bs = psBitSetSet(bs, -4);
-    printFooter(stdout, "psBitSet", "Attempt to set negative bit", true);
-
-
-    // Test H - Attempt to set bit to large
-    printNegativeTestHeader(stdout,"psBitSet", "Attempt to set bit to large",
-                            "Bit position too large: 200", 0);
-    bs = psBitSetSet(bs, 200);
-    printFooter(stdout, "psBitSet", "Attempt to set bit to large", true);
-
-
-    // Test I - Attempt to set bit in null BitSet
-    printNegativeTestHeader(stdout,"psBitSet", "Attempt to set bit in null BitSet",
-                            "Null psBitSet for inBitSet argument", 0);
-    psBitSetSet(NULL, 0);
-    printFooter(stdout, "psBitSet", "Attempt to set bit in null BitSet", true);
-
-
-    // Test J - Free psBitSet
-    printPositiveTestHeader(stdout, "psBitSet", "Free psBitSet");
-    psFree(bs);
-    psMemCheckLeaks(0, NULL, stdout);
-    psMemCheckCorruption(0);
-    int nBad = psMemCheckCorruption(0);
-    if(nBad) {
-        printf("ERROR: Found %d bad memory blocks\n", nBad);
-    }
-    printFooter(stdout, "psBitSet", "Free psBitSet", true);
-
-    return 0;
-}
Index: unk/psLib/test/collections/tst_psBitSet_02.c
===================================================================
--- /trunk/psLib/test/collections/tst_psBitSet_02.c	(revision 1806)
+++ 	(revision )
@@ -1,89 +1,0 @@
-/** @file  tst_psBitSet_02.c
- *
- *  @brief Test driver for psBitSet functions
- *
- *  This test driver contains the following tests for psBitSet test point 2:
- *     A)  Create two psBitSets
- *     B)  Perform binary AND with psBitSets
- *     C)  Perform binary AND and auto allocate output
- *     D)  Free psBitSets
- *
- *  @author  Ross Harman, MHPCC
- *
- *  @version $Revision: 1.8 $  $Name: not supported by cvs2svn $
- *  @date  $Date: 2004-08-06 22:34:05 $
- *
- *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
- *
- */
-
-#include "pslib.h"
-#include "psTest.h"
-
-int main(int argc,
-         char* argv[])
-{
-    char *binOut = NULL;
-    char *binOut2 = NULL;
-
-
-    // Test A - Create two psBitSets
-    printPositiveTestHeader(stdout,"psBitSet", "Create two psBitSets");
-    psBitSet* bs1 = psBitSetAlloc(24);
-    psBitSet* bs2 = psBitSetAlloc(24);
-    binOut = psBitSetToString(bs1);
-    printf("%s\n", binOut);
-    psFree(binOut);
-    binOut = psBitSetToString(bs2);
-    printf("%s\n\n", binOut);
-    psFree(binOut);
-    printf("Setting all bits true...\n");
-    for(int i=0; i<24; i++) {
-        bs1 = psBitSetSet(bs1, i);
-        bs2 = psBitSetSet(bs2, i);
-    }
-    binOut = psBitSetToString(bs1);
-    printf("%s\n", binOut);
-    psFree(binOut);
-    binOut = psBitSetToString(bs2);
-    printf("%s\n\n", binOut);
-    psFree(binOut);
-    printFooter(stdout, "psBitSet", "Create two psBitSets", true);
-
-    // Test B - Perform binary AND with psBitSets
-    printPositiveTestHeader(stdout,"psBitSet", "Perform binary AND with psBitSets");
-    psBitSet* outbs = psBitSetAlloc(24);
-    outbs = psBitSetOp(outbs, bs1, "AND", bs2);
-    binOut = psBitSetToString(outbs);
-    printf("Result:\n");
-    printf("%s\n", binOut);
-    psFree(binOut);
-    printFooter(stdout, "psBitSet", "Perform binary AND with psBitSets", true);
-
-
-    // Test C - Perform binary AND and auto allocate output
-    printPositiveTestHeader(stdout,"psBitSet", "Perform binary AND and auto allocate output");
-    psBitSet* outbs2 = NULL;
-    outbs2 = psBitSetOp(outbs2, bs1, "AND", bs2);
-    binOut2 = psBitSetToString(outbs2);
-    printf("Result:\n");
-    printf("%s\n", binOut2);
-    psFree(binOut2);
-    printFooter(stdout, "psBitSet", "Perform binary AND and auto allocate output", true);
-
-
-    // Test D - Free psBitSets
-    printPositiveTestHeader(stdout, "psBitSet", "Free psBitSets");
-    psFree(bs1);
-    psFree(bs2);
-    psFree(outbs);
-    psFree(outbs2);
-    psMemCheckLeaks(0, NULL, stdout);
-    int nBad = psMemCheckCorruption(0);
-    if(nBad) {
-        printf("ERROR: Found %d bad memory blocks\n", nBad);
-    }
-    printFooter(stdout, "psBitSet", "Free psBitSets", true);
-
-    return 0;
-}
Index: unk/psLib/test/collections/tst_psBitSet_03.c
===================================================================
--- /trunk/psLib/test/collections/tst_psBitSet_03.c	(revision 1806)
+++ 	(revision )
@@ -1,76 +1,0 @@
-/** @file  tst_psBitSet_03.c
- *
- *  @brief Test driver for psBitSet functions
- *
- *  This test driver contains the following tests for psBitSet test point 3:
- *     A)  Create two psBitSets
- *     B)  Perform binary OR with psBitSets
- *     C)  Free psBitSets
- *
- *  @author  Ross Harman, MHPCC
- *
- *  @version $Revision: 1.8 $  $Name: not supported by cvs2svn $
- *  @date  $Date: 2004-08-06 22:34:05 $
- *
- *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
- *
- */
-
-#include "pslib.h"
-#include "psTest.h"
-
-int main(int argc,
-         char* argv[])
-{
-    char *binOut = NULL;
-
-
-    // Test A - Create two psBitSets
-    printPositiveTestHeader(stdout,"psBitSet", "Create two psBitSets");
-    psBitSet* bs1 = psBitSetAlloc(24);
-    psBitSet* bs2 = psBitSetAlloc(24);
-    binOut = psBitSetToString(bs1);
-    printf("%s\n", binOut);
-    psFree(binOut);
-    binOut = psBitSetToString(bs2);
-    printf("%s\n\n", binOut);
-    psFree(binOut);
-    printf("Setting all bits true...\n");
-    for(int i=0; i<24; i++) {
-        bs1 = psBitSetSet(bs1, i);
-        bs2 = psBitSetSet(bs2, i);
-    }
-    binOut = psBitSetToString(bs1);
-    printf("%s\n", binOut);
-    psFree(binOut);
-    binOut = psBitSetToString(bs2);
-    printf("%s\n\n", binOut);
-    psFree(binOut);
-    printFooter(stdout, "psBitSet", "Create two psBitSets", true);
-
-
-    // Test B - Perform binary OR with psBitSets
-    printPositiveTestHeader(stdout,"psBitSet", "Perform binary OR with psBitSets");
-    psBitSet* outbs = psBitSetAlloc(24);
-    outbs = psBitSetOp(outbs, bs1, "OR", bs2);
-    binOut = psBitSetToString(outbs);
-    printf("Result:\n");
-    printf("%s\n", binOut);
-    psFree(binOut);
-    printFooter(stdout, "psBitSet", "Perform binary OR with psBitSets", true);
-
-
-    // Test C - Free psBitSets
-    printPositiveTestHeader(stdout, "psBitSet", "Free psBitSets");
-    psFree(bs1);
-    psFree(bs2);
-    psFree(outbs);
-    psMemCheckLeaks(0, NULL, stdout);
-    int nBad = psMemCheckCorruption(0);
-    if(nBad) {
-        printf("ERROR: Found %d bad memory blocks\n", nBad);
-    }
-    printFooter(stdout, "psBitSet", "Free psBitSets", true);
-
-    return 0;
-}
Index: unk/psLib/test/collections/tst_psBitSet_04.c
===================================================================
--- /trunk/psLib/test/collections/tst_psBitSet_04.c	(revision 1806)
+++ 	(revision )
@@ -1,76 +1,0 @@
-/** @file  tst_psBitSet_04.c
- *
- *  @brief Test driver for psBitSet functions
- *
- *  This test driver contains the following tests for psBitSet test point 4:
- *     A)  Create two psBitSets
- *     B)  Perform binary XOR with psBitSets
- *     C)  Free psBitSets
- *
- *  @author  Ross Harman, MHPCC
- *
- *  @version $Revision: 1.7 $  $Name: not supported by cvs2svn $
- *  @date  $Date: 2004-08-06 22:34:05 $
- *
- *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
- *
- */
-
-#include "pslib.h"
-#include "psTest.h"
-
-int main(int argc,
-         char* argv[])
-{
-    char *binOut = NULL;
-
-
-    // Test A - Create two psBitSets
-    printPositiveTestHeader(stdout,"psBitSet", "Create two psBitSets");
-    psBitSet* bs1 = psBitSetAlloc(24);
-    psBitSet* bs2 = psBitSetAlloc(24);
-    binOut = psBitSetToString(bs1);
-    printf("%s\n", binOut);
-    psFree(binOut);
-    binOut = psBitSetToString(bs2);
-    printf("%s\n\n", binOut);
-    psFree(binOut);
-    printf("Setting all bits true...\n");
-    for(int i=0; i<24; i++) {
-        bs1 = psBitSetSet(bs1, i);
-        bs2 = psBitSetSet(bs2, i);
-    }
-    binOut = psBitSetToString(bs1);
-    printf("%s\n", binOut);
-    psFree(binOut);
-    binOut = psBitSetToString(bs2);
-    printf("%s\n\n", binOut);
-    psFree(binOut);
-    printFooter(stdout, "psBitSet", "Create two psBitSets", true);
-
-
-    // Test B - Perform binary XOR with psBitSets
-    printPositiveTestHeader(stdout,"psBitSet", "Perform binary XOR with psBitSets");
-    psBitSet* outbs = psBitSetAlloc(24);
-    outbs = psBitSetOp(outbs, bs1, "XOR", bs2);
-    binOut = psBitSetToString(outbs);
-    printf("Result:\n");
-    printf("%s\n", binOut);
-    psFree(binOut);
-    printFooter(stdout, "psBitSet", "Perform binary XOR with psBitSets", true);
-
-
-    // Test C - Free psBitSets
-    printPositiveTestHeader(stdout, "psBitSet", "Free psBitSets");
-    psFree(bs1);
-    psFree(bs2);
-    psFree(outbs);
-    psMemCheckLeaks(0, NULL, stdout);
-    int nBad = psMemCheckCorruption(0);
-    if(nBad) {
-        printf("ERROR: Found %d bad memory blocks\n", nBad);
-    }
-    printFooter(stdout, "psBitSet", "Free psBitSets", true);
-
-    return 0;
-}
Index: unk/psLib/test/collections/tst_psBitSet_05.c
===================================================================
--- /trunk/psLib/test/collections/tst_psBitSet_05.c	(revision 1806)
+++ 	(revision )
@@ -1,61 +1,0 @@
-/** @file  tst_psBitSet_05.c
- *
- *  @brief Test driver for psBitSet functions
- *
- *  This test driver contains the following tests for psBitSet test point 5:
- *     A)  Create two psBitSets of different size
- *     B)  Attempt OR with psBitsets, should get error
- *     C)  Free psBitSets
- *
- *  @author  Ross Harman, MHPCC
- *
- *  @version $Revision: 1.7 $  $Name: not supported by cvs2svn $
- *  @date  $Date: 2004-08-06 22:34:05 $
- *
- *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
- *
- */
-
-#include "pslib.h"
-#include "psTest.h"
-
-int main(int argc,
-         char* argv[])
-{
-    char *binOut = NULL;
-
-
-    // Test A - Create two psBitSets
-    printPositiveTestHeader(stdout,"psBitSet", "Create two psBitSets of different size");
-    psBitSet* bs1 = psBitSetAlloc(24);
-    psBitSet* bs2 = psBitSetAlloc(40);
-    binOut = psBitSetToString(bs1);
-    printf("%s\n", binOut);
-    psFree(binOut);
-    binOut = psBitSetToString(bs2);
-    printf("%s\n\n", binOut);
-    psFree(binOut);
-    printFooter(stdout, "psBitSet", "Create two psBitSets of different size", true);
-
-
-    // Test B - Attempt OR with psBitsets, should get error
-    printNegativeTestHeader(stdout, "psBitSet", "Attempt OR with psBitsets", "psBitSet sizes not the same", 0);
-    psBitSet* outbs = psBitSetAlloc(24);
-    outbs = psBitSetOp(outbs, bs1, "OR", bs2);
-    printFooter(stdout, "psBitSet", "Attempt OR with psBitsets", true);
-
-
-    // Test C - Free psBitSets
-    printPositiveTestHeader(stdout, "psBitSet", "Free psBitSets");
-    psFree(bs1);
-    psFree(bs2);
-    psFree(outbs);
-    psMemCheckLeaks(0, NULL, stdout);
-    int nBad = psMemCheckCorruption(0);
-    if(nBad) {
-        printf("ERROR: Found %d bad memory blocks\n", nBad);
-    }
-    printFooter(stdout, "psBitSet", "Free psBitSets", true);
-
-    return 0;
-}
Index: unk/psLib/test/collections/tst_psBitSet_06.c
===================================================================
--- /trunk/psLib/test/collections/tst_psBitSet_06.c	(revision 1806)
+++ 	(revision )
@@ -1,70 +1,0 @@
-/** @file  tst_psBitSet_06.c
- *
- *  @brief Test driver for psBitSet functions
- *
- *  This test driver contains the following tests for psBitSet test point 6:
- *     A)  Create two psBitSets
- *     B)  Perform invalid binary operation with psBitSets
- *     C)  Attempt to create negative size bitset
- *     D   Attempt to free null BitSet
- *     E)  Free psBitSets
- *
- *  @author  Ross Harman, MHPCC
- *
- *  @version $Revision: 1.9 $  $Name: not supported by cvs2svn $
- *  @date  $Date: 2004-08-06 22:34:05 $
- *
- *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
- *
- */
-
-#include "pslib.h"
-#include "psTest.h"
-
-int main(int argc,
-         char* argv[])
-{
-    char *binOut = NULL;
-
-
-    // Test A - Create two psBitSets
-    printPositiveTestHeader(stdout,"psBitSet", "Create two psBitSets");
-    psBitSet* bs1 = psBitSetAlloc(24);
-    psBitSet* bs2 = psBitSetAlloc(24);
-    binOut = psBitSetToString(bs1);
-    printf("%s\n", binOut);
-    psFree(binOut);
-    binOut = psBitSetToString(bs2);
-    printf("%s\n\n", binOut);
-    psFree(binOut);
-    printFooter(stdout, "psBitSet", "Create two psBitSets", true);
-
-
-    // Test B - Perform invalid binary operation with psBitSets
-    printNegativeTestHeader(stdout,"psBitSet", "Perform invalid binary operation",
-                            "Invalid psBitMask binary operation", 0);
-    psBitSet* outbs = psBitSetAlloc(24);
-    outbs = psBitSetOp(outbs, bs1, "ZZXOR", bs2);
-    printFooter(stdout, "psBitSet", "Perform binary XOR with psBitSets", true);
-
-
-    // Test C - Attempt to create negative size bitset
-    printNegativeTestHeader(stdout,"psBitSet", "Create negative size bitset",
-                            "Allocation size must be >= 0: size = -4", 0);
-    psBitSetAlloc(-4);
-    printFooter(stdout, "psBitSet", "Create negative size bitset", true);
-
-    // Test E - Free psBitSets
-    printPositiveTestHeader(stdout, "psBitSet", "Free psBitSets");
-    psFree(bs1);
-    psFree(bs2);
-    psFree(outbs);
-    psMemCheckLeaks(0, NULL, stdout);
-    int nBad = psMemCheckCorruption(0);
-    if(nBad) {
-        printf("ERROR: Found %d bad memory blocks\n", nBad);
-    }
-    printFooter(stdout, "psBitSet", "Free psBitSetFree psBitSets", true);
-
-    return 0;
-}
Index: unk/psLib/test/collections/tst_psBitSet_07.c
===================================================================
--- /trunk/psLib/test/collections/tst_psBitSet_07.c	(revision 1806)
+++ 	(revision )
@@ -1,95 +1,0 @@
-
-/** @file  tst_psBitSet_07.c
- *
- *  @brief Test driver for psBitSet functions
- *
- *  This test driver contains the following tests for psBitSet test point 7:
- *     A)  Create psBitSets of non-multiple of 8 bits
- *     B)  Set psBitSets to 0x3 and 0x5
- *     C)  Perform AND, OR, and XOR
- *     D)  Free psBitSets
- *
- *  @author  Ross Harman, MHPCC
- *
- *  @version $Revision: 1.2 $  $Name: not supported by cvs2svn $
- *  @date  $Date: 2004-08-06 22:34:05 $
- *
- *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
- *
- */
-
-#include "pslib.h"
-#include "psTest.h"
-
-int main(int argc,
-         char* argv[])
-{
-    char *binOut1 = NULL;
-    char *binOut2 = NULL;
-    char *binOut3 = NULL;
-
-    // Test A - Create psBitSet
-    printPositiveTestHeader(stdout,"psBitSet", "Create psBitSets of non-multiple of 8 bits");
-    printf("Creating psBitSets\n");
-    psBitSet* bs1 = psBitSetAlloc(3);
-    psBitSet* bs2 = psBitSetAlloc(3);
-    psBitSet* bs3 = psBitSetAlloc(3);
-    binOut1 = psBitSetToString(bs1);
-    binOut2 = psBitSetToString(bs2);
-    printf("%s\n", binOut1);
-    printf("%s\n\n", binOut2);
-    psFree(binOut1);
-    psFree(binOut2);
-    printFooter(stdout, "psBitSet", "Create psBitSets of non-multiple of 8 bits", true);
-
-
-    // Test B - Set bits to 0x3 and 0x5
-    printPositiveTestHeader(stdout, "psBitSet", "Set psBitSets to 0x3 and 0x5");
-    bs1 = psBitSetSet(bs1, 0);
-    bs1 = psBitSetSet(bs1, 1);
-    bs2 = psBitSetSet(bs2, 0);
-    bs2 = psBitSetSet(bs2, 2);
-    binOut1 = psBitSetToString(bs1);
-    binOut2 = psBitSetToString(bs2);
-    printf("%s\n", binOut1);
-    printf("%s\n\n", binOut2);
-    psFree(binOut1);
-    psFree(binOut2);
-    printFooter(stdout, "psBitSet", "Set psBitSets to 0x3 and 0x5", true);
-
-
-    // Test C - Perform AND, OR, and XOR
-    printPositiveTestHeader(stdout, "psBitSet", "Perform AND, OR, and XOR");
-    printf("AND:\n");
-    bs3 = psBitSetOp(bs3, bs1, "AND", bs2);
-    binOut3 = psBitSetToString(bs3);
-    printf("%s\n", binOut3);
-    psFree(binOut3);
-    printf("OR:\n");
-    bs3 = psBitSetOp(bs3, bs1, "OR", bs2);
-    binOut3 = psBitSetToString(bs3);
-    printf("%s\n", binOut3);
-    psFree(binOut3);
-    printf("XOR:\n");
-    bs3 = psBitSetOp(bs3, bs1, "XOR", bs2);
-    binOut3 = psBitSetToString(bs3);
-    printf("%s\n", binOut3);
-    psFree(binOut3);
-    printFooter(stdout, "psBitSet", "Perform AND, OR, and XOR", true);
-
-
-    // Test D - Free psBitSets
-    printPositiveTestHeader(stdout, "psBitSet", "Free psBitSets");
-    psFree(bs1);
-    psFree(bs2);
-    psFree(bs3);
-    psMemCheckLeaks(0, NULL, stdout);
-    psMemCheckCorruption(0);
-    int nBad = psMemCheckCorruption(0);
-    if(nBad) {
-        printf("ERROR: Found %d bad memory blocks\n", nBad);
-    }
-    printFooter(stdout, "psBitSet", "Free psBitSets", true);
-
-    return 0;
-}
Index: unk/psLib/test/collections/tst_psBitSet_08.c
===================================================================
--- /trunk/psLib/test/collections/tst_psBitSet_08.c	(revision 1806)
+++ 	(revision )
@@ -1,116 +1,0 @@
-/** @file  tst_psBitSet_08.c
- *
- *  @brief Test driver for psBitSet functions
- *
- *  This test driver contains the following tests for psBitSet test point 8:
- *     A) Create psBitSets and set to 0xAA and 0xFF 0xCC
- *     B) Perform NOT operation and auto allocate output
- *     C) Attempt NOT operation if input argument is NULL
- *     D) Free psBitSets
- *
- *  @author  Ross Harman, MHPCC
- *
- *  @version $Revision: 1.2 $  $Name: not supported by cvs2svn $
- *  @date  $Date: 2004-08-06 22:34:05 $
- *
- *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
- *
- */
-
-#include "pslib.h"
-#include "psTest.h"
-
-int main(int argc,
-         char* argv[])
-{
-    char *binOut1 = NULL;
-    char *binOut2 = NULL;
-    char *binOut3 = NULL;
-    psBitSet *bsOut1 = NULL;
-    psBitSet *bsOut2 = NULL;
-    psBitSet *bsOut3 = NULL;
-
-
-    // Test A - Create psBitSets and set to 0xAA and 0xFF 0xCC
-    printPositiveTestHeader(stdout,"psBitSet", "Create psBitSets and set to 0xAA and 0xFF 0xCC");
-    printf("Creating psBitSets\n");
-    psBitSet* bs1 = psBitSetAlloc(8);
-    psBitSet* bs2 = psBitSetAlloc(8);
-    psBitSet* bs3 = psBitSetAlloc(8);
-
-    // Create 0xAA
-    bs1 = psBitSetSet(bs1, 1);
-    bs1 = psBitSetSet(bs1, 3);
-    bs1 = psBitSetSet(bs1, 5);
-    bs1 = psBitSetSet(bs1, 7);
-
-    // Create 0xFF
-    bs2 = psBitSetSet(bs2, 0);
-    bs2 = psBitSetSet(bs2, 1);
-    bs2 = psBitSetSet(bs2, 2);
-    bs2 = psBitSetSet(bs2, 3);
-    bs2 = psBitSetSet(bs2, 4);
-    bs2 = psBitSetSet(bs2, 5);
-    bs2 = psBitSetSet(bs2, 6);
-    bs2 = psBitSetSet(bs2, 7);
-
-    // Create 0xCC
-    bs3 = psBitSetSet(bs3, 2);
-    bs3 = psBitSetSet(bs3, 3);
-
-    binOut1 = psBitSetToString(bs1);
-    binOut2 = psBitSetToString(bs2);
-    binOut3 = psBitSetToString(bs3);
-    printf("%s\n", binOut1);
-    printf("%s\n", binOut2);
-    printf("%s\n\n", binOut3);
-    psFree(binOut1);
-    psFree(binOut2);
-    psFree(binOut3);
-    printFooter(stdout, "psBitSet", "Create psBitSets and set to 0xAA and 0xFF 0xCC", true);
-
-
-    // Test B - Perform NOT operation and auto allocate output argument
-    printPositiveTestHeader(stdout, "psBitSet", "Perform NOT operation and auto allocate output");
-    bsOut1 = psBitSetNot(bsOut1, bs1);
-    bsOut2 = psBitSetNot(bsOut2, bs2);
-    bsOut3 = psBitSetNot(bsOut3, bs3);
-    binOut1 = psBitSetToString(bsOut1);
-    binOut2 = psBitSetToString(bsOut2);
-    binOut3 = psBitSetToString(bsOut3);
-    printf("%s\n", binOut1);
-    printf("%s\n", binOut2);
-    printf("%s\n\n", binOut3);
-    psFree(binOut1);
-    psFree(binOut2);
-    psFree(binOut3);
-    printFooter(stdout, "psBitSet", "Perform NOT operation and auto allocate output", true);
-
-
-    // Test C - Attempt NOT operation if input argument is NULL
-    printNegativeTestHeader(stdout, "psBitSet", "Attempt NOT operation if input argument is NULL",
-                            "Null psBitSet for inBitSet argument", 0);
-    if(psBitSetNot(NULL, NULL) != NULL) {
-        printf("ERROR: Output psBitset should be NULL\n");
-    }
-    printFooter(stdout, "psBitSet", "Attempt NOT operation if input argument is NULL", true);
-
-
-    // Test D - Free psBitSets
-    printPositiveTestHeader(stdout, "psBitSet", "Free psBitSets");
-    psFree(bs1);
-    psFree(bs2);
-    psFree(bs3);
-    psFree(bsOut1);
-    psFree(bsOut2);
-    psFree(bsOut3);
-    psMemCheckLeaks(0, NULL, stdout);
-    psMemCheckCorruption(0);
-    int nBad = psMemCheckCorruption(0);
-    if(nBad) {
-        printf("ERROR: Found %d bad memory blocks\n", nBad);
-    }
-    printFooter(stdout, "psBitSet", "Free psBitSets", true);
-
-    return 0;
-}
Index: /trunk/psLib/test/collections/verified/tst_psBitSet.stderr
===================================================================
--- /trunk/psLib/test/collections/verified/tst_psBitSet.stderr	(revision 1807)
+++ /trunk/psLib/test/collections/verified/tst_psBitSet.stderr	(revision 1807)
@@ -0,0 +1,147 @@
+/***************************** TESTPOINT ******************************************\
+*             TestFile: tst_psBitSet.c                                             *
+*            TestPoint: psBitSet{psBitSetAlloc}                                    *
+*             TestType: Positive                                                   *
+\**********************************************************************************/
+
+Creating psBitSet with 24 bits...
+Creating psBitSet with 25 bits...
+<DATE><TIME>|<HOST>|I|testBitSet01a
+    Following is an error.
+<DATE><TIME>|<HOST>|E|psLib.collections.psBitSetAlloc
+    The number of bit in a psBitSet (-4) must be greater than zero.
+
+---> TESTPOINT PASSED (psBitSet{psBitSetAlloc} | tst_psBitSet.c)
+
+/***************************** TESTPOINT ******************************************\
+*             TestFile: tst_psBitSet.c                                             *
+*            TestPoint: psBitSet{psBitSetSet/psBitSetClear}                        *
+*             TestType: Positive                                                   *
+\**********************************************************************************/
+
+Setting first bit...
+Setting third bit...
+Setting last bit...
+100000000000000000000101
+
+Clearing first bit...
+Clearing third bit...
+Clearing last bit...
+000000000000000000000000
+
+<DATE><TIME>|<HOST>|I|testBitSet01b
+    Following should be an error
+<DATE><TIME>|<HOST>|E|psLib.collections.psBitSetSet
+    The specified bit position (-4) is invalid.  Position must be between 0 and 23.
+<DATE><TIME>|<HOST>|I|testBitSet01b
+    Following should be an error
+<DATE><TIME>|<HOST>|E|psLib.collections.psBitSetSet
+    The specified bit position (200) is invalid.  Position must be between 0 and 23.
+<DATE><TIME>|<HOST>|I|testBitSet01b
+    Following should be an error
+<DATE><TIME>|<HOST>|E|psLib.collections.psBitSetSet
+    Can not operate on a NULL psBitSet.
+
+---> TESTPOINT PASSED (psBitSet{psBitSetSet/psBitSetClear} | tst_psBitSet.c)
+
+/***************************** TESTPOINT ******************************************\
+*             TestFile: tst_psBitSet.c                                             *
+*            TestPoint: psBitSet{psBitSetTest}                                     *
+*             TestType: Positive                                                   *
+\**********************************************************************************/
+
+Setting first bit...
+Setting third bit...
+Setting last bit...
+<DATE><TIME>|<HOST>|I|testBitSet01c
+    Following should be an error
+<DATE><TIME>|<HOST>|E|psLib.collections.psBitSetTest
+    The specified bit position (-4) is invalid.  Position must be between 0 and 23.
+<DATE><TIME>|<HOST>|I|testBitSet01c
+    Following should be an error
+<DATE><TIME>|<HOST>|E|psLib.collections.psBitSetTest
+    The specified bit position (200) is invalid.  Position must be between 0 and 23.
+<DATE><TIME>|<HOST>|I|testBitSet01c
+    Following should be an error
+<DATE><TIME>|<HOST>|E|psLib.collections.psBitSetTest
+    Can not operate on a NULL psBitSet.
+
+---> TESTPOINT PASSED (psBitSet{psBitSetTest} | tst_psBitSet.c)
+
+/***************************** TESTPOINT ******************************************\
+*             TestFile: tst_psBitSet.c                                             *
+*            TestPoint: psBitSet{psBitSetOp}                                       *
+*             TestType: Positive                                                   *
+\**********************************************************************************/
+
+<DATE><TIME>|<HOST>|I|testBitSet06
+    Following should be an error
+<DATE><TIME>|<HOST>|E|psLib.collections.psBitSetOp
+    The psBitSet operand must be the same size.
+<DATE><TIME>|<HOST>|I|testBitSet06
+    Following is an error.
+<DATE><TIME>|<HOST>|E|psLib.collections.psBitSetOp
+    Specified operator, FOO, is invalid.  Valid operators are AND, OR, and XOR.
+<DATE><TIME>|<HOST>|I|testBitSet06
+    Following is an error.
+<DATE><TIME>|<HOST>|E|psLib.collections.psBitSetOp
+    Specified operator, FOO, is invalid.  Valid operators are AND, OR, and XOR.
+
+---> TESTPOINT PASSED (psBitSet{psBitSetOp} | tst_psBitSet.c)
+
+/***************************** TESTPOINT ******************************************\
+*             TestFile: tst_psBitSet.c                                             *
+*            TestPoint: psBitSet{psBitSetOp AND Operator}                          *
+*             TestType: Positive                                                   *
+\**********************************************************************************/
+
+psBitSetOp input is 001100110011001100110011, 010101010101010101010101.  Truth is 000100010001000100010001.
+<DATE><TIME>|<HOST>|I|testBitSet02
+    Perform binary AND with psBitSets
+<DATE><TIME>|<HOST>|I|testBitSet02
+    Perform binary AND and auto allocate output
+
+---> TESTPOINT PASSED (psBitSet{psBitSetOp AND Operator} | tst_psBitSet.c)
+
+/***************************** TESTPOINT ******************************************\
+*             TestFile: tst_psBitSet.c                                             *
+*            TestPoint: psBitSet{psBitSetOp OR Operator}                           *
+*             TestType: Positive                                                   *
+\**********************************************************************************/
+
+psBitSetOp input is 110011001100110011001100, 101010101010101010101010.  Truth is 111011101110111011101110.
+<DATE><TIME>|<HOST>|I|testBitSet03
+    Perform binary OR with psBitSets
+<DATE><TIME>|<HOST>|I|testBitSet03
+    Perform binary OR and auto allocate output
+
+---> TESTPOINT PASSED (psBitSet{psBitSetOp OR Operator} | tst_psBitSet.c)
+
+/***************************** TESTPOINT ******************************************\
+*             TestFile: tst_psBitSet.c                                             *
+*            TestPoint: psBitSet{psBitSetOp XOR Operator}                          *
+*             TestType: Positive                                                   *
+\**********************************************************************************/
+
+psBitSetOp input is 110011001100110011001100, 101010101010101010101010.  Truth is 011001100110011001100110.
+<DATE><TIME>|<HOST>|I|testBitSet04
+    Perform binary XOR with psBitSets
+<DATE><TIME>|<HOST>|I|testBitSet04
+    Perform binary XOR and auto allocate output
+
+---> TESTPOINT PASSED (psBitSet{psBitSetOp XOR Operator} | tst_psBitSet.c)
+
+/***************************** TESTPOINT ******************************************\
+*             TestFile: tst_psBitSet.c                                             *
+*            TestPoint: psBitSet{psBitSetNot}                                      *
+*             TestType: Positive                                                   *
+\**********************************************************************************/
+
+psBitSetOp input is 101010101010101010101010.  Truth is 010101010101010101010101.
+<DATE><TIME>|<HOST>|I|testBitSet05
+    Perform binary NOT with psBitSets
+<DATE><TIME>|<HOST>|I|testBitSet05
+    Perform binary NOT and auto allocate output
+
+---> TESTPOINT PASSED (psBitSet{psBitSetNot} | tst_psBitSet.c)
+
Index: unk/psLib/test/collections/verified/tst_psBitSet_01.stderr
===================================================================
--- /trunk/psLib/test/collections/verified/tst_psBitSet_01.stderr	(revision 1806)
+++ 	(revision )
@@ -1,12 +1,0 @@
-<DATE><TIME>|<HOST>|E|psBitSetTest
-     : Line <LINENO> - Bit position too small: -4
-<DATE><TIME>|<HOST>|E|psBitSetTest
-     : Line <LINENO> - Bit position too large: 200
-<DATE><TIME>|<HOST>|E|psBitSetTest
-     : Line <LINENO> - Null psBitSet for inBitSet argument
-<DATE><TIME>|<HOST>|E|psBitSetSet
-     : Line <LINENO> - Bit position too small: -4
-<DATE><TIME>|<HOST>|E|psBitSetSet
-     : Line <LINENO> - Bit position too large: 200
-<DATE><TIME>|<HOST>|E|psBitSetSet
-     : Line <LINENO> - Null psBitSet for inBitSet argument
Index: unk/psLib/test/collections/verified/tst_psBitSet_01.stdout
===================================================================
--- /trunk/psLib/test/collections/verified/tst_psBitSet_01.stdout	(revision 1806)
+++ 	(revision )
@@ -1,116 +1,0 @@
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psBitSet_01.c                                          *
-*            TestPoint: psBitSet{Create psBitSet}                                  *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-Creating psBitSet with 24 bits...
-000000000000000000000000
-
-
----> TESTPOINT PASSED (psBitSet{Create psBitSet} | tst_psBitSet_01.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psBitSet_01.c                                          *
-*            TestPoint: psBitSet{Set bits}                                         *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-Setting first bit...
-Setting third bit...
-Setting last bit...
-100000000000000000000101
-
-
----> TESTPOINT PASSED (psBitSet{Set bits} | tst_psBitSet_01.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psBitSet_01.c                                          *
-*            TestPoint: psBitSet{Test bits}                                        *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-Testing first bit...
-Result: 1
-Testing third bit...
-Result: 1
-Testing last bit...
-Result: 1
-
----> TESTPOINT PASSED (psBitSet{Test bits} | tst_psBitSet_01.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psBitSet_01.c                                          *
-*            TestPoint: psBitSet{Attempt to test negative bit}                     *
-*             TestType: Negative                                                   *
-*    ExpectedErrorText: Bit position too small: -4                                 *
-*  ExpectedStatusValue: 0                                                          *
-\**********************************************************************************/
-
-
----> TESTPOINT PASSED (psBitSet{Attempt to test negative bit} | tst_psBitSet_01.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psBitSet_01.c                                          *
-*            TestPoint: psBitSet{Attempt to test bit to large}                     *
-*             TestType: Negative                                                   *
-*    ExpectedErrorText: Bit position too large: 200                                *
-*  ExpectedStatusValue: 0                                                          *
-\**********************************************************************************/
-
-
----> TESTPOINT PASSED (psBitSet{Attempt to test bit to large} | tst_psBitSet_01.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psBitSet_01.c                                          *
-*            TestPoint: psBitSet{Attempt to test bit in null BitSet}               *
-*             TestType: Negative                                                   *
-*    ExpectedErrorText: Null psBitSet for inBitSet argument                        *
-*  ExpectedStatusValue: 0                                                          *
-\**********************************************************************************/
-
-
----> TESTPOINT PASSED (psBitSet{Attempt to test bit in null BitSet} | tst_psBitSet_01.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psBitSet_01.c                                          *
-*            TestPoint: psBitSet{Attempt to set negative bit}                      *
-*             TestType: Negative                                                   *
-*    ExpectedErrorText: Bit position too small: -4                                 *
-*  ExpectedStatusValue: 0                                                          *
-\**********************************************************************************/
-
-
----> TESTPOINT PASSED (psBitSet{Attempt to set negative bit} | tst_psBitSet_01.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psBitSet_01.c                                          *
-*            TestPoint: psBitSet{Attempt to set bit to large}                      *
-*             TestType: Negative                                                   *
-*    ExpectedErrorText: Bit position too large: 200                                *
-*  ExpectedStatusValue: 0                                                          *
-\**********************************************************************************/
-
-
----> TESTPOINT PASSED (psBitSet{Attempt to set bit to large} | tst_psBitSet_01.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psBitSet_01.c                                          *
-*            TestPoint: psBitSet{Attempt to set bit in null BitSet}                *
-*             TestType: Negative                                                   *
-*    ExpectedErrorText: Null psBitSet for inBitSet argument                        *
-*  ExpectedStatusValue: 0                                                          *
-\**********************************************************************************/
-
-
----> TESTPOINT PASSED (psBitSet{Attempt to set bit in null BitSet} | tst_psBitSet_01.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psBitSet_01.c                                          *
-*            TestPoint: psBitSet{Free psBitSet}                                    *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-
----> TESTPOINT PASSED (psBitSet{Free psBitSet} | tst_psBitSet_01.c)
-
Index: unk/psLib/test/collections/verified/tst_psBitSet_02.stdout
===================================================================
--- /trunk/psLib/test/collections/verified/tst_psBitSet_02.stdout	(revision 1806)
+++ 	(revision )
@@ -1,47 +1,0 @@
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psBitSet_02.c                                          *
-*            TestPoint: psBitSet{Create two psBitSets}                             *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-000000000000000000000000
-000000000000000000000000
-
-Setting all bits true...
-111111111111111111111111
-111111111111111111111111
-
-
----> TESTPOINT PASSED (psBitSet{Create two psBitSets} | tst_psBitSet_02.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psBitSet_02.c                                          *
-*            TestPoint: psBitSet{Perform binary AND with psBitSets}                *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-Result:
-111111111111111111111111
-
----> TESTPOINT PASSED (psBitSet{Perform binary AND with psBitSets} | tst_psBitSet_02.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psBitSet_02.c                                          *
-*            TestPoint: psBitSet{Perform binary AND and auto allocate output}      *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-Result:
-111111111111111111111111
-
----> TESTPOINT PASSED (psBitSet{Perform binary AND and auto allocate output} | tst_psBitSet_02.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psBitSet_02.c                                          *
-*            TestPoint: psBitSet{Free psBitSets}                                   *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-
----> TESTPOINT PASSED (psBitSet{Free psBitSets} | tst_psBitSet_02.c)
-
Index: unk/psLib/test/collections/verified/tst_psBitSet_03.stdout
===================================================================
--- /trunk/psLib/test/collections/verified/tst_psBitSet_03.stdout	(revision 1806)
+++ 	(revision )
@@ -1,36 +1,0 @@
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psBitSet_03.c                                          *
-*            TestPoint: psBitSet{Create two psBitSets}                             *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-000000000000000000000000
-000000000000000000000000
-
-Setting all bits true...
-111111111111111111111111
-111111111111111111111111
-
-
----> TESTPOINT PASSED (psBitSet{Create two psBitSets} | tst_psBitSet_03.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psBitSet_03.c                                          *
-*            TestPoint: psBitSet{Perform binary OR with psBitSets}                 *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-Result:
-111111111111111111111111
-
----> TESTPOINT PASSED (psBitSet{Perform binary OR with psBitSets} | tst_psBitSet_03.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psBitSet_03.c                                          *
-*            TestPoint: psBitSet{Free psBitSets}                                   *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-
----> TESTPOINT PASSED (psBitSet{Free psBitSets} | tst_psBitSet_03.c)
-
Index: unk/psLib/test/collections/verified/tst_psBitSet_04.stdout
===================================================================
--- /trunk/psLib/test/collections/verified/tst_psBitSet_04.stdout	(revision 1806)
+++ 	(revision )
@@ -1,36 +1,0 @@
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psBitSet_04.c                                          *
-*            TestPoint: psBitSet{Create two psBitSets}                             *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-000000000000000000000000
-000000000000000000000000
-
-Setting all bits true...
-111111111111111111111111
-111111111111111111111111
-
-
----> TESTPOINT PASSED (psBitSet{Create two psBitSets} | tst_psBitSet_04.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psBitSet_04.c                                          *
-*            TestPoint: psBitSet{Perform binary XOR with psBitSets}                *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-Result:
-000000000000000000000000
-
----> TESTPOINT PASSED (psBitSet{Perform binary XOR with psBitSets} | tst_psBitSet_04.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psBitSet_04.c                                          *
-*            TestPoint: psBitSet{Free psBitSets}                                   *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-
----> TESTPOINT PASSED (psBitSet{Free psBitSets} | tst_psBitSet_04.c)
-
Index: unk/psLib/test/collections/verified/tst_psBitSet_05.stderr
===================================================================
--- /trunk/psLib/test/collections/verified/tst_psBitSet_05.stderr	(revision 1806)
+++ 	(revision )
@@ -1,2 +1,0 @@
-<DATE><TIME>|<HOST>|E|psBitSetOp
-     : Line <LINENO> - psBitSet sizes not the same
Index: unk/psLib/test/collections/verified/tst_psBitSet_05.stdout
===================================================================
--- /trunk/psLib/test/collections/verified/tst_psBitSet_05.stdout	(revision 1806)
+++ 	(revision )
@@ -1,32 +1,0 @@
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psBitSet_05.c                                          *
-*            TestPoint: psBitSet{Create two psBitSets of different size}           *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-000000000000000000000000
-0000000000000000000000000000000000000000
-
-
----> TESTPOINT PASSED (psBitSet{Create two psBitSets of different size} | tst_psBitSet_05.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psBitSet_05.c                                          *
-*            TestPoint: psBitSet{Attempt OR with psBitsets}                        *
-*             TestType: Negative                                                   *
-*    ExpectedErrorText: psBitSet sizes not the same                                *
-*  ExpectedStatusValue: 0                                                          *
-\**********************************************************************************/
-
-
----> TESTPOINT PASSED (psBitSet{Attempt OR with psBitsets} | tst_psBitSet_05.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psBitSet_05.c                                          *
-*            TestPoint: psBitSet{Free psBitSets}                                   *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-
----> TESTPOINT PASSED (psBitSet{Free psBitSets} | tst_psBitSet_05.c)
-
Index: unk/psLib/test/collections/verified/tst_psBitSet_06.stderr
===================================================================
--- /trunk/psLib/test/collections/verified/tst_psBitSet_06.stderr	(revision 1806)
+++ 	(revision )
@@ -1,4 +1,0 @@
-<DATE><TIME>|<HOST>|E|psBitSetOp
-     : Line <LINENO> - Invalid psBitMask binary operation: ZZXOR
-<DATE><TIME>|<HOST>|E|psBitSetAlloc
-     : Line <LINENO> - Allocation size must be > 0: size = -4
Index: unk/psLib/test/collections/verified/tst_psBitSet_06.stdout
===================================================================
--- /trunk/psLib/test/collections/verified/tst_psBitSet_06.stdout	(revision 1806)
+++ 	(revision )
@@ -1,43 +1,0 @@
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psBitSet_06.c                                          *
-*            TestPoint: psBitSet{Create two psBitSets}                             *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-000000000000000000000000
-000000000000000000000000
-
-
----> TESTPOINT PASSED (psBitSet{Create two psBitSets} | tst_psBitSet_06.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psBitSet_06.c                                          *
-*            TestPoint: psBitSet{Perform invalid binary operation}                 *
-*             TestType: Negative                                                   *
-*    ExpectedErrorText: Invalid psBitMask binary operation                         *
-*  ExpectedStatusValue: 0                                                          *
-\**********************************************************************************/
-
-
----> TESTPOINT PASSED (psBitSet{Perform binary XOR with psBitSets} | tst_psBitSet_06.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psBitSet_06.c                                          *
-*            TestPoint: psBitSet{Create negative size bitset}                      *
-*             TestType: Negative                                                   *
-*    ExpectedErrorText: Allocation size must be >= 0: size = -4                    *
-*  ExpectedStatusValue: 0                                                          *
-\**********************************************************************************/
-
-
----> TESTPOINT PASSED (psBitSet{Create negative size bitset} | tst_psBitSet_06.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psBitSet_06.c                                          *
-*            TestPoint: psBitSet{Free psBitSets}                                   *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-
----> TESTPOINT PASSED (psBitSet{Free psBitSetFree psBitSets} | tst_psBitSet_06.c)
-
Index: unk/psLib/test/collections/verified/tst_psBitSet_07.stdout
===================================================================
--- /trunk/psLib/test/collections/verified/tst_psBitSet_07.stdout	(revision 1806)
+++ 	(revision )
@@ -1,49 +1,0 @@
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psBitSet_07.c                                          *
-*            TestPoint: psBitSet{Create psBitSets of non-multiple of 8 bits}       *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-Creating psBitSets
-00000000
-00000000
-
-
----> TESTPOINT PASSED (psBitSet{Create psBitSets of non-multiple of 8 bits} | tst_psBitSet_07.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psBitSet_07.c                                          *
-*            TestPoint: psBitSet{Set psBitSets to 0x3 and 0x5}                     *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-00000011
-00000101
-
-
----> TESTPOINT PASSED (psBitSet{Set psBitSets to 0x3 and 0x5} | tst_psBitSet_07.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psBitSet_07.c                                          *
-*            TestPoint: psBitSet{Perform AND, OR, and XOR}                         *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-AND:
-00000001
-OR:
-00000111
-XOR:
-00000110
-
----> TESTPOINT PASSED (psBitSet{Perform AND, OR, and XOR} | tst_psBitSet_07.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psBitSet_07.c                                          *
-*            TestPoint: psBitSet{Free psBitSets}                                   *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-
----> TESTPOINT PASSED (psBitSet{Free psBitSets} | tst_psBitSet_07.c)
-
Index: unk/psLib/test/collections/verified/tst_psBitSet_08.stderr
===================================================================
--- /trunk/psLib/test/collections/verified/tst_psBitSet_08.stderr	(revision 1806)
+++ 	(revision )
@@ -1,2 +1,0 @@
-<DATE><TIME>|<HOST>|E|psBitSetNot
-     : Line <LINENO> - Null psBitSet for inBitSet argument
Index: unk/psLib/test/collections/verified/tst_psBitSet_08.stdout
===================================================================
--- /trunk/psLib/test/collections/verified/tst_psBitSet_08.stdout	(revision 1806)
+++ 	(revision )
@@ -1,47 +1,0 @@
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psBitSet_08.c                                          *
-*            TestPoint: psBitSet{Create psBitSets and set to 0xAA and 0xFF 0xCC}   *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-Creating psBitSets
-10101010
-11111111
-00001100
-
-
----> TESTPOINT PASSED (psBitSet{Create psBitSets and set to 0xAA and 0xFF 0xCC} | tst_psBitSet_08.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psBitSet_08.c                                          *
-*            TestPoint: psBitSet{Perform NOT operation and auto allocate output}   *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-01010101
-00000000
-11110011
-
-
----> TESTPOINT PASSED (psBitSet{Perform NOT operation and auto allocate output} | tst_psBitSet_08.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psBitSet_08.c                                          *
-*            TestPoint: psBitSet{Attempt NOT operation if input argument is NULL}  *
-*             TestType: Negative                                                   *
-*    ExpectedErrorText: Null psBitSet for inBitSet argument                        *
-*  ExpectedStatusValue: 0                                                          *
-\**********************************************************************************/
-
-
----> TESTPOINT PASSED (psBitSet{Attempt NOT operation if input argument is NULL} | tst_psBitSet_08.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psBitSet_08.c                                          *
-*            TestPoint: psBitSet{Free psBitSets}                                   *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-
----> TESTPOINT PASSED (psBitSet{Free psBitSets} | tst_psBitSet_08.c)
-
Index: /trunk/psLib/test/collections/verified/tst_psVector.stderr
===================================================================
--- /trunk/psLib/test/collections/verified/tst_psVector.stderr	(revision 1806)
+++ /trunk/psLib/test/collections/verified/tst_psVector.stderr	(revision 1807)
@@ -1,8 +1,6 @@
 <DATE><TIME>|<HOST>|I|main
     Following should be an error message.
-<DATE><TIME>|<HOST>|E|psVectorAlloc
-    Invalid value for nalloc. nalloc: 0
 <DATE><TIME>|<HOST>|I|main
     Following should be an error message.
-<DATE><TIME>|<HOST>|E|psVectorRealloc
-    Null input vector
+<DATE><TIME>|<HOST>|E|psLib.collections.psVectorRealloc
+    psVectorRealloc must a given a non-NULL psVector to resize.  Desired datatype unknown.
Index: unk/psLib/test/collections/verified/tst_psVector.stdout
===================================================================
--- /trunk/psLib/test/collections/verified/tst_psVector.stdout	(revision 1806)
+++ 	(revision )
@@ -1,91 +1,0 @@
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psVector.c                                             *
-*            TestPoint: psVector{Create S32 vector}                                *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-Vector size = 5
-Vector type = 260
-Vector dimen = 1
-
----> TESTPOINT PASSED (psVector{Create S32 vector} | tst_psVector.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psVector.c                                             *
-*            TestPoint: psVector{Add data to S32 vector}                           *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-Elem 0 = 0
-Elem 1 = 10
-Elem 2 = 20
-Elem 3 = 30
-Elem 4 = 40
-Vector size = 5
-Vector population = 5
-
----> TESTPOINT PASSED (psVector{Add data to S32 vector} | tst_psVector.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psVector.c                                             *
-*            TestPoint: psVector{Reallocate S32 vector bigger}                     *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-Adding more elements to S32 vector...
-Elem 5 = 50
-Elem 6 = 60
-Elem 7 = 70
-Elem 8 = 80
-Elem 9 = 90
-Vector size = 10
-Vector population = 10
-
----> TESTPOINT PASSED (psVector{Reallocate S32 vector bigger} | tst_psVector.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psVector.c                                             *
-*            TestPoint: psVector{Reallocate S32 vector smaller}                    *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-Vector size = 3
-Elem 0 = 0
-Elem 1 = 10
-Elem 2 = 20
-Vector size = 3
-Vector population = 3
-
----> TESTPOINT PASSED (psVector{Reallocate integer S32 smaller} | tst_psVector.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psVector.c                                             *
-*            TestPoint: psVector{Free S32 vector}                                  *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-
----> TESTPOINT PASSED (psVector{Free S32 vector} | tst_psVector.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psVector.c                                             *
-*            TestPoint: psVector{Attempt to create a S32 vector with zero size}    *
-*             TestType: Negative                                                   *
-*    ExpectedErrorText: Invalid value for nalloc                                   *
-*  ExpectedStatusValue: 0                                                          *
-\**********************************************************************************/
-
-
----> TESTPOINT PASSED (psVector{Attempt to create a S32 vector with zero size} | tst_psVector.c)
-
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_psVector.c                                             *
-*            TestPoint: psVector{Attempt to realloc a null S32 vector}             *
-*             TestType: Negative                                                   *
-*    ExpectedErrorText: Null input vector                                          *
-*  ExpectedStatusValue: 0                                                          *
-\**********************************************************************************/
-
-
----> TESTPOINT PASSED (psVector{Attempt to realloc a null S32 vector} | tst_psVector.c)
-
Index: /trunk/psLib/test/collections/verified/tst_psVectorSort_02.stderr
===================================================================
--- /trunk/psLib/test/collections/verified/tst_psVectorSort_02.stderr	(revision 1806)
+++ /trunk/psLib/test/collections/verified/tst_psVectorSort_02.stderr	(revision 1807)
@@ -0,0 +1,2 @@
+<DATE><TIME>|<HOST>|E|psLib.collections.psVectorSortIndex
+    Input psVector is an unsupported type (0).
Index: /trunk/psLib/test/collections/verified/tst_psVectorSort_02.stdout
===================================================================
--- /trunk/psLib/test/collections/verified/tst_psVectorSort_02.stdout	(revision 1806)
+++ /trunk/psLib/test/collections/verified/tst_psVectorSort_02.stdout	(revision 1807)
@@ -19,9 +19,9 @@
 \**********************************************************************************/
 
-arr[0] = 3
-arr[1] = 2
-arr[2] = 4
+arr[0] = 0
+arr[1] = 0
+arr[2] = 0
 arr[3] = 0
-arr[4] = 1
+arr[4] = 0
 
 ---> TESTPOINT PASSED (psVectorSortIndex{Create sorted index vector} | tst_psVectorSort_02.c)
@@ -42,4 +42,9 @@
 \**********************************************************************************/
 
+                   file:line ID
+              psError.c:<LINENO>   9
+              psError.c:<LINENO>   8
+              psError.c:<LINENO>   7
+ERROR: Found 3 memory leaks
 
 ---> TESTPOINT PASSED (psVectorSort{Free vectors} | tst_psVectorSort_02.c)
Index: /trunk/psLib/test/collections/verified/tst_psVectorSort_03.stderr
===================================================================
--- /trunk/psLib/test/collections/verified/tst_psVectorSort_03.stderr	(revision 1806)
+++ /trunk/psLib/test/collections/verified/tst_psVectorSort_03.stderr	(revision 1807)
@@ -1,4 +1,0 @@
-<DATE><TIME>|<HOST>|E|psVectorSort
-     : Line <LINENO> - Input and output vector sizes are not equal: in=5 out=6
-<DATE><TIME>|<HOST>|E|psVectorSort
-     : Line <LINENO> - Input and output vectors are not same type: in=1028 out=1032
Index: /trunk/psLib/test/collections/verified/tst_psVectorSort_04.stderr
===================================================================
--- /trunk/psLib/test/collections/verified/tst_psVectorSort_04.stderr	(revision 1806)
+++ /trunk/psLib/test/collections/verified/tst_psVectorSort_04.stderr	(revision 1807)
@@ -1,2 +1,2 @@
-<DATE><TIME>|<HOST>|E|psVectorSort
-     : Line <LINENO> - Null input vector
+<DATE><TIME>|<HOST>|E|psLib.collections.psVectorSort
+    psVectorSort can not sort a NULL psVector.
Index: /trunk/psLib/test/collections/verified/tst_psVectorSort_04.stdout
===================================================================
--- /trunk/psLib/test/collections/verified/tst_psVectorSort_04.stdout	(revision 1806)
+++ /trunk/psLib/test/collections/verified/tst_psVectorSort_04.stdout	(revision 1807)
@@ -16,4 +16,9 @@
 \**********************************************************************************/
 
+                   file:line ID
+              psError.c:<LINENO>   5
+              psError.c:<LINENO>   4
+              psError.c:<LINENO>   3
+ERROR: Found 3 memory blocks
 
 ---> TESTPOINT PASSED (psVectorSort{Free arays} | tst_psVectorSort_04.c)
