Index: trunk/psLib/src/dataManip/psConstants.h
===================================================================
--- trunk/psLib/src/dataManip/psConstants.h	(revision 3884)
+++ trunk/psLib/src/dataManip/psConstants.h	(revision 3990)
@@ -6,6 +6,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.66 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-05-11 22:02:16 $
+ *  @version $Revision: 1.67 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-05-19 23:57:37 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -17,4 +17,8 @@
  *  that we ensure that an argument which is expected to be output is
  *  psFree'ed before reurning NULL.
+ *
+ *  XXX: The macros have a name similar to PS_CHECK_CONDITION() and generally
+ *  throw a psError if the CONDITION is true.  However, some throw the error
+ *  if the CONDITION is false.  This should be consistant.
  *
  */
@@ -68,4 +72,15 @@
 }
 
+// Return an error if the arg is less than zero.
+#define PS_INT_CHECK_NEGATIVE(NAME, RVAL) \
+if (NAME < 0) { \
+    psError(PS_ERR_BAD_PARAMETER_VALUE, true, \
+            "Error: %s is less than 0.", #NAME); \
+    return(RVAL); \
+}
+
+// Return an error if the arg is less than zero.
+// XXX: This naming scheme is opposite most other macros.  This should be
+// corrected as soon as a fresh checkin/out can be performed.
 #define PS_INT_CHECK_NON_NEGATIVE(NAME, RVAL) \
 if (NAME < 0) { \
@@ -75,4 +90,7 @@
 }
 
+// Return an error if the arg is less than or equal to zero.
+// XXX: This naming scheme is opposite most other macros.  This should be
+// corrected as soon as a fresh checkin/out can be performed.
 #define PS_INT_CHECK_POSITIVE(NAME, RVAL) \
 if (NAME < 1) { \
@@ -82,6 +100,15 @@
 }
 
+// Return an error if the arg is not equal to zero.
+#define PS_INT_CHECK_NON_ZERO(NAME, RVAL) \
+if (NAME != 0) { \
+    psError(PS_ERR_BAD_PARAMETER_VALUE, true, \
+            "Error: %s is 0.", #NAME); \
+    return(RVAL); \
+}
+
+// Return an error if the arg is equal to zero.
 #define PS_INT_CHECK_ZERO(NAME, RVAL) \
-if (NAME < 1) { \
+if (NAME == 0) { \
     psError(PS_ERR_BAD_PARAMETER_VALUE, true, \
             "Error: %s is 0.", #NAME); \
@@ -89,4 +116,5 @@
 }
 
+// Return an error if the arg is lies outside the supplied range.
 #define PS_INT_CHECK_RANGE(NAME, LOWER, UPPER, RVAL) \
 if ((int)NAME < LOWER || (int)NAME > UPPER) { \
@@ -106,5 +134,4 @@
 }
 
-
 // Produce an error if ((NAME1 > NAME2)
 #define PS_FLOAT_COMPARE(NAME1, NAME2, RVAL) \
@@ -116,4 +143,6 @@
 }
 
+// Generate an error if the two floats are equal.
+// XXX: Inconsistent naming.
 #define PS_FLOAT_CHECK_NON_EQUAL(NAME1, NAME2, RVAL) \
 if (fabs(NAME2 - NAME1) < FLT_EPSILON) { \
@@ -124,4 +153,5 @@
 }
 
+// Return an error if the arg is lies outside the supplied range.
 #define PS_FLOAT_CHECK_RANGE(NAME, LOWER, UPPER, RVAL) \
 if ((NAME) < (LOWER) || (NAME) > (UPPER)) { \
