Beispiel #1
0
/**
 * Test the first queue is greater than or equal to the second queue.
 */
bool_t queue_greater_equal(const queue_t* cpque_first, const queue_t* cpque_second)
{
    assert(cpque_first != NULL);
    assert(cpque_second != NULL);

#ifdef CSTL_QUEUE_LIST_SEQUENCE
    return list_greater_equal(&cpque_first->_t_sequence, &cpque_second->_t_sequence);
#else
    return deque_greater_equal(&cpque_first->_t_sequence, &cpque_second->_t_sequence);
#endif
}
Beispiel #2
0
/**
 * Test the first stack is greater than or equal to the second stack.
 */
bool_t stack_greater_equal(const cstl_stack_t* cpsk_first, const cstl_stack_t* cpsk_second)
{
    assert(cpsk_first != NULL && cpsk_second != NULL);

#if defined (CSTL_STACK_VECTOR_SEQUENCE)
    return vector_greater_equal(&cpsk_first->_t_sequence, &cpsk_second->_t_sequence);
#elif defined (CSTL_STACK_LIST_SEQUENCE)
    return list_greater_equal(&cpsk_first->_t_sequence, &cpsk_second->_t_sequence);
#else
    return deque_greater_equal(&cpsk_first->_t_sequence, &cpsk_second->_t_sequence);
#endif
}