WONKY



LOG | FILES | OVERVIEW


#ifndef GQUEUE_H
#define GQUEUE_H GQUEUE_H
#include <queue.hh>

#include <stdlib.h>
#include <wonky_assert.h>
#include <common.h>
#include <wonky_malloc.h>

struct Queue_Node
{
	void *data;
	struct Queue_Node *prev; /*+1*/
	struct Queue_Node *next; /*-1*/
};

struct Queue
{
	struct Queue_Node *first;
	struct Queue_Node *last;
	
	size_t size;
};
void Queue_Init(Queue *q);
void Queue_Push(Queue *q,void *data);
void Queue_Push_Front(struct Queue *q,void *data);
void* Queue_Pop(Queue *q);
void Queue_Append(struct Queue *lead,struct Queue *follower);
void Queue_Destroy(Queue *q);
void *Queue_At(struct Queue *q,size_t where);

#endif