16 lines
296 B
C
16 lines
296 B
C
#ifndef QUEUE_H
|
|
#define QUEUE_H
|
|
|
|
struct queue {
|
|
void **items;
|
|
int n;
|
|
int cap;
|
|
};
|
|
|
|
struct queue init_queue(int cap);
|
|
void free_queue(struct queue *q);
|
|
int enqueue(struct queue *q, void *item);
|
|
int priority_enqueue(struct queue *q, void *item);
|
|
int dequeue(struct queue *q, void **item);
|
|
|
|
#endif |