Initial commit
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
/* - | Copyright | ------------------------------------------------------------
|
||||
Copyright (c) 2026 Randy Jordan
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
* --------------------------------------------------------------------------*/
|
||||
#ifndef CI2_SYNTAX_H
|
||||
#define CI2_SYNTAX_H
|
||||
|
||||
/* Floating Points */
|
||||
typedef float ci2_f32; // IEEE 754
|
||||
typedef double ci2_f64; // IEE 754
|
||||
|
||||
/* Characters */
|
||||
typedef signed char ci2_char; // [−127, +127]
|
||||
typedef unsigned char ci2_uchar; // [0, 255]
|
||||
typedef unsigned char ci2_byte; // [0, 255]
|
||||
typedef unsigned char* ci2_bytes; // Pointer
|
||||
|
||||
/* Integers */
|
||||
typedef signed short ci2_short; // [−32,767, 32,767]
|
||||
typedef unsigned short ci2_ushort; // [0, 65,535]
|
||||
typedef signed int ci2_int; // [−32,767, 32,767]
|
||||
typedef unsigned int ci2_uint; // [0, 65,535]
|
||||
typedef signed long int ci2_long; // [−2,147,483,647, 2,147,483,647]
|
||||
typedef unsigned long int ci2_ulong; // [0, 4,294,967,295]
|
||||
|
||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
||||
#include <inttypes.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
// −9223372036854775807
|
||||
typedef unsigned long long int ci2_ull; // +9223372036854775807 range.
|
||||
typedef signed long long int ci2_ll; //[0, 18446744073709551615] range.
|
||||
|
||||
typedef int8_t i8;
|
||||
typedef int16_t i16;
|
||||
typedef int32_t i32;
|
||||
typedef int64_t i64;
|
||||
|
||||
typedef uint8_t u8;
|
||||
typedef uint16_t u16;
|
||||
typedef uint32_t u32;
|
||||
typedef uint64_t u64;
|
||||
|
||||
typedef uintptr_t uptr;
|
||||
typedef ptrdiff_t size;
|
||||
typedef size_t usize;
|
||||
|
||||
#endif
|
||||
|
||||
#endif // ci2_syntax.h
|
||||
Reference in New Issue
Block a user