N64FlashcartMenu
Loading...
Searching...
No Matches
utils.h
1#ifndef UTILS_H__
2#define UTILS_H__
3
4
5#define ALIGN(x, a) (((x) + ((typeof(x))(a) - 1)) & ~((typeof(x))(a) - 1))
6
7#define MAX(a,b) ({ typeof(a) _a = a; typeof(b) _b = b; _a > _b ? _a : _b; })
8#define MIN(a,b) ({ typeof(a) _a = a; typeof(b) _b = b; _a < _b ? _a : _b; })
9
10#define KiB(x) ((x) * 1024)
11#define MiB(x) ((x) * 1024 * 1024)
12
13
14#endif