Beispiel #1
0
/// Test if specified event is blocked.
static int event_is_blocked(const event_t &e) {
    const block_t *block;
    parser_t &parser = parser_t::principal_parser();

    size_t idx = 0;
    while ((block = parser.block_at_index(idx++))) {
        if (event_block_list_blocks_type(block->event_blocks, e.type)) return true;
    }
    return event_block_list_blocks_type(parser.global_event_blocks, e.type);
}
Beispiel #2
0
/**
   Test if specified event is blocked
*/
static int event_is_blocked(event_t *e)
{
    block_t *block;
    parser_t &parser = parser_t::principal_parser();
    for (block = parser.current_block; block; block = block->outer)
    {
        if (event_block_list_blocks_type(block->event_blocks, e->type))
            return true;
    }
    return event_block_list_blocks_type(parser.global_event_blocks, e->type);
}