Index: /trunk/archive/pslib/src/Utils/dlist.c
===================================================================
--- /trunk/archive/pslib/src/Utils/dlist.c	(revision 389)
+++ /trunk/archive/pslib/src/Utils/dlist.c	(revision 390)
@@ -187,5 +187,5 @@
 	
 	if (which < 0 || which >= list->n) { // out of bounds
-	    psError(__func__, "Index %d is not in range [0..%d] for list 0x%x", which, list->n, list);
+	    psError(__func__, PS_ERR_BAD_INDEX, 1, "Index %d is not in range [0..%d] for list 0x%x", which, list->n, list);
 	    return NULL;
 	}
@@ -281,5 +281,5 @@
 {
     if (where != PS_DLIST_HEAD && where != PS_DLIST_TAIL) {
-	psError(__func__, "Invalid where argument: %d; assuming PS_DLIST_HEAD", where);
+	psError(__func__, PS_ERR_UNKNOWN, 1, "Invalid where argument: %d; assuming PS_DLIST_HEAD", where);
 	where = PS_DLIST_HEAD;
     }
Index: /trunk/archive/pslib/src/Utils/tst_memory.c
===================================================================
--- /trunk/archive/pslib/src/Utils/tst_memory.c	(revision 389)
+++ /trunk/archive/pslib/src/Utils/tst_memory.c	(revision 390)
@@ -25,5 +25,5 @@
 static void *my_MemExhaustedCB(size_t size)
 {
-    psError(__func__, "Bye bye sweet world\n");
+    psError(__func__, ENOMEM, 1, "Bye bye sweet world\n");
     
     return NULL;
@@ -74,5 +74,5 @@
     str = psRealloc(str, 20);
     psFree(str);
-#if 1
+#if 0
     /*
      * An illegal double-free
@@ -81,5 +81,5 @@
 #endif
 
-#if 1
+#if 0
     /*
      * Free memory not allocated with psAlloc
@@ -88,5 +88,5 @@
 #endif
 
-#if 0
+#if 1
     /*
      * Ask for more memory than we can get
@@ -137,5 +137,5 @@
      */
     if(psMemCheckCorruption(1)) {
-	psError(__func__, "Detected corrupted memory\n\n");
+	psError(__func__, PS_ERR_MEMORY_CORRUPTION, 1, "Detected corrupted memory\n\n");
     }
     /*
Index: /trunk/archive/pslib/src/Utils/tst_trace.c
===================================================================
--- /trunk/archive/pslib/src/Utils/tst_trace.c	(revision 389)
+++ /trunk/archive/pslib/src/Utils/tst_trace.c	(revision 390)
@@ -13,5 +13,5 @@
     
     if(psMemCheckCorruption(0)) {
-	psError(__func__, "Detected corrupted memory\n\n");
+	psError(__func__, PS_ERR_MEMORY_CORRUPTION, PS_NEW_ERROR, "Detected corrupted memory\n");
     }
     
