Index: trunk/psLib/test/image/tst_psImage.c
===================================================================
--- trunk/psLib/test/image/tst_psImage.c	(revision 2262)
+++ trunk/psLib/test/image/tst_psImage.c	(revision 2273)
@@ -6,6 +6,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-27 00:57:33 $
+ *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-11-04 01:05:00 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -71,5 +71,5 @@
                     continue;
                 }
-                psError(__func__,"psImageAlloc returned NULL for type %x, size %dx%d.",
+                psError(PS_ERR_UNKNOWN, true,"psImageAlloc returned NULL for type %x, size %dx%d.",
                         type[t], numCols[i], numRows[i]);
                 psFree(image);
@@ -78,5 +78,5 @@
 
             if (image->type.dimen != PS_DIMEN_IMAGE || image->type.type != type[t]) {
-                psError(__func__,"psImageAlloc allocated wrong dimen/type (%d/%d), should be "
+                psError(PS_ERR_UNKNOWN, true,"psImageAlloc allocated wrong dimen/type (%d/%d), should be "
                         "PS_IMAGE_DIMEN/%d", image->type.dimen, image->type.type, type[t]);
                 psFree(image);
@@ -85,5 +85,5 @@
 
             if (image->numCols != numCols[i] || image->numRows != numRows[i]) {
-                psError(__func__,"psImageAlloc allocated wrong size %dx%d, should be %dx%d (type = %d)",
+                psError(PS_ERR_UNKNOWN, true,"psImageAlloc allocated wrong size %dx%d, should be %dx%d (type = %d)",
                         image->numCols, image->numRows, numCols[i], numRows[i],type[t]);
                 psFree(image);
@@ -92,5 +92,5 @@
 
             if (image->col0 != 0 || image->row0 != 0) {
-                psError(__func__,"psImageAlloc returned row0/col0 of %d/%d.  Should be 0/0.",
+                psError(PS_ERR_UNKNOWN, true,"psImageAlloc returned row0/col0 of %d/%d.  Should be 0/0.",
                         image->row0, image->row0);
                 psFree(image);
@@ -99,5 +99,5 @@
 
             if (image->parent != NULL) {
-                psError(__func__,"psImageAlloc returned non-NULL parent");
+                psError(PS_ERR_UNKNOWN, true,"psImageAlloc returned non-NULL parent");
                 psFree(image);
                 return 5;
@@ -105,5 +105,5 @@
 
             if (image->children != NULL) {
-                psError(__func__,"psImageAlloc returned non-NULL children array");
+                psError(PS_ERR_UNKNOWN, true,"psImageAlloc returned non-NULL children array");
                 psFree(image);
                 return 7;
@@ -123,5 +123,5 @@
                         for (psS32 c=0;c<cols;c++) {
                             if (image->data.U16[r][c] != 2*c+r) {
-                                psError(__func__,"Could not set all pixels in uint16 image at (%d,%d)",c,r);
+                                psError(PS_ERR_UNKNOWN, true,"Could not set all pixels in uint16 image at (%d,%d)",c,r);
                                 psFree(image);
                                 return 8;
@@ -143,5 +143,5 @@
                         for (psS32 c=0;c<cols;c++) {
                             if (fabsf(image->data.F32[r][c] - (2.0f*c+r)) > FLT_EPSILON) {
-                                psError(__func__,"Could not set all pixels in float image at (%d,%d)",c,r);
+                                psError(PS_ERR_UNKNOWN, true,"Could not set all pixels in float image at (%d,%d)",c,r);
                                 psFree(image);
                                 return 8;
@@ -163,5 +163,5 @@
                         for (psS32 c=0;c<cols;c++) {
                             if (fabs(image->data.F64[r][c] - (2.0f*c+r)) > DBL_EPSILON) {
-                                psError(__func__,"Could not set all pixels in double image at (%d,%d)",c,r);
+                                psError(PS_ERR_UNKNOWN, true,"Could not set all pixels in double image at (%d,%d)",c,r);
                                 psFree(image);
                                 return 8;
@@ -184,5 +184,5 @@
                             if (fabsf(crealf(image->data.C32[r][c]) - r) > FLT_EPSILON ||
                                     fabsf(cimagf(image->data.C32[r][c]) - c) > FLT_EPSILON ) {
-                                psError(__func__,"Could not set all pixels in complex image at (%d,%d)",c,r);
+                                psError(PS_ERR_UNKNOWN, true,"Could not set all pixels in complex image at (%d,%d)",c,r);
                                 psFree(image);
                                 return 8;
@@ -205,5 +205,5 @@
                         for (psS32 c=0;c<cols;c++) {
                             if (image->data.PTR[r][c] != temp) {
-                                psError(__func__, "Could not set pixel in pointer image at (%d,%d): %x %x",
+                                psError(PS_ERR_UNKNOWN, true, "Could not set pixel in pointer image at (%d,%d): %x %x",
                                         c,r,image->data.PTR[r][c],temp);
                                 psFree(image);
@@ -229,5 +229,5 @@
                         for (psS32 c=0;c<cols;c++) {
                             if (image->data.U8[r][c] != (uint8_t)(r + c)) {
-                                psError(__func__,"Could not set all pixels in image (type=%d) at (%d,%d)",
+                                psError(PS_ERR_UNKNOWN, true,"Could not set all pixels in image (type=%d) at (%d,%d)",
                                         type[t],c,r);
                                 psFree(image);
@@ -281,5 +281,5 @@
     // Verify the returned psImage structure pointer is equal to the input parameter output.
     if (img2 != img3) {
-        psError(__func__,"the image given for recycled wasn't");
+        psError(PS_ERR_UNKNOWN, true,"the image given for recycled wasn't");
         return 1;
     }
@@ -289,9 +289,9 @@
     img4 = psImageCopy(NULL,img,PS_TYPE_F32);
     if (img4 == NULL) {
-        psError(__func__,"output image doesn't exist");
+        psError(PS_ERR_UNKNOWN, true,"output image doesn't exist");
         return 4;
     }
     if (img4->type.type != img->type.type) {
-        psError(__func__,"output image is not the same type as input image");
+        psError(PS_ERR_UNKNOWN, true,"output image is not the same type as input image");
         return 4;
     }
@@ -301,5 +301,5 @@
         for (unsigned col=0;col<c;col++) {
             if( imgInRow[col] != imgOutRow[col] ) {
-                psError(__func__,"Input image not equal to output image at %d,%d!",
+                psError(PS_ERR_UNKNOWN, true,"Input image not equal to output image at %d,%d!",
                         col, row);
                 return 4;
@@ -321,5 +321,5 @@
     img2 = psImageCopy(img2,img,PS_TYPE_##OUT); \
     if (img2 == NULL) { \
-        psError(__func__,"psImageCopy failed to copy U8."); \
+        psError(PS_ERR_UNKNOWN, true,"psImageCopy failed to copy U8."); \
         return 2; \
     } \
@@ -329,10 +329,10 @@
         for (psU32 col=0;col<c;col++) { \
             if (abs(imgRow[col] - (ps##IN)(row+col)) > 0.5) { \
-                psError(__func__,"Input image was changed at %d,%d!", \
+                psError(PS_ERR_UNKNOWN, true,"Input image was changed at %d,%d!", \
                         col,row); \
                 return 2; \
             } \
             if (abs(img2Row[col] - (ps##OUT)(imgRow[col])) > 0.5) { \
-                psError(__func__,"returned psImage values after copy don't match at %d,%d " \
+                psError(PS_ERR_UNKNOWN, true,"returned psImage values after copy don't match at %d,%d " \
                         "(%d vs %d)",\
                         col,row,img2Row[col], (ps##OUT)(imgRow[col])); \
@@ -382,5 +382,5 @@
     img3 = psImageCopy(NULL,NULL,PS_TYPE_F32);
     if (img3 != NULL) {
-        psError(__func__,"psImageCopy didn't return NULL when input image was NULL.");
+        psError(PS_ERR_UNKNOWN, true,"psImageCopy didn't return NULL when input image was NULL.");
         return 3;
     }
Index: trunk/psLib/test/image/tst_psImageConvolve.c
===================================================================
--- trunk/psLib/test/image/tst_psImageConvolve.c	(revision 2262)
+++ trunk/psLib/test/image/tst_psImageConvolve.c	(revision 2273)
@@ -5,6 +5,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-27 00:57:33 $
+ *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-11-04 01:05:00 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -52,5 +52,5 @@
 
         if (k == NULL) {
-            psError(__func__,"psKernelAlloc returned NULL for [%d:%d,%d:%d].",
+            psError(PS_ERR_UNKNOWN, true,"psKernelAlloc returned NULL for [%d:%d,%d:%d].",
                     xMin[i], xMax[i], yMin[i], yMax[i]);
             return i*10+1;
@@ -59,5 +59,5 @@
         if (k->xMin != xMin[i] || k->xMax != xMax[i] ||
                 k->yMin != yMin[i] || k->yMax != yMax[i]) {
-            psError(__func__,"Min/max members, [%d:%d,%d:%d], of psKernel wrong. Should be [%d:%d,%d:%d].",
+            psError(PS_ERR_UNKNOWN, true,"Min/max members, [%d:%d,%d:%d], of psKernel wrong. Should be [%d:%d,%d:%d].",
                     k->xMin,k->xMax, k->yMin, k->yMax,
                     xMin[i], xMax[i], yMin[i], yMax[i]);
@@ -67,5 +67,5 @@
         if (k->image->numCols != xMax[i]-xMin[i]+1 ||
                 k->image->numRows != yMax[i]-yMin[i]+1) {
-            psError(__func__,"Size of the kernel image is wrong (%dx%d vs %dx%d).",
+            psError(PS_ERR_UNKNOWN, true,"Size of the kernel image is wrong (%dx%d vs %dx%d).",
                     xMax[i]-xMin[i]+1, yMax[i]-yMin[i]+1,
                     k->image->numCols, k->image->numRows);
@@ -75,5 +75,5 @@
         for (psS32 j=yMin[i]; j<yMax[i]; j++) {
             if (k->kernel[j]+xMin[i] != k->image->data.PS_TYPE_KERNEL_DATA[j-yMin[i]]) {
-                psError(__func__,"The kernel pointer was set wrong for row %d.",
+                psError(PS_ERR_UNKNOWN, true,"The kernel pointer was set wrong for row %d.",
                         j);
                 return i*10+4;
@@ -87,10 +87,10 @@
     k = psKernelAlloc(5, -5, -2, 2);
     if (k == NULL) {
-        psError(__func__,"psKernelAlloc returned NULL for xMin > xMax.");
+        psError(PS_ERR_UNKNOWN, true,"psKernelAlloc returned NULL for xMin > xMax.");
         return i*10+5;
     }
 
     if (k->xMin != -5 || k->xMax != 5) {
-        psError(__func__,"psKernelAlloc didn't swap xMin & xMax.");
+        psError(PS_ERR_UNKNOWN, true,"psKernelAlloc didn't swap xMin & xMax.");
         return i*10+6;
     }
@@ -101,10 +101,10 @@
     k = psKernelAlloc(-2, 2, 5, -5);
     if (k == NULL) {
-        psError(__func__,"psKernelAlloc returned NULL for yMin > yMax.");
+        psError(PS_ERR_UNKNOWN, true,"psKernelAlloc returned NULL for yMin > yMax.");
         return i*10+7;
     }
 
     if (k->yMin != -5 || k->yMax != 5) {
-        psError(__func__,"psKernelAlloc didn't swap yMin & yMax.");
+        psError(PS_ERR_UNKNOWN, true,"psKernelAlloc didn't swap yMin & yMax.");
         return i*10+8;
     }
@@ -136,5 +136,5 @@
 
     if (result == NULL) {
-        psError(__func__,"psKernelGenerate returned NULL.");
+        psError(PS_ERR_UNKNOWN, true,"psKernelGenerate returned NULL.");
         return 1;
     }
@@ -142,5 +142,5 @@
     if (result->xMin != -1 || result->xMax != 1 ||
             result->yMin != -2 || result->yMax != 2) {
-        psError(__func__,"psKernelGenerate result had a range of [%d:%d,%d:%d].  Suppose to be [0:1,1:2].",
+        psError(PS_ERR_UNKNOWN, true,"psKernelGenerate result had a range of [%d:%d,%d:%d].  Suppose to be [0:1,1:2].",
                 result->xMin, result->xMax, result->yMin, result->yMax);
         return 2;
@@ -154,5 +154,5 @@
     }
     if (fabsf(1.0 - sum) > FLT_EPSILON) {
-        psError(__func__,"psKernelGenerate result is not normalized (sum=%g).",
+        psError(PS_ERR_UNKNOWN, true,"psKernelGenerate result is not normalized (sum=%g).",
                 sum);
 
@@ -166,5 +166,5 @@
             fabsf(result->kernel[-1][ 0] - 2.0/10.0) > FLT_EPSILON ||
             fabsf(result->kernel[-2][-1] - 0.0/10.0) > FLT_EPSILON) {
-        psError(__func__,"psKernelGenerate result values, %g,%g;%g,%g, are wrong. Suppose to be 2,6;1,0.",
+        psError(PS_ERR_UNKNOWN, true,"psKernelGenerate result values, %g,%g;%g,%g, are wrong. Suppose to be 2,6;1,0.",
                 result->kernel[-1][0], result->kernel[1][1],
                 result->kernel[2][0], result->kernel[-2][-1]);
@@ -191,5 +191,5 @@
 
     if (result == NULL) {
-        psError(__func__,"psKernelGenerate returned NULL.");
+        psError(PS_ERR_UNKNOWN, true,"psKernelGenerate returned NULL.");
         return 5;
     }
@@ -197,5 +197,5 @@
     if (result->xMin != 0 || result->xMax != 1 ||
             result->yMin != 0 || result->yMax != 3) {
-        psError(__func__,"psKernelGenerate result had a range of [%d:%d,%d:%d].  Suppose to be [0:1,1:2].",
+        psError(PS_ERR_UNKNOWN, true,"psKernelGenerate result had a range of [%d:%d,%d:%d].  Suppose to be [0:1,1:2].",
                 result->xMin, result->xMax, result->yMin, result->yMax);
         return 6;
@@ -209,5 +209,5 @@
     }
     if (fabsf(1.0 - sum) > FLT_EPSILON) {
-        psError(__func__,"psKernelGenerate result is not normalized (sum=%g).",
+        psError(PS_ERR_UNKNOWN, true,"psKernelGenerate result is not normalized (sum=%g).",
                 sum);
 
@@ -220,5 +220,5 @@
             fabsf(result->kernel[3][1] - 8.0/21.0) > FLT_EPSILON ||
             fabsf(result->kernel[2][1] - 10.0/21.0) > FLT_EPSILON) {
-        psError(__func__,"psKernelGenerate result values, %g,%g;%g,%g, are wrong. Suppose to be 2,6;1,0.",
+        psError(PS_ERR_UNKNOWN, true,"psKernelGenerate result values, %g,%g;%g,%g, are wrong. Suppose to be 2,6;1,0.",
                 result->kernel[1][0], result->kernel[1][1],
                 result->kernel[2][0], result->kernel[2][1]);
@@ -246,5 +246,5 @@
     result = psKernelGenerate(tVec, xVec, yVec, false);
     if (result == NULL) {
-        psError(__func__,"psKernelGenerate returned NULL.");
+        psError(PS_ERR_UNKNOWN, true,"psKernelGenerate returned NULL.");
         return 9;
     }
@@ -254,5 +254,5 @@
             fabsf(result->kernel[ 1][ 1] - 6.0/8.0) > FLT_EPSILON ||
             fabsf(result->kernel[ 0][ 0] - 1.0/8.0) > FLT_EPSILON) {
-        psError(__func__,"psKernelGenerate result values wrong for truncated time vector.");
+        psError(PS_ERR_UNKNOWN, true,"psKernelGenerate result values wrong for truncated time vector.");
 
         return 10;
@@ -264,5 +264,5 @@
     result = psKernelGenerate(NULL, xVec, yVec, true);
     if (result != NULL) {
-        psError(__func__,"psKernelGenerate returned a kernel with no time vector.");
+        psError(PS_ERR_UNKNOWN, true,"psKernelGenerate returned a kernel with no time vector.");
         return 11;
     }
@@ -271,5 +271,5 @@
     result = psKernelGenerate(tVec, NULL, yVec, true);
     if (result != NULL) {
-        psError(__func__,"psKernelGenerate returned a kernel with no x vector.");
+        psError(PS_ERR_UNKNOWN, true,"psKernelGenerate returned a kernel with no x vector.");
         return 11;
     }
@@ -278,5 +278,5 @@
     result = psKernelGenerate(tVec, xVec, NULL, true);
     if (result != NULL) {
-        psError(__func__,"psKernelGenerate returned a kernel with no y vector.");
+        psError(PS_ERR_UNKNOWN, true,"psKernelGenerate returned a kernel with no y vector.");
         return 11;
     }
@@ -336,10 +336,10 @@
  
     if (out == NULL) {
-        psError(__func__, "psImageConvolve returned a NULL for direct gaussian case.");
+        psError(PS_ERR_UNKNOWN, true, "psImageConvolve returned a NULL for direct gaussian case.");
         return 1;
     }
  
     if (out->numCols != c || out->numRows != r) {
-        psError(__func__, "psImageConvolve result image is %dx%d, but expected %dx%d.",
+        psError(PS_ERR_UNKNOWN, true, "psImageConvolve result image is %dx%d, but expected %dx%d.",
                 out->numCols, out->numRows,
                 c,r);
@@ -350,5 +350,5 @@
         char* typeStr;
         PS_TYPE_NAME(typeStr,out->type.type);
-        psError(__func__, "psImageConvolve result image is of type %s, not psF32.",
+        psError(PS_ERR_UNKNOWN, true, "psImageConvolve result image is of type %s, not psF32.",
                 typeStr);
         return 3;
@@ -359,5 +359,5 @@
         for (psS32 j=-1;j<1;j++) {
             if (fabsf(out->data.F32[r/2+i][c/2+j] - g->kernel[i][j]) > 0.0001) {
-                psError(__func__,"Convolved image wrong at %d,%d.  Value is %g, expected %g.",
+                psError(PS_ERR_UNKNOWN, true,"Convolved image wrong at %d,%d.  Value is %g, expected %g.",
                         c/2+j,r/2+i,
                         out->data.F32[r/2+i][c/2+j], g->kernel[i][j]);
@@ -365,5 +365,5 @@
             }
             if (i >= 0 && j >= 0 && fabsf(out->data.F32[i][j] - g->kernel[i][j]) > 0.0001) {
-                psError(__func__,"Convolved image wrong at %d,%d.  Value is %g, expected %g.",
+                psError(PS_ERR_UNKNOWN, true,"Convolved image wrong at %d,%d.  Value is %g, expected %g.",
                         j,i,
                         out->data.F32[i][j], g->kernel[i][j]);
@@ -371,5 +371,5 @@
             }
             if (i <= 0 && fabsf(out->data.F32[r-1+i][c/2+j] - g->kernel[i][j]) > 0.0001) {
-                psError(__func__,"Convolved image wrong at %d,%d.  Value is %g, expected %g.",
+                psError(PS_ERR_UNKNOWN, true,"Convolved image wrong at %d,%d.  Value is %g, expected %g.",
                         c/2+j,r-1+i,
                         out->data.F32[r-1+i][c/2+j], g->kernel[i][j]);
@@ -397,15 +397,15 @@
  
     if (out == NULL) {
-        psError(__func__, "psImageConvolve returned a NULL for gaussian case.");
+        psError(PS_ERR_UNKNOWN, true, "psImageConvolve returned a NULL for gaussian case.");
         return 10;
     }
  
     if (out != out2) {
-        psError(__func__, "psImageConvolve didn't recycle the supplied out image struct.");
+        psError(PS_ERR_UNKNOWN, true, "psImageConvolve didn't recycle the supplied out image struct.");
         return 11;
     }
  
     if (out->numCols != c || out->numRows != r) {
-        psError(__func__, "psImageConvolve result image is %dx%d, but expected %dx%d.",
+        psError(PS_ERR_UNKNOWN, true, "psImageConvolve result image is %dx%d, but expected %dx%d.",
                 out->numCols, out->numRows,
                 c,r);
@@ -416,5 +416,5 @@
         char* typeStr;
         PS_TYPE_NAME(typeStr,out->type.type);
-        psError(__func__, "psImageConvolve result image is of type %s, not psF32.",
+        psError(PS_ERR_UNKNOWN, true, "psImageConvolve result image is of type %s, not psF32.",
                 typeStr);
         return 13;
@@ -426,5 +426,5 @@
         for (psS32 j=-1;j<1;j++) {
             if (fabsf(out->data.F32[r/2+i][c/2+j] - g->kernel[i][j]) > 0.0001) {
-                psError(__func__,"Convolved image wrong at %d,%d.  Value is %g, expected %g.",
+                psError(PS_ERR_UNKNOWN, true,"Convolved image wrong at %d,%d.  Value is %g, expected %g.",
                         c/2+j,r/2+i,
                         out->data.F32[r/2+i][c/2+j], g->kernel[i][j]);
@@ -433,5 +433,5 @@
             }
             if (i >= 0 && j >= 0 && fabsf(out->data.F32[i][j] - g->kernel[i][j]) > 0.0001) {
-                psError(__func__,"Convolved image wrong at %d,%d.  Value is %g, expected %g.",
+                psError(PS_ERR_UNKNOWN, true,"Convolved image wrong at %d,%d.  Value is %g, expected %g.",
                         j,i,
                         out->data.F32[i][j], g->kernel[i][j]);
@@ -439,5 +439,5 @@
             }
             if (i <= 0 && fabsf(out->data.F32[r-1+i][c/2+j] - g->kernel[i][j]) > 0.0001) {
-                psError(__func__,"Convolved image wrong at %d,%d.  Value is %g, expected %g.",
+                psError(PS_ERR_UNKNOWN, true,"Convolved image wrong at %d,%d.  Value is %g, expected %g.",
                         c/2+j,r-1+i,
                         out->data.F32[r-1+i][c/2+j], g->kernel[i][j]);
Index: trunk/psLib/test/image/tst_psImageExtraction.c
===================================================================
--- trunk/psLib/test/image/tst_psImageExtraction.c	(revision 2262)
+++ trunk/psLib/test/image/tst_psImageExtraction.c	(revision 2273)
@@ -6,6 +6,6 @@
 *  @author Robert DeSonia, MHPCC
 *
-*  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-10-27 00:57:33 $
+*  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-11-04 01:05:00 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -87,5 +87,5 @@
     \
     if (out->n != TRUTH_SIZE) { \
-        psError(__func__,"Number of results is wrong (%d, not %d)", \
+        psError(PS_ERR_UNKNOWN,true,"Number of results is wrong (%d, not %d)", \
                 out->n,n); \
         return TESTNUM*4+1; \
@@ -93,5 +93,5 @@
     \
     if (positions->n != TRUTH_SIZE) { \
-        psError(__func__,"Number of results for positions vector is wrong (%d, not %d)", \
+        psError(PS_ERR_UNKNOWN,true,"Number of results for positions vector is wrong (%d, not %d)", \
                 out->n,n); \
         return TESTNUM*4+2; \
@@ -100,5 +100,5 @@
     for (psS32 i=0;i<out->n;i++) { \
         if (fabs(out->data.F64[i]-image->data.TYPE[r/10+TRUTHPIX_Y][c/10+TRUTHPIX_X]) > 1.0/(psF64)r) { \
-            psError(__func__,"Improper result at position %d.  Got %g, expected %g",i, \
+            psError(PS_ERR_UNKNOWN,true,"Improper result at position %d.  Got %g, expected %g",i, \
                     out->data.F64[i],image->data.TYPE[r/10+TRUTHPIX_Y][c/10+TRUTHPIX_X]); \
             return TESTNUM*4+3; \
@@ -106,5 +106,5 @@
         if (DIRECTION == PS_CUT_X_POS || DIRECTION == PS_CUT_X_NEG) { \
             if (positions->data.U32[i] != c/10+TRUTHPIX_X) { \
-                psError(__func__,"Improper positions (%d vs %d) result @ %d.", \
+                psError(PS_ERR_UNKNOWN,true,"Improper positions (%d vs %d) result @ %d.", \
                         positions->data.U32[i],c/10+TRUTHPIX_X,i); \
                 return TESTNUM*4+4; \
@@ -112,5 +112,5 @@
         } else { \
             if (positions->data.U32[i] != r/10+TRUTHPIX_Y) { \
-                psError(__func__,"Improper positions (%d vs %d) result @ %d.", \
+                psError(PS_ERR_UNKNOWN,true,"Improper positions (%d vs %d) result @ %d.", \
                         positions->data.U32[i],r/10+TRUTHPIX_Y,i); \
                 return TESTNUM*4+4; \
@@ -165,5 +165,5 @@
                         stat );
     if ( out != NULL ) {
-        psError( __func__, "Giving a NULL image, psImageSlice didn't return NULL as expected" );
+        psError( PS_ERR_UNKNOWN,true, "Giving a NULL image, psImageSlice didn't return NULL as expected" );
         return 101;
     }
@@ -184,5 +184,5 @@
                         NULL );
     if ( out != NULL ) {
-        psError( __func__, "Giving a NULL stat struct, psImageSlice didn't return NULL as expected" );
+        psError( PS_ERR_UNKNOWN,true, "Giving a NULL stat struct, psImageSlice didn't return NULL as expected" );
         return 102;
     }
@@ -202,5 +202,5 @@
                         stat);
     if ( out != NULL ) {
-        psError( __func__, "Giving a bogus direction flag, psImageSlice didn't return NULL as expected" );
+        psError( PS_ERR_UNKNOWN,true, "Giving a bogus direction flag, psImageSlice didn't return NULL as expected" );
         return 103;
     }
@@ -220,5 +220,5 @@
                         stat );
     if ( out != NULL ) {
-        psError( __func__, "Giving a 0x0 region, psImageSlice didn't return NULL as expected" );
+        psError( PS_ERR_UNKNOWN,true, "Giving a 0x0 region, psImageSlice didn't return NULL as expected" );
         return 104;
     }
@@ -238,5 +238,5 @@
                         stat );
     if ( out != NULL ) {
-        psError( __func__, "Giving an invalid x position, psImageSlice didn't return NULL as expected" );
+        psError( PS_ERR_UNKNOWN,true, "Giving an invalid x position, psImageSlice didn't return NULL as expected" );
         return 105;
     }
@@ -251,5 +251,5 @@
                         stat );
     if ( out != NULL ) {
-        psError( __func__, "Giving an invalid y position, psImageSlice didn't return NULL as expected" );
+        psError( PS_ERR_UNKNOWN,true, "Giving an invalid y position, psImageSlice didn't return NULL as expected" );
         return 106;
     }
@@ -264,5 +264,5 @@
                         stat);
     if ( out != NULL ) {
-        psError( __func__, "Giving an invalid numCols, psImageSlice didn't return NULL as expected" );
+        psError( PS_ERR_UNKNOWN,true, "Giving an invalid numCols, psImageSlice didn't return NULL as expected" );
         return 107;
     }
@@ -277,5 +277,5 @@
                         stat);
     if ( out != NULL ) {
-        psError( __func__, "Giving an invalid numRows, psImageSlice didn't return NULL as expected" );
+        psError( PS_ERR_UNKNOWN,true, "Giving an invalid numRows, psImageSlice didn't return NULL as expected" );
         return 108;
     }
@@ -296,5 +296,5 @@
                         stat);
     if ( out != NULL ) {
-        psError( __func__, "Giving an invalid numRows, psImageSlice didn't return NULL as expected" );
+        psError( PS_ERR_UNKNOWN,true, "Giving an invalid numRows, psImageSlice didn't return NULL as expected" );
         return 109;
     }
@@ -314,5 +314,5 @@
                         stat);
     if ( out != NULL ) {
-        psError( __func__, "Mask size different than image size didn't return NULL as expected" );
+        psError( PS_ERR_UNKNOWN,true, "Mask size different than image size didn't return NULL as expected" );
         return 110;
     }
@@ -330,5 +330,5 @@
                          stat);
     if ( out != NULL ) {
-        psError( __func__, "Mask invalid type didn't return NULL as expected.");
+        psError( PS_ERR_UNKNOWN,true, "Mask invalid type didn't return NULL as expected.");
         return 111;
     }
@@ -345,5 +345,5 @@
                         stat);
     if ( out != NULL ) {
-        psError( __func__, "Input image with invalid type didn't return NULL as expected.");
+        psError( PS_ERR_UNKNOWN,true, "Input image with invalid type didn't return NULL as expected.");
         return 112;
     }
@@ -390,5 +390,5 @@
 
     if (subset2->numCols != c/2 || subset2->numRows != r/2) {
-        psError(__func__,"psImageSubset output size was not proper(%dx%d, should be %dx%d).",
+        psError(PS_ERR_UNKNOWN,true,"psImageSubset output size was not proper(%dx%d, should be %dx%d).",
                 subset2->numCols, subset2->numRows, c/2,r/2);
         return 1;
@@ -396,5 +396,5 @@
 
     if (subset3->numCols != c/2 || subset3->numRows != r/2) {
-        psError(__func__,"psImageSubset output size was not proper(%dx%d, should be %dx%d).",
+        psError(PS_ERR_UNKNOWN,true,"psImageSubset output size was not proper(%dx%d, should be %dx%d).",
                 subset3->numCols, subset3->numRows, c/2,r/2);
         return 2;
@@ -407,10 +407,10 @@
         for (psS32 col=0;col<c/2;col++) {
             if (subset2->data.U32[row][col] != original->data.U32[row+r/4][col+c/4]) {
-                psError(__func__,"psImageSubset output #1 was wrong at %dx%d (%d vs %d).",
+                psError(PS_ERR_UNKNOWN,true,"psImageSubset output #1 was wrong at %dx%d (%d vs %d).",
                         row,col,subset2->data.U32[row][col], original->data.U32[row+r/4][col+c/4]);
                 return 3;
             }
             if (subset3->data.U32[row][col] != original->data.U32[row][col]) {
-                psError(__func__,"psImageSubset output #1 was wrong at %dx%d (%d vs %d).",
+                psError(PS_ERR_UNKNOWN,true,"psImageSubset output #1 was wrong at %dx%d (%d vs %d).",
                         row,col,subset2->data.U32[row][col], original->data.U32[row][col]);
                 return 4;
@@ -423,10 +423,10 @@
 
     if (subset2->type.type != PS_TYPE_U32) {
-        psError(__func__,"psImageSubset output type was not proper(%d, should be %d).",
+        psError(PS_ERR_UNKNOWN,true,"psImageSubset output type was not proper(%d, should be %d).",
                 subset2->type.type, PS_TYPE_U32);
         return 6;
     }
     if (subset3->type.type != PS_TYPE_U32) {
-        psError(__func__,"psImageSubset output type was not proper(%d, should be %d).",
+        psError(PS_ERR_UNKNOWN,true,"psImageSubset output type was not proper(%d, should be %d).",
                 subset3->type.type, PS_TYPE_U32);
         return 7;
@@ -437,10 +437,10 @@
 
     if (subset2->col0 != c/4 || subset2->row0 != r/4) {
-        psError(__func__,"psImageSubset didn't set col0/row0 for subset2 (%d/%d, should be %d/%d).",
+        psError(PS_ERR_UNKNOWN,true,"psImageSubset didn't set col0/row0 for subset2 (%d/%d, should be %d/%d).",
                 subset2->col0,subset2->row0,c/4,r/4);
         return 8;
     }
     if (subset3->col0 != 0 || subset3->row0 != 0) {
-        psError(__func__,"psImageSubset didn't set col0/row0 for subset3 (%d/%d, should be %d/%d).",
+        psError(PS_ERR_UNKNOWN,true,"psImageSubset didn't set col0/row0 for subset3 (%d/%d, should be %d/%d).",
                 subset3->col0,subset3->row0,0,0);
         return 9;
@@ -451,5 +451,5 @@
 
     if (subset2->parent != original || subset3->parent != original) {
-        psError(__func__,"psImageSubset didn't set parent.");
+        psError(PS_ERR_UNKNOWN,true,"psImageSubset didn't set parent.");
         return 10;
     }
@@ -458,5 +458,5 @@
 
     if (subset2->children != NULL || subset3->children != NULL) {
-        psError(__func__,"psImageSubset didn't set children to NULL.");
+        psError(PS_ERR_UNKNOWN,true,"psImageSubset didn't set children to NULL.");
         return 11;
     }
@@ -467,9 +467,9 @@
 
     if (original->children == NULL || original->children->n != 2) {
-        psError(__func__,"psImageSubset didn't increment number of children by one per subset.");
+        psError(PS_ERR_UNKNOWN,true,"psImageSubset didn't increment number of children by one per subset.");
         return 12;
     }
     if (original->children->data[0] != subset2 || original->children->data[1] != subset3) {
-        psError(__func__,"psImageSubset didn't properly store the children pointers.");
+        psError(PS_ERR_UNKNOWN,true,"psImageSubset didn't properly store the children pointers.");
         return 13;
     }
@@ -482,5 +482,5 @@
     subset1 = psImageSubset(NULL,0,0,c/2,r/2);
     if (subset1 != NULL) {
-        psError(__func__,"psImageSubset didn't return NULL when input image was NULL.");
+        psError(PS_ERR_UNKNOWN,true,"psImageSubset didn't return NULL when input image was NULL.");
         return 14;
     }
@@ -494,5 +494,5 @@
     subset1 = psImageSubset(original,0,r/2,c/2,r/2);
     if (subset1 != NULL) {
-        psError(__func__,"psImageSubset didn't return NULL when numRows=0.");
+        psError(PS_ERR_UNKNOWN,true,"psImageSubset didn't return NULL when numRows=0.");
         return 15;
     }
@@ -500,9 +500,9 @@
     subset1 = psImageSubset(original,c/2,0,c/2,r/2);
     if (subset1 != NULL) {
-        psError(__func__,"psImageSubset didn't return NULL when numCols=0.");
+        psError(PS_ERR_UNKNOWN,true,"psImageSubset didn't return NULL when numCols=0.");
         return 16;
     }
     if (memcmp(original,&preSubsetStruct,sizeof(psImage)) != 0) {
-        psError(__func__,"psImageSubset changed the original struct though it failed to subset.");
+        psError(PS_ERR_UNKNOWN,true,"psImageSubset changed the original struct though it failed to subset.");
         return 17;
     }
@@ -516,5 +516,5 @@
     subset1 = psImageSubset(original,0,0,c/2,r*2);
     if (subset1 != NULL) {
-        psError(__func__,"psImageSubset didn't return NULL when subset origin was outside of "
+        psError(PS_ERR_UNKNOWN,true,"psImageSubset didn't return NULL when subset origin was outside of "
                 "image (via cols).");
         return 18;
@@ -523,5 +523,5 @@
     subset1 = psImageSubset(original,0,0,c*2,r/2);
     if (subset1 != NULL) {
-        psError(__func__,"psImageSubset didn't return NULL when subset origin was outside of "
+        psError(PS_ERR_UNKNOWN,true,"psImageSubset didn't return NULL when subset origin was outside of "
                 "image (via rows).");
         return 19;
@@ -530,5 +530,5 @@
     subset1 = psImageSubset(original,-1,0,c/2,r/2);
     if (subset1 != NULL) {
-        psError(__func__,"psImageSubset didn't return NULL when subset origin was outside of "
+        psError(PS_ERR_UNKNOWN,true,"psImageSubset didn't return NULL when subset origin was outside of "
                 "image (col0=-1).");
         return 20;
@@ -537,5 +537,5 @@
     subset1 = psImageSubset(original,0,-1,c/2,r/2);
     if (subset1 != NULL) {
-        psError(__func__,"psImageSubset didn't return NULL when subset origin was outside of "
+        psError(PS_ERR_UNKNOWN,true,"psImageSubset didn't return NULL when subset origin was outside of "
                 "image (row0=-1).");
         return 21;
@@ -550,5 +550,5 @@
     subset1 = psImageSubset(original,0,0,c/2,r+1);
     if (subset1 != NULL) {
-        psError(__func__,"psImageSubset didn't return NULL when subset was outside of image (via rows).");
+        psError(PS_ERR_UNKNOWN,true,"psImageSubset didn't return NULL when subset was outside of image (via rows).");
         return 22;
     }
@@ -556,5 +556,5 @@
     subset1 = psImageSubset(original,0,0,c+1,r/2);
     if (subset1 != NULL) {
-        psError(__func__,"psImageSubset didn't return NULL when subset was outside of image (via cols).");
+        psError(PS_ERR_UNKNOWN,true,"psImageSubset didn't return NULL when subset was outside of image (via cols).");
         return 23;
     }
@@ -562,5 +562,5 @@
     subset1 = psImageSubset(original,0,0,c+1,r+1);
     if (subset1 != NULL) {
-        psError(__func__,"psImageSubset didn't return NULL when subset was outside of image (via row+cols).");
+        psError(PS_ERR_UNKNOWN,true,"psImageSubset didn't return NULL when subset was outside of image (via row+cols).");
         return 24;
     }
@@ -575,5 +575,5 @@
     // Verify the returned psImage structure member Nchildren is set to zero.
     if (original->children != NULL && original->children->n > 0) {
-        psError(__func__,"psImageFreeChildren didn't set number of children to zero.");
+        psError(PS_ERR_UNKNOWN,true,"psImageFreeChildren didn't set number of children to zero.");
         return 25;
     }
@@ -586,5 +586,5 @@
             preSubsetStruct.col0 != original->col0) {
 
-        psError(__func__,"psImageFreeChildren modified parent's non-children elements.");
+        psError(PS_ERR_UNKNOWN,true,"psImageFreeChildren modified parent's non-children elements.");
         return 27;
     }
@@ -626,5 +626,5 @@
 
         if (subset == NULL) {
-            psError(__func__,"psImageSubsection returned a NULL with a subset of %s.",
+            psError(PS_ERR_UNKNOWN,true,"psImageSubsection returned a NULL with a subset of %s.",
                     sectionStr);
             return 10*i+1;
@@ -632,5 +632,5 @@
 
         if (subset->type.type != PS_TYPE_U32) {
-            psError(__func__,"psImageSubsection output type was not proper(%d, should be %d).",
+            psError(PS_ERR_UNKNOWN,true,"psImageSubsection output type was not proper(%d, should be %d).",
                     subset->type.type, PS_TYPE_U32);
             return 10*i+2;
@@ -638,5 +638,5 @@
 
         if (subset->col0 != x1[i] || subset->row0 != y1[i]) {
-            psError(__func__,"psImageSubsection didn't set properly col0/row0 (%d/%d, should be %d/%d).",
+            psError(PS_ERR_UNKNOWN,true,"psImageSubsection didn't set properly col0/row0 (%d/%d, should be %d/%d).",
                     subset->col0,subset->row0,x1[i],y1[i]);
             return 10*i+3;
@@ -644,15 +644,15 @@
 
         if (subset->parent != original) {
-            psError(__func__,"psImageSubsection didn't set parent.");
+            psError(PS_ERR_UNKNOWN,true,"psImageSubsection didn't set parent.");
             return 10*i+4;
         }
 
         if (subset->children != NULL) {
-            psError(__func__,"psImageSubsection didn't set children to NULL.");
+            psError(PS_ERR_UNKNOWN,true,"psImageSubsection didn't set children to NULL.");
             return 10*i+5;
         }
 
         if (original->children == NULL || original->children->n != i+1) {
-            psError(__func__,"psImageSubsection didn't increment number of children by one per subset.");
+            psError(PS_ERR_UNKNOWN,true,"psImageSubsection didn't increment number of children by one per subset.");
             return 10*i+6;
         }
@@ -660,5 +660,5 @@
 
         if (original->children->data[i] != subset) {
-            psError(__func__,"psImageSubsection didn't properly store the children pointer.");
+            psError(PS_ERR_UNKNOWN,true,"psImageSubsection didn't properly store the children pointer.");
             return 10*i+7;
         }
@@ -667,5 +667,5 @@
         psS32 numRows = y2[i]-y1[i]+1;
         if (subset->numCols != numCols || subset->numRows != numRows) {
-            psError(__func__,"psImageSubsection output size was not proper(%dx%d, should be %dx%d).",
+            psError(PS_ERR_UNKNOWN,true,"psImageSubsection output size was not proper(%dx%d, should be %dx%d).",
                     subset->numCols, subset->numRows, numCols, numRows);
             return 10*i+8;
@@ -675,5 +675,5 @@
             for (psS32 col=0;col<numCols;col++) {
                 if (subset->data.U32[row][col] != original->data.U32[row+y1[i]][col+x1[i]]) {
-                    psError(__func__,"psImageSubset output #1 was wrong at %dx%d (%d vs %d).",
+                    psError(PS_ERR_UNKNOWN,true,"psImageSubset output #1 was wrong at %dx%d (%d vs %d).",
                             row,col,subset->data.U32[row][col], original->data.U32[row+y1[i]][col+x1[i]]);
                     return 10*i+9;
@@ -686,5 +686,5 @@
     subset = psImageSubsection(original,"[64:32,32:64]");
     if (subset != NULL) {
-        psError(__func__,"psImageSubsection didn't return NULL when x1 > x2.");
+        psError(PS_ERR_UNKNOWN,true,"psImageSubsection didn't return NULL when x1 > x2.");
         return 10*i+10;
     }
@@ -693,5 +693,5 @@
     subset = psImageSubsection(original,"[32:64,64:32]");
     if (subset != NULL) {
-        psError(__func__,"psImageSubsection didn't return NULL when y1 > y2.");
+        psError(PS_ERR_UNKNOWN,true,"psImageSubsection didn't return NULL when y1 > y2.");
         return 10*i+11;
     }
@@ -700,5 +700,5 @@
     subset = psImageSubsection(original,"[64:256,32:64]"); // assumes c<256
     if (subset != NULL) {
-        psError(__func__,"psImageSubsection didn't return NULL when x2 > c.");
+        psError(PS_ERR_UNKNOWN, true,"psImageSubsection didn't return NULL when x2 > c.");
         return 10*i+12;
     }
@@ -707,5 +707,5 @@
     subset = psImageSubsection(original,"[32:64,64:256]"); // assumes r==256
     if (subset != NULL) {
-        psError(__func__,"psImageSubsection didn't return NULL when y2 > r.");
+        psError(PS_ERR_UNKNOWN, true,"psImageSubsection didn't return NULL when y2 > r.");
         return 10*i+13;
     }
@@ -714,5 +714,5 @@
     subset = psImageSubsection(original,"32:64,32:64");
     if (subset != NULL) {
-        psError(__func__,"psImageSubsection didn't return NULL when subsection was '32:64,32:64'.");
+        psError(PS_ERR_UNKNOWN, true,"psImageSubsection didn't return NULL when subsection was '32:64,32:64'.");
         return 10*i+14;
     }
@@ -721,5 +721,5 @@
     subset = psImageSubsection(original,"[32-64,32-64]");
     if (subset != NULL) {
-        psError(__func__,"psImageSubsection didn't return NULL when subsection was '[32-64,32-64]'.");
+        psError(PS_ERR_UNKNOWN, true,"psImageSubsection didn't return NULL when subsection was '[32-64,32-64]'.");
         return 10*i+15;
     }
@@ -728,5 +728,5 @@
     subset = psImageSubsection(original,"[32:64,32]");
     if (subset != NULL) {
-        psError(__func__,"psImageSubsection didn't return NULL when subsection was '[32:64,32]'.");
+        psError(PS_ERR_UNKNOWN, true,"psImageSubsection didn't return NULL when subsection was '[32:64,32]'.");
         return 10*i+16;
     }
@@ -735,5 +735,5 @@
     subset = psImageSubsection(NULL,"[32:64,32:64]");
     if (subset != NULL) {
-        psError(__func__,"psImageSubsection didn't return NULL when image was NULL.");
+        psError(PS_ERR_UNKNOWN, true,"psImageSubsection didn't return NULL when image was NULL.");
         return 10*i+17;
     }
@@ -742,5 +742,5 @@
     subset = psImageSubsection(original,NULL);
     if (subset != NULL) {
-        psError(__func__,"psImageSubsection didn't return NULL when subsection was NULL.");
+        psError(PS_ERR_UNKNOWN, true,"psImageSubsection didn't return NULL when subsection was NULL.");
         return 10*i+18;
     }
Index: trunk/psLib/test/image/tst_psImageFFT.c
===================================================================
--- trunk/psLib/test/image/tst_psImageFFT.c	(revision 2262)
+++ trunk/psLib/test/image/tst_psImageFFT.c	(revision 2273)
@@ -6,6 +6,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-27 00:57:33 $
+ *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-11-04 01:05:00 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -85,9 +85,9 @@
     img2 = psImageFFT(img2,img,PS_FFT_FORWARD);
     if (img2->type.type != PS_TYPE_C32) {
-        psError(__func__,"FFT didn't produce complex values?");
+        psError(PS_ERR_UNKNOWN, true,"FFT didn't produce complex values?");
         return 1;
     }
     if (img2->numCols != m || img2->numRows != n) {
-        psError(__func__,"FFT didn't produce proper size result (%dx%d vs. expected %dx%d).",
+        psError(PS_ERR_UNKNOWN, true,"FFT didn't produce proper size result (%dx%d vs. expected %dx%d).",
                 img2->numCols,img2->numRows,m,n);
         return 2;
@@ -103,5 +103,5 @@
                 if (! (col == 0 && (row == 1 || row == n-1))
                         && ! (row == 0 && (col==1 || col == n-1)) ) {
-                    psError(__func__,"Result invalid at %d,%d (%.2f)",col,row,mag);
+                    psError(PS_ERR_UNKNOWN, true,"Result invalid at %d,%d (%.2f)",col,row,mag);
                     return 3;
                 }
@@ -109,5 +109,5 @@
                 if ( (col == 0 && (row == 1 || row == n-1))
                         || (row == 0 && (col==1 || col == n-1)) ) {
-                    psError(__func__,"Result invalid at %d,%d (%.2f)",col,row,mag);
+                    psError(PS_ERR_UNKNOWN, true,"Result invalid at %d,%d (%.2f)",col,row,mag);
                     return 4;
                 }
@@ -120,10 +120,10 @@
 
     if (img3->type.type != PS_TYPE_C32) {
-        psError(__func__,"FFT didn't produce complex values?");
+        psError(PS_ERR_UNKNOWN, true,"FFT didn't produce complex values?");
         return 5;
     }
 
     if (img3->numCols != m || img3->numRows != n) {
-        psError(__func__,"FFT didn't produce proper size result (%dx%d vs. expected %dx%d).",
+        psError(PS_ERR_UNKNOWN, true,"FFT didn't produce proper size result (%dx%d vs. expected %dx%d).",
                 img3->numCols,img3->numRows,m,n);
         return 6;
@@ -136,5 +136,5 @@
             psF32 pixel = creal(img3Row[col])/m/n;
             if (fabsf(pixel-imgRow[col]) > 0.1) {
-                psError(__func__,"Reverse FFT didn't give original image back (%d,%d %.2f vs %.2f)",
+                psError(PS_ERR_UNKNOWN, true,"Reverse FFT didn't give original image back (%d,%d %.2f vs %.2f)",
                         col,row,pixel,imgRow[col]);
                 return 7;
@@ -149,10 +149,10 @@
         char* typeStr;
         PS_TYPE_NAME(typeStr,img3->type.type)
-        psError(__func__,"FFT asked to make real result, but I got a %s type image?",typeStr);
+        psError(PS_ERR_UNKNOWN, true,"FFT asked to make real result, but I got a %s type image?",typeStr);
         return 8;
     }
 
     if (img3->numCols != m || img3->numRows != n) {
-        psError(__func__,"FFT didn't produce proper size result (%dx%d vs. expected %dx%d).",
+        psError(PS_ERR_UNKNOWN, true,"FFT didn't produce proper size result (%dx%d vs. expected %dx%d).",
                 img3->numCols,img3->numRows,m,n);
         return 9;
@@ -165,5 +165,5 @@
             psF32 pixel = img3Row[col]/m/n;
             if (fabsf(pixel-imgRow[col]) > 0.1) {
-                psError(__func__,"Reverse FFT didn't give original image back (%d,%d %.2f vs %.2f)",
+                psError(PS_ERR_UNKNOWN, true,"Reverse FFT didn't give original image back (%d,%d %.2f vs %.2f)",
                         col,row,pixel,imgRow[col]);
                 return 10;
@@ -175,5 +175,5 @@
     psLogMsg(__func__,PS_LOG_INFO,"Following should be an error.");
     if (psImageFFT(NULL,img2,PS_FFT_REVERSE|PS_FFT_FORWARD) != NULL) {
-        psError(__func__,"PS_FFT_REVERSE|PS_FFT_FORWARD option produced something?");
+        psError(PS_ERR_UNKNOWN, true,"PS_FFT_REVERSE|PS_FFT_FORWARD option produced something?");
         return 11;
     }
@@ -181,5 +181,5 @@
     psLogMsg(__func__,PS_LOG_INFO,"Following should be an error.");
     if (psImageFFT(NULL,img2,PS_FFT_FORWARD|PS_FFT_REAL_RESULT) != NULL) {
-        psError(__func__,"PS_FFT_FORWARD|PS_FFT_REAL_RESULT option produced something?");
+        psError(PS_ERR_UNKNOWN, true,"PS_FFT_FORWARD|PS_FFT_REAL_RESULT option produced something?");
         return 12;
     }
@@ -188,5 +188,5 @@
     img4 = psImageFFT(NULL,NULL,PS_FFT_FORWARD);
     if (img4 != NULL ) {
-        psError(__func__,"psImageFFT should return null for a null input image.");
+        psError(PS_ERR_UNKNOWN, true,"psImageFFT should return null for a null input image.");
         return 10;
     }
@@ -197,5 +197,5 @@
     img5 = psImageFFT(NULL,img4,PS_FFT_REAL_RESULT);
     if (img5 != NULL) {
-        psError(__func__,"psImageFFT should return null for an invalid FFT direction.");
+        psError(PS_ERR_UNKNOWN, true,"psImageFFT should return null for an invalid FFT direction.");
         return 11;
     }
@@ -229,9 +229,9 @@
     img2 = psImageReal(img2,img);
     if (img2 == NULL) {
-        psError(__func__,"psImageReal returned a NULL?");
+        psError(PS_ERR_UNKNOWN, true,"psImageReal returned a NULL?");
         return 1;
     }
     if (img2->type.type != PS_TYPE_F32) {
-        psError(__func__,"psImageReal returned a wrong type (%d)?",
+        psError(PS_ERR_UNKNOWN, true,"psImageReal returned a wrong type (%d)?",
                 img2->type.type);
         return 2;
@@ -240,9 +240,9 @@
     img3 = psImageImaginary(img3,img);
     if (img3 == NULL) {
-        psError(__func__,"psImageImaginary returned a NULL?");
+        psError(PS_ERR_UNKNOWN, true,"psImageImaginary returned a NULL?");
         return 3;
     }
     if (img3->type.type != PS_TYPE_F32) {
-        psError(__func__,"psImageImaginary returned a wrong type (%d)?",
+        psError(PS_ERR_UNKNOWN, true,"psImageImaginary returned a wrong type (%d)?",
                 img3->type.type);
         return 4;
@@ -255,10 +255,10 @@
         for (psU32 col=0;col<m;col++) {
             if (fabsf(img2Row[col] - row) > FLT_EPSILON) {
-                psError(__func__,"psImageReal didn't return the real portion at n=%d",
+                psError(PS_ERR_UNKNOWN, true,"psImageReal didn't return the real portion at n=%d",
                         n);
                 return 5;
             }
             if (fabsf(img3Row[col] - col) > FLT_EPSILON) {
-                psError(__func__,"psImageImaginary didn't return the imag portion at n=%d",
+                psError(PS_ERR_UNKNOWN, true,"psImageImaginary didn't return the imag portion at n=%d",
                         n);
                 return 6;
@@ -307,5 +307,5 @@
     // 3. verify that the result is a psC32
     if (img3->type.type != PS_TYPE_C32) {
-        psError(__func__,"Image Type from psImageComplex is not complex? (%d)",
+        psError(PS_ERR_UNKNOWN, true,"Image Type from psImageComplex is not complex? (%d)",
                 img3->type.type);
         return 1;
@@ -319,5 +319,5 @@
             if (fabsf(crealf(img3Row[col]) - row) > FLT_EPSILON ||
                     fabsf(cimagf(img3Row[col]) - col) > FLT_EPSILON) {
-                psError(__func__,"psImageComplex result is invalid (%d,%d, %.2f+%.2fi)",
+                psError(PS_ERR_UNKNOWN, true,"psImageComplex result is invalid (%d,%d, %.2f+%.2fi)",
                         col,row,crealf(img3Row[col]),cimagf(img3Row[col]));
                 return 2;
@@ -334,5 +334,5 @@
     // 8. verify that an appropriate error occurred. (this partially has to be done via inspection)
     if (img3 != NULL) {
-        psError(__func__,"psImageComplex returned a image though input types mismatched.");
+        psError(PS_ERR_UNKNOWN, true,"psImageComplex returned a image though input types mismatched.");
         return 3;
     }
@@ -347,5 +347,5 @@
     // 11. verify thet an appropriate error occurred.
     if (img3 != NULL) {
-        psError(__func__,"psImageComplex returned a image though input sizes mismatched.");
+        psError(PS_ERR_UNKNOWN, true,"psImageComplex returned a image though input sizes mismatched.");
         return 4;
     }
@@ -380,5 +380,5 @@
     // 3. verify result is psC32
     if (img2->type.type != PS_TYPE_C32) {
-        psError(__func__,"the psImageConjugate didn't return a C32 image.");
+        psError(PS_ERR_UNKNOWN, true,"the psImageConjugate didn't return a C32 image.");
         return 1;
     }
@@ -390,5 +390,5 @@
             if (fabsf(crealf(img2Row[col]) - row) > FLT_EPSILON ||
                     fabsf(cimagf(img2Row[col]) + col) > FLT_EPSILON) {
-                psError(__func__,"psImageComplex result is invalid (%d,%d, %.2f+%.2fi)",
+                psError(PS_ERR_UNKNOWN, true,"psImageComplex result is invalid (%d,%d, %.2f+%.2fi)",
                         col,row,crealf(img2Row[col]),cimagf(img2Row[col]));
                 return 2;
@@ -425,5 +425,5 @@
     // 3. verify result is psF32
     if (img2->type.type != PS_TYPE_F32) {
-        psError(__func__,"the type was not PS_TYPE_F32.");
+        psError(PS_ERR_UNKNOWN, true,"the type was not PS_TYPE_F32.");
         return 1;
     }
@@ -438,5 +438,5 @@
 
             if (fabsf(img2Row[col] - power) > 2.0f*FLT_EPSILON) {
-                psError(__func__,"psImagePowerSpectrum result is invalid (%d,%d, %.2f vs %.2f)",
+                psError(PS_ERR_UNKNOWN, true,"psImagePowerSpectrum result is invalid (%d,%d, %.2f vs %.2f)",
                         col,row,img2Row[col],power);
                 return 2;
Index: trunk/psLib/test/image/tst_psImageIO.c
===================================================================
--- trunk/psLib/test/image/tst_psImageIO.c	(revision 2262)
+++ trunk/psLib/test/image/tst_psImageIO.c	(revision 2273)
@@ -6,6 +6,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-27 00:57:33 $
+ *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-11-04 01:05:00 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -97,17 +97,17 @@
         remove(filename); \
         if (! psImageWriteSection(img3,0,0,1,NULL,0,filename)) { \
-            psError(__func__,"Failed to write test image %s",filename); \
+            psError(PS_ERR_UNKNOWN, true,"Failed to write test image %s",filename); \
             return 1; \
         } \
         if (! psImageWriteSection(img,0,0,0,NULL,0,filename)) { \
-            psError(__func__,"Failed to write test image %s",filename); \
+            psError(PS_ERR_UNKNOWN, true,"Failed to write test image %s",filename); \
             return 2; \
         } \
         if (! psImageWriteSection(img,0,0,1,NULL,1,filename)) { \
-            psError(__func__,"Failed to write test image %s",filename); \
+            psError(PS_ERR_UNKNOWN, true,"Failed to write test image %s",filename); \
             return 3; \
         } \
         if (! psImageWriteSection(img3,0,0,0,NULL,1,filename)) { \
-            psError(__func__,"Failed to write test image %s",filename); \
+            psError(PS_ERR_UNKNOWN, true,"Failed to write test image %s",filename); \
             return 4; \
         } \
@@ -119,10 +119,10 @@
         img = psImageReadSection(img,readM0,readN0,readM,readN,0,NULL,0,filename); \
         /*        if (img_ref != img) { */ \
-        /*            psError(__func__,"psImageReadSection didn't recycle the psImage?"); */ \
+        /*            psError(PS_ERR_UNKNOWN, true,"psImageReadSection didn't recycle the psImage?"); */ \
         /*            return 5; */ \
         /*        } */ \
         img3 = psImageReadSection(img3,readM0,readN0,readM,readN,1,NULL,0,filename); \
         if (img3 == NULL) { \
-            psError(__func__,"Failed to read test image %s",filename); \
+            psError(PS_ERR_UNKNOWN, true,"Failed to read test image %s",filename); \
             return 6; \
         } \
@@ -134,10 +134,10 @@
             for (psU32 col = readM0; col < readM; col++) { \
                 if (fabsf(imgRow[col-readM0]-img2Row[col]) > FLT_EPSILON) { \
-                    psError(__func__,"Image changed in I/O operation at %d,%d,0 (%.2f vs %.2f) for %s", \
+                    psError(PS_ERR_UNKNOWN, true,"Image changed in I/O operation at %d,%d,0 (%.2f vs %.2f) for %s", \
                             col,row,(psF32)imgRow[col-readM0],(psF32)img2Row[col],filename); \
                     return 7; \
                 } \
                 if (fabsf(img3Row[col-readM0]-img4Row[col]) > FLT_EPSILON) { \
-                    psError(__func__,"Image changed in I/O operation at %d,%d,1 (%.2f vs %.2f) for %s", \
+                    psError(PS_ERR_UNKNOWN, true,"Image changed in I/O operation at %d,%d,1 (%.2f vs %.2f) for %s", \
                             col,row,(psF32)img3Row[col-readM0],(psF32)img4Row[col],filename); \
                     return 8; \
@@ -152,5 +152,5 @@
         img = psImageReadSection(img,readM0,readN0,readM,readN,1,NULL,1,filename); \
         if (img == NULL) { \
-            psError(__func__,"Failed to read test image %s",filename); \
+            psError(PS_ERR_UNKNOWN, true,"Failed to read test image %s",filename); \
             return 9; \
         } \
@@ -162,10 +162,10 @@
             for (psU32 col = readM0; col < readM; col++) { \
                 if (fabsf(imgRow[col-readM0]-img2Row[col]) > FLT_EPSILON) { \
-                    psError(__func__,"Image changed in I/O operation at %d,%d,0 (%.2f vs %.2f) for %s", \
+                    psError(PS_ERR_UNKNOWN, true,"Image changed in I/O operation at %d,%d,0 (%.2f vs %.2f) for %s", \
                             col,row,(psF32)imgRow[col-readM0],(psF32)img2Row[col],filename); \
                     return 10; \
                 } \
                 if (fabsf(img3Row[col-readM0]-img4Row[col]) > FLT_EPSILON) { \
-                    psError(__func__,"Image changed in I/O operation at %d,%d,1 (%.2f vs %.2f) for %s", \
+                    psError(PS_ERR_UNKNOWN, true,"Image changed in I/O operation at %d,%d,1 (%.2f vs %.2f) for %s", \
                             col,row,(psF32)img3Row[col-readM0],(psF32)img4Row[col],filename); \
                     return 11; \
@@ -204,5 +204,5 @@
     image = psImageReadSection(image,0,0,M,N,0,NULL,0,"foobar.fits");
     if (image != NULL) {
-        psError(__func__,"Image returned though filename did not exist.");
+        psError(PS_ERR_UNKNOWN, true,"Image returned though filename did not exist.");
         return 12;
     }
@@ -220,5 +220,5 @@
     image = psImageReadSection(image,0,0,M,N,0,NULL,0,NULL);
     if (image != NULL) {
-        psError(__func__,"Image returned though filename was NULL.");
+        psError(PS_ERR_UNKNOWN, true,"Image returned though filename was NULL.");
         return 13;
     }
@@ -233,5 +233,5 @@
     image = psImageReadSection(image,0,0,M,N,0,NULL,4,"tmpImages/MxN_F32.fits");
     if (image != NULL) {
-        psError(__func__,"Image returned though extnum was invalid.");
+        psError(PS_ERR_UNKNOWN, true,"Image returned though extnum was invalid.");
         return 14;
     }
@@ -239,5 +239,5 @@
     image = psImageReadSection(image,0,0,M,N,0,"bogus",0,"tmpImages/MxN_F32.fits");
     if (image != NULL) {
-        psError(__func__,"Image returned though extnum was invalid.");
+        psError(PS_ERR_UNKNOWN, true,"Image returned though extnum was invalid.");
         return 15;
     }
@@ -302,9 +302,9 @@
         ;
     if (! psImageWriteSection(img,0,0,0,NULL,0,"tmpImages/writeTest.fits")) {
-        psError(__func__,"Couldn't write writeTest.fits.");
+        psError(PS_ERR_UNKNOWN, true,"Couldn't write writeTest.fits.");
         return 14;
     }
     if (! psImageWriteSection(img2,0,0,0,NULL,0,"tmpImages/writeTest.fits")) {
-        psError(__func__,"Couldn't overwrite writeTest.fits.");
+        psError(PS_ERR_UNKNOWN, true,"Couldn't overwrite writeTest.fits.");
         return 15;
     }
@@ -315,5 +315,5 @@
     img = psImageReadSection(NULL,0,0,m,n,0,NULL,0,"tmpImages/writeTest.fits");
     if (img == NULL) {
-        psError(__func__,"Could not read in writeTest.fits.");
+        psError(PS_ERR_UNKNOWN, true,"Could not read in writeTest.fits.");
         return 16;
     }
@@ -322,5 +322,5 @@
         for (psU32 col=0;col<m;col++) {
             if (fabsf(imgRow[col] - (row+2*col)) > FLT_EPSILON) {
-                psError(__func__,"The image values were not overwritten at %d,%d (%.2f vs %.2f)",
+                psError(PS_ERR_UNKNOWN, true,"The image values were not overwritten at %d,%d (%.2f vs %.2f)",
                         col,row,imgRow[col],(row+2*col));
                 return 17;
@@ -337,5 +337,5 @@
     psLogMsg(__func__,PS_LOG_INFO,"Following should generate an error message because input image is null.");
     if ( psImageWriteSection(NULL,0,0,0,NULL,0,"tmpImages/writeTest.fits")) {
-        psError(__func__,"psImageWriteSection did not return false when input image is NULL.");
+        psError(PS_ERR_UNKNOWN, true,"psImageWriteSection did not return false when input image is NULL.");
         return 20;
     }
@@ -347,5 +347,5 @@
     GENIMAGE(img,32,32,S8,row+2*col);
     if ( psImageWriteSection(img,0,0,0,NULL,0,"tmpImages/writeTest.fits")) {
-        psError(__func__,"psImageWriteSection did not return false when input image type invalid.");
+        psError(PS_ERR_UNKNOWN, true,"psImageWriteSection did not return false when input image type invalid.");
         return 21;
     }
@@ -358,5 +358,5 @@
     GENIMAGE(img,32,32,U8,row+2*col);
     if ( psImageWriteSection(img,0,0,0,NULL,0,"panstarrs/writeFits.fits")) {
-        psError(__func__,"psImageWriteSection did not return false for invalid path name.");
+        psError(PS_ERR_UNKNOWN, true,"psImageWriteSection did not return false for invalid path name.");
         return 22;
     }
@@ -370,5 +370,5 @@
     psLogMsg(__func__,PS_LOG_INFO,"Following should be an error for passing invalid FITS file.");
     if ( psImageWriteSection(img,0,0,0,NULL,0,"tmpImages/writeInvalidFile.fits")) {
-        psError(__func__,"psImageWriteSection did not return false for invalid FITS file.");
+        psError(PS_ERR_UNKNOWN, true,"psImageWriteSection did not return false for invalid FITS file.");
         return 22;
     }
@@ -381,5 +381,5 @@
     psLogMsg(__func__,PS_LOG_INFO,"Following should be an error for invalid extension name.");
     if ( psImageWriteSection(img,0,0,0,"ext2",0,"tmpImages/writeTest.fits")) {
-        psError(__func__,"psImageWriteSection did not return false for invalid extension name.");
+        psError(PS_ERR_UNKNOWN, true,"psImageWriteSection did not return false for invalid extension name.");
         return 23;
     }
@@ -390,5 +390,5 @@
     psLogMsg(__func__,PS_LOG_INFO,"Following should be an error for invalid extension number.");
     if ( psImageWriteSection(img,0,0,0,NULL,99,"tmpImages/writeTest.fits")) {
-        psError(__func__,"psImageWriteSection did not return false for invalid extension number.");
+        psError(PS_ERR_UNKNOWN, true,"psImageWriteSection did not return false for invalid extension number.");
         return 24;
     }
Index: trunk/psLib/test/image/tst_psImageManip.c
===================================================================
--- trunk/psLib/test/image/tst_psImageManip.c	(revision 2262)
+++ trunk/psLib/test/image/tst_psImageManip.c	(revision 2273)
@@ -6,6 +6,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-27 00:57:33 $
+ *  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-11-04 01:05:00 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -119,5 +119,5 @@
             } \
             if (fabsf(imgRow[col]-value) > FLT_EPSILON) { \
-                psError(__func__,"Pixel value is not as expected (%g vs %g) at %u,%u", \
+                psError(PS_ERR_UNKNOWN, true,"Pixel value is not as expected (%g vs %g) at %u,%u", \
                         (psF64)imgRow[col],(psF64)value,col,row); \
                 return 1; \
@@ -126,5 +126,5 @@
     } \
     if (retVal != numClipped) { \
-        psError(__func__,"Expected %d clips, but got %d", \
+        psError(PS_ERR_UNKNOWN, true,"Expected %d clips, but got %d", \
                 numClipped,retVal); \
         return 2; \
@@ -159,5 +159,5 @@
             if (fabsf(creal(imgRow[col])-creal(value)) > FLT_EPSILON || \
                     fabsf(cimag(imgRow[col])-cimag(value)) > FLT_EPSILON) { \
-                psError(__func__,"Pixel value is not as expected (%.2f+%.2fi vs %.2f+%.2fi) at %u,%u", \
+                psError(PS_ERR_UNKNOWN, true,"Pixel value is not as expected (%.2f+%.2fi vs %.2f+%.2fi) at %u,%u", \
                         creal(imgRow[col]),cimag(imgRow[col]),creal(value),cimag(value),col,row); \
                 return 1; \
@@ -166,5 +166,5 @@
     } \
     if (retVal != numClipped) { \
-        psError(__func__,"Expected %d clips, but got %d", \
+        psError(PS_ERR_UNKNOWN, true,"Expected %d clips, but got %d", \
                 numClipped,retVal); \
         return 2; \
@@ -198,5 +198,5 @@
     retVal = psImageClip(NULL,min,-1.0f,max,-2.0f);
     if (retVal != 0) {
-        psError(__func__,"Expected zero return for clips of a NULL image.");
+        psError(PS_ERR_UNKNOWN, true,"Expected zero return for clips of a NULL image.");
         return 3;
     }
@@ -207,5 +207,5 @@
     retVal = psImageClip(img,max,-1.0f,min,-2.0f);
     if (retVal != 0) {
-        psError(__func__,"Expected zero return for clips when max < min.");
+        psError(PS_ERR_UNKNOWN, true,"Expected zero return for clips when max < min.");
         return 4;
     }
@@ -217,5 +217,5 @@
     retVal = psImageClip(img,min,-1.0f,max,-2.0f);
     if (retVal != 0) {
-        psError(__func__,"Expected zero return for clip of invalid image type.");
+        psError(PS_ERR_UNKNOWN, true,"Expected zero return for clip of invalid image type.");
         return 5;
     }
@@ -276,5 +276,5 @@
             } \
             if (fabsf(imgRow[col]-value) > FLT_EPSILON) { \
-                psError(__func__,"Pixel value is not as expected (%f vs %f) at %d,%d", \
+                psError(PS_ERR_UNKNOWN, true,"Pixel value is not as expected (%f vs %f) at %d,%d", \
                         imgRow[col],value,col,row); \
                 return 1; \
@@ -283,5 +283,5 @@
     } \
     if (retVal != numClipped) { \
-        psError(__func__,"Expected %d clips, but got %d", \
+        psError(PS_ERR_UNKNOWN, true,"Expected %d clips, but got %d", \
                 numClipped,retVal); \
         return 2; \
@@ -299,5 +299,5 @@
     retVal = psImageClipNaN(NULL,-1.0f);
     if (retVal != 0) {
-        psError(__func__,"Expected zero return for clips of a NULL image.");
+        psError(PS_ERR_UNKNOWN, true,"Expected zero return for clips of a NULL image.");
         return 3;
     }
@@ -309,5 +309,5 @@
     retVal = psImageClipNaN(img,2.0f);
     if (retVal != 0) {
-        psError(__func__,"Expected zero return for clip of invalid image type.");
+        psError(PS_ERR_UNKNOWN, true,"Expected zero return for clip of invalid image type.");
         return 4;
     }
@@ -377,5 +377,5 @@
             } \
             if (cabs(imgRow[col]-value) > FLT_EPSILON) { \
-                psError(__func__,"Pixel value is not as expected (%g%+gi vs %g%+gi) at %d,%d", \
+                psError(PS_ERR_UNKNOWN, true,"Pixel value is not as expected (%g%+gi vs %g%+gi) at %d,%d", \
                         creal(imgRow[col]),cimag(imgRow[col]),creal(value),cimag(value),col,row); \
                 return 1; \
@@ -384,5 +384,5 @@
     } \
     if (retVal != numClipped) { \
-        psError(__func__,"Expected %d clips, but got %d", \
+        psError(PS_ERR_UNKNOWN, true,"Expected %d clips, but got %d", \
                 numClipped,retVal); \
         return 2; \
@@ -408,5 +408,5 @@
     retVal = psImageClipComplexRegion(NULL,0,0,0,0);
     if (retVal != 0) {
-        psError(__func__,"Expected zero return for clips of a NULL image.");
+        psError(PS_ERR_UNKNOWN, true,"Expected zero return for clips of a NULL image.");
         return 3;
     }
@@ -427,5 +427,5 @@
     retVal = psImageClipComplexRegion(img,10.0+I*1.0,-1.0,5.0+5.0*I,-2.0);
     if (retVal != 0) {
-        psError(__func__,"Expected zero return for creal(min)>creal(max).");
+        psError(PS_ERR_UNKNOWN, true,"Expected zero return for creal(min)>creal(max).");
         return 3;
     }
@@ -433,5 +433,5 @@
     retVal = psImageClipComplexRegion(img,1.0+I*10.0,-1.0,5.0+5.0*I,-2.0);
     if (retVal != 0) {
-        psError(__func__,"Expected zero return for cimag(min)>cimag(max).");
+        psError(PS_ERR_UNKNOWN, true,"Expected zero return for cimag(min)>cimag(max).");
         return 3;
     }
@@ -439,5 +439,5 @@
     retVal = psImageClipComplexRegion(img,10.0+I*10.0,-1.0,5.0+5.0*I,-2.0);
     if (retVal != 0) {
-        psError(__func__,"Expected zero return for min>max.");
+        psError(PS_ERR_UNKNOWN, true,"Expected zero return for min>max.");
         return 3;
     }
@@ -457,5 +457,5 @@
                                       0.0);
     if (retVal != 0) {
-        psError(__func__,"Expected zero return for vmin not in datatype range.");
+        psError(PS_ERR_UNKNOWN, true,"Expected zero return for vmin not in datatype range.");
         return 80;
     }
@@ -468,5 +468,5 @@
                                       0.0);
     if (retVal != 0) {
-        psError(__func__,"Expected zero return for vmin not in datatype range.");
+        psError(PS_ERR_UNKNOWN, true,"Expected zero return for vmin not in datatype range.");
         return 81;
     }
@@ -479,5 +479,5 @@
                                       0.0);
     if (retVal != 0) {
-        psError(__func__,"Expected zero return for vmin not in datatype range.");
+        psError(PS_ERR_UNKNOWN, true,"Expected zero return for vmin not in datatype range.");
         return 82;
     }
@@ -490,5 +490,5 @@
                                       0.0);
     if (retVal != 0) {
-        psError(__func__,"Expected zero return for vmin not in datatype range.");
+        psError(PS_ERR_UNKNOWN, true,"Expected zero return for vmin not in datatype range.");
         return 83;
     }
@@ -501,5 +501,5 @@
                                       -2.0*(double)FLT_MAX);
     if (retVal != 0) {
-        psError(__func__,"Expected zero return for vmax not in datatype range.");
+        psError(PS_ERR_UNKNOWN, true,"Expected zero return for vmax not in datatype range.");
         return 84;
     }
@@ -512,5 +512,5 @@
                                       2.0*(double)FLT_MAX);
     if (retVal != 0) {
-        psError(__func__,"Expected zero return for vmax not in datatype range.");
+        psError(PS_ERR_UNKNOWN, true,"Expected zero return for vmax not in datatype range.");
         return 85;
     }
@@ -523,5 +523,5 @@
                                       -2.0*(double)FLT_MAX*I);
     if (retVal != 0) {
-        psError(__func__,"Expected zero return for vmax not in datatype range.");
+        psError(PS_ERR_UNKNOWN, true,"Expected zero return for vmax not in datatype range.");
         return 87;
     }
@@ -534,5 +534,5 @@
                                       2.0*(double)FLT_MAX*I);
     if (retVal != 0) {
-        psError(__func__,"Expected zero return for vmax not in datatype range.");
+        psError(PS_ERR_UNKNOWN, true,"Expected zero return for vmax not in datatype range.");
         return 88;
     }
@@ -552,5 +552,5 @@
                                       0.0);
     if (retVal == 0) {
-        psError(__func__,"Didn't expect zero return for vmin > vmax.");
+        psError(PS_ERR_UNKNOWN, true,"Didn't expect zero return for vmin > vmax.");
         return 83;
     }
@@ -573,5 +573,5 @@
     retVal = psImageClipComplexRegion(img,2.0,10.0,5.0,0.0);
     if (retVal != 0) {
-        psError(__func__,"Expected zero return for clip of invalid image type.");
+        psError(PS_ERR_UNKNOWN, true,"Expected zero return for clip of invalid image type.");
         return 84;
     }
@@ -625,5 +625,5 @@
     retVal = psImageOverlaySection(img,img2,c/4,r/4,OPSTRING); \
     if (retVal != 0) { \
-        psError(__func__,"psImageOverlaySection returned non-zero %s op",OPSTRING); \
+        psError(PS_ERR_UNKNOWN, true,"psImageOverlaySection returned non-zero %s op",OPSTRING); \
         return 1; \
     } \
@@ -637,10 +637,10 @@
             } \
             if (fabsf(imgRow[col] - val) > FLT_EPSILON) { \
-                psError(__func__,"Value incorrect at %d,%d (%.2f vs %.2f for %s)", \
+                psError(PS_ERR_UNKNOWN, true,"Value incorrect at %d,%d (%.2f vs %.2f for %s)", \
                         col,row,imgRow[col],val,OPSTRING); \
                 return 2; \
             } \
             if (row < r/2 && col < c/2 && fabsf(img2Row[col] - 2.0) > FLT_EPSILON) { \
-                psError(__func__,"Overlay modified at %d,%d (%.2f for %s)", \
+                psError(PS_ERR_UNKNOWN, true,"Overlay modified at %d,%d (%.2f for %s)", \
                         col,row,img2Row[col],OPSTRING); \
                 return 2; \
@@ -706,5 +706,5 @@
     retVal = psImageOverlaySection(img,img2,c/4,r/4,"+");
     if (retVal == 0) {
-        psError(__func__,"psImageOverlaySection returned zero even though "
+        psError(PS_ERR_UNKNOWN, true,"psImageOverlaySection returned zero even though "
                 "overlay too big");
         return 3;
@@ -714,5 +714,5 @@
         for (unsigned col=0;col<c;col++) {
             if (imgRow[col] != 6.0f) {
-                psError(__func__,"Input image modified when overlay size too big");
+                psError(PS_ERR_UNKNOWN, true,"Input image modified when overlay size too big");
                 return 4;
             }
@@ -729,5 +729,5 @@
     retVal = psImageOverlaySection(img,NULL,c/4,r/4,"+");
     if (retVal == 0) {
-        psError(__func__,"psImageOverlaySection returned zero even though "
+        psError(PS_ERR_UNKNOWN, true,"psImageOverlaySection returned zero even though "
                 "overlay too big");
         return 5;
@@ -737,5 +737,5 @@
         for (unsigned col=0;col<c;col++) {
             if (imgRow[col] != 6.0f) {
-                psError(__func__,"Input image modified when overlay NULL");
+                psError(PS_ERR_UNKNOWN, true,"Input image modified when overlay NULL");
                 return 6;
             }
@@ -751,5 +751,5 @@
     retVal = psImageOverlaySection(NULL,img2,c/4,r/4,"+");
     if (retVal == 0) {
-        psError(__func__,"psImageOverlaySection returned zero even though "
+        psError(PS_ERR_UNKNOWN, true,"psImageOverlaySection returned zero even though "
                 "overlay too big");
         return 7;
@@ -764,5 +764,5 @@
     retVal = psImageOverlaySection(img,img2,0,0,"$");
     if (retVal == 0) {
-        psError(__func__,"psImageOverlaySection returned zero even though "
+        psError(PS_ERR_UNKNOWN, true,"psImageOverlaySection returned zero even though "
                 "overlay operator is invalid");
         return 8;
@@ -777,5 +777,5 @@
     retVal = psImageOverlaySection(img,img2,0,0,NULL);
     if(retVal == 0) {
-        psError(__func__,"psImageOverlaySection returned zero even though "
+        psError(PS_ERR_UNKNOWN, true,"psImageOverlaySection returned zero even though "
                 "overlay operator is NULL");
         return 9;
@@ -790,5 +790,5 @@
     retVal = psImageOverlaySection(img,img3,0,0,"+");
     if(retVal == 0) {
-        psError(__func__,"psImageOverlaySection returned zero eventhough "
+        psError(PS_ERR_UNKNOWN, true,"psImageOverlaySection returned zero eventhough "
                 " overlay image type is different than input image.");
         return 10;
@@ -803,5 +803,5 @@
     retVal = psImageOverlaySection(img3,img4,0,0,"+");
     if(retVal == 0) {
-        psError(__func__,"psImageOverlaySection returned zero eventhough "
+        psError(PS_ERR_UNKNOWN, true,"psImageOverlaySection returned zero eventhough "
                 "overlay and image type are invalid type.");
         return 11;
@@ -820,5 +820,5 @@
     retVal = psImageOverlaySection(img,img2,0,0,"/");
     if (retVal != 0) {
-        psError(__func__,"psImageOverlaySection returned non-zero when "
+        psError(PS_ERR_UNKNOWN, true,"psImageOverlaySection returned non-zero when "
                 "checking divide-by-zero.");
         return 12;
@@ -906,9 +906,9 @@
     out = psImageRebin(NULL,in,NULL,0,4,&stats); \
     if (out == NULL) { \
-        psError(__func__,"psImageRebin returned a NULL pointer!?"); \
+        psError(PS_ERR_UNKNOWN, true,"psImageRebin returned a NULL pointer!?"); \
         return 1; \
     } \
     if (out->numRows != 4 || out->numCols != 4) { \
-        psError(__func__,"psImageRebin didn't produce the proper size image " \
+        psError(PS_ERR_UNKNOWN, true,"psImageRebin didn't produce the proper size image " \
                 "(%d x %d).", \
                 out->numCols, out->numRows); \
@@ -920,5 +920,5 @@
         for (psS32 col = 0; col<4; col++) { \
             if (fabsf((float)outRow[col]-(float)truthRow[col]) > FLT_EPSILON) { \
-                psError(__func__,"psImageRebin didn't produce the proper mean " \
+                psError(PS_ERR_UNKNOWN, true,"psImageRebin didn't produce the proper mean " \
                         "result at (%d,%d) [%f vs %f].", \
                         col,row,outRow[col],truthRow[col]); \
@@ -934,5 +934,5 @@
         for ( psS32 col = 0; col<4; col++) { \
             if(abs((psS32)outRow[col]-(psS32)truthRow[col]) > FLT_EPSILON) { \
-                psError(__func__,"psImageRebin with mask didn't produce the proper mean " \
+                psError(PS_ERR_UNKNOWN, true,"psImageRebin with mask didn't produce the proper mean " \
                         "result at (%d,%d) [%f vs %f].", \
                         col,row,outRow[col],truthRow[col]); \
@@ -944,13 +944,13 @@
     out2 = psImageRebin(out,in,NULL,0,3,&stats); \
     if (out != out2) { \
-        psError(__func__,"psImageRebin didn't recycle a psImage properly!?"); \
+        psError(PS_ERR_UNKNOWN, true,"psImageRebin didn't recycle a psImage properly!?"); \
         return 7; \
     } \
     if (out == NULL) { \
-        psError(__func__,"psImageRebin returned a NULL pointer!?"); \
+        psError(PS_ERR_UNKNOWN, true,"psImageRebin returned a NULL pointer!?"); \
         return 4; \
     } \
     if (out->numRows != 6 || out->numCols != 6) { \
-        psError(__func__,"psImageRebin didn't produce the proper size image " \
+        psError(PS_ERR_UNKNOWN, true,"psImageRebin didn't produce the proper size image " \
                 "(%d x %d).", \
                 out->numCols, out->numRows); \
@@ -962,5 +962,5 @@
         for (psS32 col = 0; col<6; col++) { \
             if (fabsf((float)outRow[col]-(float)truthRow[col]) > FLT_EPSILON) { \
-                psError(__func__,"psImageRebin didn't produce the proper " \
+                psError(PS_ERR_UNKNOWN, true,"psImageRebin didn't produce the proper " \
                         "max result at (%d,%d) [%f vs %f].", \
                         col,row,outRow[col],truthRow[col]); \
@@ -990,5 +990,5 @@
     out = psImageRebin(NULL,in,NULL,0,4,&stats);
     if(out != NULL) {
-        psError(__func__,"psImageRebin return an image eventhough the "
+        psError(PS_ERR_UNKNOWN, true,"psImageRebin return an image eventhough the "
                 "type is not handled.");
         return 14;
@@ -999,5 +999,5 @@
     out = psImageRebin(NULL,in,mask,1,4,&stats);
     if(out != NULL) {
-        psError(__func__,"psImageRebin return an image eventhough the "
+        psError(PS_ERR_UNKNOWN, true,"psImageRebin return an image eventhough the "
                 "mask is not the correct type.");
         return 17;
@@ -1012,5 +1012,5 @@
 
     if (out2 != NULL) {
-        psError(__func__,"psImageRebin returned an image though the input was "
+        psError(PS_ERR_UNKNOWN, true,"psImageRebin returned an image though the input was "
                 "NULL!?");
         return 8;
@@ -1024,5 +1024,5 @@
 
     if (out2 != NULL) {
-        psError(__func__,"psImageRebin returned an image though the scale was "
+        psError(PS_ERR_UNKNOWN, true,"psImageRebin returned an image though the scale was "
                 "zero!?");
         return 9;
@@ -1035,5 +1035,5 @@
 
     if (out2 != NULL) {
-        psError(__func__,"psImageRebin returned an image though the stats was "
+        psError(PS_ERR_UNKNOWN, true,"psImageRebin returned an image though the stats was "
                 "NULL!?");
         return 10;
@@ -1049,5 +1049,5 @@
 
     if (out2 != NULL) {
-        psError(__func__,"psImageRebin returned an image though the stats "
+        psError(PS_ERR_UNKNOWN, true,"psImageRebin returned an image though the stats "
                 "options was zero!?");
         return 11;
@@ -1059,5 +1059,5 @@
 
     if (out2 != NULL) {
-        psError(__func__,"psImageRebin returned an image though the stats "
+        psError(PS_ERR_UNKNOWN, true,"psImageRebin returned an image though the stats "
                 "options was PS_STAT_USE_RANGE!?");
         return 12;
@@ -1072,5 +1072,5 @@
 
     if (out2 != NULL) {
-        psError(__func__,"psImageRebin returned an image though the stats "
+        psError(PS_ERR_UNKNOWN, true,"psImageRebin returned an image though the stats "
                 "options was PS_STAT_SAMPLE_MEAN+PS_STAT_MAX!?");
         return 13;
@@ -1121,5 +1121,5 @@
         for (psS32 col=0;col<cols;col++) {
             if (inRow[col] != outRow[col]) {
-                psError(__func__,"psImageRoll didn't produce expected result "
+                psError(PS_ERR_UNKNOWN, true,"psImageRoll didn't produce expected result "
                         "at %d,%d (%f vs %f) for dx=0, dy=0.",
                         col,row,inRow[col],outRow[col]);
@@ -1135,5 +1135,5 @@
         for (psS32 col=0;col<cols;col++) {
             if (inRow[(col+cols/4) % cols] != outRow[col]) {
-                psError(__func__,"psImageRoll didn't produce expected result "
+                psError(PS_ERR_UNKNOWN, true,"psImageRoll didn't produce expected result "
                         "at %d,%d (%f vs %f) for dx=cols/4, dy=0.",
                         col,row,inRow[(col+cols/4) % cols],outRow[col]);
@@ -1146,5 +1146,5 @@
     // parameter out if provided.
     if (out2 != out) {
-        psError(__func__,"psImageRoll didn't recycle my out psImage!?");
+        psError(PS_ERR_UNKNOWN, true,"psImageRoll didn't recycle my out psImage!?");
         return 1;
     }
@@ -1156,5 +1156,5 @@
         for (psS32 col=0;col<cols;col++) {
             if (inRow[col] != outRow[col]) {
-                psError(__func__,"psImageRoll didn't produce expected result "
+                psError(PS_ERR_UNKNOWN, true,"psImageRoll didn't produce expected result "
                         "at %d,%d (%f vs %f) for dx=0, dy=rows/4.",
                         col,row,inRow[col],outRow[col]);
@@ -1170,5 +1170,5 @@
         for (psS32 col=0;col<cols;col++) {
             if (inRow[(col+cols/4) % cols] != outRow[col]) {
-                psError(__func__,"psImageRoll didn't produce expected result "
+                psError(PS_ERR_UNKNOWN, true,"psImageRoll didn't produce expected result "
                         "at %d,%d (%f vs %f) for dx=cols/4, dy=rows/4.",
                         col,row,inRow[(col+cols/4) % cols],outRow[col]);
@@ -1184,5 +1184,5 @@
         for (psS32 col=0;col<cols;col++) {
             if (inRow[(col+(cols-cols/4)) % cols] != outRow[col]) {
-                psError(__func__,"psImageRoll didn't produce expected result "
+                psError(PS_ERR_UNKNOWN, true,"psImageRoll didn't produce expected result "
                         "at %d,%d (%f vs %f) for dx=-cols/4, dy=0.",
                         col,row,inRow[(col+(cols-cols/4)) % cols],outRow[col]);
@@ -1198,5 +1198,5 @@
         for (psS32 col=0;col<cols;col++) {
             if (inRow[col] != outRow[col]) {
-                psError(__func__,"psImageRoll didn't produce expected result "
+                psError(PS_ERR_UNKNOWN, true,"psImageRoll didn't produce expected result "
                         "at %d,%d (%f vs %f) for dx=0, dy=-rows/4.",
                         col,row,inRow[col],outRow[col]);
@@ -1212,5 +1212,5 @@
         for (psS32 col=0;col<cols;col++) {
             if (inRow[(col+cols-cols/4) % cols] != outRow[col]) {
-                psError(__func__,"psImageRoll didn't produce expected result "
+                psError(PS_ERR_UNKNOWN, true,"psImageRoll didn't produce expected result "
                         "at %d,%d (%f vs %f) for dx=cols/4, dy=rows/4.",
                         col,row,inRow[(col+cols-cols/4) % cols],outRow[col]);
@@ -1226,5 +1226,5 @@
     out2 = psImageRoll(NULL,NULL,0,0);
     if (out2 != NULL) {
-        psError(__func__,"psImageRoll did not return NULL though input image was NULL!?");
+        psError(PS_ERR_UNKNOWN, true,"psImageRoll did not return NULL though input image was NULL!?");
         return 2;
     }
@@ -1249,5 +1249,5 @@
         for (psS32 col=0;col<cols1;col++) { \
             if (inRow[(col+cols1/4)%cols1] != outRow[col]) { \
-                psError(__func__,"psImageRoll didn't produce expected result " \
+                psError(PS_ERR_UNKNOWN, true,"psImageRoll didn't produce expected result " \
                         "at %d,%d (%f vs %f) for dx=0, dy=0.", \
                         col,row,(float)inRow[col],(float)outRow[col]); \
@@ -1346,9 +1346,9 @@
         // parameter out if provided.
         if (oldOut != NULL && oldOut != fOut) {
-            psError(__func__,"the output recycle functionality failed");
+            psError(PS_ERR_UNKNOWN, true,"the output recycle functionality failed");
             return 2;
         }
         if (oldBiOut != NULL && oldBiOut != fBiOut) {
-            psError(__func__,"the output recycle functionality failed");
+            psError(PS_ERR_UNKNOWN, true,"the output recycle functionality failed");
             return 4;
         }
@@ -1356,17 +1356,17 @@
         sBiOut = psImageRotate(sBiOut,sImg,rot,-1.0,PS_INTERPOLATE_BILINEAR);
         if (! psImageWriteSection(fOut,0,0,0,NULL,index,"temp/fOut.fits") ) {
-            psError(__func__,"Can not write to temp/fOut.fits, so why continue!?");
+            psError(PS_ERR_UNKNOWN, true,"Can not write to temp/fOut.fits, so why continue!?");
             return 20;
         }
         if (! psImageWriteSection(sOut,0,0,0,NULL,index,"temp/sOut.fits") ) {
-            psError(__func__,"Can not write to temp/sOut.fits, so why continue!?");
+            psError(PS_ERR_UNKNOWN, true,"Can not write to temp/sOut.fits, so why continue!?");
             return 21;
         }
         if (! psImageWriteSection(fBiOut,0,0,0,NULL,index,"temp/fBiOut.fits") ) {
-            psError(__func__,"Can not write to temp/fBiOut.fits, so why continue!?");
+            psError(PS_ERR_UNKNOWN, true,"Can not write to temp/fBiOut.fits, so why continue!?");
             return 40;
         }
         if (! psImageWriteSection(sBiOut,0,0,0,NULL,index,"temp/sBiOut.fits") ) {
-            psError(__func__,"Can not write to temp/sBiOut.fits, so why continue!?");
+            psError(PS_ERR_UNKNOWN, true,"Can not write to temp/sBiOut.fits, so why continue!?");
             return 41;
         }
@@ -1378,10 +1378,10 @@
         sBiTruth = psImageReadSection(sBiTruth,0,0,0,0,0,NULL,index,"verified/sBiOut.fits");
         if (fTruth == NULL) {
-            psError(__func__,"verified psF32 image failed to be read (%d deg. rotation)",
+            psError(PS_ERR_UNKNOWN, true,"verified psF32 image failed to be read (%d deg. rotation)",
                     rot);
             fail = true;
         } else {
             if (fTruth->numRows != fOut->numRows || fTruth->numCols != fOut->numCols) {
-                psError(__func__,"Rotated float image size did not match truth "
+                psError(PS_ERR_UNKNOWN, true,"Rotated float image size did not match truth "
                         "image for %d deg rotation (%dx%d vs %dx%d).",
                         rot,fOut->numCols,fOut->numRows,fTruth->numCols,fTruth->numRows);
@@ -1393,5 +1393,5 @@
                     for (psS32 col=0;col<fTruth->numCols;col++) {
                         if (fabsf(truthRow[col]-outRow[col]) > 1) {
-                            psError(__func__,"Float Image mismatch (%f vs %f) at %d,%d.",
+                            psError(PS_ERR_UNKNOWN, true,"Float Image mismatch (%f vs %f) at %d,%d.",
                                     outRow[col], truthRow[col],col,row);
                             fail = true;
@@ -1403,5 +1403,5 @@
 
         if (sTruth == NULL) {
-            psError(__func__,"verified psS16 image failed to be read "
+            psError(PS_ERR_UNKNOWN, true,"verified psS16 image failed to be read "
                     "(%d deg. rotation)",rot);
             fail = true;
@@ -1409,5 +1409,5 @@
             if (sTruth->numRows != sOut->numRows ||
                     sTruth->numCols != sOut->numCols) {
-                psError(__func__,"Rotated psS16 image size did not match truth "
+                psError(PS_ERR_UNKNOWN, true,"Rotated psS16 image size did not match truth "
                         "image for %d deg rotation.",rot);
                 fail = true;
@@ -1418,5 +1418,5 @@
                     for (psS32 col=0;col<sTruth->numCols;col++) {
                         if (fabsf(truthRow[col]-outRow[col]) > 1) {
-                            psError(__func__,"Short Image mismatch (%d vs %d) "
+                            psError(PS_ERR_UNKNOWN, true,"Short Image mismatch (%d vs %d) "
                                     "at %d,%d.",
                                     outRow[col], truthRow[col],col,row);
@@ -1430,10 +1430,10 @@
 
         if (fBiTruth == NULL) {
-            psError(__func__,"verified psF32 Bi image failed to be read (%d deg. rotation)",
+            psError(PS_ERR_UNKNOWN, true,"verified psF32 Bi image failed to be read (%d deg. rotation)",
                     rot);
             fail = true;
         } else {
             if (fBiTruth->numRows != fBiOut->numRows || fBiTruth->numCols != fBiOut->numCols) {
-                psError(__func__,"Rotated float image size did not match truth "
+                psError(PS_ERR_UNKNOWN, true,"Rotated float image size did not match truth "
                         "image for %d deg rotation (%dx%d vs %dx%d). BILINEAR",
                         rot,fBiOut->numCols,fBiOut->numRows,fBiTruth->numCols,fBiTruth->numRows);
@@ -1445,5 +1445,5 @@
                     for (psS32 col=0;col<fBiTruth->numCols;col++) {
                         if (fabsf(truthRow[col]-outRow[col]) > 1) {
-                            psError(__func__,"Float Image mismatch (%f vs %f) at %d,%d. BILINEAR",
+                            psError(PS_ERR_UNKNOWN, true,"Float Image mismatch (%f vs %f) at %d,%d. BILINEAR",
                                     outRow[col], truthRow[col],col,row);
                             fail = true;
@@ -1455,5 +1455,5 @@
 
         if (sBiTruth == NULL) {
-            psError(__func__,"verified psS16 image failed to be read "
+            psError(PS_ERR_UNKNOWN, true,"verified psS16 image failed to be read "
                     "(%d deg. rotation) BILINEAR",rot);
             fail = true;
@@ -1461,5 +1461,5 @@
             if (sBiTruth->numRows != sBiOut->numRows ||
                     sBiTruth->numCols != sBiOut->numCols) {
-                psError(__func__,"Rotated psS16 image size did not match truth "
+                psError(PS_ERR_UNKNOWN, true,"Rotated psS16 image size did not match truth "
                         "image for %d deg rotation. BILINEAR",rot);
                 fail = true;
@@ -1470,5 +1470,5 @@
                     for (psS32 col=0;col<sBiTruth->numCols;col++) {
                         if (fabsf(truthRow[col]-outRow[col]) > 1) {
-                            psError(__func__,"Short Image mismatch (%d vs %d) "
+                            psError(PS_ERR_UNKNOWN, true,"Short Image mismatch (%d vs %d) "
                                     "at %d,%d. BILINEAR",
                                     outRow[col], truthRow[col],col,row);
@@ -1487,5 +1487,5 @@
             s32Out = psImageRotate(s32Out,s32Img,rot,-1.0,PS_INTERPOLATE_FLAT);
             if( s32Out != NULL ) {
-                psError(__func__,"psImage returned is not NULL for invalid image type.");
+                psError(PS_ERR_UNKNOWN, true,"psImage returned is not NULL for invalid image type.");
                 return 5;
             }
@@ -1496,5 +1496,5 @@
 
     if (fail) {
-        psError(__func__,"One or more images didn't match truth or truth did "
+        psError(PS_ERR_UNKNOWN, true,"One or more images didn't match truth or truth did "
                 "not exist.");
         return 10;
@@ -1507,5 +1507,5 @@
     fOut = psImageRotate(fOut,NULL,0,0,PS_INTERPOLATE_FLAT);
     if (fOut != NULL) {
-        psError(__func__,"NULL wasn't returned though the input image was NULL.");
+        psError(PS_ERR_UNKNOWN, true,"NULL wasn't returned though the input image was NULL.");
         return 3;
     }
@@ -1517,5 +1517,5 @@
     fOut = psImageRotate(fOut, fImg, 33, 0, -1);
     if (fOut != NULL) {
-        psError(__func__,"NULL wasn't returned though the interpolation mode "
+        psError(PS_ERR_UNKNOWN, true,"NULL wasn't returned though the interpolation mode "
                 "is invalid.");
         return 4;
@@ -1598,5 +1598,5 @@
 
     if (fRecycle != fOut) {
-        psError(__func__,"psImageShift didn't recycle my image?");
+        psError(PS_ERR_UNKNOWN, true,"psImageShift didn't recycle my image?");
         return 10;
     }
@@ -1609,5 +1609,5 @@
     fOut = psImageShift(fOut,NULL,8,8,NAN,PS_INTERPOLATE_FLAT);
     if (fOut != NULL) {
-        psError(__func__,"psImageShift didn't return NULL given a NULL input image.");
+        psError(PS_ERR_UNKNOWN, true,"psImageShift didn't return NULL given a NULL input image.");
         return 11;
     }
@@ -1618,5 +1618,5 @@
     fOut = psImageShift(fOut,fImg,8,8,NAN,-1);
     if (fOut != NULL ) {
-        psError(__func__,"psImageShift didn't return NULL given an invalid interpolation mode.");
+        psError(PS_ERR_UNKNOWN, true,"psImageShift didn't return NULL given an invalid interpolation mode.");
         return 12;
     }
@@ -1675,20 +1675,20 @@
 
             if (fabsf(fRow[col] - fValue) > FLT_EPSILON) {
-                psError(__func__,"Float image not shifted correctly at %d,%d (%g vs %g)",
+                psError(PS_ERR_UNKNOWN, true,"Float image not shifted correctly at %d,%d (%g vs %g)",
                         col,row,fRow[col],fValue);
                 return 1;
             }
             if (sRow[col] != sValue) {
-                psError(__func__,"Short image not shifted correctly at %d,%d (%d vs %d)",
+                psError(PS_ERR_UNKNOWN, true,"Short image not shifted correctly at %d,%d (%d vs %d)",
                         col,row,sRow[col],sValue);
                 return 2;
             }
             if (fabsf(fBiRow[col] - fBiValue) > FLT_EPSILON) {
-                psError(__func__,"Float image not shifted correctly at %d,%d (%g vs %g)",
+                psError(PS_ERR_UNKNOWN, true,"Float image not shifted correctly at %d,%d (%g vs %g)",
                         col,row,fBiRow[col],fBiValue);
                 return 1;
             }
             if (sBiRow[col] != sBiValue) {
-                psError(__func__,"Short image not shifted correctly at %d,%d (%d vs %d)",
+                psError(PS_ERR_UNKNOWN, true,"Short image not shifted correctly at %d,%d (%d vs %d)",
                         col,row,sBiRow[col],sBiValue);
                 return 2;
