Index: trunk/Ohana/src/opihi/dvo/dbBooleanCond.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/dbBooleanCond.c	(revision 15717)
+++ trunk/Ohana/src/opihi/dvo/dbBooleanCond.c	(revision 20936)
@@ -3,5 +3,6 @@
 // evaluate the expression in inStack as a boolean; necessary db field values are
 // supplied by fields, in order 0 - Nfields (validate before calling)
-int dbBooleanCond (dbStack *inStack, int NinStack, float *fields) {
+// XXX fields needs to be typed (dbValue), stack math needs to deal with the type cases
+int dbBooleanCond (dbStack *inStack, int NinStack, dbValue *fields) {
   
   float value;
@@ -21,5 +22,5 @@
 
     /***** binary operators *****/
-    if ((stack[i][0].type >= 3) && (stack[i][0].type <= 8)) {
+    if ((stack[i][0].type >= DB_STACK_LOGIC) && (stack[i][0].type <= DB_STACK_POWER)) {
 
       // pre-test that op and entries match
@@ -41,5 +42,5 @@
 
     /***** unary operators **/
-    if (stack[i][0].type == 9) {
+    if (stack[i][0].type == DB_STACK_UNARY) {
 
       // pre-test that op and entries match
@@ -61,9 +62,9 @@
 
   // the result here is a single stack entry with a value:
-  if (stack[0][0].type == 'F') {
+  if (stack[0][0].type & DB_STACK_FIELD) {
     N = stack[0][0].field;
-    value = fields[N];
+    value = (stack[0][0].type & DB_STACK_INT) ? fields[N].Int : fields[N].Flt;
   } else {
-    value = stack[0][0].Float;
+    value = (stack[0][0].type & DB_STACK_INT) ? stack[0][0].IntValue : stack[0][0].FltValue;
   }
     
