Exemplo n.º 1
0
/**
 * Assign queue element with an exist queue adaptor.
 */
void queue_assign(queue_t* pque_dest, const queue_t* cpque_src)
{
    assert(pque_dest != NULL);
    assert(cpque_src != NULL);

#ifdef CSTL_QUEUE_LIST_SEQUENCE
    list_assign(&pque_dest->_t_sequence, &cpque_src->_t_sequence);
#else
    deque_assign(&pque_dest->_t_sequence, &cpque_src->_t_sequence);
#endif
}
Exemplo n.º 2
0
/**
 * Assign stack element with an exist stack adaptor.
 */
void stack_assign(cstl_stack_t* psk_dest, const cstl_stack_t* cpsk_src)
{
    assert(psk_dest != NULL);
    assert(cpsk_src != NULL);

#if defined (CSTL_STACK_VECTOR_SEQUENCE)
    vector_assign(&psk_dest->_t_sequence, &cpsk_src->_t_sequence);
#elif defined (CSTL_STACK_LIST_SEQUENCE)
    list_assign(&psk_dest->_t_sequence, &cpsk_src->_t_sequence);
#else
    deque_assign(&psk_dest->_t_sequence, &cpsk_src->_t_sequence);
#endif
}
Exemplo n.º 3
0
int main(int argc, char** argv)
{
    _();
    vec_as_string();
    vec_fill_and_remove();
    vec_not1();
    vec_bind2nd();
    verse_iterator_find_if();
    reverse_iterator_find_if();
    inner_product();
    descending_sort();
    deque_push_erase();
    deque_invalidate();
    deque_assign();

    return EXIT_SUCCESS;
}
Exemplo n.º 4
0
void _type_copy_deque(const void* cpv_first, const void* cpv_second, void* pv_output)
{
    assert(cpv_first != NULL && cpv_second != NULL && pv_output != NULL);
    deque_assign((deque_t*)cpv_first, (deque_t*)cpv_second);
    *(bool_t*)pv_output = true;
}