-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpoint_queue.h
More file actions
41 lines (31 loc) · 717 Bytes
/
Copy pathpoint_queue.h
File metadata and controls
41 lines (31 loc) · 717 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
32
33
34
35
36
37
38
39
40
/* Base graphics library for coursework
*
* Point Queue
*/
#ifndef POINT_QUEUE
#define POINT_QUEUE
#include "point.h"
#include "linux/list.h"
struct bg_point_queue_node {
struct bg_point * point;
struct list_head list;
};
typedef struct list_head bg_point_queue;
int
bg_point_queue_empty(
const bg_point_queue * head) {
return list_empty(head);
}
void
bg_point_queue_pushback(
const bg_point_queue * head,
const struct bg_point * p) {
list_add_tail(&(p->list), head);
return;
}
struct bg_point *
bg_point_queue_popfront(
const bg_point_queue * head) {
struct bg_point_queue_node ret;
list_first_entry(ret,
#endif /* POINT_QUEUE */