-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathqueue.h
More file actions
31 lines (25 loc) · 662 Bytes
/
queue.h
File metadata and controls
31 lines (25 loc) · 662 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*****************************************************************************
**
** queue.h
**
** Structure and interface definitions for Queue, a polymorphic FIFO
** data structure
**
** Author: Sean Butze
**
****************************************************************************/
#include "node.h"
#ifndef QUEUE_H
#define QUEUE_H
typedef struct Queue {
unsigned size;
Node *head;
Node *tail;
} Queue;
extern Queue* Queue_new();
extern void Queue_add(Queue *q, void *el);
extern void* Queue_remove(Queue *q);
extern void* Queue_front(Queue *q);
extern unsigned Queue_size(Queue *q);
extern void Queue_delete(Queue *q);
#endif