Index: trunk/psLib/src/math/psStats.c
===================================================================
--- trunk/psLib/src/math/psStats.c	(revision 4409)
+++ trunk/psLib/src/math/psStats.c	(revision 4540)
@@ -14,6 +14,6 @@
  *      stats->binsize
  *
- *  @version $Revision: 1.136 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-28 20:17:52 $
+ *  @version $Revision: 1.137 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-07-12 19:12:01 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -41,5 +41,5 @@
 #include "psConstants.h"
 
-#include "psDataManipErrors.h"
+#include "psErrorText.h"
 
 /*****************************************************************************/
@@ -77,5 +77,6 @@
 psBool p_psGetStatValue(const psStats* stats, psF64 *value)
 {
-    switch (stats->options & ~(PS_STAT_USE_RANGE | PS_STAT_USE_BINSIZE | PS_STAT_ROBUST_FOR_SAMPLE)) {
+    //    switch (stats->options & ~(PS_STAT_USE_RANGE | PS_STAT_USE_BINSIZE | PS_STAT_ROBUST_FOR_SAMPLE)) {
+    switch (stats->options & ~(PS_STAT_USE_RANGE | PS_STAT_USE_BINSIZE)) {
     case PS_STAT_SAMPLE_MEAN:
         *value = stats->sampleMean;
@@ -658,5 +659,5 @@
         x.data.F32 = iMid - (PS_GAUSS_WIDTH * sigma);
         if ((x.data.F32 >= firstBound) && (x.data.F32 <= lastBound)) {
-            jMin = p_psVectorBinDisect(robustHistogram->bounds, &x);
+            jMin = p_psVectorBinDisect( *(psVector* *)&robustHistogram->bounds, &x);
             if (jMin < 0) {
                 psError(PS_ERR_UNEXPECTED_NULL,
@@ -673,5 +674,5 @@
         x.data.F32 = iMid + (PS_GAUSS_WIDTH * sigma);
         if ((x.data.F32 >= firstBound) && (x.data.F32 <= lastBound)) {
-            jMax = p_psVectorBinDisect(robustHistogram->bounds, &x);
+            jMax = p_psVectorBinDisect( *(psVector* *)&robustHistogram->bounds, &x);
             if (jMax < 0) {
                 psError(PS_ERR_UNEXPECTED_NULL,
@@ -1705,5 +1706,5 @@
         //Determine id that is okay.
         stats->robustMedian = fitQuadraticSearchForYThenReturnX(
-                                  robustHistogram->bounds,
+                                  *(psVector* *)&robustHistogram->bounds,
                                   cumulativeRobustSums,
                                   medianBinNum,
@@ -1721,5 +1722,5 @@
         //Determine id that is okay.
         stats->robustLQ = fitQuadraticSearchForYThenReturnX(
-                              robustHistogram->bounds,
+                              *(psVector* *)&robustHistogram->bounds,
                               cumulativeRobustSums,
                               LQBinNum,
@@ -1728,5 +1729,5 @@
         //Determine id that is okay.
         stats->robustUQ = fitQuadraticSearchForYThenReturnX(
-                              robustHistogram->bounds,
+                              *(psVector* *)&robustHistogram->bounds,
                               cumulativeRobustSums,
                               UQBinNum,
@@ -1812,5 +1813,5 @@
     psMemSetDeallocator(newHist, (psFreeFunc) histogramFree);
     newHist->bounds = psVectorAlloc(n + 1, PS_TYPE_F32);
-    newHist->bounds->n = newHist->bounds->nalloc;
+    *(int *)&newHist->bounds->n = newHist->bounds->nalloc;
 
     // Calculate the bounds for each bin.
@@ -1859,5 +1860,5 @@
     psMemSetDeallocator(newHist, (psFreeFunc) histogramFree);
     newHist->bounds = psVectorAlloc(bounds->n, PS_TYPE_F32);
-    newHist->bounds->n = newHist->bounds->nalloc;
+    *(int *)&newHist->bounds->n = newHist->bounds->nalloc;
     for (i = 0; i < bounds->n; i++) {
         newHist->bounds->data.F32[i] = bounds->data.F32[i];
@@ -2067,5 +2068,5 @@
                     // correct bin number requires a bit more work.
                     tmpScalar.data.F32 = inF32->data.F32[i];
-                    binNum = p_psVectorBinDisect(out->bounds, &tmpScalar);
+                    binNum = p_psVectorBinDisect( *(psVector* *)&out->bounds, &tmpScalar);
                     if (binNum < 0) {
                         psLogMsg(__func__, PS_LOG_WARN,
