70 lines
1.5 KiB
C
70 lines
1.5 KiB
C
/* See the end of this file for copyright and license terms. */
|
|
|
|
#pragma once
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include "neo/_types.h"
|
|
|
|
/**
|
|
* @defgroup limits Integer Limits
|
|
*
|
|
* @{
|
|
*/
|
|
|
|
#define I8_MIN ((i8)-0x80)
|
|
#define I8_MAX ((i8) 0x7f)
|
|
|
|
#define I16_MIN ((i16)-0x8000)
|
|
#define I16_MAX ((i16) 0x7fff)
|
|
|
|
#define I32_MIN ((i32)-0x80000000)
|
|
#define I32_MAX ((i32) 0x7fffffff)
|
|
|
|
#define I64_MIN ((i64)-0x8000000000000000)
|
|
#define I64_MAX ((i64) 0x7fffffffffffffff)
|
|
|
|
#define U8_MIN ((u8)0x00)
|
|
#define U8_MAX ((u8)0xff)
|
|
|
|
#define BYTE_MIN ((byte)0x00)
|
|
#define BYTE_MAX ((byte)0xff)
|
|
|
|
#define U16_MIN ((u16)0x0000)
|
|
#define U16_MAX ((u16)0xffff)
|
|
|
|
#define U32_MIN ((u32)0x00000000)
|
|
#define U32_MAX ((u32)0xffffffff)
|
|
|
|
#define U64_MIN ((u64)0x0000000000000000)
|
|
#define U64_MAX ((u64)0xffffffffffffffff)
|
|
|
|
#define USIZE_MIN ((usize)0)
|
|
#define USIZE_MAX ((usize)__SIZE_MAX__)
|
|
|
|
#define ISIZE_MAX ((isize)(USIZE_MAX >> 1))
|
|
#define ISIZE_MIN (-ISIZE_MAX - 1)
|
|
|
|
#define NCHAR_MIN ((nchar)0)
|
|
#define NCHAR_MAX ((nchar)0x0010ffff)
|
|
|
|
/** @} */
|
|
|
|
#ifdef __cplusplus
|
|
}; /* extern "C" */
|
|
#endif
|
|
|
|
/*
|
|
* This file is part of libneo.
|
|
* Copyright (c) 2021 Fefie <owo@fef.moe>.
|
|
*
|
|
* libneo is non-violent software: you may only use, redistribute,
|
|
* and/or modify it under the terms of the CNPLv6+ as found in
|
|
* the LICENSE file in the source code root directory or at
|
|
* <https://git.pixie.town/thufie/CNPL>.
|
|
*
|
|
* libneo comes with ABSOLUTELY NO WARRANTY, to the extent
|
|
* permitted by applicable law. See the CNPLv6+ for details.
|
|
*/
|