Edit on GitHub

C libraries

Nelua provides bindings for common C functions according to the C11 specification. This is a list of all imported C libraries.

To use a C library, use require 'C.stdlib' for example.

Nelua encourages you to use it’s standard libraries instead of the C APIs, these are provided just as convenience for interoperating with C libraries.

C.arg

Library importing C’s main argc and argv.

C.argc

global C.argc: cint

C.argv

global C.argv: *[0]cstring

C.ctype

Library importing symbols from <ctype.h> header according to C11 spec.

For a complete documentation about the functions, see C ctype documentation.

C.isalnum

function C.isalnum(x: cint): cint

C.isalpha

function C.isalpha(x: cint): cint

C.islower

function C.islower(x: cint): cint

C.isupper

function C.isupper(x: cint): cint

C.isdigit

function C.isdigit(x: cint): cint

C.isxdigit

function C.isxdigit(x: cint): cint

C.iscntrl

function C.iscntrl(x: cint): cint

C.isgraph

function C.isgraph(x: cint): cint

C.isspace

function C.isspace(x: cint): cint

C.isblank

function C.isblank(x: cint): cint

C.isprint

function C.isprint(x: cint): cint

C.ispunct

function C.ispunct(x: cint): cint

C.tolower

function C.tolower(c: cint): cint

C.toupper

function C.toupper(c: cint): cint

C.errno

Library that imports symbols from the <errno.h> header according to C11 specifications.

For a complete documentation about the functions, see C errno documentation.

C.errno

global C.errno: cint

C.EDOM

global C.EDOM: cint

C.EILSEQ

global C.EILSEQ: cint

C.ERANGE

global C.ERANGE: cint

C.locale

Library that imports symbols from the <locale.h> header according to C11 specifications.

For a complete documentation about the functions, see C locale documentation.

C.lconv

global C.lconv: type = @record{
  decimal_point: cstring,
  thousands_sep: cstring,
  grouping: cstring,
  int_curr_symbol: cstring,
  currency_symbol: cstring,
  mon_decimal_point: cstring,
  mon_thousands_sep: cstring,
  mon_grouping: cstring,
  positive_sign: cstring,
  negative_sign: cstring,
  int_frac_digits: cchar,
  frac_digits: cchar,
  p_cs_precedes: cchar,
  p_sep_by_space: cchar,
  n_cs_precedes: cchar,
  n_sep_by_space: cchar,
  p_sign_posn: cchar,
  n_sign_posn: cchar,
  int_p_cs_precedes: cchar,
  int_p_sep_by_space: cchar,
  int_n_cs_precedes: cchar,
  int_n_sep_by_space: cchar,
  int_p_sign_posn: cchar,
  int_n_sign_posn: cchar
}

C.setlocale

function C.setlocale(category: cint, locale: cstring): cstring

C.localeconv

function C.localeconv(): *C.lconv

C.LC_ALL

global C.LC_ALL: cint

C.LC_COLLATE

global C.LC_COLLATE: cint

C.LC_CTYPE

global C.LC_CTYPE: cint

C.LC_MONETARY

global C.LC_MONETARY: cint

C.LC_NUMERIC

global C.LC_NUMERIC: cint

C.LC_TIME

global C.LC_TIME: cint

C.math

Library that imports symbols from the <math.h> header according to C11 specifications.

For a complete documentation about the functions, see C math documentation.

C.fabs

function C.fabs(x: float64): float64

C.fabsf

function C.fabsf(x: float32): float32

C.fabsl

function C.fabsl(x: clongdouble): clongdouble

C.fmod

function C.fmod(x: float64, y: float64): float64

C.fmodf

function C.fmodf(x: float32, y: float32): float32

C.fmodl

function C.fmodl(x: clongdouble, y: clongdouble): clongdouble

C.remainder

function C.remainder(x: float64, y: float64): float64

C.remainderf

function C.remainderf(x: float32, y: float32): float32

C.remainderl

function C.remainderl(x: clongdouble, y: clongdouble): clongdouble

C.remquo

function C.remquo(x: float64, y: float64, quo: *cint): float64

C.remquof

function C.remquof(x: float32, y: float32, quo: *cint): float32

C.remquol

function C.remquol(x: clongdouble, y: clongdouble, quo: *cint): clongdouble

C.fma

function C.fma(x: float64, y: float64, z: float64): float64

C.fmaf

function C.fmaf(x: float32, y: float32, z: float32): float32

C.fmal

function C.fmal(x: clongdouble, y: clongdouble, z: clongdouble): clongdouble

C.fmax

function C.fmax(x: float64, y: float64): float64

C.fmaxf

function C.fmaxf(x: float32, y: float32): float32

C.fmaxl

function C.fmaxl(x: clongdouble, y: clongdouble): clongdouble

C.fmin

function C.fmin(x: float64, y: float64): float64

C.fminf

function C.fminf(x: float32, y: float32): float32

C.fminl

function C.fminl(x: clongdouble, y: clongdouble): clongdouble

C.fdim

function C.fdim(x: float64, y: float64): float64

C.fdimf

function C.fdimf(x: float32, y: float32): float32

C.fdiml

function C.fdiml(x: clongdouble, y: clongdouble): clongdouble

C.nan

function C.nan(tagb: cstring): float64

C.nanf

function C.nanf(tagb: cstring): float32

C.nanl

function C.nanl(tagb: cstring): clongdouble

C.exp

function C.exp(x: float64): float64

C.expf

function C.expf(x: float32): float32

C.expl

function C.expl(x: clongdouble): clongdouble

C.exp2

function C.exp2(x: float64): float64

C.exp2f

function C.exp2f(x: float32): float32

C.exp2l

function C.exp2l(x: clongdouble): clongdouble

C.expm1

function C.expm1(x: float64): float64

C.expm1f

function C.expm1f(x: float32): float32

C.expm1l

function C.expm1l(x: clongdouble): clongdouble

C.log

function C.log(x: float64): float64

C.logf

function C.logf(x: float32): float32

C.logl

function C.logl(x: clongdouble): clongdouble

C.log10

function C.log10(x: float64): float64

C.log10f

function C.log10f(x: float32): float32

C.log10l

function C.log10l(x: clongdouble): clongdouble

C.log1p

function C.log1p(x: float64): float64

C.log1pf

function C.log1pf(x: float32): float32

C.log1pl

function C.log1pl(x: clongdouble): clongdouble

C.log2

function C.log2(x: float64): float64

C.log2f

function C.log2f(x: float32): float32

C.log2l

function C.log2l(x: clongdouble): clongdouble

C.logb

function C.logb(x: float64): float64

C.logbf

function C.logbf(x: float32): float32

C.logbl

function C.logbl(x: clongdouble): clongdouble

C.pow

function C.pow(x: float64, y: float64): float64

C.powf

function C.powf(x: float32, y: float32): float32

C.powl

function C.powl(x: clongdouble, y: clongdouble): clongdouble

C.sqrt

function C.sqrt(x: float64): float64

C.sqrtf

function C.sqrtf(x: float32): float32

C.sqrtl

function C.sqrtl(x: clongdouble): clongdouble

C.cbrt

function C.cbrt(x: float64): float64

C.cbrtf

function C.cbrtf(x: float32): float32

C.cbrtl

function C.cbrtl(x: clongdouble): clongdouble

C.hypot

function C.hypot(x: float64, y: float64): float64

C.hypotf

function C.hypotf(x: float32, y: float32): float32

C.hypotl

function C.hypotl(x: clongdouble, y: clongdouble): clongdouble

C.cos

function C.cos(x: float64): float64

C.cosf

function C.cosf(x: float32): float32

C.cosl

function C.cosl(x: clongdouble): clongdouble

C.sin

function C.sin(x: float64): float64

C.sinf

function C.sinf(x: float32): float32

C.sinl

function C.sinl(x: clongdouble): clongdouble

C.tan

function C.tan(x: float64): float64

C.tanf

function C.tanf(x: float32): float32

C.tanl

function C.tanl(x: clongdouble): clongdouble

C.acos

function C.acos(x: float64): float64

C.acosf

function C.acosf(x: float32): float32

C.acosl

function C.acosl(x: clongdouble): clongdouble

C.asin

function C.asin(x: float64): float64

C.asinf

function C.asinf(x: float32): float32

C.asinl

function C.asinl(x: clongdouble): clongdouble

C.atan

function C.atan(x: float64): float64

C.atanf

function C.atanf(x: float32): float32

C.atanl

function C.atanl(x: clongdouble): clongdouble

C.atan2

function C.atan2(y: float64, x: float64): float64

C.atan2f

function C.atan2f(y: float32, x: float32): float32

C.atan2l

function C.atan2l(y: clongdouble, x: clongdouble): clongdouble

C.cosh

function C.cosh(x: float64): float64

C.coshf

function C.coshf(x: float32): float32

C.coshl

function C.coshl(x: clongdouble): clongdouble

C.sinh

function C.sinh(x: float64): float64

C.sinhf

function C.sinhf(x: float32): float32

C.sinhl

function C.sinhl(x: clongdouble): clongdouble

C.tanh

function C.tanh(x: float64): float64

C.tanhf

function C.tanhf(x: float32): float32

C.tanhl

function C.tanhl(x: clongdouble): clongdouble

C.acosh

function C.acosh(x: float64): float64

C.acoshf

function C.acoshf(x: float32): float32

C.acoshl

function C.acoshl(x: clongdouble): clongdouble

C.asinh

function C.asinh(x: float64): float64

C.asinhf

function C.asinhf(x: float32): float32

C.asinhl

function C.asinhl(x: clongdouble): clongdouble

C.atanh

function C.atanh(x: float64): float64

C.atanhf

function C.atanhf(x: float32): float32

C.atanhl

function C.atanhl(x: clongdouble): clongdouble

C.erf

function C.erf(x: float64): float64

C.erff

function C.erff(x: float32): float32

C.erfl

function C.erfl(x: clongdouble): clongdouble

C.erfc

function C.erfc(x: float64): float64

C.erfcf

function C.erfcf(x: float32): float32

C.erfcl

function C.erfcl(x: clongdouble): clongdouble

C.tgamma

function C.tgamma(x: float64): float64

C.tgammaf

function C.tgammaf(x: float32): float32

C.tgammal

function C.tgammal(x: clongdouble): clongdouble

C.lgamma

function C.lgamma(x: float64): float64

C.lgammaf

function C.lgammaf(x: float32): float32

C.lgammal

function C.lgammal(x: clongdouble): clongdouble

C.ceil

function C.ceil(x: float64): float64

C.ceilf

function C.ceilf(x: float32): float32

C.ceill

function C.ceill(x: clongdouble): clongdouble

C.floor

function C.floor(x: float64): float64

C.floorf

function C.floorf(x: float32): float32

C.floorl

function C.floorl(x: clongdouble): clongdouble

C.trunc

function C.trunc(x: float64): float64

C.truncf

function C.truncf(x: float32): float32

C.truncl

function C.truncl(x: clongdouble): clongdouble

C.round

function C.round(x: float64): float64

C.roundf

function C.roundf(x: float32): float32

C.roundl

function C.roundl(x: clongdouble): clongdouble

C.lround

function C.lround(x: float64): clong

C.lroundf

function C.lroundf(x: float32): clong

C.lroundl

function C.lroundl(x: clongdouble): clong

C.llround

function C.llround(x: float64): clonglong

C.llroundf

function C.llroundf(x: float32): clonglong

C.llroundl

function C.llroundl(x: clongdouble): clonglong

C.rint

function C.rint(x: float64): float64

C.rintf

function C.rintf(x: float32): float32

C.rintl

function C.rintl(x: clongdouble): clongdouble

C.lrint

function C.lrint(x: float64): clong

C.lrintf

function C.lrintf(x: float32): clong

C.lrintl

function C.lrintl(x: clongdouble): clong

C.llrint

function C.llrint(x: float64): clonglong

C.llrintf

function C.llrintf(x: float32): clonglong

C.llrintl

function C.llrintl(x: clongdouble): clonglong

C.nearbyint

function C.nearbyint(x: float64): float64

C.nearbyintf

function C.nearbyintf(x: float32): float32

C.nearbyintl

function C.nearbyintl(x: clongdouble): clongdouble

C.frexp

function C.frexp(x: float64, exponent: *cint): float64

C.frexpf

function C.frexpf(x: float32, exponent: *cint): float32

C.frexpl

function C.frexpl(x: clongdouble, exponent: *cint): clongdouble

C.ldexp

function C.ldexp(x: float64, exponent: cint): float64

C.ldexpf

function C.ldexpf(x: float32, exponent: cint): float32

C.ldexpl

function C.ldexpl(x: clongdouble, exponent: cint): clongdouble

C.modf

function C.modf(x: float64, iptr: *float64): float64

C.modff

function C.modff(x: float32, iptr: *float32): float32

C.modfl

function C.modfl(x: clongdouble, iptr: *clongdouble): clongdouble

C.scalbln

function C.scalbln(x: float64, n: clong): float64

C.scalblnf

function C.scalblnf(x: float32, n: clong): float32

C.scalblnl

function C.scalblnl(x: clongdouble, n: clong): clongdouble

C.scalbn

function C.scalbn(x: float64, n: cint): float64

C.scalbnf

function C.scalbnf(x: float32, n: cint): float32

C.scalbnl

function C.scalbnl(x: clongdouble, n: cint): clongdouble

C.ilogb

function C.ilogb(x: float64): cint

C.ilogbf

function C.ilogbf(x: float32): cint

C.ilogbl

function C.ilogbl(x: clongdouble): cint

C.nextafter

function C.nextafter(x: float64, y: float64): float64

C.nextafterf

function C.nextafterf(x: float32, y: float32): float32

C.nextafterl

function C.nextafterl(x: clongdouble, y: clongdouble): clongdouble

C.nexttoward

function C.nexttoward(x: float64, y: clongdouble): float64

C.nexttowardf

function C.nexttowardf(x: float32, y: clongdouble): float32

C.nexttowardl

function C.nexttowardl(x: clongdouble, y: clongdouble): clongdouble

C.copysign

function C.copysign(x: float64, y: float64): float64

C.copysignf

function C.copysignf(x: float32, y: float32): float32

C.copysignl

function C.copysignl(x: clongdouble, y: clongdouble): clongdouble

C.fpclassify

function C.fpclassify(x: float64): cint

C.fpclassifyf

function C.fpclassifyf(x: float32): cint

C.fpclassifyl

function C.fpclassifyl(x: clongdouble): cint

C.isfinite

function C.isfinite(x: float64): cint

C.isfinitef

function C.isfinitef(x: float32): cint

C.isfinitel

function C.isfinitel(x: clongdouble): cint

C.isinf

function C.isinf(x: float64): cint

C.isinff

function C.isinff(x: float32): cint

C.isinfl

function C.isinfl(x: clongdouble): cint

C.isnan

function C.isnan(x: float64): cint

C.isnanf

function C.isnanf(x: float32): cint

C.isnanl

function C.isnanl(x: clongdouble): cint

C.isnormal

function C.isnormal(x: float64): cint

C.isnormalf

function C.isnormalf(x: float32): cint

C.isnormall

function C.isnormall(x: clongdouble): cint

C.signbit

function C.signbit(x: float64): cint

C.signbitf

function C.signbitf(x: float32): cint

C.signbitl

function C.signbitl(x: clongdouble): cint

C.isgreater

function C.isgreater(x: float64, y: float64): cint

C.isgreaterf

function C.isgreaterf(x: float32, y: float32): cint

C.isgreaterl

function C.isgreaterl(x: clongdouble, y: clongdouble): cint

C.isgreaterequal

function C.isgreaterequal(x: float64, y: float64): cint

C.isgreaterequalf

function C.isgreaterequalf(x: float32, y: float32): cint

C.isgreaterequall

function C.isgreaterequall(x: clongdouble, y: clongdouble): cint

C.isless

function C.isless(x: float64, y: float64): cint

C.islessf

function C.islessf(x: float32, y: float32): cint

C.islessl

function C.islessl(x: clongdouble, y: clongdouble): cint

C.islessequal

function C.islessequal(x: float64, y: float64): cint

C.islessequalf

function C.islessequalf(x: float32, y: float32): cint

C.islessequall

function C.islessequall(x: clongdouble, y: clongdouble): cint

C.islessgreater

function C.islessgreater(x: float64, y: float64): cint

C.islessgreaterf

function C.islessgreaterf(x: float32, y: float32): cint

C.islessgreaterl

function C.islessgreaterl(x: clongdouble, y: clongdouble): cint

C.isunordered

function C.isunordered(x: float64, y: float64): cint

C.isunorderedf

function C.isunorderedf(x: float32, y: float32): cint

C.isunorderedl

function C.isunorderedl(x: clongdouble, y: clongdouble): cint

C.HUGE_VALF

global C.HUGE_VALF: float32

C.HUGE_VAL

global C.HUGE_VAL: float64

C.HUGE_VALL

global C.HUGE_VALL: clongdouble

C.INFINITY

global C.INFINITY: cfloat

C.NAN

global C.NAN: cfloat

C.FP_FAST_FMAF

global C.FP_FAST_FMAF: float32

C.FP_FAST_FMA

global C.FP_FAST_FMA: float64

C.FP_FAST_FMAL

global C.FP_FAST_FMAL: clongdouble

C.FP_ILOGB0

global C.FP_ILOGB0: cint

C.FP_ILOGBNAN

global C.FP_ILOGBNAN: cint

C.math_errhandling

global C.math_errhandling: cint

C.MATH_ERRNO

global C.MATH_ERRNO: cint

C.MATH_ERREXCEPT

global C.MATH_ERREXCEPT: cint

C.FP_NORMAL

global C.FP_NORMAL: cint

C.FP_SUBNORMAL

global C.FP_SUBNORMAL: cint

C.FP_ZERO

global C.FP_ZERO: cint

C.FP_INFINITE

global C.FP_INFINITE: cint

C.FP_NAN

global C.FP_NAN: cint

C.signal

Library that imports symbols from the <signal.h> header according to C11 specifications.

For a complete documentation about the functions, see C signal documentation.

C.signal

function C.signal(sig: cint, handler: function(cint)): function(cint)

C.raise

function C.raise(sig: cint): cint

C.SIG_DFL

global C.SIG_DFL: function(cint)

C.SIG_IGN

global C.SIG_IGN: function(cint)

C.SIG_ERR

global C.SIG_ERR: function(cint)

C.SIGTERM

global C.SIGTERM: cint

C.SIGSEGV

global C.SIGSEGV: cint

C.SIGINT

global C.SIGINT: cint

C.SIGILL

global C.SIGILL: cint

C.SIGABRT

global C.SIGABRT: cint

C.SIGFPE

global C.SIGFPE: cint

C.stdarg

Library that imports symbols from the <stdarg.h> header according to C11 specifications.

For a complete documentation about the functions, see C stdarg documentation.

C.va_start

function C.va_start(ap: cvalist, paramN: auto): void

C.va_end

function C.va_end(ap: cvalist): void

C.va_arg

function C.va_arg(ap: *cvalist, T: type)

C.stdio

Library that imports symbols from the <stdio.h> header according to C11 specifications.

For a complete documentation about the functions, see C stdio documentation.

C.FILE

global C.FILE: type = @record{}

C.fpos_t

global C.fpos_t: type = @record{}

C.remove

function C.remove(filename: cstring): cint

C.rename

function C.rename(old: cstring, new: cstring): cint

C.tmpfile

function C.tmpfile(): *C.FILE

C.tmpnam

function C.tmpnam(s: cstring): cstring

C.fclose

function C.fclose(stream: *C.FILE): cint

C.fflush

function C.fflush(stream: *C.FILE): cint

C.fopen

function C.fopen(filename: cstring, modes: cstring): *C.FILE

C.freopen

function C.freopen(filename: cstring, modes: cstring, stream: *C.FILE): *C.FILE

C.setbuf

function C.setbuf(stream: *C.FILE, buf: cstring): void

C.setvbuf

function C.setvbuf(stream: *C.FILE, buf: cstring, modes: cint, n: csize): cint

C.scanf

function C.scanf(format: cstring, ...: cvarargs): cint

C.fscanf

function C.fscanf(stream: *C.FILE, format: cstring, ...: cvarargs): cint

C.sscanf

function C.sscanf(s: cstring, format: cstring, ...: cvarargs): cint

C.vscanf

function C.vscanf(format: cstring, arg: cvalist): cint

C.vfscanf

function C.vfscanf(stream: *C.FILE, format: cstring, arg: cvalist): cint

C.vsscanf

function C.vsscanf(s: cstring, format: cstring, arg: cvalist): cint

C.printf

function C.printf(format: cstring, ...: cvarargs): cint

C.fprintf

function C.fprintf(stream: *C.FILE, format: cstring, ...: cvarargs): cint

C.sprintf

function C.sprintf(s: cstring, format: cstring, ...: cvarargs): cint

C.snprintf

function C.snprintf(s: cstring, maxlen: csize, format: cstring, ...: cvarargs): cint

C.vprintf

function C.vprintf(format: cstring, arg: cvalist): cint

C.vfprintf

function C.vfprintf(stream: *C.FILE, format: cstring, arg: cvalist): cint

C.vsprintf

function C.vsprintf(s: cstring, format: cstring, arg: cvalist): cint

C.vsnprintf

function C.vsnprintf(s: cstring, maxlen: csize, format: cstring, arg: cvalist): cint

C.getc

function C.getc(stream: *C.FILE): cint

C.putc

function C.putc(c: cint, stream: *C.FILE): cint

C.getchar

function C.getchar(): cint

C.putchar

function C.putchar(c: cint): cint

C.fgetc

function C.fgetc(stream: *C.FILE): cint

C.fputc

function C.fputc(c: cint, stream: *C.FILE): cint

C.fgets

function C.fgets(s: cstring, n: cint, stream: *C.FILE): cstring

C.fputs

function C.fputs(s: cstring, stream: *C.FILE): cint

C.gets

function C.gets(s: cstring): cstring

C.puts

function C.puts(s: cstring): cint

C.ungetc

function C.ungetc(c: cint, stream: *C.FILE): cint

C.fread

function C.fread(ptr: pointer, size: csize, n: csize, stream: *C.FILE): csize

C.fwrite

function C.fwrite(ptr: pointer, size: csize, n: csize, sream: pointer): csize

C.fgetpos

function C.fgetpos(stream: *C.FILE, pos: *C.fpos_t): cint

C.fsetpos

function C.fsetpos(stream: *C.FILE, pos: *C.fpos_t): cint

C.fseek

function C.fseek(stream: *C.FILE, off: clong, whence: cint): cint

C.ftell

function C.ftell(stream: *C.FILE): clong

C.rewind

function C.rewind(stream: *C.FILE): void

C.clearerr

function C.clearerr(stream: *C.FILE): void

C.feof

function C.feof(stream: *C.FILE): cint

C.ferror

function C.ferror(stream: *C.FILE): cint

C.perror

function C.perror(s: cstring): void

C.stdin

global C.stdin: *C.FILE

C.stdout

global C.stdout: *C.FILE

C.stderr

global C.stderr: *C.FILE

C.EOF

global C.EOF: cint

C.BUFSIZ

global C.BUFSIZ: cint

C.FOPEN_MAX

global C.FOPEN_MAX: cint

C.FILENAME_MAX

global C.FILENAME_MAX: cint

C._IOFBF

global C._IOFBF: cint

C._IOLBF

global C._IOLBF: cint

C._IONBF

global C._IONBF: cint

C.SEEK_SET

global C.SEEK_SET: cint

C.SEEK_CUR

global C.SEEK_CUR: cint

C.SEEK_END

global C.SEEK_END: cint

C.TMP_MAX

global C.TMP_MAX: cint

C.L_tmpnam

global C.L_tmpnam: cint

C.stdlib

Library that imports symbols from the <stdlib.h> header according to C11 specifications.

For a complete documentation about the functions, see C stdlib documentation.

C.div_t

global C.div_t: type = @record{quot: cint, rem: cint}

C.ldiv_t

global C.ldiv_t: type = @record{quot: cint, rem: cint}

C.lldiv_t

global C.lldiv_t: type = @record{quot: cint, rem: cint}

C.malloc

function C.malloc(size: csize): pointer

C.calloc

function C.calloc(nmemb: csize, size: csize): pointer

C.realloc

function C.realloc(ptr: pointer, size: csize): pointer

C.free

function C.free(ptr: pointer): void

C.aligned_alloc

function C.aligned_alloc(alignment: csize, size: csize): pointer

C.abort

function C.abort(): void

C.exit

function C.exit(status: cint): void

C.quick_exit

function C.quick_exit(status: cint): void

C._Exit

function C._Exit(status: cint): void

C.atexit

function C.atexit(func: pointer): cint

C.at_quick_exit

function C.at_quick_exit(func: pointer): cint

C.system

function C.system(command: cstring): cint

C.getenv

function C.getenv(name: cstring): cstring

C.bsearch

function C.bsearch(key: pointer, base: pointer, nmemb: csize, size: csize, compar: function(pointer, pointer): cint): pointer

C.qsort

function C.qsort(base: pointer, nmemb: csize, size: csize, compar: function(pointer, pointer): cint): void

C.rand

function C.rand(): cint

C.srand

function C.srand(seed: cuint): void

C.atof

function C.atof(nptr: cstring): float64

C.atoi

function C.atoi(nptr: cstring): cint

C.atol

function C.atol(nptr: cstring): clong

C.atoll

function C.atoll(nptr: cstring): clonglong

C.strtof

function C.strtof(nptr: cstring, endptr: *cstring): float32

C.strtod

function C.strtod(nptr: cstring, endptr: *cstring): float64

C.strtold

function C.strtold(nptr: cstring, endptr: *cstring): clongdouble

C.strtol

function C.strtol(nptr: cstring, endptr: *cstring, base: cint): clong

C.strtoll

function C.strtoll(nptr: cstring, endptr: *cstring, base: cint): clonglong

C.strtoul

function C.strtoul(nptr: cstring, endptr: *cstring, base: cint): culong

C.strtoull

function C.strtoull(nptr: cstring, endptr: *cstring, base: cint): culonglong

C.abs

function C.abs(x: cint): cint

C.labs

function C.labs(x: clong): clong

C.llabs

function C.llabs(x: clonglong): clonglong

C.div

function C.div(numer: cint, denom: cint): C.div_t

C.ldiv

function C.ldiv(numer: clong, denom: clong): C.ldiv_t

C.lldiv

function C.lldiv(numer: clonglong, denom: clonglong): C.lldiv_t

C.EXIT_SUCCESS

global C.EXIT_SUCCESS: cint

C.EXIT_FAILURE

global C.EXIT_FAILURE: cint

C.RAND_MAX

global C.RAND_MAX: cint

C.string

Library that imports symbols from the <string.h> header according to C11 specifications.

For a complete documentation about the functions, see C string documentation.

C.memcpy

function C.memcpy(dest: pointer, src: pointer, n: csize): pointer

C.memmove

function C.memmove(dest: pointer, src: pointer, n: csize): pointer

C.memccpy

function C.memccpy(dest: pointer, src: pointer, c: cint, n: csize): pointer

C.memset

function C.memset(s: pointer, c: cint, n: csize): pointer

C.memcmp

function C.memcmp(s1: pointer, s2: pointer, n: csize): cint

C.memchr

function C.memchr(s: pointer, c: cint, n: csize): pointer

C.strcpy

function C.strcpy(dest: cstring, src: cstring): cstring

C.strncpy

function C.strncpy(dest: cstring, src: cstring, n: csize): cstring

C.strcat

function C.strcat(dest: cstring, src: cstring): cstring

C.strncat

function C.strncat(dest: cstring, src: cstring, n: csize): cstring

C.strcmp

function C.strcmp(s1: cstring, s2: cstring): cint

C.strncmp

function C.strncmp(s1: cstring, s2: cstring, n: csize): cint

C.strcoll

function C.strcoll(s1: cstring, s2: cstring): cint

C.strxfrm

function C.strxfrm(dest: cstring, src: cstring, n: csize): csize

C.strchr

function C.strchr(s: cstring, c: cint): cstring

C.strrchr

function C.strrchr(s: cstring, c: cint): cstring

C.strcspn

function C.strcspn(s: cstring, reject: cstring): csize

C.strspn

function C.strspn(s: cstring, accept: cstring): csize

C.strpbrk

function C.strpbrk(s: cstring, accept: cstring): cstring

C.strstr

function C.strstr(haystack: cstring, needle: cstring): cstring

C.strlen

function C.strlen(s: cstring): csize

C.strerror

function C.strerror(errnum: cint): cstring

C.time

Library that imports symbols from the <time.h> header according to C11 specifications.

For a complete documentation about the functions, see C time documentation.

C.clock_t

global C.clock_t: type

C.time_t

global C.time_t: type

C.tm

global C.tm: type = @record{
  tm_sec: cint,
  tm_min: cint,
  tm_hour: cint,
  tm_mday: cint,
  tm_mon: cint,
  tm_year: cint,
  tm_wday: cint,
  tm_yday: cint,
  tm_isdst: cint
}

C.timespec

global C.timespec: type = @record{
  tv_sec: C.time_t,
  tv_nsec: clong
}

C.clock

function C.clock(): C.clock_t

C.difftime

function C.difftime(time1: C.time_t, time0: C.time_t): float64

C.mktime

function C.mktime(tp: *C.tm): C.time_t

C.strftime

function C.strftime(s: cstring, maxsize: csize, format: cstring, tp: *C.tm): csize

C.time

function C.time(timer: *C.time_t): C.time_t

C.asctime

function C.asctime(tp: *C.tm): cstring

C.ctime

function C.ctime(timer: *C.time_t): cstring

C.gmtime

function C.gmtime(timer: *C.time_t): *C.tm

C.localtime

function C.localtime(timer: *C.time_t): *C.tm

C.timespec_get

function C.timespec_get(ts: *C.timespec, base: cint): cint

C.CLOCKS_PER_SEC

global C.CLOCKS_PER_SEC: C.clock_t

C.TIME_UTC

global C.TIME_UTC: cint