Index: /trunk/psLib/src/astro/psCoord.h
===================================================================
--- /trunk/psLib/src/astro/psCoord.h	(revision 4936)
+++ /trunk/psLib/src/astro/psCoord.h	(revision 4937)
@@ -10,6 +10,6 @@
 *  @author GLG, MHPCC
 *
-*  @version $Revision: 1.42 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-08-30 01:14:10 $
+*  @version $Revision: 1.43 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-08-31 22:28:35 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -24,5 +24,5 @@
 #include "psList.h"
 #include "psFunctions.h"
-#include "psTime.h"
+//#include "psTime.h"
 
 /// @addtogroup CoordinateTransform
@@ -52,5 +52,5 @@
  *
  */
-typedef struct psSphere
+typedef struct
 {
     double r;                          ///< RA
Index: /trunk/psLib/src/astro/psSphereOps.h
===================================================================
--- /trunk/psLib/src/astro/psSphereOps.h	(revision 4936)
+++ /trunk/psLib/src/astro/psSphereOps.h	(revision 4937)
@@ -7,6 +7,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-08-30 01:14:10 $
+ *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-31 22:28:35 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -19,5 +19,6 @@
 /// @{
 
-#include "psCoord.h"
+//#include "psCoord.h"
+#include "psTime.h"
 
 /** Spherical Rotation Definition
Index: /trunk/psLib/src/astro/psTime.c
===================================================================
--- /trunk/psLib/src/astro/psTime.c	(revision 4936)
+++ /trunk/psLib/src/astro/psTime.c	(revision 4937)
@@ -10,6 +10,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.67 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-08-30 01:14:10 $
+ *  @version $Revision: 1.68 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-31 22:28:35 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -28,5 +28,4 @@
 #include "psAbort.h"
 #include "psImage.h"
-#include "psCoord.h"
 #include "psString.h"
 #include "psMetadata.h"
@@ -899,5 +898,5 @@
 }
 
-struct psSphere* p_psTimeGetPoleCoords(const psTime* time)
+psSphere* p_psTimeGetPoleCoords(const psTime* time)
 {
     psU32 nTables = 3;
@@ -908,5 +907,5 @@
     psF64 c = 0.0;
     psF64 mjdPred = 0.0;
-    struct psSphere* output = NULL;
+    psSphere* output = NULL;
     psLookupStatusType xStatus = PS_LOOKUP_SUCCESS;
     psLookupStatusType yStatus = PS_LOOKUP_SUCCESS;
@@ -920,6 +919,5 @@
     PS_ASSERT_INT_WITHIN_RANGE(time->nsec,0,(psU32)((1e9)-1),NULL);
 
-    if(time->type != PS_TIME_TAI)
-    {
+    if(time->type != PS_TIME_TAI) {
         psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_TYPE_INCORRECT, time->type);
         return NULL;
@@ -934,6 +932,5 @@
 
     // Value could not be found through table lookup and interpolation
-    if(xStatus==PS_LOOKUP_PAST_TOP && yStatus==PS_LOOKUP_PAST_TOP)
-    {
+    if(xStatus==PS_LOOKUP_PAST_TOP && yStatus==PS_LOOKUP_PAST_TOP) {
 
         // Date too earlier for tables. Get default polar coodinate values from metadata, and issue warning.
@@ -954,6 +951,5 @@
         y = tableMetadataItem->data.F64;
 
-    } else if(xStatus==PS_LOOKUP_PAST_BOTTOM && yStatus==PS_LOOKUP_PAST_BOTTOM)
-    {
+    } else if(xStatus==PS_LOOKUP_PAST_BOTTOM && yStatus==PS_LOOKUP_PAST_BOTTOM) {
 
         /* Date too late for tables. Issue warning and use following formulae for predicting
@@ -1012,6 +1008,5 @@
             yp->data.F64[4]*sin(c);
 
-    } else if(xStatus!=PS_LOOKUP_SUCCESS || yStatus!=PS_LOOKUP_SUCCESS)
-    {
+    } else if(xStatus!=PS_LOOKUP_SUCCESS || yStatus!=PS_LOOKUP_SUCCESS) {
         psError(PS_ERR_BAD_PARAMETER_VALUE, true, PS_ERRORTEXT_psTime_INTERPOLATION_FAILED);
         return NULL;
Index: /trunk/psLib/src/astro/psTime.h
===================================================================
--- /trunk/psLib/src/astro/psTime.h	(revision 4936)
+++ /trunk/psLib/src/astro/psTime.h	(revision 4937)
@@ -11,6 +11,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-08-31 02:07:09 $
+ *  @version $Revision: 1.37 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-31 22:28:35 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -26,4 +26,5 @@
 #include "psType.h"
 #include "psImage.h"
+#include "psCoord.h"
 
 struct psSphere;
@@ -173,7 +174,7 @@
  *  @return  psSphere*: Spherical coordinates of Earth's polar axias.
  */
-struct psSphere* p_psTimeGetPoleCoords(
-                const psTime *time      ///< psTime determine polar orientation.
-            );
+psSphere* p_psTimeGetPoleCoords(
+    const psTime *time      ///< psTime determine polar orientation.
+);
 
 /** Calculate the number of leapseconds between two times.
Index: /trunk/psLib/src/math/psFunctions.c
===================================================================
--- /trunk/psLib/src/math/psFunctions.c	(revision 4936)
+++ /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]);
Index: /trunk/psLib/src/math/psFunctions.h
===================================================================
--- /trunk/psLib/src/math/psFunctions.h	(revision 4936)
+++ /trunk/psLib/src/math/psFunctions.h	(revision 4937)
@@ -12,6 +12,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-08-30 01:14:13 $
+ *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-08-31 22:28:35 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -74,5 +74,5 @@
 {
     psPolynomialType type;             ///< Polynomial type
-    int n;                             ///< Number of terms
+    unsigned int n;                    ///< Number of terms
     psF64 *coeff;                      ///< Coefficients
     psF64 *coeffErr;                   ///< Error in coefficients
@@ -85,6 +85,6 @@
 {
     psPolynomialType type;             ///< Polynomial type
-    int nX;                            ///< Number of terms in x
-    int nY;                            ///< Number of terms in y
+    unsigned int nX;                   ///< Number of terms in x
+    unsigned int nY;                   ///< Number of terms in y
     psF64 **coeff;                     ///< Coefficients
     psF64 **coeffErr;                  ///< Error in coefficients
@@ -97,7 +97,7 @@
 {
     psPolynomialType type;             ///< Polynomial type
-    int nX;                           ///< Number of terms in x
-    int nY;                            ///< Number of terms in y
-    int nZ;                           ///< Number of terms in z
+    unsigned int nX;                   ///< Number of terms in x
+    unsigned int nY;                   ///< Number of terms in y
+    unsigned int nZ;                   ///< Number of terms in z
     psF64 ***coeff;                    ///< Coefficients
     psF64 ***coeffErr;                 ///< Error in coefficients
@@ -110,8 +110,8 @@
 {
     psPolynomialType type;             ///< Polynomial type
-    int nX;                            ///< Number of terms in x
-    int nY;                            ///< Number of terms in y
-    int nZ;                            ///< Number of terms in z
-    int nT;                            ///< Number of terms in t
+    unsigned int nX;                   ///< Number of terms in x
+    unsigned int nY;                   ///< Number of terms in y
+    unsigned int nZ;                   ///< Number of terms in z
+    unsigned int nT;                   ///< Number of terms in t
     psF64 ****coeff;                   ///< Coefficients
     psF64 ****coeffErr;                ///< Error in coefficients
@@ -126,5 +126,5 @@
  */
 psPolynomial1D* psPolynomial1DAlloc(
-    int n,                             ///< Number of terms
+    unsigned int n,                    ///< Number of terms
     psPolynomialType type              ///< Polynomial Type
 );
@@ -135,6 +135,6 @@
  */
 psPolynomial2D* psPolynomial2DAlloc(
-    int nX,                   ///< Number of terms in x
-    int nY,                   ///< Number of terms in y
+    unsigned int nX,                   ///< Number of terms in x
+    unsigned int nY,                   ///< Number of terms in y
     psPolynomialType type              ///< Polynomial Type
 );
@@ -145,7 +145,7 @@
  */
 psPolynomial3D* psPolynomial3DAlloc(
-    int nX,                            ///< Number of terms in x
-    int nY,                            ///< Number of terms in y
-    int nZ,                            ///< Number of terms in z
+    unsigned int nX,                   ///< Number of terms in x
+    unsigned int nY,                   ///< Number of terms in y
+    unsigned int nZ,                   ///< Number of terms in z
     psPolynomialType type              ///< Polynomial Type
 );
@@ -156,8 +156,8 @@
  */
 psPolynomial4D* psPolynomial4DAlloc(
-    int nX,                            ///< Number of terms in x
-    int nY,                            ///< Number of terms in y
-    int nZ,                            ///< Number of terms in z
-    int nT,                            ///< Number of terms in t
+    unsigned int nX,                   ///< Number of terms in x
+    unsigned int nY,                   ///< Number of terms in y
+    unsigned int nZ,                   ///< Number of terms in z
+    unsigned int nT,                   ///< Number of terms in t
     psPolynomialType type              ///< Polynomial Type
 );
@@ -212,6 +212,4 @@
     psPtr ptr                          ///< the pointer whose type to check
 );
-
-
 
 /** Evaluates a 1-D polynomial at specific coordinates.
@@ -299,9 +297,8 @@
 );
 
-
 /** One-Dimensional Spline */
 typedef struct
 {
-    int n;                             ///< The number of spline pieces
+    unsigned int n;                    ///< The number of spline pieces
     psPolynomial1D **spline;           ///< An array of n pointers to the spline polynomials
     psVector *knots;                   ///< The boundaries between each spline piece.  Size is n+1.
@@ -319,6 +316,6 @@
  */
 psSpline1D *psSpline1DAlloc(
-    int n,                             ///< Number of spline polynomials
-    int order,                         ///< Order of spline polynomials
+    unsigned int n,                             ///< Number of spline polynomials
+    unsigned int order,                         ///< Order of spline polynomials
     float min,                         ///< Lower boundary value of spline polynomials
     float max                          ///< Upper boundary value of spline polynomials
@@ -333,5 +330,5 @@
 psSpline1D *psSpline1DAllocGeneric(
     const psVector *bounds,            ///< Bounds for spline polynomials
-    int order                          ///< Order of spline polynomials
+    unsigned int order                 ///< Order of spline polynomials
 );
 
