Index: trunk/psLib/test/imageops/tst_psImageStructManip.c
===================================================================
--- trunk/psLib/test/imageops/tst_psImageStructManip.c	(revision 4547)
+++ trunk/psLib/test/imageops/tst_psImageStructManip.c	(revision 7071)
@@ -6,6 +6,6 @@
 *  @author Robert DeSonia, MHPCC
 *
-*  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-07-13 02:47:00 $
+*  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2006-05-05 02:48:34 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -62,9 +62,11 @@
     subset3 = psImageSubset(original,region1);
 
-    psLogMsg(__func__,PS_LOG_INFO,"Verify the returned psImage structure members nrow and ncol are equal to "
+    psLogMsg(__func__,PS_LOG_INFO,
+             "Verify the returned psImage structure members nrow and ncol are equal to "
              "the input parameter nrow and ncol respectively.");
 
     if (subset2->numCols != c/2 || subset2->numRows != r/2) {
-        psError(PS_ERR_UNKNOWN,true,"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;
@@ -72,10 +74,12 @@
 
     if (subset3->numCols != c/2 || subset3->numRows != r/2) {
-        psError(PS_ERR_UNKNOWN,true,"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;
     }
 
-    psLogMsg(__func__,PS_LOG_INFO,"Verify the returned psImage structure contains expected values in the "
+    psLogMsg(__func__,PS_LOG_INFO,
+             "Verify the returned psImage structure contains expected values in the "
              "row member, if the input psImage structure image contains known values.");
 
@@ -95,5 +99,6 @@
     }
 
-    psLogMsg(__func__,PS_LOG_INFO,"Verify the returned psImage structure member type is equal to the input "
+    psLogMsg(__func__,PS_LOG_INFO,
+             "Verify the returned psImage structure member type is equal to the input "
              "psImage structure member type.");
 
@@ -109,19 +114,23 @@
     }
 
-    psLogMsg(__func__,PS_LOG_INFO,"Verify the returned psImage structure members row0 and col0 are equal to "
+    psLogMsg(__func__,PS_LOG_INFO,
+             "Verify the returned psImage structure members row0 and col0 are equal to "
              "the input parameters row0 and col0 respectively.");
 
     if (subset2->col0 != c/4 || subset2->row0 != r/4) {
-        psError(PS_ERR_UNKNOWN,true,"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(PS_ERR_UNKNOWN,true,"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;
     }
 
-    psLogMsg(__func__,PS_LOG_INFO,"Verify the returned psImage structure member parent is equal to the "
+    psLogMsg(__func__,PS_LOG_INFO,
+             "Verify the returned psImage structure member parent is equal to the "
              "input psImage structure pointer image.");
 
@@ -138,10 +147,12 @@
     }
 
-    psLogMsg(__func__,PS_LOG_INFO,"Verify the input psImage structure image only has the following members "
+    psLogMsg(__func__,PS_LOG_INFO,
+             "Verify the input psImage structure image only has the following members "
              "changed: 1) Nchildren is increased by one. 2) parent contains pointer psImage structure "
              "out at parent[Nchildren-1].");
 
     if (original->children == NULL || original->children->n != 2) {
-        psError(PS_ERR_UNKNOWN,true,"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;
     }
@@ -180,17 +191,20 @@
     }
     if (memcmp(original,&preSubsetStruct,sizeof(psImage)) != 0) {
-        psError(PS_ERR_UNKNOWN,true,"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;
     }
 
 
-    psLogMsg(__func__,PS_LOG_INFO,"Verify the returned psImage structure pointer is null and program "
-             "execution doesn't stop, if the input parameters row0 and col0 are not within the range of "
-             "values of psImage structure image.");
+    psLogMsg(__func__,PS_LOG_INFO,
+             "Verify the returned psImage structure pointer is null and program "
+             "execution doesn't stop, if the input parameters row0 and col0 are not within "
+             "the range of values of psImage structure image.");
 
     psLogMsg(__func__,PS_LOG_INFO,"An error should follow...");
     subset1 = psImageSubset(original, psRegionSet(0,c/2, 0,r*2));
     if (subset1 != NULL) {
-        psError(PS_ERR_UNKNOWN,true,"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;
@@ -199,5 +213,6 @@
     subset1 = psImageSubset(original,psRegionSet(0,c*2,0,r/2));
     if (subset1 != NULL) {
-        psError(PS_ERR_UNKNOWN,true,"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;
@@ -206,5 +221,6 @@
     subset1 = psImageSubset(original, psRegionSet(-1,c/2,0,r/2));
     if (subset1 != NULL) {
-        psError(PS_ERR_UNKNOWN,true,"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;
@@ -213,18 +229,21 @@
     subset1 = psImageSubset(original, psRegionSet(0,c/2,-1,r/2));
     if (subset1 != NULL) {
-        psError(PS_ERR_UNKNOWN,true,"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;
     }
 
-    psLogMsg(__func__,PS_LOG_INFO,"Verify the returned psImage structure pointer is null and program "
-             "execution doesn't stop if the input parameters nrow, ncol, row0 and col0 specify a range of "
-             "data not within the input psImage structure image.  Also verify the input psImage structure "
-             "is not modified.");
+    psLogMsg(__func__,PS_LOG_INFO,
+             "Verify the returned psImage structure pointer is null and program "
+             "execution doesn't stop if the input parameters nrow, ncol, row0 and col0 "
+             "specify a range of data not within the input psImage structure image.  Also "
+             "verify the input psImage structure is not modified.");
 
     psLogMsg(__func__,PS_LOG_INFO,"An error should follow...");
     subset1 = psImageSubset(original,psRegionSet(0,c/2,0,r+1));
     if (subset1 != NULL) {
-        psError(PS_ERR_UNKNOWN,true,"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;
     }
@@ -232,5 +251,6 @@
     subset1 = psImageSubset(original, psRegionSet(0,c+1,0,r/2));
     if (subset1 != NULL) {
-        psError(PS_ERR_UNKNOWN,true,"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;
     }
@@ -238,9 +258,11 @@
     subset1 = psImageSubset(original,psRegionSet(0,c+1,0,r+1));
     if (subset1 != NULL) {
-        psError(PS_ERR_UNKNOWN,true,"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;
     }
 
-    psLogMsg(__func__, PS_LOG_INFO, "psImageFreeChildren shall deallocate any children images of a "
+    psLogMsg(__func__, PS_LOG_INFO,
+             "psImageFreeChildren shall deallocate any children images of a "
              "psImage structure");
 
@@ -251,10 +273,11 @@
     // Verify the returned psImage structure member Nchildren is set to zero.
     if (original->children != NULL && original->children->n > 0) {
-        psError(PS_ERR_UNKNOWN,true,"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;
     }
 
-    //Verify the returned psImage structure members type, nrow, ncol, row0, col0, rows and parent are not
-    // modified.
+    //Verify the returned psImage structure members type, nrow, ncol, row0, col0, rows
+    // and parent are not modified.
     if (preSubsetStruct.numRows != original->numRows ||
             preSubsetStruct.numCols != original->numCols ||
@@ -262,5 +285,6 @@
             preSubsetStruct.col0 != original->col0) {
 
-        psError(PS_ERR_UNKNOWN,true,"psImageFreeChildren modified parent's non-children elements.");
+        psError(PS_ERR_UNKNOWN,true,
+                "psImageFreeChildren modified parent's non-children elements.");
         return 27;
     }
@@ -352,5 +376,6 @@
             } \
             if (abs(img2Row[col] - (ps##OUT)(imgRow[col])) > 0.5) { \
-                psError(PS_ERR_UNKNOWN, true,"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])); \
@@ -456,5 +481,6 @@
     for (psS32 row = 0; row < image2->numRows; row++) {
         for (psS32 col = 0; col < image2->numCols; col++) {
-            if (fabsf(image2->data.F32[row][col] - image->data.F32[row+qtrR][col+qtrC]) > FLT_EPSILON) {
+            if (fabsf(image2->data.F32[row][col] - image->data.F32[row+qtrR][col+qtrC])
+                    > FLT_EPSILON) {
                 psLogMsg(__func__,PS_LOG_ERROR,
                          "The value at (%d,%d) was %g, but should be %g.",
