From dd784271cbd08adf866ae08aee49d05ed826e582 Mon Sep 17 00:00:00 2001 From: Andrew Lalis Date: Tue, 23 May 2017 21:35:24 +0200 Subject: [PATCH] started queue file. --- source/handyqueue.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 source/handyqueue.h diff --git a/source/handyqueue.h b/source/handyqueue.h new file mode 100644 index 0000000..dc7f31b --- /dev/null +++ b/source/handyqueue.h @@ -0,0 +1,35 @@ +/* +handyqueue.h +Created By: + Andrew Lalis (andrewlalisofficial@gmail.com) + 23 May 2017 +This file is free to use, as long as the above comment remains in the file. +Please contact the author regarding bugs and/or feature requests. +*/ + +#ifdef QUEUE_TYPE + +#include "templates.h" + +#include +#include +#include + +/* +Queue: + A storage data structure which follows the rule 'first-in, first-out', and has special functions 'enqueue' and 'dequeue' to manipulate the queue. +*/ + +#define QUEUE TEMPLATE(QUEUE_TYPE,queue) + +/* +Queue Structure: +*/ +typedef struct { + QUEUE_TYPE* data; + int back; + int front; + int size; +} QUEUE; + +#endif \ No newline at end of file