htils 1
A small set of utilities for C programming.
Loading...
Searching...
No Matches
basictypes.h
Go to the documentation of this file.
1#ifndef HTILS_BASICTYPES_H
2#define HTILS_BASICTYPES_H
3
4#include <stdatomic.h>
5#include <stddef.h>
6#include <stdint.h>
7
9typedef uint8_t u8;
10
12typedef uint16_t u16;
13
15typedef uint32_t u32;
16
18typedef uint64_t u64;
19
21typedef int8_t i8;
22
24typedef int16_t i16;
25
27typedef int32_t i32;
28
30typedef int64_t i64;
31
33typedef float f32;
34
36typedef double f64;
37
39typedef u32 b32;
40
42#ifndef true
43#define true (1)
44#endif
45
47#ifndef false
48#define false (0)
49#endif
50
52#define null NULL
53
55typedef char cstr;
56
58typedef unsigned char ucstr;
59
61#ifdef USE_NULLABLE_TYPES
62typedef u8 u8_nullable;
63typedef u16 u16_nullable;
64typedef u32 u32_nullable;
65typedef u64 u64_nullable;
66
67typedef i8 i8_nullable;
68typedef i16 i16_nullable;
69typedef i32 i32_nullable;
70typedef i64 i64_nullable;
71
72typedef cstr cstr_nullable;
73typedef ucstr ucstr_nullable;
74#endif
75
76#endif // !HTILS_BASICTYPES_H
uint64_t u64
Definition basictypes.h:18
int32_t i32
Definition basictypes.h:27
float f32
Definition basictypes.h:33
u32 b32
Definition basictypes.h:39
int64_t i64
Definition basictypes.h:30
uint8_t u8
Definition basictypes.h:9
double f64
Definition basictypes.h:36
unsigned char ucstr
Definition basictypes.h:58
uint16_t u16
Definition basictypes.h:12
char cstr
Definition basictypes.h:55
int16_t i16
Definition basictypes.h:24
int8_t i8
Definition basictypes.h:21
uint32_t u32
Definition basictypes.h:15