Olaf
Overly Lightweight Acoustic Fingerprinting
Loading...
Searching...
No Matches
queue.h
Go to the documentation of this file.
1/*
2
3Copyright (c) 2005-2008, Simon Howard
4
5Permission to use, copy, modify, and/or distribute this software
6for any purpose with or without fee is hereby granted, provided
7that the above copyright notice and this permission notice appear
8in all copies.
9
10THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR
14CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
16NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
17CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18
19 */
20
41#ifndef ALGORITHM_QUEUE_H
42#define ALGORITHM_QUEUE_H
43
44#ifdef __cplusplus
45extern "C" {
46#endif
47
52typedef struct _Queue Queue;
53
58typedef void *QueueValue;
59
64#define QUEUE_NULL ((void *) 0)
65
73Queue *queue_new(void);
74
81void queue_free(Queue *queue);
82
93int queue_push_head(Queue *queue, QueueValue data);
94
104
115
126int queue_push_tail(Queue *queue, QueueValue data);
127
137
148
157int queue_is_empty(Queue *queue);
158
159#ifdef __cplusplus
160}
161#endif
162
163#endif /* #ifndef ALGORITHM_QUEUE_H */
QueueValue queue_peek_tail(Queue *queue)
Definition: queue.c:241
void queue_free(Queue *queue)
Definition: queue.c:62
int queue_push_head(Queue *queue, QueueValue data)
Definition: queue.c:75
int queue_push_tail(Queue *queue, QueueValue data)
Definition: queue.c:162
QueueValue queue_peek_head(Queue *queue)
Definition: queue.c:153
int queue_is_empty(Queue *queue)
Definition: queue.c:250
void * QueueValue
Definition: queue.h:58
QueueValue queue_pop_head(Queue *queue)
Definition: queue.c:116
Queue * queue_new(void)
Definition: queue.c:46
QueueValue queue_pop_tail(Queue *queue)
Definition: queue.c:203
Definition: queue.c:41