GATE
gatetypes.h File Reference

basic type definitions More...

#include <limits.h>
#include <stddef.h>
#include <stdbool.h>
#include <wchar.h>

Macros

#define GATE_COMPILER_SUPPORTS_STDBOOL
 
#define GATE_ARCH_X86IA16   0x0860010 /* x86 16 bit */
 
#define GATE_ARCH_X86IA32   0x0860020 /* x86 IA32 */
 
#define GATE_ARCH_X86IA64   0x0860040 /* x86 IA64 Itanium */
 
#define GATE_ARCH_X86X64   0x0860a40 /* x86 AMD64 */
 
#define GATE_ARCH_ARM32   0x0aa0020 /* ARM 32 */
 
#define GATE_ARCH_ARM64   0x0aa0040 /* ARM 64 */
 
#define GATE_ARCH_ALPHA   0x0a10000 /* ALPHA */
 
#define GATE_ARCH_RISCV32   0x0050020 /* RISC-V 32 bit*/
 
#define GATE_ARCH_RISCV64   0x0050040 /* RISC-V 64 bit*/
 
#define GATE_ARCH_VM   0xfff0000 /* virtual machine */
 
#define GATE_ARCH_VM_WASM   0xfff1020 /* web-assembly 32 */
 
#define GATE_ARCH   GATE_ARCH_X86IA32
 
#define GATE_TYPE_ALIGNED(t)   t
 
#define GATE_TYPE_UNALIGNED(t)   t
 
#define GATE_SYS_POSIX
 
#define GATE_DEBUG_MODE   1
 
#define GATE_TYPE_NATIVE_UINT_INTEGRATED   1
 
#define GATE_TYPE_NATIVE_LONG_INTEGRATED   1
 
#define GATE_TYPE_NATIVE_ULONG_INTEGRATED   1
 
#define GATE_WCHAR_IS_UTF32
 
#define GATE_FLAG_ENABLED(flagsvar, flagtype)   ((gate_bool_t)(((flagsvar & flagtype) == flagtype) ? true : false))
 
#define GATE_FLAG_SET(flagsvar, flagtype, value)   do { if(value) flagsvar |= flagtype; else flagsvar &= ~flagtype; } while(0)
 
#define GATE_UNUSED_ARG(arg)   (void) arg
 
#define GATE_INIT_EMPTY   { 0 }
 
#define GATE_MAX_FILENAME_LENGTH   (256)
 
#define GATE_DEFAULT_LINE_LENGTH   (1024)
 
#define GATE_MAX_FILEPATH_LENGTH   (2048 + 1024 + 512)
 
#define GATE_MAX_COPYBUFFER_LENGTH   (4096)
 
#define GATE_MAX_STACK_COPYBUFFER_LENGTH   (1024 * 12)
 
#define GATE_MAX_BLOCK_COPYBUFFER_LENGTH   (65536)
 
#define GATE_MACRO_TO_STRING2(x)   #x
 
#define GATE_MACRO_TO_STRING(x)   GATE_MACRO_TO_STRING2(x)
 
#define GATE_API_EXPORT
 
#define GATE_API_IMPORT
 
#define GATE_API_LOCAL
 
#define GATE_COMPILER_PRAGMA(content)
 
#define GATE_WARN_TODO(msg)   do { char* TODO = #msg ; } while(0)
 
#define GATE_CONST_LONGLONG(num)   num ## LL
 
#define GATE_CONST_ULONGLONG(num)   num ## ULL
 
#define GATE_CURRENT_FUNCTION_NAME   "(unknown)"
 

Typedefs

typedef unsigned long long gate_unsigned_long_long_t
 
typedef signed long long gate_signed_long_long_t
 
typedef void * gate_ptr_t
 
typedef bool gate_bool_t
 
typedef unsigned char gate_uint8_t
 
typedef signed char gate_int8_t
 
typedef unsigned short int gate_uint16_t
 
typedef signed short int gate_int16_t
 
typedef unsigned int gate_uint32_t
 
typedef signed long gate_int32_t
 
typedef unsigned long gate_uint64_t
 
typedef signed long gate_int64_t
 
typedef float gate_real32_t
 
typedef double gate_real64_t
 
typedef char gate_char8_t
 
typedef unsigned short gate_char16_t
 
typedef wchar_t gate_char32_t
 
typedef gate_char8_tgate_str8_t
 
typedef gate_char16_tgate_str16_t
 
typedef gate_char32_tgate_str32_t
 
typedef gate_char8_t const * gate_const_str8_t
 
typedef gate_char16_t const * gate_const_str16_t
 
typedef gate_char32_t const * gate_const_str32_t
 
typedef long gate_intptr_t
 
typedef unsigned long gate_uintptr_t
 
typedef gate_uintptr_t gate_size_t
 
typedef gate_intptr_t gate_index_t
 
typedef gate_size_t gate_offset_t
 
typedef int gate_result_t
 
typedef int gate_enumint_t
 
typedef gate_uintptr_t gate_handle_t
 
typedef void * gate_dataptr_t
 
typedef gate_result_t(* gate_funcptr_t) (gate_dataptr_t arg)
 
typedef gate_funcptr_t gate_entrypoint_t
 
typedef gate_uint8_t gate_byte_t
 
typedef gate_uint16_t gate_word_t
 
typedef gate_uint16_t gate_ushortint_t
 
typedef gate_uint32_t gate_dword_t
 
typedef gate_uint32_t gate_uint_t
 
typedef gate_uint64_t gate_qword_t
 
typedef gate_uint64_t gate_ulongint_t
 
typedef gate_int8_t gate_sbyte_t
 
typedef gate_int16_t gate_shortint_t
 
typedef gate_int32_t gate_integer_t
 
typedef gate_int64_t gate_longint_t
 
typedef gate_uint32_t gate_hash_code_t
 
typedef gate_hash_code_t(* gate_type_hash_generator_t) (void const *datatype)
 
typedef gate_uint32_t gate_input_keycode_t
 
typedef gate_uint32_t gate_input_pointer_t
 

Detailed Description

basic type definitions

Macro Definition Documentation

◆ GATE_DEFAULT_LINE_LENGTH

#define GATE_DEFAULT_LINE_LENGTH   (1024)

default text line length

◆ GATE_MAX_BLOCK_COPYBUFFER_LENGTH

#define GATE_MAX_BLOCK_COPYBUFFER_LENGTH   (65536)

default size of a copy buffer in bytes

◆ GATE_MAX_COPYBUFFER_LENGTH

#define GATE_MAX_COPYBUFFER_LENGTH   (4096)

default size of a copy buffer in bytes

◆ GATE_MAX_FILENAME_LENGTH

#define GATE_MAX_FILENAME_LENGTH   (256)

maximum length of a single file name

◆ GATE_MAX_FILEPATH_LENGTH

#define GATE_MAX_FILEPATH_LENGTH   (2048 + 1024 + 512)

maximum length of the total path of a file

◆ GATE_MAX_STACK_COPYBUFFER_LENGTH

#define GATE_MAX_STACK_COPYBUFFER_LENGTH   (1024 * 12)

default size of a copy buffer in bytes

Typedef Documentation

◆ gate_bool_t

typedef bool gate_bool_t

basic boolean type

◆ gate_char16_t

typedef unsigned short gate_char16_t

UTF 16 character

◆ gate_char32_t

typedef wchar_t gate_char32_t

UTF 32 character

◆ gate_char8_t

typedef char gate_char8_t

UTF 8 character

◆ gate_const_str16_t

const UTF 16 string

◆ gate_const_str32_t

const UTF 32 string

◆ gate_const_str8_t

const UTF 8 string

◆ gate_dataptr_t

typedef void* gate_dataptr_t

generic pointer to data

◆ gate_entrypoint_t

generic code entry point function

◆ gate_enumint_t

typedef int gate_enumint_t

generic enum-size machine word type (16-bit int)

◆ gate_funcptr_t

typedef gate_result_t(* gate_funcptr_t) (gate_dataptr_t arg)

generic pointer to C function

◆ gate_handle_t

generic integer handle

◆ gate_index_t

index in array

◆ gate_int16_t

typedef signed short int gate_int16_t

basic 16-bit signed integer

◆ gate_int32_t

typedef signed long gate_int32_t

basic 32-bit signed integer

◆ gate_int64_t

typedef signed long gate_int64_t

basic 64-bit signed integer

◆ gate_int8_t

typedef signed char gate_int8_t

basic 8-bit signed integer

◆ gate_intptr_t

typedef long gate_intptr_t

signed integer of pointer-size

◆ gate_offset_t

offset of data in memory

◆ gate_ptr_t

typedef void* gate_ptr_t

basic generic pointer type

◆ gate_real32_t

typedef float gate_real32_t

basic 32-bit floating point number

◆ gate_real64_t

typedef double gate_real64_t

basic 64-bit floating point number

◆ gate_result_t

typedef int gate_result_t

generic GATE result code

◆ gate_size_t

memory-related size

◆ gate_str16_t

UTF 16 string

◆ gate_str32_t

UTF 32 string

◆ gate_str8_t

UTF 8 string

◆ gate_uint16_t

typedef unsigned short int gate_uint16_t

basic 16-bit unsigned integer

◆ gate_uint32_t

typedef unsigned int gate_uint32_t

basic 32-bit unsigned integer

◆ gate_uint64_t

typedef unsigned long gate_uint64_t

basic 64-bit unsigned integer

◆ gate_uint8_t

typedef unsigned char gate_uint8_t

basic 8-bit unsigned integer

◆ gate_uintptr_t

typedef unsigned long gate_uintptr_t

unsigned integer of pointer-size