Go to the source code of this file.
Defines | |
#define | stack_init list_init |
Initialize the stack. The prototype for this function is the same than for list_init(). Please consult the documentation for the linked list API. | |
#define | stack_destroy list_destroy |
Free all memory allocated for the stack. The prototype for this function is the same than for list_destroy(). Please consult the documentation for the linked list API. | |
#define | stack_peek(pile) ((pile)->tete == NULL ? NULL : (pile)->tete->donnee) |
Return a pointer to the element at the top of the list (the element is NOT extracted from the list). | |
#define | stack_size list_size |
Return the numder of element in the stack. This macro is identical to the macro list_size used for linked list. Please consult the documentation for the linked list API. | |
Typedefs | |
typedef List | Stack |
A stack is implemented as a linked list. | |
Functions | |
int | stack_push (Stack *pile, const void *donnee) |
Stack up data at the top of the stack. | |
int | stack_pop (Stack *pile, void **donnee) |
Extract data from the top of the stack. |
Definition in file stack.h.
|
Return a pointer to the element at the top of the list (the element is NOT extracted from the list).
|
|
Extract data from the top of the stack.
Definition at line 33 of file stack.c. References list_rem_next(). |
|
Stack up data at the top of the stack.
Definition at line 19 of file stack.c. References list_ins_next(). |