summaryrefslogtreecommitdiffstats
path: root/include/utils.h
blob: f92e0fa15ad7ee78dbfc09f7b4be4f5107078728 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef PROJECT_UTILS_H
#define PROJECT_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 add(fpi1_t a, fpi1_t b);
fpi1_t sub(fpi1_t a, fpi1_t b);
fpi1_t mul(fpi1_t a, fpi1_t b);
fpi1_t div(fpi1_t a, fpi1_t b);

#endif /* PROJECT_UTILS_H */