LIST *nt = (*parse->left->func)( parse->left, frame ); LIST *ns = (*parse->right->func)( parse->right, frame );
LIST *nt = parse_evaluate( parse->left, frame ); LIST *ns = parse_evaluate( parse->right, frame );
evaluate_if(    PARSE   *parse,    FRAME *frame ){    int status;    if( parse->num <= COND_OR )    {        /* Handle one of the logical operators */        switch( parse->num )        {        case COND_NOT:        status = !evaluate_if( parse->left, frame );        break;        case COND_AND:        status = evaluate_if( parse->left, frame ) &&             evaluate_if( parse->right, frame );        break;        case COND_OR:        status = evaluate_if( parse->left, frame ) ||             evaluate_if( parse->right, frame );        break;        default:        status = 0; /* can't happen */        }    }    else    {        /* Handle one of the comparison operators */        /* Expand targets and sources */        LIST *nt = (*parse->left->func)( parse->left, frame );        LIST *ns = (*parse->right->func)( parse->right, frame );        /* "a in b" make sure each of a is equal to something in b. */        /* Otherwise, step through pairwise comparison. */        if( parse->num == COND_IN )        {        LIST *s, *t;        /* Try each t until failure. */        for( status = 1, t = nt; status && t; t = list_next( t ) )        {            int stat1;            /* Try each s until success */            for( stat1 = 0, s = ns; !stat1 && s; s = list_next( s ) )            stat1 = !strcmp( t->string, s->string );            status = stat1;        }        }        else        {        LIST *s = ns, *t = nt;        status = 0;        while( !status && ( t || s ) )        {            char *st = t ? t->string : "";            char *ss = s ? s->string : "";            status = strcmp( st, ss );            t = t ? list_next( t ) : t;            s = s ? list_next( s ) : s;        }        }        switch( parse->num )        {        case COND_EXISTS:   status = status > 0 ; break;        case COND_EQUALS:   status = !status; break;        case COND_NOTEQ:    status = status != 0; break;        case COND_LESS: status = status < 0; break;        case COND_LESSEQ:   status = status <= 0; break;        case COND_MORE: status = status > 0; break;        case COND_MOREEQ:   status = status >= 0; break;        case COND_IN:   /* status = status */ break;        }        if( DEBUG_IF )        {        debug_compile( 0, "if" );        list_print( nt );        printf( "(%d)", status );        list_print( ns );        printf( "\n" );        }        list_free( nt );        list_free( ns );    }    return status;}