module core.c.stdlib
C Bindings | C Standard Library Bindings

Code Map

module core.c.stdlib;

public import core.c.stddef;


enum EXIT_SUCCESS;
enum EXIT_FAILURE;
enum MB_CUR_MAX;
enum RAND_MAX;

struct div_t
{
public:
	quot: i32;
	rem: i32;
}

struct ldiv_t
{
public:
	quot: c_long;
	rem: c_long;
}

struct lldiv_t
{
public:
	quot: i64;
	rem: i64;
}

global environ: char**;

fn atof(nptr: const(const(char)*)) f64;
fn atoi(nptr: const(const(char)*)) i32;
fn atol(nptr: const(const(char)*)) c_long;
fn atoll(nptr: const(const(char)*)) i64;
fn strtod(nptr: const(const(char)*), endptr: char**) f64;
fn strtof(nptr: const(const(char)*), endptr: char**) f32;
fn strtol(nptr: const(const(char)*), endptr: char**, base: i32) c_long;
fn strtoll(nptr: const(const(char)*), endptr: char**, base: i32) i64;
fn strtoul(nptr: const(const(char)*), endptr: char**, base: i32) c_ulong;
fn strtoull(nptr: const(const(char)*), endptr: char**, base: i32) u64;
fn rand() i32;
fn srand(seed: u32);
fn malloc(size: size_t) void*;
fn calloc(nmemb: size_t, size: size_t) void*;
fn realloc(ptr: void*, size: size_t) void*;
fn free(ptr: void*);
fn abort();
fn exit(status: i32);
fn atexit(func: fn () (void)) i32;
fn _Exit(status: i32);
fn getenv(name: const(const(char)*)) char*;
fn system(str: const(const(char)*)) i32;
fn bsearch(key: const(const(void)*), base: const(const(void)*), nmemb: size_t, size: size_t, compar: fn (const(const(void)*), const(const(void)*)) (i32)) void*;
fn qsort(base: void*, nmemb: size_t, size: size_t, compar: fn (const(const(void)*), const(const(void)*)) (i32));
fn abs(j: i32) i32;
fn labs(j: c_long) c_long;
fn llabs(j: i64) i64;
fn div(numer: i32, denom: i32) div_t;
fn ldiv(numer: c_long, denom: c_long) ldiv_t;
fn lldiv(numer: i64, denom: i64) lldiv_t;
fn mblen(s: const(const(char)*), n: size_t) i32;
fn mbtowc(pwc: wchar_t*, s: const(const(char)*), n: size_t) i32;
fn wctomb(s: char*, wc: wchar_t) i32;
fn mbstowcs(pwcs: wchar_t*, s: const(const(char)*), n: size_t) size_t;
fn wcstombs(s: char*, pwcs: const(const(wchar_t)*), n: size_t) size_t;
fn realpath(const(char)*, char*) char*;