started queue file.

This commit is contained in:
Andrew Lalis 2017-05-23 21:35:24 +02:00
parent c1375f3882
commit dd784271cb
1 changed files with 35 additions and 0 deletions

35
source/handyqueue.h Normal file
View File

@ -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 <stdio.h>
#include <stdlib.h>
#include <assert.h>
/*
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