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