Index: trunk/psLib/src/imageops/psImageStats.c
===================================================================
--- trunk/psLib/src/imageops/psImageStats.c	(revision 10999)
+++ trunk/psLib/src/imageops/psImageStats.c	(revision 11759)
@@ -9,6 +9,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.103 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-01-09 22:38:52 $
+ *  @version $Revision: 1.104 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-02-13 03:01:23 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -44,11 +44,11 @@
 order to do so, we create dummy psVectors and set their "data" pointer to that
 of the input psImages.
- 
+
 XXX: use static psVectors
- 
+
 XXX: optimize this.  2k vs 4k, sample mean, takes8 seconds on Gene's machine.
 Should take .2.
  *****************************************************************************/
-psStats* psImageStats(psStats* stats,
+bool psImageStats(psStats* stats,
                       const psImage* in,
                       const psImage* mask,
@@ -58,10 +58,10 @@
     psVector *junkMask = NULL;
 
-    PS_ASSERT_PTR_NON_NULL(stats, NULL);
-    PS_ASSERT_INT_NONZERO(stats->options, NULL);
-    PS_ASSERT_IMAGE_NON_NULL(in, NULL)
+    PS_ASSERT_PTR_NON_NULL(stats, false);
+    PS_ASSERT_INT_NONZERO(stats->options, false);
+    PS_ASSERT_IMAGE_NON_NULL(in, false)
     if (mask != NULL) {
-        PS_ASSERT_IMAGE_TYPE(mask, PS_TYPE_U8, NULL);
-        PS_ASSERT_IMAGES_SIZE_EQUAL(in, mask, NULL);
+        PS_ASSERT_IMAGE_TYPE(mask, PS_TYPE_U8, false);
+        PS_ASSERT_IMAGES_SIZE_EQUAL(in, mask, false);
     }
 
@@ -116,5 +116,5 @@
     psFree(junkMask);
     psFree(junkData);
-    return(stats);
+    return true;
 }
 
@@ -123,14 +123,14 @@
 and initialized.
  *****************************************************************************/
-psHistogram* psImageHistogram(psHistogram* out,
+bool psImageHistogram(psHistogram* out,
                               const psImage* in,
                               const psImage* mask,
                               psMaskType maskVal)
 {
-    PS_ASSERT_PTR_NON_NULL(out, NULL);
-    PS_ASSERT_PTR_NON_NULL(in, NULL);
+    PS_ASSERT_PTR_NON_NULL(out, false);
+    PS_ASSERT_PTR_NON_NULL(in, false);
     if (mask != NULL) {
-        PS_ASSERT_IMAGE_TYPE(mask, PS_TYPE_U8, NULL);
-        PS_ASSERT_IMAGES_SIZE_EQUAL(in, mask, NULL);
+        PS_ASSERT_IMAGE_TYPE(mask, PS_TYPE_U8, false);
+        PS_ASSERT_IMAGES_SIZE_EQUAL(in, mask, false);
     }
     psVector* junkData = NULL;
@@ -188,5 +188,5 @@
     psFree(junkData);
 
-    return (out);
+    return true;
 }
 
@@ -197,8 +197,8 @@
 0:512 to -1:1.  This routine takes as input an integer N and produces as
 output a vector of evenly spaced floating point values between -1.0:1.0.
- 
+
 XXX: Use the p_psNormalizeVector here?
  *****************************************************************************/
-double* calcScaleFactors(psS32 n)
+static double* calcScaleFactors(psS32 n)
 {
     PS_ASSERT_INT_NONNEGATIVE(n, NULL);
@@ -235,9 +235,9 @@
         over all pixels (x,y) in the image.
   *****************************************************************************/
-psPolynomial2D* psImageFitPolynomial(psPolynomial2D* coeffs,
+bool psImageFitPolynomial(psPolynomial2D* coeffs,
                                      const psImage* input)
 {
-    PS_ASSERT_IMAGE_NON_NULL(input, NULL);
-    PS_ASSERT_IMAGE_NON_EMPTY(input, NULL);
+    PS_ASSERT_IMAGE_NON_NULL(input, false);
+    PS_ASSERT_IMAGE_NON_EMPTY(input, false);
     if ((input->type.type != PS_TYPE_S8) &&
             (input->type.type != PS_TYPE_U16) &&
@@ -245,7 +245,8 @@
             (input->type.type != PS_TYPE_F64)) {
         psError(PS_ERR_BAD_PARAMETER_TYPE, true, "Unallowable image type.\n");
-    }
-    PS_ASSERT_POLY_NON_NULL(coeffs, NULL);
-    PS_ASSERT_POLY_TYPE(coeffs, PS_POLYNOMIAL_CHEB, NULL);
+        return false;
+    }
+    PS_ASSERT_POLY_NON_NULL(coeffs, false);
+    PS_ASSERT_POLY_TYPE(coeffs, PS_POLYNOMIAL_CHEB, false);
     psS32 x = 0;
     psS32 y = 0;
@@ -338,5 +339,5 @@
     psFree(rScalingFactors);
 
-    return (coeffs);
+    return true;
 }
 
