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 <stddef.h>
5#include <stdint.h>
6
8typedef uint8_t u8;
9
11typedef uint16_t u16;
12
14typedef uint32_t u32;
15
17typedef uint64_t u64;
18
20typedef int8_t i8;
21
23typedef int16_t i16;
24
26typedef int32_t i32;
27
29typedef int64_t i64;
30
32typedef float f32;
33
35typedef double f64;
36
38typedef u32 b32;
39
41#define true ((b32)1)
42
44#define false ((b32)0)
45
47#define null NULL
48
50typedef char cstr;
51
53typedef unsigned char ucstr;
54
56#ifdef USE_NULLABLE_TYPES
57typedef u8 u8_nullable;
58typedef u16 u16_nullable;
59typedef u32 u32_nullable;
60typedef u64 u64_nullable;
61
62typedef i8 i8_nullable;
63typedef i16 i16_nullable;
64typedef i32 i32_nullable;
65typedef i64 i64_nullable;
66
67typedef cstr cstr_nullable;
68typedef ucstr ucstr_nullable;
69#endif
70
71#endif // !HTILS_BASICTYPES_H
uint64_t u64
Definition basictypes.h:17
int32_t i32
Definition basictypes.h:26
float f32
Definition basictypes.h:32
u32 b32
Definition basictypes.h:38
int64_t i64
Definition basictypes.h:29
uint8_t u8
Definition basictypes.h:8
double f64
Definition basictypes.h:35
unsigned char ucstr
Definition basictypes.h:53
uint16_t u16
Definition basictypes.h:11
char cstr
Definition basictypes.h:50
int16_t i16
Definition basictypes.h:23
int8_t i8
Definition basictypes.h:20
uint32_t u32
Definition basictypes.h:14