![]() |
Nilorea Library
C utilities for networking, threading, graphics
|
Stack functions definitions. More...
#include "nilorea/n_stack.h"
Go to the source code of this file.
Functions | |
size_t | __stack_pop (STACK *stack, uint8_t *status) |
helper for stack_pop. | |
size_t | __stack_push (STACK *stack, uint8_t *status) |
helper for stack_push. | |
bool | delete_stack (STACK **stack) |
delete a STACK *stack | |
STACK * | new_stack (size_t size) |
allocate a new STACK | |
bool | stack_is_empty (STACK *stack) |
test if the stack is empty | |
bool | stack_is_full (STACK *stack) |
test if the stack is full | |
STACK_ITEM * | stack_peek (STACK *stack, size_t position) |
peek in the stack with un stacking the stack item | |
bool | stack_pop_b (STACK *stack, uint8_t *status) |
helper to pop a bool | |
char | stack_pop_c (STACK *stack, uint8_t *status) |
helper to pop a char | |
double | stack_pop_d (STACK *stack, uint8_t *status) |
helper to pop a double | |
float | stack_pop_f (STACK *stack, uint8_t *status) |
helper to pop a float | |
int32_t | stack_pop_i32 (STACK *stack, uint8_t *status) |
helper to pop a int32_t | |
int8_t | stack_pop_i8 (STACK *stack, uint8_t *status) |
helper to pop a int8_t | |
void * | stack_pop_p (STACK *stack, uint8_t *status) |
helper to pop a pointer | |
uint32_t | stack_pop_ui32 (STACK *stack, uint8_t *status) |
helper to pop a uint32_t | |
uint8_t | stack_pop_ui8 (STACK *stack, uint8_t *status) |
helper to pop a uint8_t | |
bool | stack_push_b (STACK *stack, bool b) |
helper to push a bool | |
bool | stack_push_c (STACK *stack, char c) |
helper to push a char | |
bool | stack_push_d (STACK *stack, double d) |
helper to push a double | |
bool | stack_push_f (STACK *stack, float f) |
helper to push a float | |
bool | stack_push_i32 (STACK *stack, int32_t i32) |
helper to push an int32_t | |
bool | stack_push_i8 (STACK *stack, int8_t i8) |
helper to push an int8_t | |
bool | stack_push_p (STACK *stack, void *p, uint16_t p_type) |
helper to push a pointer | |
bool | stack_push_ui32 (STACK *stack, uint32_t ui32) |
helper to push an uint32_t | |
bool | stack_push_ui8 (STACK *stack, uint8_t ui8) |
helper to push an uint8_t | |
Stack functions definitions.
Stack header definitions.
Definition in file n_stack.c.
size_t __stack_pop | ( | STACK * | stack, |
uint8_t * | status | ||
) |
helper for stack_pop.
Try to remove a new cell in the stack, and store the result in status
stack | target STACK *stack |
status | pointer to uint8_t holding the result of the operation (STACK_IS_UNDEFINED,STACK_IS_EMPTY,STACK_ITEM_OK) |
Definition at line 140 of file n_stack.c.
References __n_assert, STACK_IS_EMPTY, STACK_IS_UNDEFINED, and STACK_ITEM_OK.
Referenced by stack_pop_b(), stack_pop_c(), stack_pop_d(), stack_pop_f(), stack_pop_i32(), stack_pop_i8(), stack_pop_p(), stack_pop_ui32(), and stack_pop_ui8().
size_t __stack_push | ( | STACK * | stack, |
uint8_t * | status | ||
) |
helper for stack_push.
Try to get a new cell in the stack, and store the result in status
stack | target STACK *stack |
status | pointer to uint8_t holding the result of the operation (STACK_IS_UNDEFINED,STACK_ITEM_OK,STACK_IS_FULL) |
Definition at line 107 of file n_stack.c.
References __n_assert, STACK_IS_FULL, stack_is_full(), STACK_IS_UNDEFINED, and STACK_ITEM_OK.
Referenced by stack_push_b(), stack_push_c(), stack_push_d(), stack_push_f(), stack_push_i32(), stack_push_i8(), stack_push_p(), stack_push_ui32(), and stack_push_ui8().