Index: /trunk/psLib/src/dataManip/psConstants.h
===================================================================
--- /trunk/psLib/src/dataManip/psConstants.h	(revision 2105)
+++ /trunk/psLib/src/dataManip/psConstants.h	(revision 2106)
@@ -6,6 +6,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-12 20:53:02 $
+ *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-14 01:44:48 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -113,4 +113,10 @@
     return(NULL); \
 }
+/** Preprocessor macro to generate error on a NULL poniter */
+#define PS_CHECK_NULL_PTR_RETURN_ZERO(NAME) \
+if (NAME == NULL) { \
+    psError(__func__,"Unallowable operation: %s is NULL.", #NAME); \
+    return(0); \
+}
 
 /** Preprocessor macro to generate error for zero length vector */
Index: /trunk/psLib/src/dataManip/psFunctions.c
===================================================================
--- /trunk/psLib/src/dataManip/psFunctions.c	(revision 2105)
+++ /trunk/psLib/src/dataManip/psFunctions.c	(revision 2106)
@@ -7,6 +7,6 @@
  *  polynomials.  It also contains a Gaussian functions.
  *
- *  @version $Revision: 1.51 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-06 22:27:06 $
+ *  @version $Revision: 1.52 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-14 01:44:48 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -206,10 +206,4 @@
 }
 
-//XXX: remove this
-//typedef enum {
-//    PS_POLYNOMIAL_ORD,                 ///< Ordinary Polynomial
-//    PS_POLYNOMIAL_CHEB                 ///< Chebyshev Polynomial
-//} psPolynomialType;
-
 /*****************************************************************************
     This routine must allocate memory for the polynomial structures.
@@ -1858,6 +1852,6 @@
 {
     if (x->type.type != bins->type.type) {
-        // XXX: Generate error message.
-        return(-1);
+        psError(__func__, "x->type.type != bins->type.type");
+        return(-2);
     }
 
@@ -1867,5 +1861,6 @@
         return(p_psVectorBinDisectF32(bins->data.F32, bins->n, x->data.F32));
     } else {
-        // XXX: Generate error message.
+        psError(__func__, "Unallowable data type.");
+        return(-2);
     }
     return(-1);
@@ -2064,6 +2059,4 @@
 by a call to the 1D polynomial functions.
  
-XXX: SDR is silent about data types.  PS_TYPE_F32 is implemented.
- 
 XXX: The spline eval functions require input and output to be F32.  however
      the spline fit functions require F32 and F64.
Index: /trunk/psLib/src/dataManip/psMinimize.c
===================================================================
--- /trunk/psLib/src/dataManip/psMinimize.c	(revision 2105)
+++ /trunk/psLib/src/dataManip/psMinimize.c	(revision 2106)
@@ -9,6 +9,6 @@
  *  @author GLF, MHPCC
  *
- *  @version $Revision: 1.57 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-06 23:38:49 $
+ *  @version $Revision: 1.58 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-14 01:44:48 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -895,5 +895,5 @@
         tmpPoly = p_psVectorFitPolynomial1DOrd(myPoly, x64, y64, yErr64);
     } else {
-        // XXX: psErrorMsg()
+        psError(__func__, "unknown polynomial type.\n");
         return(NULL);
     }
Index: /trunk/psLib/src/math/psConstants.h
===================================================================
--- /trunk/psLib/src/math/psConstants.h	(revision 2105)
+++ /trunk/psLib/src/math/psConstants.h	(revision 2106)
@@ -6,6 +6,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-12 20:53:02 $
+ *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-14 01:44:48 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -113,4 +113,10 @@
     return(NULL); \
 }
+/** Preprocessor macro to generate error on a NULL poniter */
+#define PS_CHECK_NULL_PTR_RETURN_ZERO(NAME) \
+if (NAME == NULL) { \
+    psError(__func__,"Unallowable operation: %s is NULL.", #NAME); \
+    return(0); \
+}
 
 /** Preprocessor macro to generate error for zero length vector */
Index: /trunk/psLib/src/math/psMinimize.c
===================================================================
--- /trunk/psLib/src/math/psMinimize.c	(revision 2105)
+++ /trunk/psLib/src/math/psMinimize.c	(revision 2106)
@@ -9,6 +9,6 @@
  *  @author GLF, MHPCC
  *
- *  @version $Revision: 1.57 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-06 23:38:49 $
+ *  @version $Revision: 1.58 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-14 01:44:48 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -895,5 +895,5 @@
         tmpPoly = p_psVectorFitPolynomial1DOrd(myPoly, x64, y64, yErr64);
     } else {
-        // XXX: psErrorMsg()
+        psError(__func__, "unknown polynomial type.\n");
         return(NULL);
     }
Index: /trunk/psLib/src/math/psPolynomial.c
===================================================================
--- /trunk/psLib/src/math/psPolynomial.c	(revision 2105)
+++ /trunk/psLib/src/math/psPolynomial.c	(revision 2106)
@@ -7,6 +7,6 @@
  *  polynomials.  It also contains a Gaussian functions.
  *
- *  @version $Revision: 1.51 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-06 22:27:06 $
+ *  @version $Revision: 1.52 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-14 01:44:48 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -206,10 +206,4 @@
 }
 
-//XXX: remove this
-//typedef enum {
-//    PS_POLYNOMIAL_ORD,                 ///< Ordinary Polynomial
-//    PS_POLYNOMIAL_CHEB                 ///< Chebyshev Polynomial
-//} psPolynomialType;
-
 /*****************************************************************************
     This routine must allocate memory for the polynomial structures.
@@ -1858,6 +1852,6 @@
 {
     if (x->type.type != bins->type.type) {
-        // XXX: Generate error message.
-        return(-1);
+        psError(__func__, "x->type.type != bins->type.type");
+        return(-2);
     }
 
@@ -1867,5 +1861,6 @@
         return(p_psVectorBinDisectF32(bins->data.F32, bins->n, x->data.F32));
     } else {
-        // XXX: Generate error message.
+        psError(__func__, "Unallowable data type.");
+        return(-2);
     }
     return(-1);
@@ -2064,6 +2059,4 @@
 by a call to the 1D polynomial functions.
  
-XXX: SDR is silent about data types.  PS_TYPE_F32 is implemented.
- 
 XXX: The spline eval functions require input and output to be F32.  however
      the spline fit functions require F32 and F64.
Index: /trunk/psLib/src/math/psSpline.c
===================================================================
--- /trunk/psLib/src/math/psSpline.c	(revision 2105)
+++ /trunk/psLib/src/math/psSpline.c	(revision 2106)
@@ -7,6 +7,6 @@
  *  polynomials.  It also contains a Gaussian functions.
  *
- *  @version $Revision: 1.51 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-10-06 22:27:06 $
+ *  @version $Revision: 1.52 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-10-14 01:44:48 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -206,10 +206,4 @@
 }
 
-//XXX: remove this
-//typedef enum {
-//    PS_POLYNOMIAL_ORD,                 ///< Ordinary Polynomial
-//    PS_POLYNOMIAL_CHEB                 ///< Chebyshev Polynomial
-//} psPolynomialType;
-
 /*****************************************************************************
     This routine must allocate memory for the polynomial structures.
@@ -1858,6 +1852,6 @@
 {
     if (x->type.type != bins->type.type) {
-        // XXX: Generate error message.
-        return(-1);
+        psError(__func__, "x->type.type != bins->type.type");
+        return(-2);
     }
 
@@ -1867,5 +1861,6 @@
         return(p_psVectorBinDisectF32(bins->data.F32, bins->n, x->data.F32));
     } else {
-        // XXX: Generate error message.
+        psError(__func__, "Unallowable data type.");
+        return(-2);
     }
     return(-1);
@@ -2064,6 +2059,4 @@
 by a call to the 1D polynomial functions.
  
-XXX: SDR is silent about data types.  PS_TYPE_F32 is implemented.
- 
 XXX: The spline eval functions require input and output to be F32.  however
      the spline fit functions require F32 and F64.
