Index: trunk/psLib/src/math/psBinaryOp.c
===================================================================
--- trunk/psLib/src/math/psBinaryOp.c	(revision 8468)
+++ trunk/psLib/src/math/psBinaryOp.c	(revision 8627)
@@ -30,6 +30,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-08-08 23:32:23 $
+ *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-08-26 04:34:28 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -107,5 +107,5 @@
     long n2 = ((psVector*)IN2)->n; \
     if (n1 != n2) { \
-        psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Number of elements inconsistent, %d vs %d.  Number of elements must match."), n1, n2); \
+        psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Number of elements inconsistent, %ld vs %ld.  Number of elements must match."), n1, n2); \
         if (OUT != IN1 && OUT != IN2) { \
             psFree(OUT); \
@@ -129,5 +129,5 @@
     if (((psVector*)IN1)->type.dimen == PS_DIMEN_VECTOR) { /* Regular vectors */ \
         if (n1 != numRows2) { \
-            psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Number of elements inconsistent, %d vs %d.  Number of elements must match."), n1, numRows2); \
+            psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Number of elements inconsistent, %ld vs %ld.  Number of elements must match."), n1, numRows2); \
             if (OUT != IN1 && OUT != IN2) { \
                 psFree(OUT); \
@@ -146,5 +146,5 @@
     } else {  /* Transposed vectors */ \
         if (n1 != numCols2) { \
-            psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Number of elements inconsistent, %d vs %d.  Number of elements must match."), n1, numCols2); \
+            psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Number of elements inconsistent, %ld vs %ld.  Number of elements must match."), n1, numCols2); \
             if (OUT != IN1 && OUT != IN2) { \
                 psFree(OUT); \
@@ -187,5 +187,5 @@
     if (((psVector*)IN2)->type.dimen == PS_DIMEN_VECTOR) { /* Regular vectors */ \
         if (n2 != numRows1) { \
-            psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Number of elements inconsistent, %d vs %d.  Number of elements must match."), n2, numRows1); \
+            psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Number of elements inconsistent, %ld vs %ld.  Number of elements must match."), n2, numRows1); \
             if (OUT != IN1 && OUT != IN2) { \
                 psFree(OUT); \
@@ -204,5 +204,5 @@
     } else {  /* Transposed vectors */ \
         if (n2 != numCols1) { \
-            psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Number of elements inconsistent, %d vs %d.  Number of elements must match."), n2, numCols1); \
+            psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Number of elements inconsistent, %ld vs %ld.  Number of elements must match."), n2, numCols1); \
             if (OUT != IN1) { \
                 psFree(OUT); \
@@ -229,5 +229,5 @@
     long numCols2 = ((psImage*)IN2)->numCols; \
     if (numRows1 != numRows2 || numCols1 != numCols2) { \
-        psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Specified psImage dimensions differed, %dx%d vs %dx%d."), \
+        psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Specified psImage dimensions differed, %ldx%ld vs %ldx%ld."), \
                 numCols1, numRows1, numCols2, numRows2); \
         if (OUT != IN1 && OUT != IN2) { \
@@ -360,5 +360,5 @@
     } else {                                                                                                 \
         psError(PS_ERR_BAD_PARAMETER_VALUE, true,                                                            \
-                "Types (%x,%x) are not appropriate for logical OR.\n", IN1->type, IN2->type);                \
+                "Types (%x,%x) are not appropriate for logical OR.\n", IN1->type, IN2->type);               \
         return NULL;                                                                                         \
     }                                                                                                        \
Index: trunk/psLib/src/math/psMathUtils.c
===================================================================
--- trunk/psLib/src/math/psMathUtils.c	(revision 8468)
+++ trunk/psLib/src/math/psMathUtils.c	(revision 8627)
@@ -3,6 +3,6 @@
  *  This file contains standard math routines.
  *
- *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-08-09 02:26:44 $
+ *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-08-26 04:34:28 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -58,10 +58,10 @@
     long max; \
     long mid; \
-    psTrace("psLib.math", 4, "---- %s() begin ----\n", __func__); \
+    psTrace("psLib.math", 4, "---- () begin ----\n"); \
     /* psTrace("psLib.math", 6, "Determining the bin for: %f\n", x); */\
     if (value < bounds[0]) { \
         psLogMsg(__func__, PS_LOG_WARN, \
                  "vectorBinDisect%s(): ordinate %f is outside vector range (%f - %f).", \
-                 #TYPE, value, bounds[0], bounds[numBins-1]); \
+                 #TYPE, (double)value, (double)bounds[0], (double)bounds[numBins-1]); \
         return(-2); \
     } \
@@ -69,5 +69,5 @@
         psLogMsg(__func__, PS_LOG_WARN, \
                  "vectorBinDisect%s(): ordinate %f is outside vector range (%f - %f).", \
-                 #TYPE, value, bounds[0], bounds[numBins-1]); \
+                 #TYPE, (double)value, (double)bounds[0], (double)bounds[numBins-1]); \
         return(-1); \
     } \
@@ -79,5 +79,5 @@
         \
         if (value == bounds[mid]) { \
-            psTrace("psLib.math", 4, "---- %s(%d) end (1) ----\n", __func__, mid); \
+            psTrace("psLib.math", 4, "---- %s(%ld) end (1) ----\n", __func__, mid); \
             return(mid); \
         } else if (value < bounds[mid]) { \
@@ -88,5 +88,5 @@
         mid = ((max+1)+min)/2; \
     } \
-    psTrace("psLib.math", 4, "---- %s(%d) end (2) ----\n", __func__, min); \
+    psTrace("psLib.math", 4, "---- %s(%ld) end (2) ----\n", __func__, min); \
     return(min); \
 }
Index: trunk/psLib/src/math/psMatrix.c
===================================================================
--- trunk/psLib/src/math/psMatrix.c	(revision 8468)
+++ trunk/psLib/src/math/psMatrix.c	(revision 8627)
@@ -21,6 +21,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.42 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-08-09 02:26:44 $
+ *  @version $Revision: 1.43 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-08-26 04:34:28 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -675,5 +675,5 @@
         if (outVector->n != inImage->numRows) {
             psError(PS_ERR_BAD_PARAMETER_SIZE, true,
-                    "Image and vector sizes differ: (%d vs %d).",
+                    "Image and vector sizes differ: (%d vs %ld).",
                     inImage->numRows, outVector->n);
             psMatrixToVector_EXIT;
@@ -691,5 +691,5 @@
         if (outVector->n != inImage->numCols) {
             psError(PS_ERR_BAD_PARAMETER_SIZE, true,
-                    "Image and vector sizes differ: (%d vs %d).",
+                    "Image and vector sizes differ: (%d vs %ld).",
                     inImage->numCols, outVector->n);
             psMatrixToVector_EXIT;
@@ -727,5 +727,5 @@
         } else if (outImage->numRows != inVector->n) {
             psError(PS_ERR_BAD_PARAMETER_SIZE, true,
-                    "Image and vector sizes differ: (%d vs %d).",
+                    "Image and vector sizes differ: (%d vs %ld).",
                     outImage->numRows, inVector->n);
             VECTORTOMATRIX_CLEANUP;
@@ -746,5 +746,5 @@
         } else if (outImage->numCols != inVector->n) {
             psError(PS_ERR_BAD_PARAMETER_SIZE, true,
-                    "Image and vector sizes differ: (%d vs %d).",
+                    "Image and vector sizes differ: (%d vs %ld).",
                     outImage->numCols, inVector->n);
             VECTORTOMATRIX_CLEANUP;
Index: trunk/psLib/src/math/psMinimizeLMM.c
===================================================================
--- trunk/psLib/src/math/psMinimizeLMM.c	(revision 8468)
+++ trunk/psLib/src/math/psMinimizeLMM.c	(revision 8627)
@@ -10,6 +10,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-08-09 02:26:44 $
+ *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-08-26 04:34:28 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -181,15 +181,15 @@
     psF64 rcF64 = p_psMinLM_SetABX(alpha, beta, params, paramMask, x, y, dy, func);
     if (isnan(rcF64)) {
-        psTrace (__func__, 5, "p_psMinLM_SetABX() returned a NAN.\n");
+        psTrace ("psLib.math", 5, "p_psMinLM_SetABX() returned a NAN.\n");
         rc = false;
     }
-    psTrace("psLib.math", 5, "p_psMinLM_SetABX() was succesful\n", __func__);
+    psTrace("psLib.math", 5, "p_psMinLM_SetABX() was succesful\n");
 
     psBool rcBool = p_psMinLM_GuessABP(Alpha, delta, Params, alpha, beta, params, paramMask, NULL, NULL, NULL, 0.0);
     if (rcBool == false) {
-        psTrace (__func__, 5, "p_psMinLM_GuessABP() returned FALSE.\n");
+        psTrace ("psLib.math", 5, "p_psMinLM_GuessABP() returned FALSE.\n");
         rc = false;
     }
-    psTrace("psLib.math", 5, "p_psMinLM_GuessABP() was succesful\n", __func__);
+    psTrace("psLib.math", 5, "p_psMinLM_GuessABP() was succesful\n");
 
     psFree(alpha);
@@ -200,5 +200,5 @@
         psFree(dy);
     }
-    psTrace("psLib.math", 3, "---- %s() end ----\n", __func__);
+    psTrace("psLib.math", 3, "---- end ----\n");
     return(rc);
 }
@@ -417,5 +417,5 @@
         psTrace("psLib.math", 6, "The current Param vector: \n");
         for (psS32 i = 0 ; i < Params->n ; i++) {
-            psTrace("psLib.math", 6, "Params[%d] is %f\n", Params->data.F32[i]);
+            psTrace("psLib.math", 6, "Params[%d] is %f\n", i, Params->data.F32[i]);
         }
     }
@@ -447,5 +447,5 @@
                 psTrace("psLib.math", 6, "The current Param vector: \n");
                 for (psS32 i = 0 ; i < Params->n ; i++) {
-                    psTrace("psLib.math", 6, "Params[%d] is %f\n", Params->data.F32[i]);
+                    psTrace("psLib.math", 6, "Params[%d] is %f\n", i, Params->data.F32[i]);
                 }
             }
Index: trunk/psLib/src/math/psMinimizePolyFit.c
===================================================================
--- trunk/psLib/src/math/psMinimizePolyFit.c	(revision 8468)
+++ trunk/psLib/src/math/psMinimizePolyFit.c	(revision 8627)
@@ -10,6 +10,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-08-22 15:01:12 $
+ *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-08-26 04:34:28 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -816,5 +816,5 @@
     //
     for (psS32 N = 0; N < stats->clipIter; N++) {
-        psTrace("psLib.math", 6, "Loop iteration %d.  Calling psVectorFitPolynomial1D()\n");
+        psTrace("psLib.math", 6, "Loop iteration %d.  Calling psVectorFitPolynomial1D()\n", N);
         psS32 Nkeep = 0;
         if (psTraceGetLevel(__func__) >= 6) {
@@ -894,5 +894,5 @@
         // since the polynomial fit won't change.
         //
-        psTrace("psLib.math", 6, "keeping %d of %d pts for fit\n", Nkeep, x->n);
+        psTrace("psLib.math", 6, "keeping %d of %ld pts for fit\n", Nkeep, x->n);
         psFree(fit);
     }
@@ -1250,5 +1250,5 @@
 
     for (psS32 N = 0; N < stats->clipIter; N++) {
-        psTrace("psLib.math", 6, "Loop iteration %d.  Calling psVectorFitPolynomial1D()\n");
+        psTrace("psLib.math", 6, "Loop iteration %d.  Calling psVectorFitPolynomial1D()\n", N);
         psS32 Nkeep = 0;
         if (psTraceGetLevel(__func__) >= 6) {
@@ -1331,5 +1331,5 @@
         }
 
-        psTrace("psLib.math", 6, "keeping %d of %d pts for fit\n", Nkeep, x->n);
+        psTrace("psLib.math", 6, "keeping %d of %ld pts for fit\n", Nkeep, x->n);
         psFree(fit);
     }
@@ -1770,5 +1770,5 @@
 
     for (psS32 N = 0; N < stats->clipIter; N++) {
-        psTrace("psLib.math", 6, "Loop iteration %d.  Calling psVectorFitPolynomial1D()\n");
+        psTrace("psLib.math", 6, "Loop iteration %d.  Calling psVectorFitPolynomial1D()\n", N);
         psS32 Nkeep = 0;
         if (psTraceGetLevel(__func__) >= 6) {
@@ -1851,5 +1851,5 @@
         }
 
-        psTrace("psLib.math", 6, "keeping %d of %d pts for fit\n", Nkeep, x->n);
+        psTrace("psLib.math", 6, "keeping %d of %ld pts for fit\n", Nkeep, x->n);
         psFree(fit);
     }
@@ -2338,5 +2338,5 @@
 
     for (psS32 N = 0; N < stats->clipIter; N++) {
-        psTrace("psLib.math", 6, "Loop iteration %d.  Calling psVectorFitPolynomial4D()\n");
+        psTrace("psLib.math", 6, "Loop iteration %d.  Calling psVectorFitPolynomial4D()\n", N);
         psS32 Nkeep = 0;
         if (psTraceGetLevel(__func__) >= 6) {
@@ -2420,5 +2420,5 @@
         }
 
-        psTrace("psLib.math", 6, "keeping %d of %d pts for fit\n", Nkeep, x->n);
+        psTrace("psLib.math", 6, "keeping %d of %ld pts for fit\n", Nkeep, x->n);
         psFree (fit);
     }
Index: trunk/psLib/src/math/psPolynomialUtils.c
===================================================================
--- trunk/psLib/src/math/psPolynomialUtils.c	(revision 8468)
+++ trunk/psLib/src/math/psPolynomialUtils.c	(revision 8627)
@@ -105,5 +105,5 @@
         }
 
-        psTrace (__func__, 4, "keeping %d of %d pts for fit\n",
+        psTrace (__func__, 4, "keeping %d of %ld pts for fit\n",
                  Nkeep, x->n);
 
Index: trunk/psLib/src/math/psSparse.c
===================================================================
--- trunk/psLib/src/math/psSparse.c	(revision 8468)
+++ trunk/psLib/src/math/psSparse.c	(revision 8627)
@@ -62,5 +62,5 @@
 
     if (i < j) {
-        psLogMsg(__func__, PS_LOG_WARN, "i=%ld, j=%ld refers to a sub-diagonal element; values switched.\n");
+        psLogMsg(__func__, PS_LOG_WARN, "i=%d, j=%d refers to a sub-diagonal element; values switched.\n", i, j);
         int temp = i;
         i = j;
Index: trunk/psLib/src/math/psSpline.c
===================================================================
--- trunk/psLib/src/math/psSpline.c	(revision 8468)
+++ trunk/psLib/src/math/psSpline.c	(revision 8627)
@@ -6,6 +6,6 @@
 *  This file contains the routines that allocate, free, and evaluate splines.
 *
-*  @version $Revision: 1.152 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2006-08-09 02:26:44 $
+*  @version $Revision: 1.153 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2006-08-26 04:34:28 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -213,5 +213,5 @@
     PS_ASSERT_VECTOR_NON_NULL(y, NULL);
     PS_ASSERT_VECTOR_TYPE_F32_OR_F64(y, NULL);
-    PS_ASSERT_INT_LARGER_THAN_OR_EQUAL(y->n, 2, NULL);
+    PS_ASSERT_LONG_LARGER_THAN_OR_EQUAL(y->n, (long)2, NULL);
     psS32 numSplines = (y->n)-1;
     psTrace("psLib.math", 5, "numSplines is %d\n", numSplines);
Index: trunk/psLib/src/math/psStats.c
===================================================================
--- trunk/psLib/src/math/psStats.c	(revision 8468)
+++ trunk/psLib/src/math/psStats.c	(revision 8627)
@@ -16,6 +16,6 @@
  * use ->min and ->max (PS_STAT_USE_RANGE)
  *
- *  @version $Revision: 1.184 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-08-09 02:26:44 $
+ *  @version $Revision: 1.185 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-08-26 04:34:28 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -665,10 +665,10 @@
     if (count == 0) {
         stats->sampleStdev = NAN;
-        psLogMsg(__func__, PS_LOG_WARN, "WARNING: vectorSampleStdev(): no valid psVector elements (%d).  Setting stats->sampleStdev = NAN.\n", count);
+        psLogMsg(__func__, PS_LOG_WARN, "WARNING: vectorSampleStdev(): no valid psVector elements (%ld).  Setting stats->sampleStdev = NAN.\n", count);
         return false;
     }
     if (count == 1) {
         stats->sampleStdev = 0.0;
-        psLogMsg(__func__, PS_LOG_WARN, "WARNING: vectorSampleStdev(): only one valid psVector elements (%d).  Setting stats->sampleStdev = 0.0.\n", count);
+        psLogMsg(__func__, PS_LOG_WARN, "WARNING: vectorSampleStdev(): only one valid psVector elements (%ld).  Setting stats->sampleStdev = 0.0.\n", count);
         return false;
     }
@@ -713,7 +713,7 @@
 
     // Ensure that stats->clipSigma is within the proper range.
-    PS_ASSERT_INT_WITHIN_RANGE(stats->clipSigma,
-                               PS_CLIPPED_SIGMA_LB,
-                               PS_CLIPPED_SIGMA_UB, -1);
+    PS_ASSERT_FLOAT_WITHIN_RANGE(stats->clipSigma,
+                                 PS_CLIPPED_SIGMA_LB,
+                                 PS_CLIPPED_SIGMA_UB, -1);
 
     // Allocate a psStats structure for calculating the mean, median, and
@@ -777,5 +777,5 @@
                         fabsf(myVector->data.F32[j] - clippedMean) > stats->clipSigma * errors->data.F32[j]) {
                     tmpMask->data.U8[j] = 0xff;
-                    psTrace("psLib.math", 10, "Clipped %d: %f +/- %f\n", j,
+                    psTrace("psLib.math", 10, "Clipped %ld: %f +/- %f\n", j,
                             myVector->data.F32[j], errors->data.F32[j]);
                     numClipped++;
@@ -788,5 +788,5 @@
                         fabsf(myVector->data.F32[j] - clippedMean) > (stats->clipSigma * clippedStdev)) {
                     tmpMask->data.U8[j] = 0xff;
-                    psTrace("psLib.math", 10, "Clipped %d: %f\n", j, myVector->data.F32[j]);
+                    psTrace("psLib.math", 10, "Clipped %ld: %f\n", j, myVector->data.F32[j]);
                     numClipped++;
                     clipped = true;
@@ -896,6 +896,6 @@
     PS_ASSERT_VECTOR_TYPE(yVec, PS_TYPE_F32, NAN);
     //    PS_ASSERT_VECTORS_SIZE_EQUAL(xVec, yVec, NAN);
-    PS_ASSERT_INT_WITHIN_RANGE(binNum, 0, (xVec->n - 1), NAN);
-    PS_ASSERT_INT_WITHIN_RANGE(binNum, 0, (yVec->n - 1), NAN);
+    PS_ASSERT_INT_WITHIN_RANGE(binNum, 0, (int)(xVec->n - 1), NAN);
+    PS_ASSERT_INT_WITHIN_RANGE(binNum, 0, (int)(yVec->n - 1), NAN);
 
     psVector *x = psVectorAlloc(3, PS_TYPE_F64);
@@ -1008,8 +1008,8 @@
     psTrace("psLib.math", 4, "---- %s() begin ----\n", __func__);
     PS_ASSERT_VECTOR_NON_NULL(params, NAN);
-    PS_ASSERT_VECTOR_SIZE(params, 2, NAN);
+    PS_ASSERT_VECTOR_SIZE(params, (long)2, NAN);
     PS_ASSERT_VECTOR_TYPE(params, PS_TYPE_F32, NAN);
     PS_ASSERT_VECTOR_NON_NULL(coords, NAN);
-    PS_ASSERT_VECTOR_SIZE(coords, 1, NAN);
+    PS_ASSERT_VECTOR_SIZE(coords, (long)1, NAN);
     PS_ASSERT_VECTOR_TYPE(coords, PS_TYPE_F32, NAN);
 
@@ -1020,5 +1020,5 @@
     psF32 gauss = psGaussian(x, mean, stdev, false);
     if (deriv) {
-        PS_ASSERT_VECTOR_SIZE(deriv, 2, NAN);
+        PS_ASSERT_VECTOR_SIZE(deriv, (long)2, NAN);
         PS_ASSERT_VECTOR_TYPE(deriv, PS_TYPE_F32, NAN);
         psF32 tmp = (x - mean) * gauss;
@@ -1136,5 +1136,5 @@
         // we get here, we know that binSize != 0.0.
         long numBins = (max - min) / binSize; // Number of bins
-        psTrace("psLib.math", 6, "Numbins is %d\n", numBins);
+        psTrace("psLib.math", 6, "Numbins is %ld\n", numBins);
         psTrace("psLib.math", 6, "Creating a robust histogram from data range (%.2f - %.2f)\n", min, max);
         // Generate the histogram
@@ -1159,5 +1159,5 @@
         // ADD step 2: Find the bin which contains the 50% data point.
         totalDataPoints = cumulative->nums->data.F32[numBins - 1];
-        psTrace("psLib.math", 6, "Total data points is %d\n", totalDataPoints);
+        psTrace("psLib.math", 6, "Total data points is %ld\n", totalDataPoints);
         long binMedian;
         if (totalDataPoints/2.0 < cumulative->nums->data.F32[0]) {
@@ -1170,5 +1170,5 @@
             if (binMedian < 0) {
                 psError(PS_ERR_UNKNOWN, false,
-                        "Failed to calculate the 50 precent data point (%d).\n", binMedian);
+                        "Failed to calculate the 50 precent data point (%ld).\n", binMedian);
                 psFree(statsMinMax);
                 psFree(histogram);
@@ -1179,5 +1179,5 @@
             }
         }
-        psTrace("psLib.math", 6, "The median bin is %d (%.2f to %.2f)\n", binMedian,
+        psTrace("psLib.math", 6, "The median bin is %ld (%.2f to %.2f)\n", binMedian,
                 cumulative->bounds->data.F32[binMedian], cumulative->bounds->data.F32[binMedian+1]);
 
@@ -1217,5 +1217,5 @@
             }
         }
-        psTrace("psLib.math", 6, "The 15.8655%% and 84.1345%% data point bins are (%d, %d).\n",
+        psTrace("psLib.math", 6, "The 15.8655%% and 84.1345%% data point bins are (%ld, %ld).\n",
                 binLo, binHi);
         psTrace("psLib.math", 6, "binLo midpoint is %f\n", PS_BIN_MIDPOINT(cumulative, binLo));
@@ -1248,7 +1248,7 @@
         #else
         // This code basically interpolates to find the positions exactly.
-        psTrace("psLib.math", 6, "binLo is %d.  Nums at that bin and the next are (%.2f, %.2f)\n",
+        psTrace("psLib.math", 6, "binLo is %ld.  Nums at that bin and the next are (%.2f, %.2f)\n",
                 binLo, cumulative->nums->data.F32[binLo], cumulative->nums->data.F32[binLo+1]);
-        psTrace("psLib.math", 6, "binHi is %d.  Nums at that bin and the next are (%.2f, %.2f)\n",
+        psTrace("psLib.math", 6, "binHi is %ld.  Nums at that bin and the next are (%.2f, %.2f)\n",
                 binHi, cumulative->nums->data.F32[binHi], cumulative->nums->data.F32[binHi+1]);
 
@@ -1304,5 +1304,5 @@
             psTrace("psLib.math", 6, "Masking data more than 25 bins from the median\n");
             psTrace("psLib.math", 6,
-                    "The median is at bin number %d.  We mask bins outside the bin range (%d:%d)\n",
+                    "The median is at bin number %ld.  We mask bins outside the bin range (%ld:%ld)\n",
                     binMedian, maskLo, maskHi);
             psTrace("psLib.math", 6, "Masking data outside (%f %f)\n", medianLo, medianHi);
@@ -1310,5 +1310,5 @@
                 if ((myVector->data.F32[i] < medianLo) || (myVector->data.F32[i] > medianHi)) {
                     mask->data.U8[i] = 0xff;
-                    psTrace("psLib.math", 6, "Masking element %d is %f\n", i, myVector->data.F32[i]);
+                    psTrace("psLib.math", 6, "Masking element %ld is %f\n", i, myVector->data.F32[i]);
                 }
             }
@@ -1350,5 +1350,5 @@
         return false;
     }
-    psTrace("psLib.math", 6, "The 25-percent and 75-precent data point bins are (%d, %d).\n", binLo25, binHi25);
+    psTrace("psLib.math", 6, "The 25-percent and 75-precent data point bins are (%ld, %ld).\n", binLo25, binHi25);
 
     // ADD step 8: Interpolate to find these two positions exactly: these are the upper and lower quartile
@@ -1381,5 +1381,5 @@
     }
     stats->robustN50 = N50;
-    psTrace("psLib.math", 6, "The robustN50 is %d.\n", N50);
+    psTrace("psLib.math", 6, "The robustN50 is %ld.\n", N50);
 
 
@@ -1413,5 +1413,5 @@
         psTrace("psLib.math", 6, "The new min/max values are (%f, %f).\n", min, max);
         psTrace("psLib.math", 6, "The new bin size is %f.\n", newBinSize);
-        psTrace("psLib.math", 6, "The numBins is %d\n", numBins);
+        psTrace("psLib.math", 6, "The numBins is %ld\n", numBins);
 
         psHistogram *histogram = psHistogramAlloc(min, max, numBins); // A new histogram (without outliers)
@@ -1460,5 +1460,5 @@
             }
         }
-        psTrace("psLib.math", 6, "The peak bin is %d, with %f data.n", binNum, binMaxNums);
+        psTrace("psLib.math", 6, "The peak bin is %ld, with %f data.n", binNum, binMaxNums);
 
         // Fit a Gaussian to the bins in the range 20 sigma of the robust histogram median.
@@ -1696,5 +1696,5 @@
     PS_ASSERT_VECTOR_NON_NULL(bounds, NULL);
     PS_ASSERT_VECTOR_TYPE(bounds, PS_TYPE_F32, NULL);
-    PS_ASSERT_INT_LARGER_THAN_OR_EQUAL(bounds->n, 2, NULL);
+    PS_ASSERT_LONG_LARGER_THAN_OR_EQUAL(bounds->n, (long)2, NULL);
 
     // Allocate memory for the new histogram structure.
@@ -1761,5 +1761,5 @@
     PS_ASSERT_PTR_NON_NULL(out->bounds, false);
     PS_ASSERT_PTR_NON_NULL(out->nums, false);
-    PS_ASSERT_INT_WITHIN_RANGE(binNum, 0, ((out->nums->n)-1), false);
+    PS_ASSERT_LONG_WITHIN_RANGE(binNum, (long)0, (long)((out->nums->n)-1), false);
     PS_ASSERT_FLOAT_LARGER_THAN_OR_EQUAL(error, 0.0, false);
     PS_ASSERT_FLOAT_WITHIN_RANGE(data, out->bounds->data.F32[0],
Index: trunk/psLib/src/math/psUnaryOp.c
===================================================================
--- trunk/psLib/src/math/psUnaryOp.c	(revision 8468)
+++ trunk/psLib/src/math/psUnaryOp.c	(revision 8627)
@@ -30,6 +30,6 @@
  *  @author Robert DeSonia, MHPCC
  *
- *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-08-08 23:32:23 $
+ *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-08-26 04:34:28 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -78,5 +78,5 @@
     long nOut = ((psVector*)OUT)->n; \
     if (nIn != nOut) { \
-        psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Number of elements inconsistent, %d vs %d.  Number of elements must match."), nIn, nOut); \
+        psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Number of elements inconsistent, %ld vs %ld.  Number of elements must match."), nIn, nOut); \
         if (OUT != IN) { \
             psFree(OUT); \
@@ -99,5 +99,5 @@
     long numColsOut = ((psImage*)OUT)->numCols; \
     if(numRowsIn!=numRowsOut || numColsIn!=numColsOut) { \
-        psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Specified psImage dimensions differed, %dx%d vs %dx%d."), \
+        psError(PS_ERR_BAD_PARAMETER_SIZE, true, _("Specified psImage dimensions differed, %ldx%ld vs %ldx%ld."), \
                 numColsIn, numRowsIn, numColsOut, numRowsOut); \
         if (OUT != IN) { \
