aboutsummaryrefslogtreecommitdiffstats
path: root/src/basecmd.h
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2016-05-25 11:37:40 -0400
committerKevin O'Connor <kevin@koconnor.net>2016-05-25 11:37:40 -0400
commitf582a36e4df16d5709943f7df17a900c8bcc12ab (patch)
tree628d927c4f3e19e54618f7f47c7a44af66bf0c2f /src/basecmd.h
parent37a91e9c10648208de002c75df304e23ca89e256 (diff)
downloadkutter-f582a36e4df16d5709943f7df17a900c8bcc12ab.tar.gz
kutter-f582a36e4df16d5709943f7df17a900c8bcc12ab.tar.xz
kutter-f582a36e4df16d5709943f7df17a900c8bcc12ab.zip
Initial commit of source code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/basecmd.h')
-rw-r--r--src/basecmd.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/basecmd.h b/src/basecmd.h
new file mode 100644
index 00000000..e5719c6f
--- /dev/null
+++ b/src/basecmd.h
@@ -0,0 +1,23 @@
+#ifndef __BASECMD_H
+#define __BASECMD_H
+
+#include <stdint.h> // uint8_t
+
+struct move {
+ uint32_t interval;
+ int16_t add;
+ uint16_t count;
+ struct move *next;
+ uint8_t flags;
+};
+
+void move_free(struct move *m);
+struct move *move_alloc(void);
+void *lookup_oid(uint8_t oid, void *type);
+void *alloc_oid(uint8_t oid, void *type, uint16_t size);
+void *next_oid(uint8_t *i, void *type);
+
+#define foreach_oid(pos,data,oidtype) \
+ for (pos=-1; (data=next_oid(&pos, oidtype)); )
+
+#endif // basecmd.h