reldb 0.1.0
Recreational SQLite
Loading...
Searching...
No Matches
types.h
Go to the documentation of this file.
1
8
9#ifndef TYPES_H
10#define TYPES_H
11
12#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
13# include <float.h>
14# include <stdbool.h>
15# include <stddef.h>
16# include <stdint.h>
17#else
18// Fallback for pre-C99
19# include <stdbool.h>
20# include <stddef.h>
21# include <stdint.h>
22#endif
23
29typedef uint8_t u8;
30typedef uint16_t u16;
31typedef uint32_t u32;
32typedef uint64_t u64;
33
34typedef int8_t s8;
35typedef int16_t s16;
36typedef int32_t s32;
37typedef int64_t s64;
38
39typedef int8_t i8;
40typedef int16_t i16;
41typedef int32_t i32;
42typedef int64_t i64;
44
50typedef size_t usize;
51
53typedef ptrdiff_t isize;
54
55typedef uintptr_t uptr;
56typedef intptr_t iptr;
58
64typedef float f32;
65typedef double f64;
66
67#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
68typedef _Float128 f128;
69#elif defined(__GNUC__) || defined(__clang__)
70typedef __float128 f128;
71#endif
73
79typedef char *cstr;
80typedef const char *ccstr;
81
82typedef void *ptr;
83typedef const void *cptr;
84
85typedef uint8_t byte;
86typedef bool b8;
87typedef int32_t b32;
89
95#define KB(x) ((x) * 1024ULL)
96#define MB(x) (KB(x) * 1024ULL)
97#define GB(x) (MB(x) * 1024ULL)
98#define TB(x) (GB(x) * 1024ULL)
100
101#endif // TYPES_H
int64_t s64
Definition types.h:37
uint64_t u64
Definition types.h:32
int32_t i32
Definition types.h:41
int64_t i64
Definition types.h:42
uint8_t u8
Definition types.h:29
int8_t s8
Definition types.h:34
int16_t s16
Definition types.h:35
uint16_t u16
Definition types.h:30
int16_t i16
Definition types.h:40
int8_t i8
Definition types.h:39
int32_t s32
Definition types.h:36
uint32_t u32
Definition types.h:31
float f32
Definition types.h:64
double f64
Definition types.h:65
intptr_t iptr
Definition types.h:56
ptrdiff_t isize
Definition types.h:53
size_t usize
Definition types.h:50
uintptr_t uptr
Definition types.h:55
const char * ccstr
Definition types.h:80
const void * cptr
Definition types.h:83
bool b8
Definition types.h:86
int32_t b32
Definition types.h:87
char * cstr
Definition types.h:79
void * ptr
Definition types.h:82
uint8_t byte
Definition types.h:85