58 lines
1.0 KiB
C
58 lines
1.0 KiB
C
// vim:fileencoding=utf-8:foldmethod=marker
|
|
|
|
#ifndef ALIASES_H
|
|
#define ALIASES_H
|
|
|
|
#include "../platform/platform.h"
|
|
#include <stdint.h>
|
|
|
|
#if WAPP_PLATFORM_C_VERSION >= WAPP_PLATFORM_C11_VERSION && !defined(WAPP_PLATFORM_APPLE)
|
|
#include <uchar.h>
|
|
|
|
#if WAPP_PLATFORM_C_VERSION >= WAPP_PLATFORM_C23_VERSION
|
|
#define c8 char8_t
|
|
#else
|
|
#define c8 uint8_t
|
|
#endif // !WAPP_PLATFORM_C23_VERSION
|
|
|
|
#define c16 char16_t
|
|
#define c32 char32_t
|
|
#else
|
|
#define c8 uint8_t
|
|
#define c16 uint16_t
|
|
#define c32 uint32_t
|
|
#endif // !WAPP_PLATFORM_C11_VERSION
|
|
|
|
#define u8 uint8_t
|
|
#define u16 uint16_t
|
|
#define u32 uint32_t
|
|
#define u64 uint64_t
|
|
|
|
#define b32 uint32_t
|
|
|
|
#ifndef false
|
|
#define false (b32)0
|
|
#endif
|
|
|
|
#ifndef true
|
|
#define true (b32)1
|
|
#endif
|
|
|
|
#define i8 int8_t
|
|
#define i16 int16_t
|
|
#define i32 int32_t
|
|
#define i64 int64_t
|
|
|
|
#define f32 float
|
|
#define f64 double
|
|
#define f128 long double
|
|
|
|
#define uptr uintptr_t
|
|
#define iptr intptr_t
|
|
|
|
#define external extern
|
|
#define internal static
|
|
#define persistent static
|
|
|
|
#endif // !ALIASES_H
|