Index: trunk/psLib/src/sys/psAssert.h
===================================================================
--- trunk/psLib/src/sys/psAssert.h	(revision 12433)
+++ trunk/psLib/src/sys/psAssert.h	(revision 12596)
@@ -12,4 +12,11 @@
 #include "psError.h"
 #include "psLogMsg.h"
+
+// these two asserts can be used in the middle of a function to test for programming errors
+#define PS_ASSERT(VAR, RVAL) \
+if (!(VAR)) { \
+    psError(PS_ERR_PROGRAMMING, false, "Error: %s is not true.", #VAR); \
+    return(RVAL); \
+}
 
 // Ensure this is a psLib pointer, by checking for the memblock bounds.
@@ -35,4 +42,12 @@
 }
 
+#define PS_ASSERT_INT_UNEQUAL(NAME1, NAME2, RVAL) \
+if ((NAME1) == (NAME2)) { \
+    psError(PS_ERR_BAD_PARAMETER_VALUE, true, \
+            "Error: %s and %s are equal.", \
+            #NAME1, #NAME2); \
+    return(RVAL); \
+}
+
 #define PS_ASSERT_INT_EQUAL(NAME1, NAME2, RVAL) \
 if ((NAME1) != (NAME2)) { \
