Index: trunk/psModules/src/pmImageSubtract.c
===================================================================
--- trunk/psModules/src/pmImageSubtract.c	(revision 4185)
+++ trunk/psModules/src/pmImageSubtract.c	(revision 4223)
@@ -3,9 +3,9 @@
  *  This file will ...
  *
+ *  @author Paul Price, IfA (original prototype)
  *  @author GLG, MHPCC
- *  @author Paul Price, IfA
  *
- *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-09 06:18:19 $
+ *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-06-13 20:09:53 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -37,4 +37,5 @@
 #include "pmImageSubtract.h"
 
+// XXX: Put this is psConstants.h
 #define PS_ASSERT_INT_LESS_THAN(VAR1, VAR2, RVAL) \
 if (!(VAR1 < VAR2)) { \
@@ -171,5 +172,5 @@
 
 /*******************************************************************************
-XXX: Get the types correct.
+XXX: Get the types correct (u, v, xOrder, yOrder).
  
 XXX: For the various spatial orders, verify that the preCalc data does not
@@ -194,15 +195,4 @@
     //
     psS32 numSigmas = sigmas->n;
-    //    psS32 nBF = 0;
-    //    for (psS32 s = 0 ; s < numSigmas ; s++) {
-    //        nBF+= ((orders->n + 1) * (orders->n + 2) / 2);
-    //    }
-    //    nBF*= ((spatialOrder + 1) * (spatialOrder + 2) / 2);
-
-    //    psS32 nBF = 1;
-    //    for (psS32 s = 0 ; s < numSigmas ; s++) {
-    //        nBF*= ((orders->n + 1) * (orders->n + 2) / 2);
-    //    }
-    //    nBF*= ((spatialOrder + 1) * (spatialOrder + 2) / 2);
 
     // XXX: Get rid of the sigma loop?  We merely multiple nBF by numSigmas?
@@ -461,9 +451,9 @@
 to ensure no seg faults.
  ******************************************************************************/
-psF32 GeneralKernelConvolve(const psImage *input,
-                            const psSubtractionKernels *kernels,
-                            psS32 kernelID,
-                            psS32 col,
-                            psS32 row)
+static psF32 GeneralKernelConvolve(const psImage *input,
+                                   const psSubtractionKernels *kernels,
+                                   psS32 kernelID,
+                                   psS32 col,
+                                   psS32 row)
 {
     psS32 spatialOrder = kernels->p_spatialOrder;
@@ -500,8 +490,4 @@
 
 /*******************************************************************************
-XXX: How is the spatial order factor calculated?  Is it simply a x^iy^j power
-evaluated at the (x, y) center for the stamp?  Why bother with the 2-D
-polynomial in evaluating it?
- 
 XXX: Should we assert that the footprint is equal to the kernel size, or does
 they have nothing in common.
@@ -686,5 +672,5 @@
                         }
                     } else {
-                        printf("XXX: put some warning message here (bad kernel->type).\n");
+                        psLogMsg(__func__, PS_LOG_WARN, "WARNING: unknown kernel->type.\n");
                         return(false);
                     } // if-else on kernel type.
@@ -708,8 +694,6 @@
 
             //
-            // XXX: understand this.
             // XXX: Why aren't they using numSolveParams instead of numKernels?
             // XXX: is this POIS specific?
-            // XXX: What is config->penalty?
             //
             #define XXX_CONFIG_PENALTY 1.0
@@ -900,9 +884,9 @@
 arbitrary image with either an ISIS or POIS set of kernel basis functions.
  ******************************************************************************/
-psImage *ConvolveImage(const psImage *input,
-                       const psImage *mask,
-                       psU32 badStampMaskVal,
-                       const psVector *solution,
-                       const psSubtractionKernels *kernels)
+static psImage *ConvolveImage(const psImage *input,
+                              const psImage *mask,
+                              psU32 badStampMaskVal,
+                              const psVector *solution,
+                              const psSubtractionKernels *kernels)
 {
     PS_ASSERT_IMAGE_NON_NULL(input, NULL);
@@ -980,13 +964,13 @@
 /*******************************************************************************
  ******************************************************************************/
-psVector *CalculateDeviations(psVector *deviations,
-                              psArray *stamps,
-                              psS32 footprint,
-                              const psImage *refImage,
-                              const psImage *inImage,
-                              const psImage *mask,
-                              psU32 badStampMaskVal,
-                              const psSubtractionKernels *kernels,
-                              const psVector *solution)
+static psVector *CalculateDeviations(psVector *deviations,
+                                     psArray *stamps,
+                                     psS32 footprint,
+                                     const psImage *refImage,
+                                     const psImage *inImage,
+                                     const psImage *mask,
+                                     psU32 badStampMaskVal,
+                                     const psSubtractionKernels *kernels,
+                                     const psVector *solution)
 {
     PS_ASSERT_PTR_NON_NULL(stamps, NULL);
