Index: trunk/psLib/src/math/psSpline.c
===================================================================
--- trunk/psLib/src/math/psSpline.c	(revision 1907)
+++ trunk/psLib/src/math/psSpline.c	(revision 1921)
@@ -7,6 +7,6 @@
  *  polynomials.  It also contains a Gaussian functions.
  *
- *  @version $Revision: 1.42 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-27 23:41:42 $
+ *  @version $Revision: 1.43 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-09-28 23:27:37 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -486,4 +486,5 @@
 float p_psChebPolynomial1DEval(float x, const psPolynomial1D* myPoly)
 {
+    /*
     psVector *d;
     int n;
@@ -507,20 +508,23 @@
     psFree(d);
     return(tmp);
-    /*
-        int n;
-        int i;
-        float tmp;
-        psPolynomial1D **chebPolys = NULL;
-     
-        n = myPoly->n;
-        chebPolys = CreateChebyshevPolys(n);
-     
-        tmp = 0.0;
-        for (i=0;i<myPoly->n;i++) {
-            tmp+= (myPoly->coeff[i] * psPolynomial1DEval(x, chebPolys[i]));
-        }
-        tmp-= (myPoly->coeff[0]/2.0);
-        return(tmp);
     */
+
+    int n;
+    int i;
+    float tmp;
+    psPolynomial1D **chebPolys = NULL;
+
+    n = myPoly->n;
+    chebPolys = CreateChebyshevPolys(n);
+
+    tmp = 0.0;
+    for (i=0;i<myPoly->n;i++) {
+        tmp+= (myPoly->coeff[i] * psPolynomial1DEval(x, chebPolys[i]));
+        //            printf("HMMM: psPolynomial1DEval(%f, chebPolys[%d]) is %f\n", x, i, psPolynomial1DEval(x, chebPolys[i]));
+    }
+    tmp-= (myPoly->coeff[0]/2.0);
+
+
+    return(tmp);
 }
 
@@ -1942,5 +1946,5 @@
 
 /*****************************************************************************
-p_psInterpolate1D(): This routine will take as input psVectors domain and
+p_psVectorInterpolate(): This routine will take as input psVectors domain and
 range, and the x value, assumed to lie with the domain vector.  It produces
 as output the LaGrange interpolated value of a polynomial of the specified
@@ -1959,12 +1963,17 @@
             "---- p_psVectorInterpolate() begin ----\n");
 
-    if (domain->type.type != range->type.type != x->type.type) {
+    if ((domain->type.type != range->type.type) ||
+            (domain->type.type != x->type.type)) {
         // XXX psError
+        printf("domain->type.type != range->type.type != x->type.type\n");
+        printf("%d %d %d\n", domain->type.type, range->type.type, x->type.type);
     }
     if (domain->n != range->n) {
         // XXX psError
+        printf("domain->n != range->n\n");
     }
     if (order > (domain->n - 1)) {
         // XXX psError: not enough data points for order-order interpolation.
+        printf("not enough data points for order-order interpolation.\n");
     }
 
@@ -1979,6 +1988,8 @@
     } else {
         // XXX psError: type not supported
-    }
-
+        printf("XXX psError: type not supported\n");
+    }
+
+    printf("return(NULL)\n");
     psTrace(".psLib.dataManip.psFunctions.p_psVectorInterpolate", 4,
             "---- p_psVectorInterpolate() end ----\n");
