summaryrefslogtreecommitdiff
path: root/src/libdatastruct/genqdyn_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libdatastruct/genqdyn_init.c')
-rw-r--r--src/libdatastruct/genqdyn_init.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/libdatastruct/genqdyn_init.c b/src/libdatastruct/genqdyn_init.c
new file mode 100644
index 0000000..08e3370
--- /dev/null
+++ b/src/libdatastruct/genqdyn_init.c
@@ -0,0 +1,13 @@
+/* ISC license. */
+
+#include <skalibs/stralloc.h>
+#include <skalibs/genqdyn.h>
+
+void genqdyn_init (genqdyn *g, size_t esize, unsigned int num, unsigned int den)
+{
+ g->queue = stralloc_zero ;
+ g->esize = esize ;
+ g->head = 0 ;
+ g->num = num ;
+ g->den = den ;
+}