back to scratko.xyz
summaryrefslogtreecommitdiff
path: root/queue.h
diff options
context:
space:
mode:
authorscratko <m@scratko.xyz>2024-04-23 19:03:35 +0300
committerscratko <m@scratko.xyz>2024-05-25 21:12:30 +0300
commitc1e5cffb43977f5a2f8d9623e40c01dab6d80c46 (patch)
tree31c9c9b6847c292b13a354d962b86b6f5e15bb26 /queue.h
downloadshell-c1e5cffb43977f5a2f8d9623e40c01dab6d80c46.tar.gz
shell-c1e5cffb43977f5a2f8d9623e40c01dab6d80c46.tar.bz2
shell-c1e5cffb43977f5a2f8d9623e40c01dab6d80c46.zip
Shell-I releaseshell-I
Diffstat (limited to 'queue.h')
-rw-r--r--queue.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/queue.h b/queue.h
new file mode 100644
index 0000000..db8ac54
--- /dev/null
+++ b/queue.h
@@ -0,0 +1,19 @@
+#ifndef QUEUE_H_SENTRY
+#define QUEUE_H_SENTRY
+
+struct word_item {
+ char *word;
+ struct word_item *next;
+};
+
+struct queue {
+ struct word_item *first;
+ struct word_item *last;
+};
+
+void queue_init(struct queue *q);
+void queue_push(struct queue *q, char *word);
+void queue_clear(struct queue *q);
+void queue_processing(const struct queue *q, void (*callback)(char*));
+
+#endif