8 bool read_full(int fd, char *buffer, size_t size);
11 bool read_ ## type(int fd, type *ptr); \
12 bool write_ ## type(int fd, type val);
14 #define DEFBOX(type) \
15 typedef struct {v ## type min; v ## type max;} aabb ## type;
17 #define DEFVEC(type) \
18 typedef struct {type x, y;} v2 ## type; \
21 typedef struct {type x, y, z;} v3 ## type; \
25 #define DEFTYP(from, to) \
30 #define DEFTYPES(bits) \
31 DEFTYP(int ## bits ## _t, s ## bits) \
32 DEFTYP(uint ## bits ## _t, u ## bits)
48 typedef aabb2f32 aabb2f;
49 typedef aabb3f32 aabb3f;