13 queue->
_size = initial_size;
14 queue->
data = malloc(
sizeof(
token_t*) * initial_size);
token_t ** data
Pointer to queue data with allocated space to fit _size items.
int _current
The index for the current item.
unsigned int length
The current number of items on the queue.
unsigned int _size
Current number of elements that fits on the queue.
token_t * tkqueue_peek(const tkqueue_t *queue)
Get the current value from the queue without increment the queue position.
void tkqueue_add(tkqueue_t *queue, token_t *token)
Add a value to the token queue.
void _queue_ensure_size(tkqueue_t *queue)
int tkqueue_isempty(const tkqueue_t *queue)
Check if the given queue is empty.
token_t * tkqueue_get(tkqueue_t *queue)
Get the current value from the queue and increment the position for the next value.
void tkqueue_init(tkqueue_t *queue, unsigned int initial_size)
Initializes the token queue.
void tkqueue_close(tkqueue_t *queue)
Close the given queue.
#define QUEUE_LENGTH_INCREMENT
struct tkqueue tkqueue_t
Queue of tokens.
struct token token_t
Struct for a Mya token.