#include "utils.h" int cmp_uuid(uuid_t *first, uuid_t *second) { if (first->hi == second->hi) { if (first->low == second->low) { return 0; } else if (first->low < second->low) { return -1; } else { return 1; } } else if (first->hi < second->hi) { return -1; } else { return 1; } } fpi1_t add(fpi1_t a, fpi1_t b) { return a + b; } fpi1_t sub(fpi1_t a, fpi1_t b) { return a - b; } fpi1_t mul(fpi1_t a, fpi1_t b) { return (fpi1_t)(((long)a * (long)b) / 100); } fpi1_t div(fpi1_t a, fpi1_t b) { return (fpi1_t)(((long)a * 10) / ((long)b * 10)); }