Skip to content

Latest commit

History

40 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

QCS

The non official Queue, Chained-List and Stack library.

Index

Documentation :

documentation

Stack :

// my_stack.c
/* add a new element on the top of the stack. */voidput_on_stack(my_stack_t*stack, char*content)
/* remove the last element of a stack and return it's value. */void*put_out_stack(my_stack_t*stack)
/* allocate memory for a stack and return a pointer to it. */my_stack_t*init_stack(void)
/* free alocated space for a stack. */voidfree_stack(my_stack_t*stack)

Queue :

// my_queue.c
/* add a new element on the top of the queue. */intput_on_queue(my_queue_t*queue, void*content)
/* remove the first element of a queue and return it's value. */void*put_out_queue(my_queue_t*queue)
/* allocate memory for a queue and return a pointer to it. */my_queue_t*init_queue(void)
/* free alocated space for a queue. */voidfree_queue(my_queue_t*queue)

Chained List :

// c_list.c
/* add a new element on the top of the list. */intput_on_list(c_list_t*list, void*content)
/* remove the last element of a list and return it's value. */void*put_out_list(c_list_t*list)
/* allocate memory for a list and return a pointer to it. */c_list_t*init_list(void)
/* free alocated space for a list. */voidfree_list(c_list_t*list)

// c_list_index.c
/* allocate memory for an element and return it */staticlist_element_t*allocate_elem(void*content)
/* add a new element at the given index to the list. */intinsert_listi(c_list_t*list, unsigned intindex, void*content)
/* remove the element at the given index of the list. */intdelete_listi(c_list_t*list, unsigned intindex)
/* return the element at the given index of the list */void*get_listi(c_list_t*list, unsigned intindex)

Info

Do not use functions in qcs_utility, they are only used for the library.

About

library for Queues, Linked-lists and Stacks in C

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages