Index: trunk/psLib/src/math/psFunctions.c
===================================================================
--- trunk/psLib/src/math/psFunctions.c	(revision 4898)
+++ trunk/psLib/src/math/psFunctions.c	(revision 4937)
@@ -7,6 +7,6 @@
 *  polynomials.  It also contains a Gaussian functions.
 *
-*  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-08-30 01:14:13 $
+*  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-08-31 22:28:35 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -709,10 +709,10 @@
     This routine must allocate memory for the polynomial structures.
  *****************************************************************************/
-psPolynomial1D* psPolynomial1DAlloc(int n,
+psPolynomial1D* psPolynomial1DAlloc(unsigned int n,
                                     psPolynomialType type)
 {
     PS_ASSERT_INT_POSITIVE(n, NULL);
 
-    int i = 0;
+    unsigned int i = 0;
     psPolynomial1D* newPoly = NULL;
 
@@ -734,5 +734,6 @@
 }
 
-psPolynomial2D* psPolynomial2DAlloc( int nX,  int nY,
+psPolynomial2D* psPolynomial2DAlloc( unsigned int nX,
+                                     unsigned int nY,
                                      psPolynomialType type)
 {
@@ -740,6 +741,6 @@
     PS_ASSERT_INT_POSITIVE(nY, NULL);
 
-    int x = 0;
-    int y = 0;
+    unsigned int x = 0;
+    unsigned int y = 0;
     psPolynomial2D* newPoly = NULL;
 
@@ -770,5 +771,7 @@
 }
 
-psPolynomial3D* psPolynomial3DAlloc( int nX,  int nY,  int nZ,
+psPolynomial3D* psPolynomial3DAlloc( unsigned int nX,
+                                     unsigned int nY,
+                                     unsigned int nZ,
                                      psPolynomialType type)
 {
@@ -777,7 +780,7 @@
     PS_ASSERT_INT_POSITIVE(nZ, NULL);
 
-    psS32 x = 0;
-    psS32 y = 0;
-    psS32 z = 0;
+    unsigned int x = 0;
+    unsigned int y = 0;
+    unsigned int z = 0;
     psPolynomial3D* newPoly = NULL;
 
@@ -816,5 +819,8 @@
 }
 
-psPolynomial4D* psPolynomial4DAlloc( int nX,  int nY,  int nZ,  int nT,
+psPolynomial4D* psPolynomial4DAlloc( unsigned int nX,
+                                     unsigned int nY,
+                                     unsigned int nZ,
+                                     unsigned int nT,
                                      psPolynomialType type)
 {
@@ -824,8 +830,8 @@
     PS_ASSERT_INT_POSITIVE(nT, NULL);
 
-    psS32 x = 0;
-    psS32 y = 0;
-    psS32 z = 0;
-    psS32 t = 0;
+    unsigned int x = 0;
+    unsigned int y = 0;
+    unsigned int z = 0;
+    unsigned int t = 0;
     psPolynomial4D* newPoly = NULL;
 
@@ -899,5 +905,6 @@
 
 
-psF64 psPolynomial1DEval(const psPolynomial1D* poly, psF64 x)
+psF64 psPolynomial1DEval(const psPolynomial1D* poly,
+                         psF64 x)
 {
     PS_ASSERT_POLY_NON_NULL(poly, NAN);
@@ -932,5 +939,7 @@
 }
 
-psF64 psPolynomial2DEval(const psPolynomial2D* poly, psF64 x, psF64 y)
+psF64 psPolynomial2DEval(const psPolynomial2D* poly,
+                         psF64 x,
+                         psF64 y)
 {
     PS_ASSERT_POLY_NON_NULL(poly, NAN);
@@ -979,5 +988,8 @@
 }
 
-psF64 psPolynomial3DEval(const psPolynomial3D* poly, psF64 x, psF64 y, psF64 z)
+psF64 psPolynomial3DEval(const psPolynomial3D* poly,
+                         psF64 x,
+                         psF64 y,
+                         psF64 z)
 {
     PS_ASSERT_POLY_NON_NULL(poly, NAN);
@@ -1035,5 +1047,9 @@
 }
 
-psF64 psPolynomial4DEval(const psPolynomial4D* poly, psF64 x, psF64 y, psF64 z, psF64 t)
+psF64 psPolynomial4DEval(const psPolynomial4D* poly,
+                         psF64 x,
+                         psF64 y,
+                         psF64 z,
+                         psF64 t)
 {
     PS_ASSERT_POLY_NON_NULL(poly, NAN);
@@ -1114,6 +1130,6 @@
 XXX: What should be the default type for knots be?  psF32 is assumed.
  *****************************************************************************/
-psSpline1D *psSpline1DAlloc(int numSplines,
-                            int order,
+psSpline1D *psSpline1DAlloc(unsigned int numSplines,
+                            unsigned int order,
                             float min,
                             float max)
@@ -1131,5 +1147,5 @@
     //
     tmpSpline->spline = (psPolynomial1D **) psAlloc(numSplines * sizeof(psPolynomial1D *));
-    for (psS32 i=0;i<numSplines;i++) {
+    for (unsigned int i=0; i < numSplines; i++) {
         (tmpSpline->spline)[i] = psPolynomial1DAlloc(order+1, PS_POLYNOMIAL_ORD);
     }
@@ -1144,5 +1160,5 @@
     psF32 width = (max - min) / ((psF32) numSplines);
     tmpSpline->knots->data.F32[0] = min;
-    for (psS32 i=1;i<numSplines;i++) {
+    for (unsigned int i=1; i < numSplines; i++) {
         tmpSpline->knots->data.F32[i] = min + (width * (psF32) i);
     }
@@ -1179,5 +1195,5 @@
  *****************************************************************************/
 psSpline1D *psSpline1DAllocGeneric(const psVector *bounds,
-                                   int order)
+                                   unsigned int order)
 {
     PS_ASSERT_VECTOR_NON_NULL(bounds, NULL);
@@ -1195,5 +1211,5 @@
     //
     tmpSpline->spline = (psPolynomial1D **) psAlloc(numSplines * sizeof(psPolynomial1D *));
-    for (psS32 i=0;i<numSplines;i++) {
+    for (unsigned int i=0; i < numSplines; i++) {
         (tmpSpline->spline)[i] = psPolynomial1DAlloc(order+1, PS_POLYNOMIAL_ORD);
     }
@@ -1206,5 +1222,5 @@
     // XXX:Ensure that the knots are monotonic.
     //
-    for (psS32 i=0;i<bounds->n-1;i++) {
+    for (unsigned int i=0; i < bounds->n-1; i++) {
         if (FLT_EPSILON >= fabs(bounds->data.F32[i+1]-bounds->data.F32[i])) {
             psError(PS_ERR_UNKNOWN, true, "data points must be distinct ([%d] %f %f)\n", i, bounds->data.F32[i], bounds->data.F32[i+1]);
