Index: trunk/psLib/test/sysUtils/tst_psError.c
===================================================================
--- trunk/psLib/test/sysUtils/tst_psError.c	(revision 2204)
+++ trunk/psLib/test/sysUtils/tst_psError.c	(revision 2273)
@@ -13,6 +13,6 @@
  *  @author  Eric Van Alst, MHPCC
  *
- *  @version $Revision: 1.14 $  $Name: not supported by cvs2svn $
- *  @date  $Date: 2004-10-27 00:57:33 $
+ *  @version $Revision: 1.15 $  $Name: not supported by cvs2svn $
+ *  @date  $Date: 2004-11-04 01:05:00 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -99,13 +99,13 @@
 
     // Generate three error messages to have messages on error stack
-    if (psErrorMsg("test4A", code, true, "Error code = %d", code) !=  code) {
+    if (psError(code, true, "Error code = %d", code) !=  code) {
         psLogMsg("tst_psError04", PS_LOG_ERROR, "Failed return value verify.");
         return 31;
     }
-    if (psErrorMsg("test4A", (code+1), false, "Error code = %d", (code+1)) != (code+1)) {
+    if (psError((code+1), false, "Error code = %d", (code+1)) != (code+1)) {
         psLogMsg("tst_psError04", PS_LOG_ERROR, "Failed return value verify.");
         return 32;
     }
-    if (psErrorMsg("test4A", (code+2), false, "Error code = %d", (code+2)) != (code+2)) {
+    if (psError((code+2), false, "Error code = %d", (code+2)) != (code+2)) {
         psLogMsg("tst_psError04", PS_LOG_ERROR, "Failed return value verify.");
         return 33;
@@ -165,13 +165,13 @@
 
     // Generate three error messages
-    if (psErrorMsg("test3A", code, true, "Error code = %d", code) !=  code) {
+    if (psError(code, true, "Error code = %d", code) !=  code) {
         psLogMsg("tst_psError03", PS_LOG_ERROR, "Failed return value verify.");
         return 23;
     }
-    if (psErrorMsg("test3A", (code+1), false, "Error code = %d", (code+1)) != (code+1)) {
+    if (psError((code+1), false, "Error code = %d", (code+1)) != (code+1)) {
         psLogMsg("tst_psError03", PS_LOG_ERROR, "Failed return value verify.");
         return 24;
     }
-    if (psErrorMsg("test3A", (code+2), false, "Error code = %d", (code+2)) != (code+2)) {
+    if (psError((code+2), false, "Error code = %d", (code+2)) != (code+2)) {
         psLogMsg("tst_psError03", PS_LOG_ERROR, "Failed return value verify.");
         return 25;
@@ -219,5 +219,5 @@
 
     // Generate error message and verify return value
-    if (psErrorMsg("test2A", code, true, "Error code = %d", code) != code ) {
+    if (psError(code, true, "Error code = %d", code) != code ) {
         psLogMsg("tst_psError02", PS_LOG_ERROR, "Failed return value verify.");
         return 10;
@@ -233,5 +233,5 @@
 
     // Verify the return value of psErrorMsg is the psErrorCode passed
-    if ( psErrorMsg("test1A", code, true, "Error code = %d", code) != code) {
+    if ( psError(code, true, "Error code = %d", code) != code) {
         psLogMsg("tst_psError01", PS_LOG_ERROR, "Failed return value verify.");
         return 1;
@@ -240,5 +240,5 @@
 
     // test1B empty string in for name argument
-    if ( psErrorMsg("", code+1, true, "Error code = %d", code+1) != code+1) {
+    if ( psError(code+1, true, "Error code = %d", code+1) != code+1) {
         psLogMsg("tst_psError01", PS_LOG_ERROR, "Failed return with empty string.");
         return 2;
@@ -246,13 +246,6 @@
     psErrorStackPrint(stderr,"ERROR STACK PRINT Test1B");
 
-    // test1C null pointer in  for name argument
-    if ( psErrorMsg(NULL, code+2, true, "Error code = %d", code+2) != code+2) {
-        psLogMsg("tst_psError01", PS_LOG_ERROR, "Failed return with null name arg.");
-        return 3;
-    }
-    psErrorStackPrint(stderr,"ERROR STACK PRINT Test1C");
-
     // test1D undefined code
-    if ( psErrorMsg("test1D", -1, true, "Error code = %d", -1) != -1) {
+    if ( psError(-1, true, "Error code = %d", -1) != -1) {
         psLogMsg("test_psError01", PS_LOG_ERROR, "Failed return with undefined code.");
         return 4;
@@ -261,5 +254,5 @@
 
     // test1E set psErrorMsg argument to false
-    if( psErrorMsg("test1E", code, false, "Error code = %d", code) != code) {
+    if( psError(code, false, "Error code = %d", code) != code) {
         psLogMsg("test_psError01", PS_LOG_ERROR, "Failed return with false new arg.");
         return 5;
@@ -268,5 +261,5 @@
 
     // test1F psErrorMsg with a error code less then PS_ERR_BASE(256)
-    if( psErrorMsg("test1F", 9, true, "Errno code = %d", 9) != 9) {
+    if( psError(9, true, "Errno code = %d", 9) != 9) {
         psLogMsg("test_psError01", PS_LOG_ERROR, "Failed return with errno code.");
         return 6;
@@ -287,13 +280,13 @@
 
     // Test point #1 Multiple type values placed in the error string
-    psError(__func__,
+    psError(PS_ERR_UNKNOWN, true,
             "ALL TYPES intval = %d longval = %ld floatval = %f charval = %c strval = %s",
             intval,longval,floatval,charval,stringval);
 
     // Test point #2 String values in error message
-    psError(PS_STRING(__LINE__),"NO VALUES");
+    psError(PS_ERR_UNKNOWN, true, "NO VALUES");
 
     // Test point #3 Empty strings in error message
-    psError("","");
+    psError(PS_ERR_UNKNOWN, true, "");
 
     return 0;
Index: trunk/psLib/test/sysUtils/tst_psMemory.c
===================================================================
--- trunk/psLib/test/sysUtils/tst_psMemory.c	(revision 2204)
+++ trunk/psLib/test/sysUtils/tst_psMemory.c	(revision 2273)
@@ -6,6 +6,6 @@
 *  @author Robert DeSonia, MHPCC
 *
-*  @version $Revision: 1.26 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-10-27 00:57:33 $
+*  @version $Revision: 1.27 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-11-04 01:05:00 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -99,5 +99,5 @@
     mem = ( psS32* ) psAlloc( size * sizeof( psS32 ) );
     if ( mem == NULL ) {
-        psError( __FILE__, "psAlloc returned a NULL value in %s!", __func__ );
+        psError(PS_ERR_UNKNOWN, true, "psAlloc returned a NULL value in %s!", __func__ );
         return 1;
     }
@@ -130,5 +130,5 @@
     ref = psMemGetRefCounter( mem );
     if ( ref != 1 ) {
-        psError( __func__, "Expected to buffer reference count to be initially 1, but it was %d.", ref );
+        psError(PS_ERR_UNKNOWN, true, "Expected to buffer reference count to be initially 1, but it was %d.", ref );
         return 1;
     }
@@ -140,5 +140,5 @@
     ref = psMemGetRefCounter( mem );
     if ( ref != 4 ) {
-        psError( __func__, "Expected to find buffer reference count to be 4, but it was %d.", ref );
+        psError(PS_ERR_UNKNOWN, true, "Expected to find buffer reference count to be 4, but it was %d.", ref );
         return 1;
     }
@@ -149,5 +149,5 @@
     ref = psMemGetRefCounter( mem );
     if ( ref != 2 ) {
-        psError( __func__, "Expected to find buffer reference count to be 2, but it was %d.", ref );
+        psError(PS_ERR_UNKNOWN, true, "Expected to find buffer reference count to be 2, but it was %d.", ref );
         return 1;
     }
@@ -159,5 +159,5 @@
     ref = psMemGetRefCounter( mem );
     if ( ref != 1 ) {
-        psError( __func__, "Expected to find buffer reference count to be 1, but it was %d.", ref );
+        psError(PS_ERR_UNKNOWN, true, "Expected to find buffer reference count to be 1, but it was %d.", ref );
         return 1;
     }
@@ -197,5 +197,5 @@
 
     if ( exhaustedCallbackCalled == 0 ) {
-        psError( __FILE__, "Called psRealloc with HUGE memory requirement and survived in %s!", __func__ );
+        psError(PS_ERR_UNKNOWN,true, "Called psRealloc with HUGE memory requirement and survived in %s!", __func__ );
         return 1;
     }
@@ -232,5 +232,5 @@
 
     if ( exhaustedCallbackCalled == 0 ) {
-        psError( __FILE__, "Called psAlloc with HUGE memory requirement and survived in %s!", __func__ );
+        psError(PS_ERR_UNKNOWN,true, "Called psAlloc with HUGE memory requirement and survived in %s!", __func__ );
         return 1;
     }
@@ -273,6 +273,6 @@
     for ( psS32 i = 0;i < initialSize;i++ ) {
         if ( mem1[ i ] != i || mem2[ i ] != i || mem3[ i ] != i ) {
-            psError( __FILE__, "Realloc didn't preserve the contents with expanding buffer in %s.",
-                     __func__ );
+            psError(PS_ERR_UNKNOWN,true, "Realloc didn't preserve the contents with expanding buffer in %s.",
+                    __func__ );
             break;
         }
@@ -290,6 +290,6 @@
     for ( psS32 i = 0;i < initialSize / 2;i++ ) {
         if ( mem1[ i ] != i || mem2[ i ] != i || mem3[ i ] != i ) {
-            psError( __FILE__, "Realloc didn't preserve the contents with shrinking buffer in %s.",
-                     __func__ );
+            psError(PS_ERR_UNKNOWN,true, "Realloc didn't preserve the contents with shrinking buffer in %s.",
+                    __func__ );
             break;
         }
@@ -333,6 +333,6 @@
 
     if ( allocCallbackCalled != 2 || freeCallbackCalled != 2 ) {
-        psError( __FILE__, "alloc/free callbacks were not called the proper number of times in %s",
-                 __func__ );
+        psError(PS_ERR_UNKNOWN,true, "alloc/free callbacks were not called the proper number of times in %s",
+                __func__ );
         return 1;
     }
@@ -352,6 +352,6 @@
 
     if ( allocCallbackCalled != 2 ) {
-        psError( __FILE__, "realloc callbacks were not called the proper number of times in %s",
-                 __func__ );
+        psError(PS_ERR_UNKNOWN,true, "realloc callbacks were not called the proper number of times in %s",
+                __func__ );
         return 1;
     }
@@ -388,11 +388,11 @@
 
     if ( nLeaks != 1 ) {
-        psError( __FILE__, "psMemCheckLeaks should have found 1 leak, but found %d in %s.", nLeaks, __func__ );
+        psError(PS_ERR_UNKNOWN,true, "psMemCheckLeaks should have found 1 leak, but found %d in %s.", nLeaks, __func__ );
         return 1;
     }
 
     if ( blks[ 0 ] ->lineno != lineMark ) {
-        psError( __FILE__, "psMemCheckLeaks found a leak other than the expected one (line %d vs %d) in %s.",
-                 lineMark, blks[ 0 ] ->lineno, __func__ );
+        psError(PS_ERR_UNKNOWN,true, "psMemCheckLeaks found a leak other than the expected one (line %d vs %d) in %s.",
+                lineMark, blks[ 0 ] ->lineno, __func__ );
         return 1;
     }
@@ -418,10 +418,10 @@
 
     if ( nLeaks != 1 ) {
-        psError( __FILE__, "psMemCheckLeaks should have found 1 leak, but found %d in %s.", nLeaks, __func__ );
+        psError(PS_ERR_UNKNOWN,true, "psMemCheckLeaks should have found 1 leak, but found %d in %s.", nLeaks, __func__ );
         return 1;
     }
 
     if ( blks[ 0 ] ->lineno != lineMark ) {
-        psError( __FILE__, "psMemCheckLeaks found a leak other than the expected one in %s.", __func__ );
+        psError(PS_ERR_UNKNOWN,true, "psMemCheckLeaks found a leak other than the expected one in %s.", __func__ );
         return 1;
     }
@@ -448,10 +448,10 @@
 
     if ( nLeaks != 2 ) {
-        psError( __FILE__, "psMemCheckLeaks should have found 1 leak, but found %d in %s.", nLeaks, __func__ );
+        psError(PS_ERR_UNKNOWN,true, "psMemCheckLeaks should have found 1 leak, but found %d in %s.", nLeaks, __func__ );
         return 1;
     }
 
     if ( blks[ 0 ] ->lineno != lineMark ) {
-        psError( __FILE__, "psMemCheckLeaks found a leak other than the expected one in %s.", __func__ );
+        psError(PS_ERR_UNKNOWN,true, "psMemCheckLeaks found a leak other than the expected one in %s.", __func__ );
         return 1;
     }
@@ -499,12 +499,12 @@
 
     if ( corruptions != 1 ) {
-        psError( __FILE__, "Expected one memory corruption but found %d in %s.",
-                 corruptions, __func__ );
+        psError(PS_ERR_UNKNOWN,true, "Expected one memory corruption but found %d in %s.",
+                corruptions, __func__ );
         return 1;
     }
 
     if ( problemCallbackCalled != 1 ) {
-        psError( __FILE__, "The memProblemCallback was not invoked but should have been in %s",
-                 __func__ );
+        psError(PS_ERR_UNKNOWN,true, "The memProblemCallback was not invoked but should have been in %s",
+                __func__ );
         return 1;
     }
@@ -556,7 +556,7 @@
 
     if (err->code != PS_ERR_MEMORY_DEREF_USAGE) {
-        psErrorMsg("psLibTest.sysUtils.tst_psMemory",PS_ERR_UNKNOWN,true,
-                   "Multiple psFree calls generated wrong error code (%d)",
-                   err->code);
+        psError(PS_ERR_UNKNOWN,true,
+                "Multiple psFree calls generated wrong error code (%d)",
+                err->code);
         psFree(err);
         return 1;
