From f582a36e4df16d5709943f7df17a900c8bcc12ab Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Wed, 25 May 2016 11:37:40 -0400 Subject: Initial commit of source code. Signed-off-by: Kevin O'Connor --- src/basecmd.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/basecmd.h (limited to 'src/basecmd.h') 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 // 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 -- cgit v1.2.3-70-g09d2