Index: /trunk/psModules/src/pmFlatField.c
===================================================================
--- /trunk/psModules/src/pmFlatField.c	(revision 2274)
+++ /trunk/psModules/src/pmFlatField.c	(revision 2275)
@@ -18,6 +18,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-14 23:52:09 $
+ *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-11-04 02:02:10 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -56,6 +56,6 @@
         return true;       // Readout may not have data in it
     } else if(flat==NULL) {
-        psErrorMsg(PS_ERRORNAME_DOMAIN "pmFlatField", PS_ERR_BAD_PARAMETER_NULL, true,
-                   PS_ERRORTEXT_pmFlatField_NULL_FLAT_READOUT);
+        psError( PS_ERR_BAD_PARAMETER_NULL, true,
+                 PS_ERRORTEXT_pmFlatField_NULL_FLAT_READOUT);
         return false;
     }
@@ -64,10 +64,10 @@
     flatImage = flat->image;
     if (inImage == NULL) {
-        psErrorMsg(PS_ERRORNAME_DOMAIN "pmFlatField", PS_ERR_BAD_PARAMETER_NULL, true,
-                   PS_ERRORTEXT_pmFlatField_NULL_INPUT_IMAGE);
+        psError( PS_ERR_BAD_PARAMETER_NULL, true,
+                 PS_ERRORTEXT_pmFlatField_NULL_INPUT_IMAGE);
         return false;
     } else if(flatImage == NULL) {
-        psErrorMsg(PS_ERRORNAME_DOMAIN "pmFlatField", PS_ERR_BAD_PARAMETER_NULL, true,
-                   PS_ERRORTEXT_pmFlatField_NULL_FLAT_IMAGE);
+        psError( PS_ERR_BAD_PARAMETER_NULL, true,
+                 PS_ERRORTEXT_pmFlatField_NULL_FLAT_IMAGE);
         return false;
     } else if(in->mask == NULL) {
@@ -79,12 +79,12 @@
     // Check input image and its mask are not larger than flat image
     if(inImage->numRows>flatImage->numRows || inImage->numCols>flatImage->numCols) {
-        psErrorMsg(PS_ERRORNAME_DOMAIN "pmFlatField", PS_ERR_BAD_PARAMETER_SIZE, true,
-                   PS_ERRORTEXT_pmFlatField_SIZE_INPUT_IMAGE,
-                   inImage->numRows, inImage->numCols, flatImage->numRows, flatImage->numCols);
+        psError( PS_ERR_BAD_PARAMETER_SIZE, true,
+                 PS_ERRORTEXT_pmFlatField_SIZE_INPUT_IMAGE,
+                 inImage->numRows, inImage->numCols, flatImage->numRows, flatImage->numCols);
         return false;
     } else if(inMask->numRows>flatImage->numRows || inMask->numCols > flatImage->numCols) {
-        psErrorMsg(PS_ERRORNAME_DOMAIN "pmFlatField", PS_ERR_BAD_PARAMETER_SIZE, true,
-                   PS_ERRORTEXT_pmFlatField_SIZE_MASK_IMAGE,
-                   inMask->numRows, inMask->numCols, flatImage->numRows, flatImage->numCols);
+        psError( PS_ERR_BAD_PARAMETER_SIZE, true,
+                 PS_ERRORTEXT_pmFlatField_SIZE_MASK_IMAGE,
+                 inMask->numRows, inMask->numCols, flatImage->numRows, flatImage->numCols);
         return false;
     }
@@ -96,17 +96,17 @@
     // Check that offsets are within image limits
     if(totOffRow>=flatImage->numRows || totOffCol>=flatImage->numCols) {
-        psErrorMsg(PS_ERRORNAME_DOMAIN "pmFlatField", PS_ERR_BAD_PARAMETER_SIZE, true,
-                   PS_ERRORTEXT_pmFlatField_OFFSET_FLAT_IMAGE,
-                   totOffRow, totOffCol, flatImage->numRows, flatImage->numCols);
+        psError( PS_ERR_BAD_PARAMETER_SIZE, true,
+                 PS_ERRORTEXT_pmFlatField_OFFSET_FLAT_IMAGE,
+                 totOffRow, totOffCol, flatImage->numRows, flatImage->numCols);
         return false;
     } else if(totOffRow>=inImage->numRows || totOffCol>=inImage->numCols) {
-        psErrorMsg(PS_ERRORNAME_DOMAIN "pmFlatField", PS_ERR_BAD_PARAMETER_SIZE, true,
-                   PS_ERRORTEXT_pmFlatField_OFFSET_INPUT_IMAGE,
-                   totOffRow, totOffCol, inImage->numRows, inImage->numCols);
+        psError( PS_ERR_BAD_PARAMETER_SIZE, true,
+                 PS_ERRORTEXT_pmFlatField_OFFSET_INPUT_IMAGE,
+                 totOffRow, totOffCol, inImage->numRows, inImage->numCols);
         return false;
     } else if(totOffRow>=inMask->numRows || totOffCol>=inMask->numCols) {
-        psErrorMsg(PS_ERRORNAME_DOMAIN "pmFlatField", PS_ERR_BAD_PARAMETER_SIZE, true,
-                   PS_ERRORTEXT_pmFlatField_OFFSET_MASK_IMAGE,
-                   totOffRow, totOffCol, inMask->numRows, inMask->numCols);
+        psError( PS_ERR_BAD_PARAMETER_SIZE, true,
+                 PS_ERRORTEXT_pmFlatField_OFFSET_MASK_IMAGE,
+                 totOffRow, totOffCol, inMask->numRows, inMask->numCols);
         return false;
     }
@@ -117,22 +117,22 @@
     maskType = inMask->type.type;
     if(PS_IS_PSELEMTYPE_COMPLEX(inType)) {
-        psErrorMsg(PS_ERRORNAME_DOMAIN "pmFlatField", PS_ERR_BAD_PARAMETER_TYPE, true,
-                   PS_ERRORTEXT_pmFlatField_TYPE_INPUT_IMAGE,
-                   inType);
+        psError( PS_ERR_BAD_PARAMETER_TYPE, true,
+                 PS_ERRORTEXT_pmFlatField_TYPE_INPUT_IMAGE,
+                 inType);
         return false;
     } else if(PS_IS_PSELEMTYPE_COMPLEX(flatType)) {
-        psErrorMsg(PS_ERRORNAME_DOMAIN "pmFlatField", PS_ERR_BAD_PARAMETER_TYPE, true,
-                   PS_ERRORTEXT_pmFlatField_TYPE_FLAT_IMAGE,
-                   flatType);
+        psError( PS_ERR_BAD_PARAMETER_TYPE, true,
+                 PS_ERRORTEXT_pmFlatField_TYPE_FLAT_IMAGE,
+                 flatType);
         return false;
     } else if(maskType != PS_TYPE_MASK) {
-        psErrorMsg(PS_ERRORNAME_DOMAIN "pmFlatField", PS_ERR_BAD_PARAMETER_TYPE, true,
-                   PS_ERRORTEXT_pmFlatField_TYPE_MASK_IMAGE,
-                   maskType);
+        psError( PS_ERR_BAD_PARAMETER_TYPE, true,
+                 PS_ERRORTEXT_pmFlatField_TYPE_MASK_IMAGE,
+                 maskType);
         return false;
     } else if(inType != flatType) {
-        psErrorMsg(PS_ERRORNAME_DOMAIN "pmFlatField", PS_ERR_BAD_PARAMETER_TYPE, true,
-                   PS_ERRORTEXT_pmFlatField_TYPE_MISMATCH,
-                   inType, flatType);
+        psError( PS_ERR_BAD_PARAMETER_TYPE, true,
+                 PS_ERRORTEXT_pmFlatField_TYPE_MISMATCH,
+                 inType, flatType);
         return false;
     }
@@ -172,7 +172,7 @@
         PM_FLAT_DIVISION(F64);
     default:
-        psErrorMsg(PS_ERRORNAME_DOMAIN "pmFlatField", PS_ERR_BAD_PARAMETER_TYPE, true,
-                   PS_ERRORTEXT_pmFlatField_TYPE_UNSUPPORTED,
-                   inType);
+        psError( PS_ERR_BAD_PARAMETER_TYPE, true,
+                 PS_ERRORTEXT_pmFlatField_TYPE_UNSUPPORTED,
+                 inType);
     }
 
Index: /trunk/psModules/src/pmMaskBadPixels.c
===================================================================
--- /trunk/psModules/src/pmMaskBadPixels.c	(revision 2274)
+++ /trunk/psModules/src/pmMaskBadPixels.c	(revision 2275)
@@ -19,6 +19,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-14 23:52:09 $
+ *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-11-04 02:02:10 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -61,6 +61,6 @@
         return true;   // Readout may not have data in it
     } else if(mask==NULL) {
-        psErrorMsg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels", PS_ERR_BAD_PARAMETER_NULL, true,
-                   PS_ERRORTEXT_pmMaskBadPixels_NULL_MASK_IMAGE);
+        psError( PS_ERR_BAD_PARAMETER_NULL, true,
+                 PS_ERRORTEXT_pmMaskBadPixels_NULL_MASK_IMAGE);
         return false;
     }
@@ -68,6 +68,6 @@
     inImage = in->image;
     if (inImage == NULL) {
-        psErrorMsg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels", PS_ERR_BAD_PARAMETER_NULL, true,
-                   PS_ERRORTEXT_pmMaskBadPixels_NULL_INPUT_IMAGE);
+        psError( PS_ERR_BAD_PARAMETER_NULL, true,
+                 PS_ERRORTEXT_pmMaskBadPixels_NULL_INPUT_IMAGE);
         return false;
     } else if(in->mask == NULL) {
@@ -79,12 +79,12 @@
     // Check input image and its mask are not larger than mask
     if(inImage->numRows > mask->numRows || inImage->numCols > mask->numCols) {
-        psErrorMsg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels", PS_ERR_BAD_PARAMETER_SIZE, true,
-                   PS_ERRORTEXT_pmMaskBadPixels_SIZE_INPUT_IMAGE,
-                   inImage->numRows, inImage->numCols, mask->numRows, mask->numCols);
+        psError( PS_ERR_BAD_PARAMETER_SIZE, true,
+                 PS_ERRORTEXT_pmMaskBadPixels_SIZE_INPUT_IMAGE,
+                 inImage->numRows, inImage->numCols, mask->numRows, mask->numCols);
         return false;
     } else if(inMask->numRows>mask->numRows || inMask->numCols>mask->numCols) {
-        psErrorMsg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels", PS_ERR_BAD_PARAMETER_SIZE, true,
-                   PS_ERRORTEXT_pmMaskBadPixels_SIZE_MASK_IMAGE,
-                   inMask->numRows, inMask->numCols, mask->numRows, mask->numCols);
+        psError( PS_ERR_BAD_PARAMETER_SIZE, true,
+                 PS_ERRORTEXT_pmMaskBadPixels_SIZE_MASK_IMAGE,
+                 inMask->numRows, inMask->numCols, mask->numRows, mask->numCols);
         return false;
     }
@@ -96,17 +96,17 @@
     // Check that offsets are within image limits
     if(totOffRow>=mask->numRows || totOffCol>=mask->numCols) {
-        psErrorMsg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels", PS_ERR_BAD_PARAMETER_SIZE, true,
-                   PS_ERRORTEXT_pmMaskBadPixels_OFFSET_MASK_IMAGE,
-                   totOffRow, totOffCol, mask->numRows, mask->numCols);
+        psError( PS_ERR_BAD_PARAMETER_SIZE, true,
+                 PS_ERRORTEXT_pmMaskBadPixels_OFFSET_MASK_IMAGE,
+                 totOffRow, totOffCol, mask->numRows, mask->numCols);
         return false;
     } else if(totOffRow>=inImage->numRows || totOffCol>=inImage->numCols) {
-        psErrorMsg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels", PS_ERR_BAD_PARAMETER_SIZE, true,
-                   PS_ERRORTEXT_pmMaskBadPixels_OFFSET_INPUT_IMAGE,
-                   totOffRow, totOffCol, inImage->numRows, inImage->numCols);
+        psError( PS_ERR_BAD_PARAMETER_SIZE, true,
+                 PS_ERRORTEXT_pmMaskBadPixels_OFFSET_INPUT_IMAGE,
+                 totOffRow, totOffCol, inImage->numRows, inImage->numCols);
         return false;
     } else if(totOffRow>=inMask->numRows || totOffCol>=inMask->numCols) {
-        psErrorMsg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels", PS_ERR_BAD_PARAMETER_SIZE, true,
-                   PS_ERRORTEXT_pmMaskBadPixels_OFFSET_INPUT_IMAGE_MASK,
-                   totOffRow, totOffCol, inMask->numRows, inMask->numCols);
+        psError( PS_ERR_BAD_PARAMETER_SIZE, true,
+                 PS_ERRORTEXT_pmMaskBadPixels_OFFSET_INPUT_IMAGE_MASK,
+                 totOffRow, totOffCol, inMask->numRows, inMask->numCols);
         return false;
     }
@@ -116,12 +116,12 @@
     maskType = mask->type.type;
     if(PS_IS_PSELEMTYPE_COMPLEX(inType)) {
-        psErrorMsg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels", PS_ERR_BAD_PARAMETER_TYPE, true,
-                   PS_ERRORTEXT_pmMaskBadPixels_TYPE_INPUT_IMAGE,
-                   inType);
+        psError( PS_ERR_BAD_PARAMETER_TYPE, true,
+                 PS_ERRORTEXT_pmMaskBadPixels_TYPE_INPUT_IMAGE,
+                 inType);
         return false;
     } else if(maskType!=PS_TYPE_MASK) {
-        psErrorMsg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels", PS_ERR_BAD_PARAMETER_TYPE, true,
-                   PS_ERRORTEXT_pmMaskBadPixels_TYPE_MASK_IMAGE,
-                   maskType);
+        psError( PS_ERR_BAD_PARAMETER_TYPE, true,
+                 PS_ERRORTEXT_pmMaskBadPixels_TYPE_MASK_IMAGE,
+                 maskType);
         return false;
     }
@@ -175,7 +175,7 @@
         PM_BAD_PIXELS(F64);
     default:
-        psErrorMsg(PS_ERRORNAME_DOMAIN "pmMaskBadPixels", PS_ERR_BAD_PARAMETER_TYPE, true,
-                   PS_ERRORTEXT_pmMaskBadPixels_TYPE_UNSUPPORTED,
-                   inType);
+        psError( PS_ERR_BAD_PARAMETER_TYPE, true,
+                 PS_ERRORTEXT_pmMaskBadPixels_TYPE_UNSUPPORTED,
+                 inType);
     }
 
Index: /trunk/psModules/src/pmNonLinear.c
===================================================================
--- /trunk/psModules/src/pmNonLinear.c	(revision 2274)
+++ /trunk/psModules/src/pmNonLinear.c	(revision 2275)
@@ -5,6 +5,6 @@
  *  @author George Gusciora, MHPCC
  *
- *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-14 21:44:08 $
+ *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-11-04 02:02:10 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -34,7 +34,7 @@
     int j;
 
-    PS_CHECK_NULL_PTR_RETURN_NULL(in);
-    PS_CHECK_NULL_PTR_RETURN_NULL(in->image);
-    PS_CHECK_NULL_PTR_RETURN_NULL(coeff);
+    PS_PTR_CHECK_NULL(in,NULL);
+    PS_PTR_CHECK_NULL(in->image, NULL);
+    PS_PTR_CHECK_NULL(coeff,NULL);
 
     for (i=0;i<(in->image)->numRows;i++) {
@@ -58,8 +58,8 @@
                                 const psVector *outFlux)
 {
-    PS_CHECK_NULL_PTR_RETURN_NULL(in);
-    PS_CHECK_NULL_PTR_RETURN_NULL(in->image);
-    PS_CHECK_NULL_PTR_RETURN_NULL(inFlux);
-    PS_CHECK_NULL_PTR_RETURN_NULL(outFlux);
+    PS_PTR_CHECK_NULL(in,NULL);
+    PS_PTR_CHECK_NULL(in->image,NULL);
+    PS_PTR_CHECK_NULL(inFlux,NULL);
+    PS_PTR_CHECK_NULL(outFlux,NULL);
 
     int i;
Index: /trunk/psModules/src/pmReadoutCombine.c
===================================================================
--- /trunk/psModules/src/pmReadoutCombine.c	(revision 2274)
+++ /trunk/psModules/src/pmReadoutCombine.c	(revision 2275)
@@ -5,6 +5,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-11-03 22:10:37 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-11-04 02:02:10 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -15,6 +15,5 @@
 #include<math.h>
 #include "pslib.h"
-// XXX: have Desonia do this correctly.
-#include "../../psLib/src/dataManip/psConstants.h"
+#include "psConstants.h"
 
 typedef struct
@@ -90,5 +89,5 @@
         // XXX
         if (numInputCols != tmpReadout->image->numCols) {
-            psError(__func__, "Image %d not same size as other input images (%d, %d)\n",
+            psError(PS_ERR_UNKNOWN,true, "Image %d not same size as other input images (%d, %d)\n",
                     tmpReadout->image->numRows, tmpReadout->image->numCols);
             return(NULL);
@@ -96,5 +95,5 @@
         // XXX
         if (numInputRows != tmpReadout->image->numRows) {
-            psError(__func__, "Image %d not same size as other input images (%d, %d)\n",
+            psError(PS_ERR_UNKNOWN,true, "Image %d not same size as other input images (%d, %d)\n",
                     tmpReadout->image->numRows, tmpReadout->image->numCols);
             return(NULL);
@@ -111,5 +110,5 @@
 
     if (1 < p_psDetermineNumBits(params->stats->options)) {
-        psError(__func__, "Multiple statistical options have been requested.\n");
+        psError(PS_ERR_UNKNOWN,true, "Multiple statistical options have been requested.\n");
         return(NULL);
     }
@@ -175,5 +174,5 @@
             double statValue;
             if (!p_psGetStatValue(stats, &statValue)) {
-                psError(__func__, "Could not determine stats value.\n");
+                psError(PS_ERR_UNKNOWN,true, "Could not determine stats value.\n");
                 return(NULL);
             } else {
Index: /trunk/psModules/src/pmSubtractBias.c
===================================================================
--- /trunk/psModules/src/pmSubtractBias.c	(revision 2274)
+++ /trunk/psModules/src/pmSubtractBias.c	(revision 2275)
@@ -6,6 +6,6 @@
  *  @author George Gusciora, MHPCC
  *
- *  @version $Revision: 1.16 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-15 02:20:39 $
+ *  @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-11-04 02:02:10 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -38,8 +38,8 @@
 
     if (((in->image)->numRows + in->row0 - bias->row0) > (bias->image)->numRows) {
-        psError(__func__, "bias image does not have enough rows\n");
+        psError(PS_ERR_UNKNOWN,true, "bias image does not have enough rows\n");
     }
     if (((in->image)->numCols + in->row0 - bias->row0) > (bias->image)->numCols) {
-        psError(__func__, "bias image does not have enough columns\n");
+        psError(PS_ERR_UNKNOWN,true, "bias image does not have enough columns\n");
     }
 
@@ -130,5 +130,5 @@
 
     if (numOptions == 0) {
-        psError(__func__, "No statistics options have been specified\n");
+        psError(PS_ERR_UNKNOWN,true, "No statistics options have been specified\n");
     }
     if (numOptions != 1) {
@@ -189,5 +189,5 @@
         }
     } else {
-        psError(__func__, "unknown fit type\n");
+        psError(PS_ERR_UNKNOWN,true, "unknown fit type\n");
     }
 
@@ -219,5 +219,5 @@
     int nBin;
 
-    PS_CHECK_NULL_PTR_RETURN_NULL(in);
+    PS_PTR_CHECK_NULL(in,NULL);
 
     //
@@ -229,5 +229,5 @@
 
     if ((overscans == NULL) && (overScanAxis != PM_OVERSCAN_NONE)) {
-        psError(__func__, "(overscans == NULL) && (overScanAxis != PM_OVERSCAN_NONE)\n");
+        psError(PS_ERR_UNKNOWN,true, "(overscans == NULL) && (overScanAxis != PM_OVERSCAN_NONE)\n");
         return(in);
     }
Index: /trunk/psModules/src/psTest.c
===================================================================
--- /trunk/psModules/src/psTest.c	(revision 2274)
+++ /trunk/psModules/src/psTest.c	(revision 2275)
@@ -28,13 +28,13 @@
 #define HEADER_BOTTOM "\\**********************************************************************************/\n\n"
 
-bool p_runTestSuite( FILE *fp, const char* testPointFile, const char* packageName,
-                     testDescription tests[], int argc, char * const argv[] )
-{
-    bool success = true;
-    bool runAll = true;
-    bool useFork = true;
-    bool found;
-    int c;
-    int n;
+psBool p_runTestSuite( FILE *fp, const char* testPointFile, const char* packageName,
+                       testDescription tests[], psS32 argc, char * const argv[] )
+{
+    psBool success = true;
+    psBool runAll = true;
+    psBool useFork = true;
+    psBool found;
+    psS32 c;
+    psS32 n;
     extern char *optarg;
 
@@ -62,5 +62,5 @@
                 printf( "Testpoints:\n" );
                 runAll = false;
-                for ( int index = 0; tests[ index ].fcn != NULL; index++ ) {
+                for ( psS32 index = 0; tests[ index ].fcn != NULL; index++ ) {
                     printf( "    %6d - %s \n", tests[ index ].testPointNumber,
                             tests[ index ].testPointName );
@@ -70,5 +70,5 @@
             case 't':
                 runAll = false;
-                for ( int index = 0; tests[ index ].fcn != NULL; index++ ) {
+                for ( psS32 index = 0; tests[ index ].fcn != NULL; index++ ) {
                     if ( strcmp( optarg, tests[ index ].testPointName ) == 0 ) {
                         success = p_runTest( fp,
@@ -85,10 +85,10 @@
                 runAll = false;
                 if ( sscanf( optarg, "%i", &n ) != 1 ) {
-                    psError( __func__, "Failed to parse the testpoint number (%s).",
-                             optarg );
+                    psError(PS_ERR_UNKNOWN, true, "Failed to parse the testpoint number (%s).",
+                            optarg );
                     break;
                 }
                 found = false;
-                for ( int index = 0; tests[ index ].fcn != NULL; index++ ) {
+                for ( psS32 index = 0; tests[ index ].fcn != NULL; index++ ) {
                     if ( n == tests[ index ].testPointNumber ) {
                         found = true;
@@ -103,11 +103,11 @@
                 }
                 if ( ! found ) {
-                    psError( __func__, "The specified testpoint number (%d) doesn't exist in this test driver.",
-                             n );
+                    psError(PS_ERR_UNKNOWN, true, "The specified testpoint number (%d) doesn't exist in this test driver.",
+                            n );
                     break;
                 }
                 break;
             case '?':
-                psError( __func__, "Option %s is not recognized and is ignored.", optarg );
+                psError(PS_ERR_UNKNOWN, true, "Option %s is not recognized and is ignored.", optarg );
                 break;
             }
@@ -116,5 +116,5 @@
 
     if ( runAll ) {
-        for ( int index = 0; tests[ index ].fcn != NULL; index++ ) {
+        for ( psS32 index = 0; tests[ index ].fcn != NULL; index++ ) {
             if ( ! tests[ index ].isDuplicateEntry ) {
                 success = p_runTest( fp,
@@ -130,5 +130,6 @@
 
     if ( ! success ) {
-        psError( testPointFile, "One or more tests failed" );
+        psError( PS_ERR_UNKNOWN, true,
+                 "One or more tests failed" );
     }
 
@@ -136,8 +137,8 @@
 }
 
-bool p_runTest( FILE *fp, const char* testPointFile, const char* packageName, const char* testPointName,
-                testFcn fcn, int expectedReturn, bool useFork )
-{
-    int childReturn = 0;
+psBool p_runTest( FILE *fp, const char* testPointFile, const char* packageName, const char* testPointName,
+                  testFcn fcn, psS32 expectedReturn, psBool useFork )
+{
+    psS32 childReturn = 0;
     pid_t child;
 
@@ -147,9 +148,9 @@
         child = fork();
         if ( child == 0 ) {                   // I am the child process, run the test
-            int currentId = psMemGetId();
-            int retVal = fcn();
+            psS32 currentId = psMemGetId();
+            psS32 retVal = fcn();
             if ( retVal == 0 ) { // only bother checking memory if test executed to end.
                 if ( psMemCheckLeaks( currentId, NULL, stderr ) != 0 ) {
-                    psError( __func__, "Memory Leaks Detected" );
+                    psError(PS_ERR_UNKNOWN, true, "Memory Leaks Detected" );
                     retVal = 64;
                 }
@@ -171,9 +172,9 @@
         }
     } else {
-        int currentId = psMemGetId();
+        psS32 currentId = psMemGetId();
         childReturn = fcn();
         if ( childReturn == 0 ) { // only bother checking memory if test executed to end.
             if ( psMemCheckLeaks( currentId, NULL, stderr ) != 0 ) {
-                psError( __func__, "Memory Leaks Detected" );
+                psError(PS_ERR_UNKNOWN, true, "Memory Leaks Detected" );
                 childReturn = 64;
             }
@@ -215,5 +216,5 @@
                                 const char* testPointName,
                                 const char* expectedError,
-                                int exitValue )
+                                psS32 exitValue )
 {
     char TP[ 80 ];
@@ -235,5 +236,5 @@
                     const char* packageName,
                     const char* testPointName,
-                    bool success )
+                    psBool success )
 {
     if ( success ) {
