IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 30, 2008, 2:46:46 PM (18 years ago)
Author:
eugene
Message:

set vectors to use INT or FLT types as needed; cleanup type information in dbStack (use enum)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20081124/Ohana/src/opihi/dvo/dbBooleanCond.c

    r20857 r20860  
    44// supplied by fields, in order 0 - Nfields (validate before calling)
    55// XXX fields needs to be typed (dbValue), stack math needs to deal with the type cases
    6 int dbBooleanCond (dbStack *inStack, int NinStack, float *fields) {
     6int dbBooleanCond (dbStack *inStack, int NinStack, dbValue *fields) {
    77 
    88  float value;
     
    2222
    2323    /***** binary operators *****/
    24     if ((stack[i][0].type >= 3) && (stack[i][0].type <= 8)) {
     24    if ((stack[i][0].type >= DB_STACK_LOGIC) && (stack[i][0].type <= DB_STACK_POWER)) {
    2525
    2626      // pre-test that op and entries match
     
    4242
    4343    /***** unary operators **/
    44     if (stack[i][0].type == 9) {
     44    if (stack[i][0].type == DB_STACK_UNARY) {
    4545
    4646      // pre-test that op and entries match
     
    6262
    6363  // the result here is a single stack entry with a value:
    64   if (stack[0][0].type == 'F') {
     64  if (stack[0][0].type & DB_STACK_FIELD) {
    6565    N = stack[0][0].field;
    66     value = fields[N];
     66    value = (stack[0][0].type & DB_STACK_INT) ? fields[N].Int : fields[N].Flt;
    6767  } else {
    68     value = stack[0][0].Float;
     68    value = (stack[0][0].type & DB_STACK_INT) ? stack[0][0].IntValue : stack[0][0].FltValue;
    6969  }
    7070   
Note: See TracChangeset for help on using the changeset viewer.