Index: trunk/psLib/src/math/psPolynomial.c
===================================================================
--- trunk/psLib/src/math/psPolynomial.c	(revision 3027)
+++ trunk/psLib/src/math/psPolynomial.c	(revision 3096)
@@ -7,6 +7,6 @@
  *  polynomials.  It also contains a Gaussian functions.
  *
- *  @version $Revision: 1.83 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-01-17 23:25:09 $
+ *  @version $Revision: 1.84 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-01-26 20:41:04 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -92,5 +92,5 @@
         psFree(tmpSpline->p_psDeriv2);
     }
-    psFree(tmpSpline->domains);
+    psFree(tmpSpline->knots);
 
     return;
@@ -1833,10 +1833,10 @@
 //    psPolynomial1D **spline;
 //    psF32 *p_psDeriv2;
-//    psF32 *domains;
+//    psVector *knots;
 //} psSpline1D;
 
 /*****************************************************************************
     NOTE: "n" specifies the number of spline polynomials.  Therefore, there
-    must exist n+1 points in "domains".
+    must exist n+1 points in "knots".
  
 XXX: Ensure that domain[i+1] != domain[i]
@@ -1867,14 +1867,14 @@
     tmp->p_psDeriv2 = NULL;
 
-    tmp->domains = (psF32 *) psAlloc((numSplines+1) * sizeof(psF32));
+    tmp->knots = psVectorAlloc(numSplines+1, PS_TYPE_F32);
     width = (max - min) / ((psF32) numSplines);
 
-    (tmp->domains)[0] = min;
+    tmp->knots->data.F32[0] = min;
     tmpDomain = min+width;
     for (i=1;i<numSplines+1;i++) {
-        (tmp->domains)[i] = tmpDomain;
+        tmp->knots->data.F32[i] = tmpDomain;
         tmpDomain+= width;
     }
-    (tmp->domains)[numSplines] = max;
+    tmp->knots->data.F32[numSplines] = max;
 
     p_psMemSetDeallocator(tmp,(psFreeFcn)spline1DFree);
@@ -1909,8 +1909,8 @@
     tmp->p_psDeriv2 = NULL;
 
-    tmp->domains = (psF32 *) psAlloc((bounds->n) * sizeof(psF32));
+    tmp->knots = psVectorAlloc(bounds->n, PS_TYPE_F32);
 
     for (i=0;i<bounds->n;i++) {
-        (tmp->domains)[i] = bounds->data.F32[i];
+        tmp->knots->data.F32[i] = bounds->data.F32[i];
         if (i<(bounds->n-1)) {
             if (FLT_EPSILON >= fabs(bounds->data.F32[i+1]-bounds->data.F32[i])) {
@@ -2136,5 +2136,5 @@
 psSpline1DEval(): this routine takes an existing spline of arbitrary order
 and an independent x value.  Each determines which spline that x corresponds
-to by doing a bracket disection on the domains of the spline data structure
+to by doing a bracket disection on the knots of the spline data structure
 (vectorBinDisectF32()).  Then it evaluates the spline at that x location
 by a call to the 1D polynomial functions.
@@ -2155,15 +2155,16 @@
 
     n = spline->n;
-    binNum = vectorBinDisectF32(spline->domains, (spline->n)+1, x);
+    //XXX    binNum = vectorBinDisectF32(spline->domains, (spline->n)+1, x);
+    binNum = vectorBinDisectF32(spline->knots->data.F32, (spline->n)+1, x);
     if (binNum < 0) {
         psLogMsg(__func__, PS_LOG_WARN,
                  "psSpline1DEval(): x ordinate (%f) is outside the spline range (%f - %f).",
-                 x, (spline->domains)[0],
-                 (spline->domains)[n-1]);
-
-        if (x < (spline->domains)[0]) {
+                 x, spline->knots->data.F32[0],
+                 spline->knots->data.F32[n-1]);
+
+        if (x < spline->knots->data.F32[0]) {
             return(psPolynomial1DEval(spline->spline[0],
                                       x));
-        } else if (x > (spline->domains)[n-1]) {
+        } else if (x > spline->knots->data.F32[n-1]) {
             return(psPolynomial1DEval(spline->spline[n-1],
                                       x));
