summaryrefslogtreecommitdiffstats
path: root/qbuf.h
diff options
context:
space:
mode:
Diffstat (limited to 'qbuf.h')
-rw-r--r--qbuf.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/qbuf.h b/qbuf.h
new file mode 100644
index 0000000..12d07b7
--- /dev/null
+++ b/qbuf.h
@@ -0,0 +1,22 @@
+#ifndef fooqbufhfoo
+#define fooqbufhfoo
+
+/* $Id$ */
+
+#include <sys/types.h>
+
+struct qbuf {
+ void *data;
+ size_t length, index, fill;
+};
+
+void qbuf_init(struct qbuf *q, size_t length);
+void qbuf_done(struct qbuf *q);
+
+void* qbuf_push(struct qbuf *q, size_t *l);
+void qbuf_push_validate(struct qbuf *q, size_t l);
+
+void* qbuf_pull(struct qbuf *q, size_t *l);
+void qbuf_pull_invalidate(struct qbuf *q, size_t l);
+
+#endif