Index: trunk/psLib/src/math/psPolynomial.c
===================================================================
--- trunk/psLib/src/math/psPolynomial.c	(revision 1781)
+++ trunk/psLib/src/math/psPolynomial.c	(revision 1784)
@@ -7,6 +7,6 @@
  *  polynomials.  It also contains a Gaussian functions.
  *
- *  @version $Revision: 1.34 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-10 22:25:59 $
+ *  @version $Revision: 1.35 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-10 23:20:29 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -560,4 +560,5 @@
     int loop_x = 0;
     int loop_y = 0;
+    int i = 0;
     float polySum = 0.0;
     psPolynomial1D* *chebPolys = NULL;
@@ -581,5 +582,7 @@
         }
     }
-
+    for (i=0;i<maxChebyPoly;i++) {
+        psFree(chebPolys[i]);
+    }
     psFree(chebPolys);
     return(polySum);
@@ -667,4 +670,5 @@
     int loop_y = 0;
     int loop_z = 0;
+    int i = 0;
     float polySum = 0.0;
     psPolynomial1D* *chebPolys = NULL;
@@ -695,4 +699,7 @@
     }
 
+    for (i=0;i<maxChebyPoly;i++) {
+        psFree(chebPolys[i]);
+    }
     psFree(chebPolys);
     return(polySum);
@@ -799,4 +806,5 @@
     int loop_y = 0;
     int loop_z = 0;
+    int i = 0;
     float polySum = 0.0;
     psPolynomial1D* *chebPolys = NULL;
@@ -833,4 +841,7 @@
     }
 
+    for (i=0;i<maxChebyPoly;i++) {
+        psFree(chebPolys[i]);
+    }
     psFree(chebPolys);
     return(polySum);
@@ -1235,4 +1246,5 @@
     int loop_x = 0;
     int loop_y = 0;
+    int i = 0;
     double polySum = 0.0;
     psPolynomial1D* *chebPolys = NULL;
@@ -1257,4 +1269,7 @@
     }
 
+    for (i=0;i<maxChebyPoly;i++) {
+        psFree(chebPolys[i]);
+    }
     psFree(chebPolys);
     return(polySum);
@@ -1341,4 +1356,5 @@
     int loop_y = 0;
     int loop_z = 0;
+    int i = 0;
     double polySum = 0.0;
     psPolynomial1D* *chebPolys = NULL;
@@ -1369,4 +1385,7 @@
     }
 
+    for (i=0;i<maxChebyPoly;i++) {
+        psFree(chebPolys[i]);
+    }
     psFree(chebPolys);
     return(polySum);
@@ -1475,4 +1494,5 @@
     int loop_y = 0;
     int loop_z = 0;
+    int i = 0;
     double polySum = 0.0;
     psPolynomial1D* *chebPolys = NULL;
@@ -1509,4 +1529,7 @@
     }
 
+    for (i=0;i<maxChebyPoly;i++) {
+        psFree(chebPolys[i]);
+    }
     psFree(chebPolys);
     return(polySum);
@@ -1750,4 +1773,13 @@
 
 
+
+/*****************************************************************************
+psSpline1DGen(): This routine will take an existing spline data structure,
+along with a set of data values for each of the domains, and fit splines of
+the specified order (currently, linear only), and set the coefficients in the
+appropriate spline polynomials.  This function is not part of the API in the
+latest SDR, but I'm guessing it will be, and I need it to generate test
+cases, so I included it here.
+ *****************************************************************************/
 
 psSpline1D *psSpline1DGen(const psSpline1D *spline,
