From a3e36c1918e63761dfc4d2221cca3636b98e93aa Mon Sep 17 00:00:00 2001 From: Adam Branes Date: Sun, 2 May 2021 17:45:58 +0300 Subject: initial housekeeping done --- queue.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 queue.h (limited to 'queue.h') diff --git a/queue.h b/queue.h new file mode 100644 index 0000000..651d4b0 --- /dev/null +++ b/queue.h @@ -0,0 +1,23 @@ +#ifndef GQUEUE_H +#define GQUEUE_H GQUEUE_H +#include + + +struct Queue_Node +{ + void *data; + struct Queue_Node *prev; +}; + +struct Queue +{ + struct Queue_Node *first,*last; + size_t size; + +}; + +void Queue_Init(struct Queue *q); +void Queue_Push(struct Queue *q,void *data); +void* Queue_Pop(struct Queue *q); +void Queue_Destroy(struct Queue *q); +#endif -- cgit v1.2.3