Index: trunk/psLib/test/image/tst_psImageConvolve.c
===================================================================
--- trunk/psLib/test/image/tst_psImageConvolve.c	(revision 2204)
+++ 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]);
