Index: trunk/psLib/test/image/tst_psImage.c
===================================================================
--- trunk/psLib/test/image/tst_psImage.c	(revision 1405)
+++ trunk/psLib/test/image/tst_psImage.c	(revision 1406)
@@ -6,6 +6,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-07-13 01:37:58 $
+ *  @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-08-06 22:34:06 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -26,10 +26,22 @@
 
 testDescription tests[] = {
-                              {testImageAlloc,546,"psImageAlloc",0,false},
-                              {testImageAlloc,548,"psImageFree",0,true},
-                              {testImageSubset,547,"psImageSubset",0,false},
-                              {testImageSubset,550,"psImageSubset",0,true},
-                              {testImageCopy,551,"psImageCopy",0,false},
-                              {NULL}
+                              {
+                                  testImageAlloc,546,"psImageAlloc",0,false
+                              },
+                              {
+                                  testImageAlloc,548,"psImageFree",0,true
+                              },
+                              {
+                                  testImageSubset,547,"psImageSubset",0,false
+                              },
+                              {
+                                  testImageSubset,550,"psImageSubset",0,true
+                              },
+                              {
+                                  testImageCopy,551,"psImageCopy",0,false
+                              },
+                              {
+                                  NULL
+                              }
                           };
 
@@ -49,6 +61,10 @@
     psImage* image = NULL;
     unsigned int sizes = 6;
-    unsigned int numCols[] = {0,1,1,100,100,150};
-    unsigned int numRows[] = {0,1,100,1,150,100};
+    unsigned int numCols[] = {
+                                 0,1,1,100,100,150
+                             };
+    unsigned int numRows[] = {
+                                 0,1,100,1,150,100
+                             };
     unsigned int types = 12;
     psElemType type[] = { PS_TYPE_S8, PS_TYPE_S16, PS_TYPE_S32, PS_TYPE_S64,
Index: trunk/psLib/test/image/tst_psImageExtraction.c
===================================================================
--- trunk/psLib/test/image/tst_psImageExtraction.c	(revision 1405)
+++ trunk/psLib/test/image/tst_psImageExtraction.c	(revision 1406)
@@ -6,6 +6,6 @@
 *  @author Robert DeSonia, MHPCC
 *
-*  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2004-08-06 22:29:11 $
+*  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2004-08-06 22:34:06 $
 *
 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
Index: trunk/psLib/test/image/tst_psImageFFT.c
===================================================================
--- trunk/psLib/test/image/tst_psImageFFT.c	(revision 1405)
+++ trunk/psLib/test/image/tst_psImageFFT.c	(revision 1406)
@@ -6,6 +6,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-07-08 01:05:01 $
+ *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-08-06 22:34:06 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -34,10 +34,22 @@
 
 testDescription tests[] = {
-                              {testImageFFT,600,"psImageFFT",0,false},
-                              {testImageRealImaginary,601,"psImageRealImaginary",0,false},
-                              {testImageComplex,602,"psImageComplex",0,false},
-                              {testImageConjugate,603,"psImageConjugate",0,false},
-                              {testImagePowerSpectrum,604,"psImagePowerSpectrum",0,false},
-                              {NULL}
+                              {
+                                  testImageFFT,600,"psImageFFT",0,false
+                              },
+                              {
+                                  testImageRealImaginary,601,"psImageRealImaginary",0,false
+                              },
+                              {
+                                  testImageComplex,602,"psImageComplex",0,false
+                              },
+                              {
+                                  testImageConjugate,603,"psImageConjugate",0,false
+                              },
+                              {
+                                  testImagePowerSpectrum,604,"psImagePowerSpectrum",0,false
+                              },
+                              {
+                                  NULL
+                              }
                           };
 
@@ -89,8 +101,9 @@
                     psError(__func__,"Result invalid at %d,%d (%.2f)",col,row,mag);
                 }
-            } else if ( (col == 0 && (row == 1 || row == n-1))
+            } else
+                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(__func__,"Result invalid at %d,%d (%.2f)",col,row,mag);
+                }
         }
     }
Index: trunk/psLib/test/image/tst_psImageIO.c
===================================================================
--- trunk/psLib/test/image/tst_psImageIO.c	(revision 1405)
+++ trunk/psLib/test/image/tst_psImageIO.c	(revision 1406)
@@ -6,6 +6,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-07-21 23:49:52 $
+ *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-08-06 22:34:06 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -35,7 +35,13 @@
 
 testDescription tests[] = {
-                              {testImageRead,567,"psImageReadSection",0,false},
-                              {testImageWrite,569,"psImageWriteSection",0,false},
-                              {NULL}
+                              {
+                                  testImageRead,567,"psImageReadSection",0,false
+                              },
+                              {
+                                  testImageWrite,569,"psImageWriteSection",0,false
+                              },
+                              {
+                                  NULL
+                              }
                           };
 
@@ -291,5 +297,6 @@
     mkdir("tmpImages",0777);
     remove
-        ("writeTest.fits");
+        ("writeTest.fits")
+        ;
     if (! psImageWriteSection(img,0,0,0,NULL,0,"tmpImages/writeTest.fits")) {
         psError(__func__,"Couldn't write writeTest.fits.");
Index: trunk/psLib/test/image/tst_psImageManip.c
===================================================================
--- trunk/psLib/test/image/tst_psImageManip.c	(revision 1405)
+++ trunk/psLib/test/image/tst_psImageManip.c	(revision 1406)
@@ -6,6 +6,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-07-29 01:20:10 $
+ *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-08-06 22:34:06 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -33,12 +33,28 @@
 
 testDescription tests[] = {
-                              {testImageClip,571,"psImageClip",0,false},
-                              {testImageClipNAN,572,"psImageClipNAN",0,false},
-                              {testImageClipComplexRegion,673,"psImageClipComplexRegion",0,false},
-                              {testImageOverlay,573,"psImageOverlay",0,false},
-                              {testImageRebin,559,"psImageRebin",0,false},
-                              {testImageRoll,562,"psImageRoll",0,false},
-                              {testImageRotate,560,"psImageRotate",0,false},
-                              {NULL}
+                              {
+                                  testImageClip,571,"psImageClip",0,false
+                              },
+                              {
+                                  testImageClipNAN,572,"psImageClipNAN",0,false
+                              },
+                              {
+                                  testImageClipComplexRegion,673,"psImageClipComplexRegion",0,false
+                              },
+                              {
+                                  testImageOverlay,573,"psImageOverlay",0,false
+                              },
+                              {
+                                  testImageRebin,559,"psImageRebin",0,false
+                              },
+                              {
+                                  testImageRoll,562,"psImageRoll",0,false
+                              },
+                              {
+                                  testImageRotate,560,"psImageRotate",0,false
+                              },
+                              {
+                                  NULL
+                              }
                           };
 
@@ -1117,7 +1133,9 @@
     mkdir("temp",0777);
     remove
-        ("temp/fOut.fits");
+        ("temp/fOut.fits")
+        ;
     remove
-        ("temp/sOut.fits");
+        ("temp/sOut.fits")
+        ;
     int index = 0;
     bool fail = false;
Index: trunk/psLib/test/image/tst_psImageStats00.c
===================================================================
--- trunk/psLib/test/image/tst_psImageStats00.c	(revision 1405)
+++ trunk/psLib/test/image/tst_psImageStats00.c	(revision 1406)
@@ -28,128 +28,128 @@
     int IMAGE_Y_SIZE = 0;
     int currentId = 0;
-    
+
     currentId = psMemGetId();
     for ( nb = 0;nb < 6;nb++ ) {
-            if ( nb == 0 ) {
-                    IMAGE_X_SIZE = 1;
-                    IMAGE_Y_SIZE = 1;
+        if ( nb == 0 ) {
+            IMAGE_X_SIZE = 1;
+            IMAGE_Y_SIZE = 1;
+        }
+        if ( nb == 1 ) {
+            IMAGE_X_SIZE = 1;
+            IMAGE_Y_SIZE = N;
+        }
+        if ( nb == 2 ) {
+            IMAGE_X_SIZE = N;
+            IMAGE_Y_SIZE = 1;
+        }
+        if ( nb == 3 ) {
+            IMAGE_X_SIZE = N;
+            IMAGE_Y_SIZE = N;
+        }
+        if ( nb == 4 ) {
+            IMAGE_X_SIZE = N;
+            IMAGE_Y_SIZE = M;
+        }
+        if ( nb == 5 ) {
+            IMAGE_X_SIZE = M;
+            IMAGE_Y_SIZE = N;
+        }
+        printf( "*******************************\n" );
+        printf( "* IMAGE SIZE is (%d by %d)\n", IMAGE_X_SIZE, IMAGE_Y_SIZE );
+        printf( "*******************************\n" );
+        /*********************************************************************/
+        /*  Allocate and initialize data structures                      */
+        /*********************************************************************/
+        tmpImage = psImageAlloc( IMAGE_X_SIZE, IMAGE_Y_SIZE, PS_TYPE_F32 );
+
+        for ( i = 0;i < tmpImage->numRows;i++ ) {
+            for ( j = 0;j < tmpImage->numCols;j++ ) {
+                tmpImage->data.F32[ i ][ j ] = ( float ) ( i + j + 0.1 );
+            }
+        }
+        tmpMask = psImageAlloc( IMAGE_X_SIZE, IMAGE_Y_SIZE, PS_TYPE_U8 );
+        for ( i = 0;i < tmpMask->numRows;i++ ) {
+            for ( j = 0;j < tmpMask->numCols;j++ ) {
+                if ( ( i > ( tmpMask->numRows / 2 ) ) &&
+                        ( j > ( tmpMask->numCols / 2 ) ) ) {
+                    tmpMask->data.U8[ i ][ j ] = 1;
+                } else {
+                    tmpMask->data.U8[ i ][ j ] = 0;
                 }
-            if ( nb == 1 ) {
-                    IMAGE_X_SIZE = 1;
-                    IMAGE_Y_SIZE = N;
-                }
-            if ( nb == 2 ) {
-                    IMAGE_X_SIZE = N;
-                    IMAGE_Y_SIZE = 1;
-                }
-            if ( nb == 3 ) {
-                    IMAGE_X_SIZE = N;
-                    IMAGE_Y_SIZE = N;
-                }
-            if ( nb == 4 ) {
-                    IMAGE_X_SIZE = N;
-                    IMAGE_Y_SIZE = M;
-                }
-            if ( nb == 5 ) {
-                    IMAGE_X_SIZE = M;
-                    IMAGE_Y_SIZE = N;
-                }
-            printf( "*******************************\n" );
-            printf( "* IMAGE SIZE is (%d by %d)\n", IMAGE_X_SIZE, IMAGE_Y_SIZE );
-            printf( "*******************************\n" );
-            /*********************************************************************/
-            /*  Allocate and initialize data structures                      */
-            /*********************************************************************/
-            tmpImage = psImageAlloc( IMAGE_X_SIZE, IMAGE_Y_SIZE, PS_TYPE_F32 );
-            
-            for ( i = 0;i < tmpImage->numRows;i++ ) {
-                    for ( j = 0;j < tmpImage->numCols;j++ ) {
-                            tmpImage->data.F32[ i ][ j ] = ( float ) ( i + j + 0.1 );
-                        }
-                }
-            tmpMask = psImageAlloc( IMAGE_X_SIZE, IMAGE_Y_SIZE, PS_TYPE_U8 );
-            for ( i = 0;i < tmpMask->numRows;i++ ) {
-                    for ( j = 0;j < tmpMask->numCols;j++ ) {
-                            if ( ( i > ( tmpMask->numRows / 2 ) ) &&
-                                    ( j > ( tmpMask->numCols / 2 ) ) ) {
-                                    tmpMask->data.U8[ i ][ j ] = 1;
-                                } else {
-                                    tmpMask->data.U8[ i ][ j ] = 0;
-                                }
-                        }
-                }
-                
-            /*************************************************************************/
-            /*  Calculate Histogram with no mask                             */
-            /*************************************************************************/
-            printPositiveTestHeader( stdout,
-                                     "psImageStats functions",
-                                     "Calculate Histogram, no mask" );
-                                     
-            myHist = psHistogramAlloc( 0.0, ( float ) ( IMAGE_X_SIZE + IMAGE_Y_SIZE ),
-                                       NUM_BINS );
-            myHist = psImageHistogram( myHist, tmpImage, NULL, 0 );
-            for ( i = 0;i < NUM_BINS;i++ ) {
-                    printf( "Bin number %d bounds: (%.1f - %.1f) data (%d)\n", i,
-                            myHist->bounds->data.F32[ i ],
-                            myHist->bounds->data.F32[ i + 1 ],
-                            myHist->nums->data.S32[ i ] );
-                }
-            psFree( myHist );
-            
-            psMemCheckCorruption( 1 );
-            printFooter( stdout,
-                         "psImageStats functions",
-                         "Calculate Histogram, no mask",
-                         testStatus );
-                         
-            /*************************************************************************/
-            /*  Calculate Histogram with mask                                */
-            /*************************************************************************/
-            printPositiveTestHeader( stdout,
-                                     "psImageStats functions",
-                                     "Calculate Histogram with mask" );
-                                     
-            myHist = psHistogramAlloc( 0.0, ( float ) ( IMAGE_X_SIZE + IMAGE_Y_SIZE ),
-                                       NUM_BINS );
-            myHist = psImageHistogram( myHist, tmpImage, tmpMask, 1 );
-            for ( i = 0;i < NUM_BINS;i++ ) {
-                    printf( "Bin number %d bounds: (%.2f - %.2f) data (%d)\n", i,
-                            myHist->bounds->data.F32[ i ],
-                            myHist->bounds->data.F32[ i + 1 ],
-                            myHist->nums->data.S32[ i ] );
-                }
-                
-            psMemCheckCorruption( 1 );
-            printFooter( stdout,
-                         "psImageStats functions",
-                         "Calculate Histogram with mask",
-                         testStatus );
-                         
-            /*************************************************************************/
-            /*  Deallocate data structures                                   */
-            /*************************************************************************/
-            printPositiveTestHeader( stdout,
-                                     "psImageStats functions",
-                                     "Deallocate the psHistogram/psImage structure." );
-            psFree( myHist );
-            psFree( tmpImage );
-            psFree( tmpMask );
-            
-            psMemCheckCorruption( 1 );
-            memLeaks = psMemCheckLeaks( currentId, NULL, NULL );
-            if ( 0 != memLeaks ) {
-                    psAbort( __func__, "Memory Leaks! (%d leaks)", memLeaks );
-                }
-                
-            printFooter( stdout,
-                         "psImageStats functions",
-                         "Deallocate the psHistogram/psImage structure.",
-                         testStatus );
+            }
         }
+
+        /*************************************************************************/
+        /*  Calculate Histogram with no mask                             */
+        /*************************************************************************/
+        printPositiveTestHeader( stdout,
+                                 "psImageStats functions",
+                                 "Calculate Histogram, no mask" );
+
+        myHist = psHistogramAlloc( 0.0, ( float ) ( IMAGE_X_SIZE + IMAGE_Y_SIZE ),
+                                   NUM_BINS );
+        myHist = psImageHistogram( myHist, tmpImage, NULL, 0 );
+        for ( i = 0;i < NUM_BINS;i++ ) {
+            printf( "Bin number %d bounds: (%.1f - %.1f) data (%d)\n", i,
+                    myHist->bounds->data.F32[ i ],
+                    myHist->bounds->data.F32[ i + 1 ],
+                    myHist->nums->data.S32[ i ] );
+        }
+        psFree( myHist );
+
+        psMemCheckCorruption( 1 );
+        printFooter( stdout,
+                     "psImageStats functions",
+                     "Calculate Histogram, no mask",
+                     testStatus );
+
+        /*************************************************************************/
+        /*  Calculate Histogram with mask                                */
+        /*************************************************************************/
+        printPositiveTestHeader( stdout,
+                                 "psImageStats functions",
+                                 "Calculate Histogram with mask" );
+
+        myHist = psHistogramAlloc( 0.0, ( float ) ( IMAGE_X_SIZE + IMAGE_Y_SIZE ),
+                                   NUM_BINS );
+        myHist = psImageHistogram( myHist, tmpImage, tmpMask, 1 );
+        for ( i = 0;i < NUM_BINS;i++ ) {
+            printf( "Bin number %d bounds: (%.2f - %.2f) data (%d)\n", i,
+                    myHist->bounds->data.F32[ i ],
+                    myHist->bounds->data.F32[ i + 1 ],
+                    myHist->nums->data.S32[ i ] );
+        }
+
+        psMemCheckCorruption( 1 );
+        printFooter( stdout,
+                     "psImageStats functions",
+                     "Calculate Histogram with mask",
+                     testStatus );
+
+        /*************************************************************************/
+        /*  Deallocate data structures                                   */
+        /*************************************************************************/
+        printPositiveTestHeader( stdout,
+                                 "psImageStats functions",
+                                 "Deallocate the psHistogram/psImage structure." );
+        psFree( myHist );
+        psFree( tmpImage );
+        psFree( tmpMask );
+
+        psMemCheckCorruption( 1 );
+        memLeaks = psMemCheckLeaks( currentId, NULL, NULL );
+        if ( 0 != memLeaks ) {
+            psAbort( __func__, "Memory Leaks! (%d leaks)", memLeaks );
+        }
+
+        printFooter( stdout,
+                     "psImageStats functions",
+                     "Deallocate the psHistogram/psImage structure.",
+                     testStatus );
+    }
     printPositiveTestHeader( stdout,
                              "psImageStats functions",
                              "Calling psImageHistogram() with NULL parameters" );
-                             
+
     tmpImage = psImageAlloc( IMAGE_X_SIZE, IMAGE_Y_SIZE, PS_TYPE_F32 );
     myHist = psHistogramAlloc( 0.0, ( float ) ( IMAGE_X_SIZE + IMAGE_Y_SIZE ),
@@ -157,13 +157,13 @@
     myHist2 = psImageHistogram( NULL, tmpImage, NULL, 0 );
     if ( myHist2 != NULL ) {
-            printf( "ERROR: myHist2 not equal to NULL\n" );
-        }
-        
+        printf( "ERROR: myHist2 not equal to NULL\n" );
+    }
+
     myHist2 = psImageHistogram( myHist, NULL, NULL, 0 );
     myHist2 = psImageHistogram( NULL, tmpImage, NULL, 0 );
     if ( myHist2 != NULL ) {
-            printf( "ERROR: myHist2 not equal to NULL\n" );
-        }
-        
+        printf( "ERROR: myHist2 not equal to NULL\n" );
+    }
+
     psMemCheckCorruption( 1 );
     psFree( myHist );
@@ -172,12 +172,12 @@
     memLeaks = psMemCheckLeaks( currentId, NULL, NULL );
     if ( 0 != memLeaks ) {
-            psAbort( __func__, "Memory Leaks! (%d leaks)", memLeaks );
-        }
-        
+        psAbort( __func__, "Memory Leaks! (%d leaks)", memLeaks );
+    }
+
     printFooter( stdout,
                  "psImageStats functions",
                  "Calling psImageHistogram() with NULL parameters",
                  testStatus );
-                 
+
     return ( !testStatus );
 }
Index: trunk/psLib/test/image/tst_psImageStats01.c
===================================================================
--- trunk/psLib/test/image/tst_psImageStats01.c	(revision 1405)
+++ trunk/psLib/test/image/tst_psImageStats01.c	(revision 1406)
@@ -29,114 +29,114 @@
     int IMAGE_Y_SIZE = 0;
     int currentId = 0;
-    
+
     currentId = psMemGetId();
     for ( nb = 0;nb < 6;nb++ ) {
-            if ( nb == 0 ) {
-                    IMAGE_X_SIZE = 1;
-                    IMAGE_Y_SIZE = 1;
+        if ( nb == 0 ) {
+            IMAGE_X_SIZE = 1;
+            IMAGE_Y_SIZE = 1;
+        }
+        if ( nb == 1 ) {
+            IMAGE_X_SIZE = 1;
+            IMAGE_Y_SIZE = N;
+        }
+        if ( nb == 2 ) {
+            IMAGE_X_SIZE = N;
+            IMAGE_Y_SIZE = 1;
+        }
+        if ( nb == 3 ) {
+            IMAGE_X_SIZE = N;
+            IMAGE_Y_SIZE = N;
+        }
+        if ( nb == 4 ) {
+            IMAGE_X_SIZE = N;
+            IMAGE_Y_SIZE = M;
+        }
+        if ( nb == 5 ) {
+            IMAGE_X_SIZE = M;
+            IMAGE_Y_SIZE = N;
+        }
+        printf( "*******************************\n" );
+        printf( "* IMAGE SIZE is (%d by %d)\n", IMAGE_X_SIZE, IMAGE_Y_SIZE );
+        printf( "*******************************\n" );
+
+        /*************************************************************************/
+        /*  Allocate and initialize data structures                      */
+        /*************************************************************************/
+        tmpImage = psImageAlloc( IMAGE_X_SIZE, IMAGE_Y_SIZE, PS_TYPE_F32 );
+
+        for ( i = 0;i < tmpImage->numRows;i++ ) {
+            for ( j = 0;j < tmpImage->numCols;j++ ) {
+                tmpImage->data.F32[ i ][ j ] = ( float ) ( i + j );
+            }
+        }
+        tmpMask = psImageAlloc( IMAGE_X_SIZE, IMAGE_Y_SIZE, PS_TYPE_U8 );
+        for ( i = 0;i < tmpMask->numRows;i++ ) {
+            for ( j = 0;j < tmpMask->numCols;j++ ) {
+                if ( ( i > ( tmpMask->numRows / 2 ) ) &&
+                        ( j > ( tmpMask->numCols / 2 ) ) ) {
+                    tmpMask->data.U8[ i ][ j ] = 1;
+                } else {
+                    tmpMask->data.U8[ i ][ j ] = 0;
                 }
-            if ( nb == 1 ) {
-                    IMAGE_X_SIZE = 1;
-                    IMAGE_Y_SIZE = N;
-                }
-            if ( nb == 2 ) {
-                    IMAGE_X_SIZE = N;
-                    IMAGE_Y_SIZE = 1;
-                }
-            if ( nb == 3 ) {
-                    IMAGE_X_SIZE = N;
-                    IMAGE_Y_SIZE = N;
-                }
-            if ( nb == 4 ) {
-                    IMAGE_X_SIZE = N;
-                    IMAGE_Y_SIZE = M;
-                }
-            if ( nb == 5 ) {
-                    IMAGE_X_SIZE = M;
-                    IMAGE_Y_SIZE = N;
-                }
-            printf( "*******************************\n" );
-            printf( "* IMAGE SIZE is (%d by %d)\n", IMAGE_X_SIZE, IMAGE_Y_SIZE );
-            printf( "*******************************\n" );
-            
-            /*************************************************************************/
-            /*  Allocate and initialize data structures                      */
-            /*************************************************************************/
-            tmpImage = psImageAlloc( IMAGE_X_SIZE, IMAGE_Y_SIZE, PS_TYPE_F32 );
-            
-            for ( i = 0;i < tmpImage->numRows;i++ ) {
-                    for ( j = 0;j < tmpImage->numCols;j++ ) {
-                            tmpImage->data.F32[ i ][ j ] = ( float ) ( i + j );
-                        }
-                }
-            tmpMask = psImageAlloc( IMAGE_X_SIZE, IMAGE_Y_SIZE, PS_TYPE_U8 );
-            for ( i = 0;i < tmpMask->numRows;i++ ) {
-                    for ( j = 0;j < tmpMask->numCols;j++ ) {
-                            if ( ( i > ( tmpMask->numRows / 2 ) ) &&
-                                    ( j > ( tmpMask->numCols / 2 ) ) ) {
-                                    tmpMask->data.U8[ i ][ j ] = 1;
-                                } else {
-                                    tmpMask->data.U8[ i ][ j ] = 0;
-                                }
-                        }
-                }
-                
-            myStats = psStatsAlloc( PS_STAT_SAMPLE_MEAN );
-            /*************************************************************************/
-            /*  Calculate Sample Mean with no mask                           */
-            /*************************************************************************/
-            printPositiveTestHeader( stdout,
-                                     "psImageStats functions",
-                                     "Calculate Sample Mean, no mask %d" );
-                                     
-            myStats = psImageStats( myStats, tmpImage, NULL, 0 );
-            printf( "The sample mean was %.2f\n", myStats->sampleMean );
-            
-            psMemCheckCorruption( 1 );
-            
-            printFooter( stdout,
-                         "psImageStats functions",
-                         "Calculate Sample Mean, no mask",
-                         testStatus );
-                         
-            /*************************************************************************/
-            /*  Calculate Sample Mean with mask                              */
-            /*************************************************************************/
-            printPositiveTestHeader( stdout,
-                                     "psImageStats functions",
-                                     "Calculate Sample Mean with mask" );
-                                     
-            myStats = psImageStats( myStats, tmpImage, tmpMask, 1 );
-            printf( "The sample mean was %.2f\n", myStats->sampleMean );
-            
-            psMemCheckCorruption( 1 );
-            
-            printFooter( stdout,
-                         "psImageStats functions",
-                         "Calculate Sample Mean with mask",
-                         testStatus );
-                         
-            /*************************************************************************/
-            /*  Deallocate data structures                                   */
-            /*************************************************************************/
-            printPositiveTestHeader( stdout,
-                                     "psImageStats functions",
-                                     "Deallocate the psStats/psImage structure." );
-            psFree( myStats );
-            psFree( tmpImage );
-            psFree( tmpMask );
-            
-            psMemCheckCorruption( 1 );
-            memLeaks = psMemCheckLeaks( currentId, NULL, NULL );
-            if ( 0 != memLeaks ) {
-                    psAbort( __func__, "Memory Leaks! (%d leaks)", memLeaks );
-                }
-                
-            printFooter( stdout,
-                         "psImageStats functions",
-                         "Deallocate the psStats/psImage structure.",
-                         testStatus );
+            }
         }
-        
+
+        myStats = psStatsAlloc( PS_STAT_SAMPLE_MEAN );
+        /*************************************************************************/
+        /*  Calculate Sample Mean with no mask                           */
+        /*************************************************************************/
+        printPositiveTestHeader( stdout,
+                                 "psImageStats functions",
+                                 "Calculate Sample Mean, no mask %d" );
+
+        myStats = psImageStats( myStats, tmpImage, NULL, 0 );
+        printf( "The sample mean was %.2f\n", myStats->sampleMean );
+
+        psMemCheckCorruption( 1 );
+
+        printFooter( stdout,
+                     "psImageStats functions",
+                     "Calculate Sample Mean, no mask",
+                     testStatus );
+
+        /*************************************************************************/
+        /*  Calculate Sample Mean with mask                              */
+        /*************************************************************************/
+        printPositiveTestHeader( stdout,
+                                 "psImageStats functions",
+                                 "Calculate Sample Mean with mask" );
+
+        myStats = psImageStats( myStats, tmpImage, tmpMask, 1 );
+        printf( "The sample mean was %.2f\n", myStats->sampleMean );
+
+        psMemCheckCorruption( 1 );
+
+        printFooter( stdout,
+                     "psImageStats functions",
+                     "Calculate Sample Mean with mask",
+                     testStatus );
+
+        /*************************************************************************/
+        /*  Deallocate data structures                                   */
+        /*************************************************************************/
+        printPositiveTestHeader( stdout,
+                                 "psImageStats functions",
+                                 "Deallocate the psStats/psImage structure." );
+        psFree( myStats );
+        psFree( tmpImage );
+        psFree( tmpMask );
+
+        psMemCheckCorruption( 1 );
+        memLeaks = psMemCheckLeaks( currentId, NULL, NULL );
+        if ( 0 != memLeaks ) {
+            psAbort( __func__, "Memory Leaks! (%d leaks)", memLeaks );
+        }
+
+        printFooter( stdout,
+                     "psImageStats functions",
+                     "Deallocate the psStats/psImage structure.",
+                     testStatus );
+    }
+
     /*************************************************************************/
     /*  Test With Various Null Inputs                                        */
@@ -145,31 +145,31 @@
                              "psImageStats functions",
                              "Test With Various Null Inputs" );
-                             
+
     tmpImage = psImageAlloc( IMAGE_X_SIZE, IMAGE_Y_SIZE, PS_TYPE_F32 );
     tmpMask = psImageAlloc( IMAGE_X_SIZE, IMAGE_Y_SIZE, PS_TYPE_U8 );
     myStats = psStatsAlloc( 0 );
-    
+
     myStats2 = psImageStats( myStats, NULL, NULL, 0 );
     if ( myStats2 != NULL ) {
-            printf( "ERROR: myStats2 = psImageStats(myStats, NULL, NULL, 0) != NULL\n" );
-        }
-        
+        printf( "ERROR: myStats2 = psImageStats(myStats, NULL, NULL, 0) != NULL\n" );
+    }
+
     myStats2 = psImageStats( NULL, tmpImage, NULL, 0 );
     if ( myStats2 != NULL ) {
-            printf( "ERROR: myStats2 = psImageStats(NULL, tmpImage, NULL, 0) != NULL\n" );
-        }
-        
+        printf( "ERROR: myStats2 = psImageStats(NULL, tmpImage, NULL, 0) != NULL\n" );
+    }
+
     myStats2 = psImageStats( myStats, tmpImage, NULL, 0 );
-    
+
     psFree( myStats );
     psFree( tmpImage );
     psFree( tmpMask );
-    
+
     psMemCheckCorruption( 1 );
     memLeaks = psMemCheckLeaks( currentId, NULL, NULL );
     if ( 0 != memLeaks ) {
-            psAbort( __func__, "Memory Leaks! (%d leaks)", memLeaks );
-        }
-        
+        psAbort( __func__, "Memory Leaks! (%d leaks)", memLeaks );
+    }
+
     printFooter( stdout,
                  "psImageStats functions",
Index: trunk/psLib/test/image/tst_psImageStats02.c
===================================================================
--- trunk/psLib/test/image/tst_psImageStats02.c	(revision 1405)
+++ trunk/psLib/test/image/tst_psImageStats02.c	(revision 1406)
@@ -4,5 +4,5 @@
    thouroughly tested elsewhere, we will only test psImageStats() with
    the PS_STAT_SAMPLE_MEAN here.
-
+ 
    NOTE: After you debug, set CHEBY_X_DIM != CHEBY_Y_DIM.
    Also, uses non-square images.
@@ -32,5 +32,5 @@
     int rc = 0;
     int currentId = 0;
-    
+
     currentId = psMemGetId();
     /*************************************************************************/
@@ -40,11 +40,11 @@
     outImage = psImageAlloc( IMAGE_SIZE, IMAGE_SIZE, PS_TYPE_F32 );
     for ( i = 0;i < IMAGE_SIZE;i++ ) {
-            for ( j = 0;j < IMAGE_SIZE;j++ ) {
-                    tmpImage->data.F32[ i ][ j ] = 4.0;
-                    tmpImage->data.F32[ i ][ j ] = ( float ) ( i + j );
-                    tmpImage->data.F32[ i ][ j ] = ( float ) ( i + j ) + ( 4.0 * ( float ) i );
-                    outImage->data.F32[ i ][ j ] = 0.0;
-                }
+        for ( j = 0;j < IMAGE_SIZE;j++ ) {
+            tmpImage->data.F32[ i ][ j ] = 4.0;
+            tmpImage->data.F32[ i ][ j ] = ( float ) ( i + j );
+            tmpImage->data.F32[ i ][ j ] = ( float ) ( i + j ) + ( 4.0 * ( float ) i );
+            outImage->data.F32[ i ][ j ] = 0.0;
         }
+    }
     my2DPoly = psPolynomial2DAlloc( CHEBY_X_DIM, CHEBY_Y_DIM );
     /*************************************************************************/
@@ -54,12 +54,12 @@
                              "psImageStats functions",
                              "Calculate Chebyshev Polynomials, no mask" );
-                             
+
     my2DPoly = psImageFitPolynomial( tmpImage, my2DPoly );
     for ( i = 0;i < CHEBY_X_DIM;i++ ) {
-            for ( j = 0;j < CHEBY_Y_DIM;j++ ) {
-                    printf( "Cheby Polynomial (%d, %d) coefficient is %.2f\n", i, j, my2DPoly->coeff[ i ][ j ] );
-                }
+        for ( j = 0;j < CHEBY_Y_DIM;j++ ) {
+            printf( "Cheby Polynomial (%d, %d) coefficient is %.2f\n", i, j, my2DPoly->coeff[ i ][ j ] );
         }
-        
+    }
+
     psMemCheckCorruption( 1 );
     printFooter( stdout,
@@ -73,21 +73,21 @@
                              "psImageStats functions",
                              "Calculate Chebyshev Polynomials, no mask" );
-                             
+
     rc = psImageEvalPolynomial( outImage, my2DPoly );
     for ( i = 0;i < IMAGE_SIZE;i++ ) {
-            for ( j = 0;j < IMAGE_SIZE;j++ ) {
-            
-                    //             printf("pixel[%d][%d] is (%f, %f)\n", i, j,
-                    //                     tmpImage->data.F32[i][j],
-                    //                     outImage->data.F32[i][j]);
-                    if ( fabs( outImage->data.F32[ i ][ j ] - tmpImage->data.F32[ i ][ j ] ) > THRESHOLD ) {
-                            printf( "Pixel (%d, %d) is %.2f, should be %.2f\n", i, j,
-                                    outImage->data.F32[ i ][ j ],
-                                    tmpImage->data.F32[ i ][ j ] );
-                        }
-                        
-                }
+        for ( j = 0;j < IMAGE_SIZE;j++ ) {
+
+            //             printf("pixel[%d][%d] is (%f, %f)\n", i, j,
+            //                     tmpImage->data.F32[i][j],
+            //                     outImage->data.F32[i][j]);
+            if ( fabs( outImage->data.F32[ i ][ j ] - tmpImage->data.F32[ i ][ j ] ) > THRESHOLD ) {
+                printf( "Pixel (%d, %d) is %.2f, should be %.2f\n", i, j,
+                        outImage->data.F32[ i ][ j ],
+                        tmpImage->data.F32[ i ][ j ] );
+            }
+
         }
-        
+    }
+
     psMemCheckCorruption( 1 );
     printFooter( stdout,
@@ -95,5 +95,5 @@
                  "Calculate Chebyshev Polynomials, no mask",
                  testStatus );
-                 
+
     /*************************************************************************/
     /*  Deallocate data structures                                   */
@@ -106,16 +106,16 @@
     psFree( outImage );
     psFree( my2DPoly );
-    
+
     psMemCheckCorruption( 1 );
     memLeaks = psMemCheckLeaks( currentId, NULL, NULL );
     if ( 0 != memLeaks ) {
-            psAbort( __func__, "Memory Leaks! (%d leaks)", memLeaks );
-        }
-        
+        psAbort( __func__, "Memory Leaks! (%d leaks)", memLeaks );
+    }
+
     printFooter( stdout,
                  "psImageStats functions",
                  "Deallocate the psStats/psImage structure.",
                  testStatus );
-                 
+
     return ( !testStatus );
 }
