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