summaryrefslogtreecommitdiff
path: root/lib/queue.h
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2017-06-22 16:05:05 -0400
committerJaron Kent-Dobias <jaron@kent-dobias.com>2017-06-22 16:05:05 -0400
commit9db6ee734df8477a2529f56e4a6f4b1784bf941b (patch)
tree363a384753ce52cb681fbb07ba4575e592390651 /lib/queue.h
parentf2639be5d5006079868f69b0c7105a066166bec6 (diff)
downloadc++-9db6ee734df8477a2529f56e4a6f4b1784bf941b.tar.gz
c++-9db6ee734df8477a2529f56e4a6f4b1784bf941b.tar.bz2
c++-9db6ee734df8477a2529f56e4a6f4b1784bf941b.zip
many changes, simplification of some functions, removal of unneeded ones
Diffstat (limited to 'lib/queue.h')
-rw-r--r--lib/queue.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/queue.h b/lib/queue.h
new file mode 100644
index 0000000..c7acec1
--- /dev/null
+++ b/lib/queue.h
@@ -0,0 +1,18 @@
+
+#pragma once
+
+#include <inttypes.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <string.h>
+
+typedef struct ll_tag {
+ uint32_t x;
+ struct ll_tag *next;
+} ll_t;
+
+void stack_push(ll_t **q, uint32_t x);
+
+uint32_t stack_pop(ll_t **q);
+
+bool stack_contains(const ll_t *q, uint32_t x);