summaryrefslogtreecommitdiff
path: root/lib/queue.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/queue.c')
-rw-r--r--lib/queue.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/lib/queue.c b/lib/queue.c
index 9a01741..aebbb2a 100644
--- a/lib/queue.c
+++ b/lib/queue.c
@@ -1,23 +1,23 @@
-#include "wolff.h"
+#include "queue.h"
void stack_push(ll_t **q, uint32_t x) {
- ll_t *nq = malloc(sizeof(ll_t));
- nq->x = x;
- nq->next = *q;
+ ll_t *nq = malloc(sizeof(ll_t));
+ nq->x = x;
+ nq->next = *q;
- *q = nq;
+ *q = nq;
}
uint32_t stack_pop(ll_t **q) {
- ll_t *old_q = *q;
+ ll_t *old_q = *q;
- *q = old_q->next;
- uint32_t x = old_q->x;
+ *q = old_q->next;
+ uint32_t x = old_q->x;
- free(old_q);
+ free(old_q);
- return x;
+ return x;
}
bool stack_contains(const ll_t *q, uint32_t x) {
@@ -29,4 +29,3 @@ bool stack_contains(const ll_t *q, uint32_t x) {
return stack_contains(q->next, x);
}
}
-