Index: unk/psLib/src/sys/psErrorCodes.c
===================================================================
--- /trunk/psLib/src/sys/psErrorCodes.c	(revision 4577)
+++ 	(revision )
@@ -1,177 +1,0 @@
-/** @file  psErrorCodes.c
-*  @brief Contains the error codes for the error classes
- *
- *  @ingroup ErrorHandling
- *
- *  @author Robert DeSonia, MHPCC
- *
- *  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-07-16 00:06:33 $
-=======
- *  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-07-16 00:06:33 $
- *
- *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
- */
-
-#include <string.h>
-
-#include "psError.h"
-#include "psErrorCodes.h"
-#include "psList.h"
-#include "psMemory.h"
-
-#include "psErrorText.h"
-
-static psErrorDescription staticErrorCodes[] = {
-            {PS_ERR_NONE,"not an error"},
-            {PS_ERR_BASE,"base error"},
-            {PS_ERR_UNKNOWN,"unknown error"},
-            {PS_ERR_IO,"I/O error"},
-            {PS_ERR_LOCATION_INVALID,"specified location is unknown"},
-            {PS_ERR_MEMORY_CORRUPTION,"memory corruption detected"},
-            {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 type"},
-            {PS_ERR_BAD_PARAMETER_NULL,"parameter is null"},
-            {PS_ERR_BAD_PARAMETER_SIZE,"size of parameter's data is outside of acceptable range."},
-            {PS_ERR_UNEXPECTED_NULL,"unexpected NULL found"},
-            {PS_ERR_OS_CALL_FAILED,"unexpected result from an OS standard library call"},
-            {PS_ERR_N_ERR_CLASSES,"error classes end marker"}
-        };
-
-static psList* dynamicErrorCodes = NULL;
-static const psErrorDescription* getErrorDescription(psErrorCode code);
-
-
-static const psErrorDescription* getErrorDescription(psErrorCode code)
-{
-    // first, search the static error codes
-
-    psS32 n = 0;
-    while(staticErrorCodes[n].code != PS_ERR_N_ERR_CLASSES &&
-            staticErrorCodes[n].code != code) {
-        n++;
-    }
-
-    if (staticErrorCodes[n].code == code) {
-        return &staticErrorCodes[n];
-    } else {
-        psErrorDescription* desc;
-        // make sure there is a list to search
-        if (dynamicErrorCodes == NULL) {
-            return NULL;
-        }
-
-        // search dynamic list of error descriptions before giving up.
-        psListIterator* iter = psListIteratorAlloc(dynamicErrorCodes,PS_LIST_HEAD,true);
-        while ((desc = (psErrorDescription*)psListGetAndIncrement(iter)) != NULL) {
-            if (desc->code == code) {
-                psFree(iter);
-                return desc;
-            }
-        }
-        psFree(iter);
-    }
-    return NULL;
-}
-
-static void freeErrorDescription(psErrorDescription* err)
-{
-    psFree(err->description);
-}
-
-psErrorDescription* psErrorDescriptionAlloc(psErrorCode code,
-        const char *description)
-{
-    psErrorDescription* err = psAlloc(sizeof(psErrorDescription));
-    err->code = code;
-    if (description == NULL) {
-        err->description = NULL;
-    } else {
-        err->description = psAlloc(sizeof(char)*strlen(description)+1);
-        strcpy((char*)err->description,description);
-    }
-
-    psMemSetDeallocator(err,(psFreeFunc)freeErrorDescription);
-    return err;
-}
-
-
-const char *psErrorCodeString(psErrorCode code)
-{
-    // Check input argument is non-negative
-    if ( code < 0 ) {
-        return NULL;
-    }
-
-    const psErrorDescription* desc = getErrorDescription(code);
-
-    if (desc == NULL) {
-        return NULL;
-    }
-
-    return desc->description;
-}
-
-void psErrorRegister(const psErrorDescription* errors,
-                     psS32 nerror)
-{
-    if (nerror < 1) {
-        return;
-    }
-
-    if (errors == NULL) {
-        psError(PS_ERR_BAD_PARAMETER_NULL, true,
-                PS_ERRORTEXT_psErrorCode_NULL_ERRORDESCRIPTION);
-        return;
-    }
-
-    if (dynamicErrorCodes == NULL) {
-        dynamicErrorCodes = psListAlloc(NULL);
-        p_psMemSetPersistent(dynamicErrorCodes,true);
-
-        p_psMemSetPersistent(dynamicErrorCodes->iterators,true);
-        p_psMemSetPersistent(dynamicErrorCodes->iterators->data,true);
-        for (int i = 0; i < dynamicErrorCodes->iterators->n;i++) {
-            p_psMemSetPersistent(dynamicErrorCodes->iterators->data[i],true);
-        }
-    }
-
-    for (psS32 i=0;i<nerror;i++) {
-        psErrorDescription* err = psErrorDescriptionAlloc(
-                                      errors[i].code, errors[i].description);
-        p_psMemSetPersistent(err,true);
-        p_psMemSetPersistent((psPtr)err->description,true);
-        if (! psListAdd(dynamicErrorCodes,
-                        PS_LIST_HEAD,
-                        err) ) {
-
-            psError(PS_ERR_UNKNOWN, false,
-                    PS_ERRORTEXT_psErrorCode_ERRORCODE_REGISTER_FAILED,
-                    i);
-        }
-        p_psMemSetPersistent(dynamicErrorCodes->head,true);
-        psFree(err);
-    }
-}
-
-psBool p_psErrorUnregister(psErrorCode code)
-{
-    // Check input argument is non-negative
-    if ( code < 0 ) {
-        return false;
-    }
-
-    const psErrorDescription* desc = getErrorDescription(code);
-
-    if (desc == NULL) {
-        return false;
-    }
-
-    if (dynamicErrorCodes == NULL) {
-        return false;
-    }
-
-    return psListRemoveData(dynamicErrorCodes,(psPtr)desc);
-}
Index: /trunk/psLib/src/sys/psMemory.h
===================================================================
--- /trunk/psLib/src/sys/psMemory.h	(revision 4577)
+++ /trunk/psLib/src/sys/psMemory.h	(revision 4578)
@@ -12,6 +12,6 @@
  *  @ingroup MemoryManagement
  *
- *  @version $Revision: 1.45 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-07-15 02:33:54 $
+ *  @version $Revision: 1.46 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-07-18 20:54:22 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -245,5 +245,6 @@
 /// Free memory.  psFree sends file and line number to p_psFree.
 #ifndef SWIG
-#define psFree(ptr) { p_psFree((psPtr)ptr, __FILE__, __LINE__);  *(void**)&ptr = NULL; }
+//#define psFree(ptr) { p_psFree((psPtr)ptr, __FILE__, __LINE__); *(void**)&(ptr) = NULL; }
+#define psFree(ptr) { p_psFree((psPtr)ptr, __FILE__, __LINE__); }
 #endif // ! SWIG
 
Index: /trunk/psLib/src/sys/psTrace.c
===================================================================
--- /trunk/psLib/src/sys/psTrace.c	(revision 4577)
+++ /trunk/psLib/src/sys/psTrace.c	(revision 4578)
@@ -9,6 +9,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.54 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-07-12 19:12:01 $
+ *  @version $Revision: 1.55 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-07-18 20:54:22 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
