First version of string-queue utility.
[egate.git] / include / strqueue.h
diff --git a/include/strqueue.h b/include/strqueue.h
new file mode 100644 (file)
index 0000000..b701d24
--- /dev/null
@@ -0,0 +1,22 @@
+/* Gateway utility
+ * Europagate, 1995
+ *
+ * $Log: strqueue.h,v $
+ * Revision 1.1  1995/03/28 11:42:23  adam
+ * First version of string-queue utility.
+ *
+ */
+
+#ifndef STRQUEUE_H
+#define STRQUEUE_H
+struct str_queue {
+    struct str_entry *first;
+    struct str_entry *last;
+};
+
+struct str_queue *str_queue_mk (void);
+void str_queue_rm (struct str_queue **sq);
+char *str_queue_enq (struct str_queue *sq, const char *msg);
+int str_queue_deq (struct str_queue *sq, char *dst, int max);
+char *str_queue_get (struct str_queue *sq, int index);
+#endif