summaryrefslogtreecommitdiff
path: root/sources/bits.c
blob: ba52f4f51adf480017a4d552613b64bec4230d62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#define iota __COUNTER__

#define lengthof(x) (sizeof(x) / sizeof((x)[0]))

#define bit(x) (1 << (x))

#define KB bit(10)
#define MB bit(11)
#define GB bit(12)

typedef unsigned char  u8;
typedef unsigned short u16;
typedef unsigned long long u64;
typedef u64 usize;

typedef u8 bool;
#define true  1
#define false 0