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
29
typedef
uint8_t
u8
;
30
typedef
uint16_t
u16
;
31
typedef
uint32_t
u32
;
32
typedef
uint64_t
u64
;
33
34
typedef
int8_t
s8
;
35
typedef
int16_t
s16
;
36
typedef
int32_t
s32
;
37
typedef
int64_t
s64
;
38
39
typedef
int8_t
i8
;
40
typedef
int16_t
i16
;
41
typedef
int32_t
i32
;
42
typedef
int64_t
i64
;
44
50
typedef
size_t
usize
;
51
53
typedef
ptrdiff_t
isize
;
54
55
typedef
uintptr_t
uptr
;
56
typedef
intptr_t
iptr
;
58
64
typedef
float
f32
;
65
typedef
double
f64
;
66
67
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
68
typedef
_Float128 f128;
69
#elif defined(__GNUC__) || defined(__clang__)
70
typedef
__float128 f128;
71
#endif
73
79
typedef
char
*
cstr
;
80
typedef
const
char
*
ccstr
;
81
82
typedef
void
*
ptr
;
83
typedef
const
void
*
cptr
;
84
85
typedef
uint8_t
byte
;
86
typedef
bool
b8
;
87
typedef
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
s64
int64_t s64
Definition
types.h:37
u64
uint64_t u64
Definition
types.h:32
i32
int32_t i32
Definition
types.h:41
i64
int64_t i64
Definition
types.h:42
u8
uint8_t u8
Definition
types.h:29
s8
int8_t s8
Definition
types.h:34
s16
int16_t s16
Definition
types.h:35
u16
uint16_t u16
Definition
types.h:30
i16
int16_t i16
Definition
types.h:40
i8
int8_t i8
Definition
types.h:39
s32
int32_t s32
Definition
types.h:36
u32
uint32_t u32
Definition
types.h:31
f32
float f32
Definition
types.h:64
f64
double f64
Definition
types.h:65
iptr
intptr_t iptr
Definition
types.h:56
isize
ptrdiff_t isize
Definition
types.h:53
usize
size_t usize
Definition
types.h:50
uptr
uintptr_t uptr
Definition
types.h:55
ccstr
const char * ccstr
Definition
types.h:80
cptr
const void * cptr
Definition
types.h:83
b8
bool b8
Definition
types.h:86
b32
int32_t b32
Definition
types.h:87
cstr
char * cstr
Definition
types.h:79
ptr
void * ptr
Definition
types.h:82
byte
uint8_t byte
Definition
types.h:85
include
types.h
Generated by
1.16.1