package core:c/libc

Index

Types (114)
Constants (89)
Variables (4)
Procedures (326)

Types

FILE ¶

FILE :: struct($Key: typeid, $Value: typeid) where intrinsics.type_is_valid_map_key(Key) {}

atomic_bool ¶

atomic_bool :: distinct bool
 

7.17.6 Atomic integer types

atomic_char ¶

atomic_char :: distinct u8

atomic_char16_t ¶

atomic_char16_t :: distinct u16

atomic_char32_t ¶

atomic_char32_t :: distinct u32

atomic_flag ¶

atomic_flag :: distinct bool
 

7.17.8 Atomic flag type and operations

atomic_int ¶

atomic_int :: distinct i32

atomic_int_fast16_t ¶

atomic_int_fast16_t :: distinct i32

atomic_int_fast32_t ¶

atomic_int_fast32_t :: distinct i32

atomic_int_fast64_t ¶

atomic_int_fast64_t :: distinct i64

atomic_int_fast8_t ¶

atomic_int_fast8_t :: distinct i8

atomic_int_least16_t ¶

atomic_int_least16_t :: distinct i16

atomic_int_least32_t ¶

atomic_int_least32_t :: distinct i32

atomic_int_least64_t ¶

atomic_int_least64_t :: distinct i64

atomic_int_least8_t ¶

atomic_int_least8_t :: distinct i8

atomic_intmax_t ¶

atomic_intmax_t :: distinct i64

atomic_intptr_t ¶

atomic_intptr_t :: distinct int

atomic_llong ¶

atomic_llong :: distinct i64

atomic_long ¶

atomic_long :: distinct i32

atomic_ptrdiff_t ¶

atomic_ptrdiff_t :: distinct int

atomic_schar ¶

atomic_schar :: distinct u8

atomic_short ¶

atomic_short :: distinct i16

atomic_size_t ¶

atomic_size_t :: distinct uint

atomic_uchar ¶

atomic_uchar :: distinct u8

atomic_uint ¶

atomic_uint :: distinct u32

atomic_uint_fast16_t ¶

atomic_uint_fast16_t :: distinct u32

atomic_uint_fast32_t ¶

atomic_uint_fast32_t :: distinct u32

atomic_uint_fast64_t ¶

atomic_uint_fast64_t :: distinct u64

atomic_uint_fast8_t ¶

atomic_uint_fast8_t :: distinct u8

atomic_uint_least16_t ¶

atomic_uint_least16_t :: distinct u16

atomic_uint_least32_t ¶

atomic_uint_least32_t :: distinct u32

atomic_uint_least64_t ¶

atomic_uint_least64_t :: distinct u64

atomic_uint_least8_t ¶

atomic_uint_least8_t :: distinct u8

atomic_uintmax_t ¶

atomic_uintmax_t :: distinct u64

atomic_uintptr_t ¶

atomic_uintptr_t :: distinct uintptr

atomic_ullong ¶

atomic_ullong :: distinct u64

atomic_ulong ¶

atomic_ulong :: distinct u32

atomic_ushort ¶

atomic_ushort :: distinct u16

atomic_wchar_t ¶

atomic_wchar_t :: distinct u16

bool ¶

bool :: bool

char ¶

char :: u8
 

assuming -funsigned-char

char16_t ¶

char16_t :: u16

char32_t ¶

char32_t :: u32

clock_t ¶

clock_t :: distinct i32

cnd_t ¶

cnd_t :: distinct rawptr
 

_Cnd_imp_t

complex_double ¶

complex_double :: distinct complex128

complex_float ¶

complex_float :: distinct complex64

div_t ¶

div_t :: struct {
	quot,
	rem:  i32,
}
 

C does not declare which order 'quot' and 'rem' should be for the divide structures. An implementation could put 'rem' first. However, nobody actually does and everyone appears to have agreed upon this layout.

double ¶

double :: f64

double_t ¶

double_t :: f64

float ¶

float :: f32

float_t ¶

float_t :: f32
 

On amd64 Windows and Linux, float_t and double_t are respectively both their usual types. On x86 it's not possible to define these types correctly since they would be long double which Odin does have support for.

fpos_t ¶

fpos_t :: distinct i64

int ¶

int :: i32

int16_t ¶

int16_t :: i16

int32_t ¶

int32_t :: i32

int64_t ¶

int64_t :: i64

int8_t ¶

int8_t :: i8

int_fast16_t ¶

int_fast16_t :: i32

int_fast32_t ¶

int_fast32_t :: i32

int_fast64_t ¶

int_fast64_t :: i64

int_fast8_t ¶

int_fast8_t :: i8

int_least16_t ¶

int_least16_t :: i16

int_least32_t ¶

int_least32_t :: i32

int_least64_t ¶

int_least64_t :: i64

int_least8_t ¶

int_least8_t :: i8

intmax_t ¶

intmax_t :: i64

intptr_t ¶

intptr_t :: int

jmp_buf ¶

jmp_buf :: struct #align 16 {
	_: [4096]u8,
}
 

The C99 Rationale describes jmp_buf as being an array type for backward compatibility. Odin does not need to honor this and couldn't as arrays in Odin don't decay to pointers. It is somewhat easy for us to bind this, we just need to ensure the structure contains enough storage with appropriate alignment. Since there are no types in C with an alignment larger than that of max_align_t, which cannot be larger than sizeof(long double) as any other exposed type wouldn't be valid C, the maximum alignment possible in a strictly conformant C implementation is 16 on the platforms we care about. The choice of 4096 bytes for storage of this type is more than enough on all relevant platforms.

ldiv_t ¶

ldiv_t :: struct {
	quot,
	rem:  i32,
}

lldiv_t ¶

lldiv_t :: struct {
	quot,
	rem:  i64,
}

long ¶

long :: i32

longlong ¶

longlong :: i64

mbstate_t ¶

mbstate_t :: struct #align 16 {
	_: [32]u8,
}
 

Large enough and aligned enough for any wide-spread in-use libc.

memory_order ¶

memory_order :: enum i32 {
	relaxed, 
	consume, 
	acquire, 
	release, 
	acq_rel, 
	seq_cst, 
}
 

7.17.3 Order and consistency

mtx_t ¶

mtx_t :: distinct rawptr
 

_Mtx_imp_t

once_flag ¶

once_flag :: distinct i8
 

_Once_flag_imp_t

schar ¶

schar :: i8

short ¶

short :: i16

sig_atomic_t ¶

sig_atomic_t :: distinct i32

size_t ¶

size_t :: uint

ssize_t ¶

ssize_t :: int

thrd_start_t ¶

thrd_start_t :: proc "cdecl" (_: rawptr) -> i32

thrd_t ¶

thrd_t :: struct {
	_: rawptr,
	_: u32,
}
 

_Thrd_t

time_t ¶

time_t :: distinct i64

timespec ¶

timespec :: struct #align 8 {
	tv_sec:  time_t,
	tv_nsec: i32,
}

tm ¶

tm :: struct #align 8 {
	tm_sec,
	tm_min,
	tm_hour,
	tm_mday,
	tm_mon,
	tm_year,
	tm_wday,
	tm_yday,
	tm_isdst: i32,
}

tss_dtor_t ¶

tss_dtor_t :: proc "cdecl" (_: rawptr)

tss_t ¶

tss_t :: distinct i32
 

_Tss_imp_t

uchar ¶

uchar :: u8

uint ¶

uint :: u32

uint16_t ¶

uint16_t :: u16

uint32_t ¶

uint32_t :: u32

uint64_t ¶

uint64_t :: u64

uint8_t ¶

uint8_t :: u8

uint_fast16_t ¶

uint_fast16_t :: u32

uint_fast32_t ¶

uint_fast32_t :: u32

uint_fast64_t ¶

uint_fast64_t :: u64

uint_fast8_t ¶

uint_fast8_t :: u8

uint_least16_t ¶

uint_least16_t :: u16

uint_least32_t ¶

uint_least32_t :: u32

uint_least64_t ¶

uint_least64_t :: u64

uint_least8_t ¶

uint_least8_t :: u8

uintmax_t ¶

uintmax_t :: u64

uintptr_t ¶

uintptr_t :: uintptr

ulong ¶

ulong :: u32

ulonglong ¶

ulonglong :: u64

ushort ¶

ushort :: u16

va_list ¶

va_list :: struct #align 16 {
	_: [4096]u8,
}
 

Since there are no types in C with an alignment larger than that of max_align_t, which cannot be larger than sizeof(long double) as any other exposed type wouldn't be valid C, the maximum alignment possible in a strictly conformant C implementation is 16 on the platforms we care about. The choice of 4096 bytes for storage of this type is more than enough on all relevant platforms.

wchar_t ¶

wchar_t :: u16

wctrans_t ¶

wctrans_t :: distinct u16

wctype_t ¶

wctype_t :: distinct u16

wint_t ¶

wint_t :: distinct u16
 

Odin does not have default argument promotion so the need for a separate type here isn't necessary, though make it distinct just to be safe.

Constants

ATOMIC_BOOL_LOCK_FREE ¶

ATOMIC_BOOL_LOCK_FREE :: true

ATOMIC_CHAR16_T_LOCK_FREE ¶

ATOMIC_CHAR16_T_LOCK_FREE :: true

ATOMIC_CHAR32_T_LOCK_FREE ¶

ATOMIC_CHAR32_T_LOCK_FREE :: true

ATOMIC_CHAR_LOCK_FREE ¶

ATOMIC_CHAR_LOCK_FREE :: true

ATOMIC_INT_LOCK_FREE ¶

ATOMIC_INT_LOCK_FREE :: true

ATOMIC_LLONG_LOCK_FREE ¶

ATOMIC_LLONG_LOCK_FREE :: true

ATOMIC_LONG_LOCK_FREE ¶

ATOMIC_LONG_LOCK_FREE :: true

ATOMIC_POINTER_LOCK_FREE ¶

ATOMIC_POINTER_LOCK_FREE :: true

ATOMIC_SHORT_LOCK_FREE ¶

ATOMIC_SHORT_LOCK_FREE :: true

ATOMIC_WCHAR_T_LOCK_FREE ¶

ATOMIC_WCHAR_T_LOCK_FREE :: true

BUFSIZ ¶

BUFSIZ :: 512

CHAR_BIT ¶

CHAR_BIT :: 8

CLOCKS_PER_SEC ¶

CLOCKS_PER_SEC :: 1000

EDOM ¶

EDOM :: 33

EILSEQ ¶

EILSEQ :: 42

EOF ¶

EOF: i32 : int(-1)

ERANGE ¶

ERANGE :: 34

EXIT_FAILURE ¶

EXIT_FAILURE :: 1

EXIT_SUCCESS ¶

EXIT_SUCCESS :: 0
 

C does not declare what these values should be, as an implementation is free to use any two distinct values it wants to indicate success or failure. However, nobody actually does and everyone appears to have agreed upon these values.

FILENAME_MAX ¶

FILENAME_MAX :: 260

FOPEN_MAX ¶

FOPEN_MAX :: 20

FP_ILOGB0 ¶

FP_ILOGB0: i32 : FP_ILOGBNAN

FP_ILOGBNAN ¶

FP_ILOGBNAN: i32 : -1 - int((~uint(0)) >> 1)

FP_INFINITE ¶

FP_INFINITE :: 1

FP_NAN ¶

FP_NAN :: 0
 

Number classification constants. These do not have to match libc since we implement our own classification functions as libc requires they be macros, which means libc does not export standard functions for them.

FP_NORMAL ¶

FP_NORMAL :: 3

FP_SUBNORMAL ¶

FP_SUBNORMAL :: 4

FP_ZERO ¶

FP_ZERO :: 2

HUGE_VAL ¶

HUGE_VAL: f64 : double(INFINITY)

HUGE_VALF ¶

HUGE_VALF :: INFINITY

INFINITY ¶

INFINITY :: 1e5000

INT16_MAX ¶

INT16_MAX: i32 : c.INT16_MAX

INT16_MIN ¶

INT16_MIN: i32 : c.INT16_MIN

INT32_MAX ¶

INT32_MAX: i32 : c.INT32_MAX

INT32_MIN ¶

INT32_MIN: i32 : c.INT32_MIN

INT64_MAX ¶

INT64_MAX: i64 : c.INT64_MAX

INT64_MIN ¶

INT64_MIN: i64 : c.INT64_MIN

INT8_MAX ¶

INT8_MAX: i32 : c.INT8_MAX
 

Copy C's rules for type promotion here by forcing the type on the literals.

INT8_MIN ¶

INT8_MIN: i32 : c.INT8_MIN

L_tmpnam ¶

L_tmpnam :: 15
 

"\\" + 12 + NUL

MATH_ERREXCEPT ¶

MATH_ERREXCEPT :: 2

MATH_ERRNO ¶

MATH_ERRNO :: 1

NDEBUG ¶

NDEBUG :: !ODIN_DEBUG

NULL ¶

NULL :: rawptr(uintptr(0))

PTRDIFF_MAX ¶

PTRDIFF_MAX: c.ptrdiff_t : c.PTRDIFF_MAX

PTRDIFF_MIN ¶

PTRDIFF_MIN: c.ptrdiff_t : c.PTRDIFF_MIN

RAND_MAX ¶

RAND_MAX :: 0x7fff

SEEK_CUR ¶

SEEK_CUR :: 1

SEEK_END ¶

SEEK_END :: 2

SEEK_SET ¶

SEEK_SET :: 0

SIGABRT ¶

SIGABRT :: 22

SIGFPE ¶

SIGFPE :: 8

SIGILL ¶

SIGILL :: 4

SIGINT ¶

SIGINT :: 2

SIGSEGV ¶

SIGSEGV :: 11

SIGTERM ¶

SIGTERM :: 15

SIG_ATOMIC_MAX ¶

SIG_ATOMIC_MAX: sig_atomic_t : max(sig_atomic_t)

SIG_ATOMIC_MIN ¶

SIG_ATOMIC_MIN: sig_atomic_t : min(sig_atomic_t)

SIG_DFL ¶

SIG_DFL :: rawptr(uintptr(0))

SIG_ERR ¶

SIG_ERR :: rawptr(~uintptr(0))

SIG_IGN ¶

SIG_IGN :: rawptr(uintptr(1))

SIZE_MAX ¶

SIZE_MAX: uint : c.SIZE_MAX

TIME_UTC ¶

TIME_UTC :: 1

TMP_MAX ¶

TMP_MAX :: 32767
 

SHRT_MAX

TSS_DTOR_ITERATIONS ¶

TSS_DTOR_ITERATIONS :: 4
 

_TSS_DTOR_ITERATIONS_IMP

UINT16_MAX ¶

UINT16_MAX: i32 : c.UINT16_MAX

UINT32_MAX ¶

UINT32_MAX: u32 : c.UINT32_MAX

UINT64_MAX ¶

UINT64_MAX: u64 : c.UINT64_MAX

UINT8_MAX ¶

UINT8_MAX: i32 : c.UINT8_MAX

WCHAR_MAX ¶

WCHAR_MAX: u16 : c.WCHAR_MAX

WCHAR_MIN ¶

WCHAR_MIN: u16 : c.WCHAR_MIN

WEOF ¶

WEOF: wint_t : ~wint_t(0)

WINT_MAX ¶

WINT_MAX :: 1 << (size_of(wint_t) * 8)

WINT_MIN ¶

WINT_MIN :: 0
 

Calculate these values correctly regardless of what type wchar_t actually is.

math_errhandling ¶

math_errhandling :: 2
 

Windows, Linux, macOS all use this mode.

memory_order_acq_rel ¶

memory_order_acq_rel :: memory_order.acq_rel

memory_order_acquire ¶

memory_order_acquire :: memory_order.acquire

memory_order_consume ¶

memory_order_consume :: memory_order.consume

memory_order_relaxed ¶

memory_order_relaxed :: memory_order.relaxed

memory_order_release ¶

memory_order_release :: memory_order.release

memory_order_seq_cst ¶

memory_order_seq_cst :: memory_order.seq_cst

mtx_plain ¶

mtx_plain :: 1
 

_Mtx_plain

mtx_recursive ¶

mtx_recursive :: 0x100
 

_Mtx_recursive

mtx_timed ¶

mtx_timed :: 4
 

_Mtx_timed

thrd_busy ¶

thrd_busy :: 3
 

_Thrd_busy

thrd_error ¶

thrd_error :: 4
 

_Thrd_error

thrd_nomem ¶

thrd_nomem :: 1
 

_Thrd_nomem

thrd_success ¶

thrd_success :: 0
 

_Thrd_success

thrd_timedout ¶

thrd_timedout :: 2
 

_Thrd_timedout

Variables

NAN ¶

NAN: f64 = …

stderr ¶

stderr: ^FILE = …

stdin ¶

stdin: ^FILE = …

stdout ¶

stdout: ^FILE = …

Procedures

ATOMIC_VAR_INIT ¶

ATOMIC_VAR_INIT :: proc "odin" (value: $T) -> $T {…}
 

7.17.2 Initialization

CMPLX ¶

CMPLX :: proc "odin" (x, y: f64) -> complex_double {…}

CMPLXF ¶

CMPLXF :: proc "odin" (x, y: f32) -> complex_float {…}

MB_CUR_MAX ¶

MB_CUR_MAX :: proc "odin" () -> uint {…}

abort ¶

abort :: proc "cdecl" () -> ! ---
 

7.22.4 Communication with the environment

abs ¶

abs :: proc "cdecl" (j: i32) -> i32 ---
 

7.22.6 Integer arithmetic functions

aligned_alloc ¶

aligned_alloc :: proc "cdecl" (alignment, size: uint) -> rawptr {…}

aligned_free ¶

aligned_free :: proc "cdecl" (ptr: rawptr) {…}

asctime ¶

asctime :: proc "cdecl" (timeptr: ^tm) -> [^]u8 ---
 

7.27.3 Time conversion functions

at_quick_exit ¶

at_quick_exit :: proc "cdecl" (func: proc "cdecl" ()) -> i32 ---

atexit ¶

atexit :: proc "cdecl" (func: proc "cdecl" ()) -> i32 ---

atof ¶

atof :: proc "cdecl" (nptr: cstring) -> f64 ---
 

7.22.1 Numeric conversion functions

atoi ¶

atoi :: proc "cdecl" (nptr: cstring) -> i32 ---

atol ¶

atol :: proc "cdecl" (nptr: cstring) -> i32 ---

atoll ¶

atoll :: proc "cdecl" (nptr: cstring) -> i64 ---

atomic_compare_exchange_strong ¶

atomic_compare_exchange_strong :: proc "odin" (object, expected: ^$T, desired: $T) -> bool {…}
 

C does not allow failure memory order to be order_release or acq_rel. Similarly, it does not allow the failure order to be stronger than success order. Since consume and acquire are both monotonic, we can count them as one, for a total of three memory orders that are relevant in compare exchange.

relaxed, acquire (consume), seq_cst.

The requirement that the failure order cannot be stronger than success limits the valid combinations for the failure order to this table:

[success = seq_cst, failure = seq_cst] => _
[success = acquire, failure = seq_cst] => acq
[success = release, failure = seq_cst] => rel
[success = acq_rel, failure = seq_cst] => acqrel
[success = relaxed, failure = relaxed] => relaxed
[success = seq_cst, failure = relaxed] => failrelaxed
[success = seq_cst, failure = acquire] => failacq
[success = acquire, failure = relaxed] => acq_failrelaxed
[success = acq_rel, failure = relaxed] => acqrel_failrelaxed

atomic_compare_exchange_strong_explicit ¶

atomic_compare_exchange_strong_explicit :: proc "odin" (object, expected: ^$T, desired: $T, success, failure: memory_order) -> bool {…}

atomic_compare_exchange_weak ¶

atomic_compare_exchange_weak :: proc "odin" (object, expected: ^$T, desired: $T) -> bool {…}

atomic_compare_exchange_weak_explicit ¶

atomic_compare_exchange_weak_explicit :: proc "odin" (object, expected: ^$T, desited: $T, success, failure: memory_order) -> bool {…}

atomic_exchange ¶

atomic_exchange :: proc "odin" (object: ^$T, desired: $T) -> $T {…}

atomic_exchange_explicit ¶

atomic_exchange_explicit :: proc "odin" (object: ^$T, desired: $T, order: memory_order) -> $T {…}

atomic_fetch_add ¶

atomic_fetch_add :: proc "odin" (object: ^$T, operand: $T) -> $T {…}
 

7.17.7.5 The atomic_fetch and modify generic functions

atomic_fetch_add_explicit ¶

atomic_fetch_add_explicit :: proc "odin" (object: ^$T, operand: $T, order: memory_order) -> $T {…}

atomic_fetch_and ¶

atomic_fetch_and :: proc "odin" (object: ^$T, operand: $T) -> $T {…}

atomic_fetch_and_explicit ¶

atomic_fetch_and_explicit :: proc "odin" (object: ^$T, operand: $T, order: memory_order) -> $T {…}

atomic_fetch_or ¶

atomic_fetch_or :: proc "odin" (object: ^$T, operand: $T) -> $T {…}

atomic_fetch_or_explicit ¶

atomic_fetch_or_explicit :: proc "odin" (object: ^$T, operand: $T, order: memory_order) -> $T {…}

atomic_fetch_sub ¶

atomic_fetch_sub :: proc "odin" (object: ^$T, operand: $T) -> $T {…}

atomic_fetch_sub_explicit ¶

atomic_fetch_sub_explicit :: proc "odin" (object: ^$T, operand: $T, order: memory_order) -> $T {…}

atomic_fetch_xor ¶

atomic_fetch_xor :: proc "odin" (object: ^$T, operand: $T) -> $T {…}

atomic_fetch_xor_explicit ¶

atomic_fetch_xor_explicit :: proc "odin" (object: ^$T, operand: $T, order: memory_order) -> $T {…}

atomic_flag_clear ¶

atomic_flag_clear :: proc "odin" (flag: ^atomic_flag) {…}

atomic_flag_clear_explicit ¶

atomic_flag_clear_explicit :: proc "odin" (flag: ^atomic_flag, order: memory_order) {…}

atomic_flag_test_and_set ¶

atomic_flag_test_and_set :: proc "odin" (flag: ^atomic_flag) -> bool {…}

atomic_flag_test_and_set_explicit ¶

atomic_flag_test_and_set_explicit :: proc "odin" (flag: ^atomic_flag, order: memory_order) -> bool {…}

atomic_init ¶

atomic_init :: proc "odin" (obj: ^$T, value: $T) {…}

atomic_is_lock_free ¶

atomic_is_lock_free :: proc "odin" (obj: ^$T) -> bool {…}
 

7.17.5 Lock-free property

atomic_load ¶

atomic_load :: proc "odin" (object: ^$T) -> $T {…}

atomic_load_explicit ¶

atomic_load_explicit :: proc "odin" (object: ^$T, order: memory_order) {…}

atomic_signal_fence ¶

atomic_signal_fence :: proc "odin" (order: memory_order) {…}

atomic_store ¶

atomic_store :: proc "odin" (object: ^$T, desired: $T) {…}
 

7.17.7 Operations on atomic types

atomic_store_explicit ¶

atomic_store_explicit :: proc "odin" (object: ^$T, desired: $T, order: memory_order) {…}

atomic_thread_fence ¶

atomic_thread_fence :: proc "odin" (order: memory_order) {…}
 

7.17.4 Fences

bsearch ¶

bsearch :: proc "cdecl" (key, base: rawptr, nmemb, size: uint, compar: proc "cdecl" (lhs, rhs: rawptr) -> i32) -> rawptr ---
 

7.22.5 Searching and sorting utilities

btowc ¶

btowc :: proc "cdecl" (c: i32) -> wint_t ---
 

7.29.6.1 Single-byte/wide character conversion functions

c16rtomb ¶

c16rtomb :: proc "cdecl" (s: ^u8, c16: u16, ps: ^mbstate_t) -> uint ---

c32rtomb ¶

c32rtomb :: proc "cdecl" (s: ^u8, c32: u32, ps: ^mbstate_t) -> uint ---

cabs ¶

cabs :: proc "cdecl" (z: complex_double) -> complex_double ---
 

7.3.8 Power and absolute-value functions

cabsf ¶

cabsf :: proc "cdecl" (z: complex_float) -> complex_float ---

cacos ¶

cacos :: proc "cdecl" (z: complex_double) -> complex_double ---
 

7.3.5 Trigonometric functions

cacosf ¶

cacosf :: proc "cdecl" (z: complex_float) -> complex_float ---

cacosh ¶

cacosh :: proc "cdecl" (z: complex_double) -> complex_double ---
 

7.3.6 Hyperbolic functions

cacoshf ¶

cacoshf :: proc "cdecl" (z: complex_float) -> complex_float ---

call_once ¶

call_once :: proc "cdecl" (flag: ^once_flag, func: proc "cdecl" ()) ---

calloc ¶

calloc :: proc "cdecl" (nmemb, size: uint) -> rawptr ---
 

7.22.3 Memory management functions

carg ¶

carg :: proc "cdecl" (z: complex_double) -> f64 ---
 

7.3.9 Manipulation functions

cargf ¶

cargf :: proc "cdecl" (z: complex_float) -> f32 ---

casin ¶

casin :: proc "cdecl" (z: complex_double) -> complex_double ---

casinf ¶

casinf :: proc "cdecl" (z: complex_float) -> complex_float ---

casinh ¶

casinh :: proc "cdecl" (z: complex_double) -> complex_double ---

casinhf ¶

casinhf :: proc "cdecl" (z: complex_float) -> complex_float ---

catan ¶

catan :: proc "cdecl" (z: complex_double) -> complex_double ---

catanf ¶

catanf :: proc "cdecl" (z: complex_float) -> complex_float ---

catanh ¶

catanh :: proc "cdecl" (z: complex_double) -> complex_double ---

catanhf ¶

catanhf :: proc "cdecl" (z: complex_float) -> complex_float ---

ccos ¶

ccos :: proc "cdecl" (z: complex_double) -> complex_double ---

ccosf ¶

ccosf :: proc "cdecl" (z: complex_float) -> complex_float ---

ccosh ¶

ccosh :: proc "cdecl" (z: complex_double) -> complex_double ---

ccoshf ¶

ccoshf :: proc "cdecl" (z: complex_float) -> complex_float ---

cexp ¶

cexp :: proc "cdecl" (z: complex_double) -> complex_double ---
 

7.3.7 Exponential and logarithmic functions

cexpf ¶

cexpf :: proc "cdecl" (z: complex_float) -> complex_float ---

cimag ¶

cimag :: proc "cdecl" (z: complex_double) -> f64 ---

cimagf ¶

cimagf :: proc "cdecl" (z: complex_float) -> f32 ---

clearerr ¶

clearerr :: proc "cdecl" (stream: ^FILE) ---
 

7.21.10 Error-handling functions

clock ¶

clock :: proc "cdecl" () -> clock_t ---
 

7.27.2 Time manipulation functions

clog ¶

clog :: proc "cdecl" (z: complex_double) -> complex_double ---

clogf ¶

clogf :: proc "cdecl" (z: complex_float) -> complex_float ---

cnd_broadcast ¶

cnd_broadcast :: proc "cdecl" (cond: ^cnd_t) -> i32 ---

cnd_destroy ¶

cnd_destroy :: proc "cdecl" (cond: ^cnd_t) ---

cnd_init ¶

cnd_init :: proc "cdecl" (cond: ^cnd_t) -> i32 ---

cnd_signal ¶

cnd_signal :: proc "cdecl" (cond: ^cnd_t) -> i32 ---

cnd_timedwait ¶

cnd_timedwait :: proc "cdecl" (cond: ^cnd_t, mtx: ^mtx_t, ts: ^timespec) -> i32 ---

cnd_wait ¶

cnd_wait :: proc "cdecl" (cond: ^cnd_t, mtx: ^mtx_t) -> i32 ---

conj ¶

conj :: proc "cdecl" (z: complex_double) -> complex_double ---

conjf ¶

conjf :: proc "cdecl" (z: complex_float) -> complex_float ---

cpow ¶

cpow :: proc "cdecl" (x, y: complex_double) -> complex_double ---

cpowf ¶

cpowf :: proc "cdecl" (x, y: complex_float) -> complex_float ---

cproj ¶

cproj :: proc "cdecl" (z: complex_double) -> complex_double ---

cprojf ¶

cprojf :: proc "cdecl" (z: complex_float) -> complex_float ---

creal ¶

creal :: proc "cdecl" (z: complex_double) -> f64 ---

crealf ¶

crealf :: proc "cdecl" (z: complex_float) -> f32 ---

csin ¶

csin :: proc "cdecl" (z: complex_double) -> complex_double ---

csinf ¶

csinf :: proc "cdecl" (z: complex_float) -> complex_float ---

csinh ¶

csinh :: proc "cdecl" (z: complex_double) -> complex_double ---

csinhf ¶

csinhf :: proc "cdecl" (z: complex_float) -> complex_float ---

csqrt ¶

csqrt :: proc "cdecl" (z: complex_double) -> complex_double ---

csqrtf ¶

csqrtf :: proc "cdecl" (z: complex_float) -> complex_float ---

ctan ¶

ctan :: proc "cdecl" (z: complex_double) -> complex_double ---

ctanf ¶

ctanf :: proc "cdecl" (z: complex_float) -> complex_float ---

ctanh ¶

ctanh :: proc "cdecl" (z: complex_double) -> complex_double ---

ctanhf ¶

ctanhf :: proc "cdecl" (z: complex_float) -> complex_float ---

ctime ¶

ctime :: proc "cdecl" (timer: ^time_t) -> [^]u8 ---

difftime ¶

difftime :: proc "cdecl" (time1, time2: time_t) -> f64 ---

div ¶

div :: proc "cdecl" (numer, denom: i32) -> div_t ---

errno ¶

errno :: proc "odin" () -> ^i32 {…}
 

Odin has no way to make an identifier "errno" behave as a function call to read the value, or to produce an lvalue such that you can assign a different error value to errno. To work around this, just expose it as a function like it actually is.

exit ¶

exit :: proc "cdecl" (status: i32) -> ! ---

fclose ¶

fclose :: proc "cdecl" (stream: ^FILE) -> i32 ---
 

7.21.5 File access functions

feof ¶

feof :: proc "cdecl" (stream: ^FILE) -> i32 ---

ferror ¶

ferror :: proc "cdecl" (stream: ^FILE) -> i32 ---

fflush ¶

fflush :: proc "cdecl" (stream: ^FILE) -> i32 ---

fgetc ¶

fgetc :: proc "cdecl" (stream: ^FILE) -> i32 ---
 

7.21.7 Character input/output functions

fgetpos ¶

fgetpos :: proc "cdecl" (stream: ^FILE, pos: ^fpos_t) -> i32 ---
 

7.21.9 File positioning functions

fgets ¶

fgets :: proc "cdecl" (s: [^]u8, n: i32, stream: ^FILE) -> [^]u8 ---

fgetws ¶

fgetws :: proc "cdecl" (s: [^]u16, n: i32, stream: ^FILE) -> u16 ---

fopen ¶

fopen :: proc "cdecl" (filename, mode: cstring) -> ^FILE ---

fprintf ¶

fprintf :: proc "cdecl" (stream: ^FILE, format: cstring, args: ..any) -> i32 ---
 

7.21.6 Formatted input/output functions

fputc ¶

fputc :: proc "cdecl" (s: cstring, stream: ^FILE) -> i32 ---

fputwc ¶

fputwc :: proc "cdecl" (c: u16, stream: ^FILE) -> wint_t ---

fputws ¶

fputws :: proc "cdecl" (s: [^]u16, stream: ^FILE) -> i32 ---

fread ¶

fread :: proc "cdecl" (ptr: rawptr, size: uint, nmemb: uint, stream: ^FILE) -> uint ---

free ¶

free :: proc "cdecl" (ptr: rawptr) ---

freopen ¶

freopen :: proc "cdecl" (filename, mode: cstring, stream: ^FILE) -> ^FILE ---

fscanf ¶

fscanf :: proc "cdecl" (stream: ^FILE, format: cstring, args: ..any) -> i32 ---

fseek ¶

fseek :: proc "cdecl" (stream: ^FILE, offset: i32, whence: i32) -> i32 ---

fsetpos ¶

fsetpos :: proc "cdecl" (stream: ^FILE, pos: ^fpos_t) -> i32 ---

ftell ¶

ftell :: proc "cdecl" (stream: ^FILE) -> i32 ---

fwgetc ¶

fwgetc :: proc "cdecl" (stream: ^FILE) -> wint_t ---
 

7.29.3 Wide character input/output functions

fwide ¶

fwide :: proc "cdecl" (stream: ^FILE, mode: i32) -> i32 ---

fwprintf ¶

fwprintf :: proc "cdecl" (stream: ^FILE, format: [^]u16, arg: ..any) -> i32 ---
 

7.29.2 Formatted wide character input/output functions

fwrite ¶

fwrite :: proc "cdecl" (ptr: rawptr, size: uint, nmemb: uint, stream: ^FILE) -> uint ---

fwscanf ¶

fwscanf :: proc "cdecl" (stream: ^FILE, format: [^]u16, arg: ..any) -> i32 ---

getc ¶

getc :: proc "cdecl" (stream: ^FILE) -> i32 ---

getchar ¶

getchar :: proc "cdecl" () -> i32 ---

getenv ¶

getenv :: proc "cdecl" (name: cstring) -> [^]u8 ---

getwc ¶

getwc :: proc "cdecl" (stream: ^FILE) -> wint_t ---

getwchar ¶

getwchar :: proc "cdecl" () -> wint_t ---

gmtime ¶

gmtime :: proc "cdecl" (timer: ^time_t) -> ^tm ---

isalnum ¶

isalnum :: proc "cdecl" (c: i32) -> i32 ---
 

7.4.1 Character classification functions

isalpha ¶

isalpha :: proc "cdecl" (c: i32) -> i32 ---

isblank ¶

isblank :: proc "cdecl" (c: i32) -> i32 ---

iscntrl ¶

iscntrl :: proc "cdecl" (c: i32) -> i32 ---

isdigit ¶

isdigit :: proc "cdecl" (c: i32) -> i32 ---

isfinite ¶

isfinite :: proc "odin" (x: $T) -> bool {…}

isgraph ¶

isgraph :: proc "cdecl" (c: i32) -> i32 ---

isgreater ¶

isgreater :: proc "odin" (x, y: $T) -> bool {…}
 

These are special in that they avoid float exceptions. They cannot just be implemented as the relational comparisons, as that would produce an invalid "sticky" state that propagates and affects maths results. These need to be implemented natively in Odin assuming isunordered to prevent that.

isgreaterequal ¶

isgreaterequal :: proc "odin" (x, y: $T) -> bool {…}

isinf ¶

isinf :: proc "odin" (x: $T) -> bool {…}

isless ¶

isless :: proc "odin" (x, y: $T) -> bool {…}

islessequal ¶

islessequal :: proc "odin" (x, y: $T) -> bool {…}

islessgreater ¶

islessgreater :: proc "odin" (x, y: $T) -> bool {…}

islower ¶

islower :: proc "cdecl" (c: i32) -> i32 ---

isnan ¶

isnan :: proc "odin" (x: $T) -> bool {…}

isnormal ¶

isnormal :: proc "odin" (x: $T) -> bool {…}

isprint ¶

isprint :: proc "cdecl" (c: i32) -> i32 ---

ispunct ¶

ispunct :: proc "cdecl" (c: i32) -> i32 ---

isspace ¶

isspace :: proc "cdecl" (c: i32) -> i32 ---

isunordered ¶

isunordered :: proc "odin" (x, y: $T) -> bool {…}

isupper ¶

isupper :: proc "cdecl" (c: i32) -> i32 ---

iswalnum ¶

iswalnum :: proc "cdecl" (wc: wint_t) -> i32 ---
 

7.30.2.1 Wide character classification functions

iswalpha ¶

iswalpha :: proc "cdecl" (wc: wint_t) -> i32 ---

iswblank ¶

iswblank :: proc "cdecl" (wc: wint_t) -> i32 ---

iswcntrl ¶

iswcntrl :: proc "cdecl" (wc: wint_t) -> i32 ---

iswctype ¶

iswctype :: proc "cdecl" (wc: wint_t, desc: wctype_t) -> i32 ---
 

7.30.2.2 Extensible wide character classification functions

iswdigit ¶

iswdigit :: proc "cdecl" (wc: wint_t) -> i32 ---

iswgraph ¶

iswgraph :: proc "cdecl" (wc: wint_t) -> i32 ---

iswlower ¶

iswlower :: proc "cdecl" (wc: wint_t) -> i32 ---

iswprint ¶

iswprint :: proc "cdecl" (wc: wint_t) -> i32 ---

iswpunct ¶

iswpunct :: proc "cdecl" (wc: wint_t) -> i32 ---

iswspace ¶

iswspace :: proc "cdecl" (wc: wint_t) -> i32 ---

iswupper ¶

iswupper :: proc "cdecl" (wc: wint_t) -> i32 ---

iswxdigit ¶

iswxdigit :: proc "cdecl" (wc: wint_t) -> i32 ---

isxdigit ¶

isxdigit :: proc "cdecl" (c: i32) -> i32 ---

kill_dependency ¶

kill_dependency :: proc "odin" (value: $T) -> $T {…}

labs ¶

labs :: proc "cdecl" (j: i32) -> i32 ---

ldiv ¶

ldiv :: proc "cdecl" (numer, denom: i32) -> ldiv_t ---

llabs ¶

llabs :: proc "cdecl" (j: i64) -> i64 ---

lldiv ¶

lldiv :: proc "cdecl" (numer, denom: i64) -> lldiv_t ---

localtime ¶

localtime :: proc "cdecl" (timer: ^time_t) -> ^tm ---

longjmp ¶

longjmp :: proc "cdecl" (env: ^jmp_buf, val: i32) -> ! ---
 

7.13.2 Restore calling environment

malloc ¶

malloc :: proc "cdecl" (size: uint) -> rawptr ---

mblen ¶

mblen :: proc "cdecl" (s: cstring, n: uint) -> i32 ---
 

7.22.7 Multibyte/wide character conversion functions

mbrlen ¶

mbrlen :: proc "cdecl" (s: cstring, n: uint, ps: ^mbstate_t) -> uint ---
 

7.29.6.3 Restartable multibyte/wide character conversion functions

mbrtoc16 ¶

mbrtoc16 :: proc "cdecl" (pc16: [^]u16, s: cstring, n: uint, ps: ^mbstate_t) -> uint ---
 

7.28.1 Restartable multibyte/wide character conversion functions

mbrtoc32 ¶

mbrtoc32 :: proc "cdecl" (pc32: [^]u32, s: cstring, n: uint, ps: ^mbstate_t) -> uint ---

mbrtowc ¶

mbrtowc :: proc "cdecl" (pwc: [^]u16, s: cstring, n: uint, ps: ^mbstate_t) -> uint ---

mbsinit ¶

mbsinit :: proc "cdecl" (ps: ^mbstate_t) -> i32 ---
 

7.29.6.2 Conversion state functions

mbsrtowcs ¶

mbsrtowcs :: proc "cdecl" (dst: [^]u16, src: ^cstring, len: uint, ps: ^mbstate_t) -> uint ---
 

7.29.6.4 Restartable multibyte/wide string conversion functions

mbstowcs ¶

mbstowcs :: proc "cdecl" (pwcs: ^u16, s: cstring, n: uint) -> uint ---
 

7.22.8 Multibyte/wide string conversion functions

mbtowc ¶

mbtowc :: proc "cdecl" (pwc: ^u16, s: cstring, n: uint) -> i32 ---

memchr ¶

memchr :: proc "cdecl" (s: rawptr, c: i32, n: uint) -> rawptr ---
 

7.24.5 Search functions

memcmp ¶

memcmp :: proc "cdecl" (s1, s2: rawptr, n: uint) -> i32 ---
 

7.24.4 Comparison functions

memcpy ¶

memcpy :: proc "cdecl" (s1, s2: rawptr, n: uint) -> rawptr ---
 

7.24.2 Copying functions

memmove ¶

memmove :: proc "cdecl" (s1, s2: rawptr, n: uint) -> rawptr ---

memset ¶

memset :: proc "cdecl" (s: rawptr, c: i32, n: uint) -> rawptr {…}

mktime ¶

mktime :: proc "cdecl" (timeptr: ^tm) -> time_t ---

mtx_destroy ¶

mtx_destroy :: proc "cdecl" (mtx: ^mtx_t) ---

mtx_init ¶

mtx_init :: proc "cdecl" (mtx: ^mtx_t, type: i32) -> i32 ---

mtx_lock ¶

mtx_lock :: proc "cdecl" (mtx: ^mtx_t) -> i32 ---

mtx_timedlock ¶

mtx_timedlock :: proc "cdecl" (mtx: ^mtx_t, ts: ^timespec) -> i32 ---

mtx_trylock ¶

mtx_trylock :: proc "cdecl" (mtx: ^mtx_t) -> i32 ---

mtx_unlock ¶

mtx_unlock :: proc "cdecl" (mtx: ^mtx_t) -> i32 ---

perror ¶

perror :: proc "cdecl" (s: cstring) ---

printf ¶

printf :: proc "cdecl" (format: cstring, args: ..any) -> i32 ---

putc ¶

putc :: proc "cdecl" (c: i32, stream: ^FILE) -> i32 ---

putchar ¶

putchar :: proc "cdecl" (c: i32) -> i32 ---

puts ¶

puts :: proc "cdecl" (s: cstring) -> i32 ---

putwc ¶

putwc :: proc "cdecl" (c: u16, stream: ^FILE) -> wint_t ---

putwchar ¶

putwchar :: proc "cdecl" (c: u16) -> wint_t ---

qsort ¶

qsort :: proc "cdecl" (base: rawptr, nmemb, size: uint, compar: proc "cdecl" (lhs, rhs: rawptr) -> i32) ---

quick_exit ¶

quick_exit :: proc "cdecl" (status: i32) -> ! ---

raise ¶

raise :: proc "cdecl" (sig: i32) -> i32 ---

rand ¶

rand :: proc "cdecl" () -> i32 ---
 

7.22.2 Pseudo-random sequence generation functions

realloc ¶

realloc :: proc "cdecl" (ptr: rawptr, size: uint) -> rawptr ---

remove ¶

remove :: proc "cdecl" (filename: cstring) -> i32 ---
 

7.21.4 Operations on files

rename ¶

rename :: proc "cdecl" (old, new: cstring) -> i32 ---

rewind ¶

rewind :: proc "cdecl" (stream: ^FILE) ---

scanf ¶

scanf :: proc "cdecl" (format: cstring, args: ..any) -> i32 ---

setbuf ¶

setbuf :: proc "cdecl" (stream: ^FILE, buf: [^]u8) ---

setjmp ¶

setjmp :: proc "cdecl" (env: ^jmp_buf, hack: rawptr = nil) -> i32 ---

setvbuf ¶

setvbuf :: proc "cdecl" (stream: ^FILE, buf: [^]u8, mode: i32, size: uint) -> i32 ---

signal ¶

signal :: proc "cdecl" (sig: i32, func: proc "cdecl" (_: i32)) -> proc "cdecl" (_: i32) ---

snprintf ¶

snprintf :: proc "cdecl" (s: [^]u8, format: cstring, args: ..any) -> i32 ---

srand ¶

srand :: proc "cdecl" (seed: u32) ---

sscanf ¶

sscanf :: proc "cdecl" (s, format: cstring, args: ..any) -> i32 ---

strcat ¶

strcat :: proc "cdecl" (s1: [^]u8, s2: cstring) -> [^]u8 ---
 

7.24.3 Concatenation functions

strchr ¶

strchr :: proc "cdecl" (s: cstring, c: i32) -> [^]u8 ---

strcmp ¶

strcmp :: proc "cdecl" (s1, s2: cstring) -> i32 ---

strcoll ¶

strcoll :: proc "cdecl" (s1, s2: cstring) -> i32 ---

strcpn ¶

strcpn :: proc "cdecl" (s1, s2: cstring) -> [^]u8 ---

strcpy ¶

strcpy :: proc "cdecl" (s1: [^]u8, s2: cstring) -> [^]u8 ---

strcspn ¶

strcspn :: proc "cdecl" (s1, s2: cstring) -> uint ---

strerror ¶

strerror :: proc "cdecl" (errnum: i32) -> [^]u8 ---
 

7.24.6 Miscellaneous functions

strftime ¶

strftime :: proc "cdecl" (s: [^]u8, maxsize: uint, format: cstring, timeptr: ^tm) -> uint ---

strlen ¶

strlen :: proc "cdecl" (s: cstring) -> uint ---

strncat ¶

strncat :: proc "cdecl" (s1: [^]u8, s2: cstring, n: uint) -> [^]u8 ---

strncmp ¶

strncmp :: proc "cdecl" (s1, s2: cstring, n: uint) -> i32 ---

strncpy ¶

strncpy :: proc "cdecl" (s1: [^]u8, s2: cstring, n: uint) -> [^]u8 ---

strpbrk ¶

strpbrk :: proc "cdecl" (s1, s2: cstring) -> [^]u8 ---

strrchr ¶

strrchr :: proc "cdecl" (s: [^]u8, c: i32) -> [^]u8 ---

strtod ¶

strtod :: proc "cdecl" (nptr: cstring, endptr: ^[^]u8) -> f64 ---

strtof ¶

strtof :: proc "cdecl" (nptr: cstring, endptr: ^[^]u8) -> f32 ---

strtok ¶

strtok :: proc "cdecl" (s1: [^]u8, s2: cstring) -> [^]u8 ---

strtol ¶

strtol :: proc "cdecl" (nptr: cstring, endptr: ^[^]u8, base: i32) -> i32 ---

strtoll ¶

strtoll :: proc "cdecl" (nptr: cstring, endptr: ^[^]u8, base: i32) -> i64 ---

strtoul ¶

strtoul :: proc "cdecl" (nptr: cstring, endptr: ^[^]u8, base: i32) -> u32 ---

strtoull ¶

strtoull :: proc "cdecl" (nptr: cstring, endptr: ^[^]u8, base: i32) -> u64 ---

strxfrm ¶

strxfrm :: proc "cdecl" (s1: [^]u8, s2: cstring, n: uint) -> uint ---

swprintf ¶

swprintf :: proc "cdecl" (stream: ^FILE, n: uint, format: [^]u16, arg: ..any) -> i32 ---

swscanf ¶

swscanf :: proc "cdecl" (s, format: [^]u16, arg: ..any) -> i32 ---

system ¶

system :: proc "cdecl" (cmd: cstring) -> i32 ---

thrd_create ¶

thrd_create :: proc "cdecl" (thr: ^thrd_t, func: thrd_start_t, arg: rawptr) -> i32 ---

thrd_current ¶

thrd_current :: proc "cdecl" () -> thrd_t ---

thrd_detach ¶

thrd_detach :: proc "cdecl" (thr: thrd_t) -> i32 ---

thrd_equal ¶

thrd_equal :: proc "cdecl" (lhs, rhs: thrd_t) -> i32 ---

thrd_exit ¶

thrd_exit :: proc "cdecl" (res: i32) -> ! ---

thrd_join ¶

thrd_join :: proc "cdecl" (thr: thrd_t, res: ^i32) -> i32 ---

thrd_sleep ¶

thrd_sleep :: proc "cdecl" (duration, remaining: ^timespec) -> i32 ---

thrd_yield ¶

thrd_yield :: proc "cdecl" () ---

time ¶

time :: proc "cdecl" (timer: ^time_t) -> time_t ---

timespec_get ¶

timespec_get :: proc "cdecl" (ts: ^timespec, base: i32) -> i32 ---

tmpfile ¶

tmpfile :: proc "cdecl" () -> ^FILE ---

tmpnam ¶

tmpnam :: proc "cdecl" (s: [^]u8) -> [^]u8 ---

tolower ¶

tolower :: proc "cdecl" (c: i32) -> i32 ---
 

7.4.2 Character case mapping functions

toupper ¶

toupper :: proc "cdecl" (c: i32) -> i32 ---

towctrans ¶

towctrans :: proc "cdecl" (wc: wint_t, desc: wctrans_t) -> wint_t ---
 

7.30.3.2 Extensible wide character case mapping functions

towlower ¶

towlower :: proc "cdecl" (wc: wint_t) -> wint_t ---
 

7.30.3 Wide character case mapping utilities

towupper ¶

towupper :: proc "cdecl" (wc: wint_t) -> wint_t ---

tss_create ¶

tss_create :: proc "cdecl" (key: ^tss_t, dtor: tss_dtor_t) -> i32 ---

tss_delete ¶

tss_delete :: proc "cdecl" (key: tss_t) ---

tss_get ¶

tss_get :: proc "cdecl" (key: tss_t) -> rawptr ---

tss_set ¶

tss_set :: proc "cdecl" (key: tss_t, val: rawptr) -> i32 ---

ungetc ¶

ungetc :: proc "cdecl" (c: i32, stream: ^FILE) -> i32 ---

ungetwc ¶

ungetwc :: proc "cdecl" (c: u16, stream: ^FILE) -> wint_t ---

va_copy ¶

va_copy :: proc "odin" (dst, src: ^va_list) {…}

va_end ¶

va_end :: proc "odin" (ap: ^va_list) {…}

va_start ¶

va_start :: proc "odin" (ap: ^va_list, _: any) {…}

vfprintf ¶

vfprintf :: proc "cdecl" (stream: ^FILE, format: cstring, arg: ^va_list) -> i32 ---

vfscanf ¶

vfscanf :: proc "cdecl" (stream: ^FILE, format: cstring, arg: ^va_list) -> i32 ---

vfwprintf ¶

vfwprintf :: proc "cdecl" (stream: ^FILE, format: [^]u16, arg: va_list) -> i32 ---

vfwscanf ¶

vfwscanf :: proc "cdecl" (stream: ^FILE, format: [^]u16, arg: va_list) -> i32 ---

vprintf ¶

vprintf :: proc "cdecl" (format: cstring, arg: ^va_list) -> i32 ---

vscanf ¶

vscanf :: proc "cdecl" (format: cstring, arg: ^va_list) -> i32 ---

vsnprintf ¶

vsnprintf :: proc "cdecl" (s: [^]u8, n: uint, format: cstring, arg: ^va_list) -> i32 ---

vsprintf ¶

vsprintf :: proc "cdecl" (s: [^]u8, format: cstring, arg: ^va_list) -> i32 ---

vsscanf ¶

vsscanf :: proc "cdecl" (s, format: cstring, arg: ^va_list) -> i32 ---

vswprintf ¶

vswprintf :: proc "cdecl" (s: [^]u16, n: uint, format: [^]u16, arg: va_list) -> i32 ---

vswscanf ¶

vswscanf :: proc "cdecl" (s, format: [^]u16, arg: va_list) -> i32 ---

vwprintf ¶

vwprintf :: proc "cdecl" (format: [^]u16, arg: va_list) -> i32 ---

vwscanf ¶

vwscanf :: proc "cdecl" (format: [^]u16, arg: va_list) -> i32 ---

wcrtomb ¶

wcrtomb :: proc "cdecl" (s: ^u8, wc: u16, ps: ^mbstate_t) -> uint ---

wcscat ¶

wcscat :: proc "cdecl" (s1, s2: [^]u16) -> [^]u16 ---
 

7.29.4.3 Wide string concatenation functions

wcschr ¶

wcschr :: proc "cdecl" (s: [^]u16, c: u16) -> [^]u16 ---
 

7.29.4.5 Wide string search functions

wcscmp ¶

wcscmp :: proc "cdecl" (s1, s2: [^]u16) -> i32 ---
 

7.29.4.4 Wide string comparison functions

wcscoll ¶

wcscoll :: proc "cdecl" (s1, s2: [^]u16) -> i32 ---

wcscpy ¶

wcscpy :: proc "cdecl" (s1, s2: [^]u16) -> [^]u16 ---
 

7.29.4.2 Wide string copying functions

wcscspn ¶

wcscspn :: proc "cdecl" (s1, s2: [^]u16) -> uint ---

wcsftime ¶

wcsftime :: proc "cdecl" (s: [^]u16, maxsize: uint, format: [^]u16, timeptr: ^tm) -> uint ---
 

7.29.5 Wide character time conversion functions

wcslen ¶

wcslen :: proc "cdecl" (s: [^]u16) -> uint ---
 

7.29.4.6 Miscellaneous functions

wcsncat ¶

wcsncat :: proc "cdecl" (s1, s2: [^]u16, n: uint) -> [^]u16 ---

wcsncmp ¶

wcsncmp :: proc "cdecl" (s1, s2: [^]u16, n: uint) -> i32 ---

wcsncpy ¶

wcsncpy :: proc "cdecl" (s1, s2: [^]u16, n: uint) -> [^]u16 ---

wcspbrk ¶

wcspbrk :: proc "cdecl" (s1, s2: [^]u16) -> [^]u16 ---

wcsrchr ¶

wcsrchr :: proc "cdecl" (s: [^]u16, c: u16) -> [^]u16 ---

wcsrtombs ¶

wcsrtombs :: proc "cdecl" (dst: ^u8, src: ^[^]u16, len: uint, ps: ^mbstate_t) -> uint ---

wcsspn ¶

wcsspn :: proc "cdecl" (s1, s2: [^]u16) -> uint ---

wcsstr ¶

wcsstr :: proc "cdecl" (s1, s2: [^]u16) -> [^]u16 ---

wcstod ¶

wcstod :: proc "cdecl" (nptr: [^]u16, endptr: ^[^]u16) -> f64 ---
 

7.29.4 General wide string utilities

wcstof ¶

wcstof :: proc "cdecl" (nptr: [^]u16, endptr: ^[^]u16) -> f32 ---

wcstok ¶

wcstok :: proc "cdecl" (s1, s2: [^]u16, ptr: ^[^]u16) -> [^]u16 ---

wcstol ¶

wcstol :: proc "cdecl" (nptr: [^]u16, endptr: ^[^]u16, base: i32) -> i32 ---

wcstoll ¶

wcstoll :: proc "cdecl" (nptr: [^]u16, endptr: ^[^]u16, base: i32) -> i64 ---

wcstombs ¶

wcstombs :: proc "cdecl" (s: [^]u8, pwcs: ^u16, n: uint) -> uint ---

wcstoul ¶

wcstoul :: proc "cdecl" (nptr: [^]u16, endptr: ^[^]u16, base: i32) -> u32 ---

wcstoull ¶

wcstoull :: proc "cdecl" (nptr: [^]u16, endptr: ^[^]u16, base: i32) -> u64 ---

wcsxfrm ¶

wcsxfrm :: proc "cdecl" (s1, s2: [^]u16, n: uint) -> uint ---

wctob ¶

wctob :: proc "cdecl" (c: wint_t) -> i32 ---

wctomb ¶

wctomb :: proc "cdecl" (s: [^]u8, wc: u16) -> i32 ---

wctrans ¶

wctrans :: proc "cdecl" (property: cstring) -> wctrans_t ---

wctype ¶

wctype :: proc "cdecl" (property: cstring) -> wctype_t ---

wmemchr ¶

wmemchr :: proc "cdecl" (s: [^]u16, c: u16, n: uint) -> [^]u16 ---

wmemcmp ¶

wmemcmp :: proc "cdecl" (s1, s2: [^]u16, n: uint) -> i32 ---

wmemcpy ¶

wmemcpy :: proc "cdecl" (s1, s2: [^]u16, n: uint) -> [^]u16 ---

wmemmove ¶

wmemmove :: proc "cdecl" (s1, s2: [^]u16, n: uint) -> [^]u16 ---

wmemset ¶

wmemset :: proc "cdecl" (s: [^]u16, c: u16, n: uint) -> [^]u16 ---

wprintf ¶

wprintf :: proc "cdecl" (format: [^]u16, arg: ..any) -> i32 ---

wscanf ¶

wscanf :: proc "cdecl" (format: [^]u16, arg: ..any) -> i32 ---

Procedure Groups

acos ¶

acos :: proc{
	libc_acos,
	libc_acosf,
	cacos,
	cacosf,
}
 

Emulate tgmath.h behavior with explicit procedure overloading here.

acosf ¶

acosf :: proc{
	libc_acosf,
}
 

But retain the 'f' suffix-variant functions as well so they can be used, a trick is used here where we use explicit procedural overloading of one procedure. This is done because the foreign block is marked @(private) and aliasing functions does not remove privateness from the entity.

acoshf ¶

acoshf :: proc{
	libc_acoshf,
}

asinf ¶

asinf :: proc{
	libc_asinf,
}

asinhf ¶

asinhf :: proc{
	libc_asinhf,
}

atan2f ¶

atan2f :: proc{
	libc_atan2f,
}

atanf ¶

atanf :: proc{
	libc_atanf,
}

atanhf ¶

atanhf :: proc{
	libc_atanhf,
}

cbrt ¶

cbrt :: proc{
	libc_cbrt,
	libc_cbrtf,
}

cbrtf ¶

cbrtf :: proc{
	libc_cbrtf,
}

ceil ¶

ceil :: proc{
	libc_ceil,
	libc_ceilf,
}

ceilf ¶

ceilf :: proc{
	libc_ceilf,
}

copysignf ¶

copysignf :: proc{
	libc_copysignf,
}

cosf ¶

cosf :: proc{
	libc_cosf,
}

coshf ¶

coshf :: proc{
	libc_coshf,
}

erf ¶

erf :: proc{
	libc_erf,
	libc_erff,
}

erfc ¶

erfc :: proc{
	libc_erfc,
	libc_erfcf,
}

erfcf ¶

erfcf :: proc{
	libc_erfcf,
}

erff ¶

erff :: proc{
	libc_erff,
}

exp2 ¶

exp2 :: proc{
	libc_exp2,
	libc_exp2f,
}

exp2f ¶

exp2f :: proc{
	libc_exp2f,
}

expf ¶

expf :: proc{
	libc_expf,
}

expm1f ¶

expm1f :: proc{
	libc_expm1f,
}

fabsf ¶

fabsf :: proc{
	libc_fabsf,
}

fdim ¶

fdim :: proc{
	libc_fdim,
	libc_fdimf,
}

fdimf ¶

fdimf :: proc{
	libc_fdimf,
}

floorf ¶

floorf :: proc{
	libc_floorf,
}

fma ¶

fma :: proc{
	libc_fma,
	libc_fmaf,
}

fmaf ¶

fmaf :: proc{
	libc_fmaf,
}

fmax ¶

fmax :: proc{
	libc_fmax,
	libc_fmaxf,
}

fmaxf ¶

fmaxf :: proc{
	libc_fmaxf,
}

fmin ¶

fmin :: proc{
	libc_fmin,
	libc_fminf,
}

fminf ¶

fminf :: proc{
	libc_fminf,
}

fmod ¶

fmod :: proc{
	libc_fmod,
	libc_fmodf,
}

fmodf ¶

fmodf :: proc{
	libc_fmodf,
}

frexpf ¶

frexpf :: proc{
	libc_frexpf,
}

hypotf ¶

hypotf :: proc{
	libc_hypotf,
}

ilogbf ¶

ilogbf :: proc{
	libc_ilogbf,
}

ldexpf ¶

ldexpf :: proc{
	libc_ldexpf,
}

lgammaf ¶

lgammaf :: proc{
	libc_lgammaf,
}

llrintf ¶

llrintf :: proc{
	libc_llrintf,
}

llroundf ¶

llroundf :: proc{
	libc_llroundf,
}

log10f ¶

log10f :: proc{
	libc_log10f,
}

log1pf ¶

log1pf :: proc{
	libc_log1pf,
}

log2 ¶

log2 :: proc{
	libc_log2,
	libc_log2f,
}

log2f ¶

log2f :: proc{
	libc_log2f,
}

logb ¶

logb :: proc{
	libc_logb,
	libc_logbf,
}

logbf ¶

logbf :: proc{
	libc_logbf,
}

logf ¶

logf :: proc{
	libc_logf,
}

lrintf ¶

lrintf :: proc{
	libc_lrintf,
}

lroundf ¶

lroundf :: proc{
	libc_lroundf,
}

modf ¶

modf :: proc{
	libc_modf,
	libc_modff,
}

modff ¶

modff :: proc{
	libc_modff,
}

nan ¶

nan :: proc{
	libc_nan,
}
 

These two functions are special and not made type generic in tgmath.h since they only differ by their return type.

nanf ¶

nanf :: proc{
	libc_nanf,
}

nearbyintf ¶

nearbyintf :: proc{
	libc_nearbyintf,
}

nextafterf ¶

nextafterf :: proc{
	libc_nextafterf,
}

powf ¶

powf :: proc{
	libc_powf,
}

remainderf ¶

remainderf :: proc{
	libc_remainderf,
}

remquof ¶

remquof :: proc{
	libc_remquof,
}

rint ¶

rint :: proc{
	libc_rint,
	libc_rintf,
}

rintf ¶

rintf :: proc{
	libc_rintf,
}

roundf ¶

roundf :: proc{
	libc_roundf,
}

scalblnf ¶

scalblnf :: proc{
	libc_scalblnf,
}

scalbnf ¶

scalbnf :: proc{
	libc_scalbnf,
}

signbit ¶

signbit :: proc{
	_signbit,
	_signbitf,
}

sinf ¶

sinf :: proc{
	libc_sinf,
}

sinhf ¶

sinhf :: proc{
	libc_sinhf,
}

sqrtf ¶

sqrtf :: proc{
	libc_sqrtf,
}

tanf ¶

tanf :: proc{
	libc_tanf,
}

tanhf ¶

tanhf :: proc{
	libc_tanhf,
}

tgammaf ¶

tgammaf :: proc{
	libc_tgammaf,
}

truncf ¶

truncf :: proc{
	libc_truncf,
}

Source Files

Generation Information

Generated with odin version dev-2023-03 (vendor "odin") Windows_amd64 @ 2023-03-29 21:09:05.430817700 +0000 UTC