diff options
Diffstat (limited to 'include/utils.h')
-rw-r--r-- | include/utils.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/utils.h b/include/utils.h new file mode 100644 index 0000000..95b553d --- /dev/null +++ b/include/utils.h @@ -0,0 +1,22 @@ +#ifndef USURPATION_UTILS_H +#define USURPATION_UTILS_H + +#include <stdint.h> + +typedef struct uuid_s { + char bytes[16]; +} uuid_t; + +int cmp_uuid(uuid_t *first, uuid_t *second); + +/** + * Fixed point number with one decimal digit of precision. + */ +typedef int fpi1_t; + +fpi1_t fpi1_add(fpi1_t a, fpi1_t b); +fpi1_t fpi1_sub(fpi1_t a, fpi1_t b); +fpi1_t fpi1_mul(fpi1_t a, fpi1_t b); +fpi1_t fpi1_div(fpi1_t a, fpi1_t b); + +#endif /* USURPATION_UTILS_H */ |