stdlib.h header reference
[C library module]

The source code of this header can be browsed online.

Members [link] 

Types [link] 

Functions [link] 

  • void abort(void )
  • error_t atexit(void (*function)() )
  • int_fast16_t ato_intl16(const char *nptr)
  • int_fast32_t ato_intl32(const char *nptr)
  • int_fast64_t ato_intl64(const char *nptr)
  • float atof(const char *f)
  • void * bsearch(const void *key, const void *base, size_t nel, size_t width, __compiler_sint_t (*compar)(const void *,const void *) )
  • void * calloc(size_t nmemb, size_t size)
  • div_t div(__compiler_sint_t number, __compiler_sint_t denom)
  • void exit(uint_fast8_t status)
  • void free(void *ptr)
  • uint32_t gcd32(uint32_t a, uint32_t b)
  • uint64_t gcd64(uint64_t a, uint64_t b)
  • char * getenv(const char *key)
  • ldiv_t ldiv(__compiler_slong_t number, __compiler_slong_t denom)
  • void * malloc(size_t size)
  • void qsort(void *base, size_t nel, size_t width, qsort_compar_t *compar)
  • __compiler_sint_t rand(void )
  • uint32_t rand_64(void )
  • void rand_64_merge(const void *data, size_t size)
  • uint32_t rand_64_r(uint64_t *s)
  • uint32_t rand_64_range(uint32_t min, uint32_t max)
  • uint32_t rand_64_range_r(uint64_t *s, uint32_t min, uint32_t max)
  • __compiler_sint_t rand_r(__compiler_uint_t *seedp)
  • __compiler_slong_t random(void )
  • void * realloc(void *ptr, size_t size)
  • void srand(__compiler_uint_t seed)
  • void srandom(__compiler_uint_t seed)
  • int_fast16_t strto_intl16(const char *nptr, char **endptr, int_fast8_t base)
  • int_fast32_t strto_intl32(const char *nptr, char **endptr, int_fast8_t base)
  • int_fast64_t strto_intl64(const char *nptr, char **endptr, int_fast8_t base)
  • uint_fast16_t strto_uintl16(const char *nptr, char **endptr, int_fast8_t base)
  • uint_fast32_t strto_uintl32(const char *nptr, char **endptr, int_fast8_t base)
  • uint_fast64_t strto_uintl64(const char *nptr, char **endptr, int_fast8_t base)
  • double strtod(const char *d, const char **ret)
  • error_t system(const char *cmd)
  • uint32_t __rand_r32(__compiler_uint_t *seedp)

Variable [link] 

Macros [link] 

Members detail [link] 

struct <anonymous> [link] 

This struct is declared in stdlib.h source file, line 263.

See also div.

FieldDescription
__compiler_sint_t quot;
__compiler_sint_t rem;

See also div_t.

struct <anonymous> [link] 

This struct is declared in stdlib.h source file, line 271.

See also ldiv.

FieldDescription
__compiler_slong_t quot;
__compiler_slong_t rem;

See also ldiv_t.

#define EXIT_FAILURE [link] 

This macro is declared in stdlib.h source file, line 217.

standard EXIT_FAILURE macro

#define EXIT_SUCCESS [link] 

This macro is declared in stdlib.h source file, line 215.

standard EXIT_SUCCESS macro

#define RAND_MAX 0x7fffffff [link] 

This macro is declared in stdlib.h source file, line 140.

This macro specifies the maximum value returned by the rand and random functions.

#define STDLIB_H_ [link] 

This macro is declared in stdlib.h source file, line 23.

#define _STRTOINT_(a, b) [link] 

This macro is declared in stdlib.h source file, line 82.

#define _STRTOINT__(a, b) [link] 

This macro is declared in stdlib.h source file, line 81.

#define __ABS(n) [link] 

This macro is declared in stdlib.h source file, line 237.

Compute the absolute value of an integer. This generic macro adapts to the integer type width.

See also abs.

#define __MAX(a, b) [link] 

This macro is declared in stdlib.h source file, line 108.

Get integer maximum value

#define __MIN(a, b) [link] 

This macro is declared in stdlib.h source file, line 105.

Get integer minimum value

void abort(void ) [link] 

This function is declared in stdlib.h source file, line 211.

#define abs(x) [link] 

This macro is declared in stdlib.h source file, line 252.

standard abs function

See also __ABS.

error_t atexit(void (*function)() ) [link] 

This function is declared in stdlib.h source file, line 226.

int_fast16_t ato_intl16(const char *nptr) [link] 

This function is declared in stdlib.h source file, line 72.

int_fast32_t ato_intl32(const char *nptr) [link] 

This function is declared in stdlib.h source file, line 76.

int_fast64_t ato_intl64(const char *nptr) [link] 

This function is declared in stdlib.h source file, line 80.

float atof(const char *f) [link] 

This function is declared in stdlib.h source file, line 99.

#define atoi [link] 

This macro is declared in stdlib.h source file, line 90.

#define atol [link] 

This macro is declared in stdlib.h source file, line 91.

#define atoll [link] 

This macro is declared in stdlib.h source file, line 92.

void * bsearch(const void *key, const void *base, size_t nel, size_t width, __compiler_sint_t (*compar)(const void *,const void *) ) [link] 

This function is declared in stdlib.h source file, line 135.

void * calloc(size_t nmemb, size_t size) [link] 

This function is declared in stdlib.h source file, line 45.

This is available when CONFIG_MUTEK_MEMALLOC is defined.

div_t div(__compiler_sint_t number, __compiler_sint_t denom) [link] 

This function is declared in stdlib.h source file, line 268.

typedef struct <anonymous> div_t [link] 

This typedef is declared in stdlib.h source file, line 266.

void exit(uint_fast8_t status) [link] 

This function is declared in stdlib.h source file, line 222.

void free(void *ptr) [link] 

This function is declared in stdlib.h source file, line 55.

This is available when CONFIG_MUTEK_MEMALLOC is defined.

uint32_t gcd32(uint32_t a, uint32_t b) [link] 

This function is declared in stdlib.h source file, line 259.

uint64_t gcd64(uint64_t a, uint64_t b) [link] 

This function is declared in stdlib.h source file, line 260.

char * getenv(const char *key) [link] 

This function is declared in stdlib.h source file, line 229.

#define labs(x) [link] 

This macro is declared in stdlib.h source file, line 254.

standard labs function

See also __ABS.

ldiv_t ldiv(__compiler_slong_t number, __compiler_slong_t denom) [link] 

This function is declared in stdlib.h source file, line 276.

typedef struct <anonymous> ldiv_t [link] 

This typedef is declared in stdlib.h source file, line 274.

#define llabs(x) [link] 

This macro is declared in stdlib.h source file, line 256.

standard llabs function

See also __ABS.

void * malloc(size_t size) [link] 

This function is declared in stdlib.h source file, line 50.

This is available when CONFIG_MUTEK_MEMALLOC is defined.

void qsort(void *base, size_t nel, size_t width, qsort_compar_t *compar) [link] 

This function is declared in stdlib.h source file, line 127.

this function sorts the nel-element long array pointed by base containing elements of size width. Using compar as the comparaison function.

Parameter list:

  • base: Base pointer of the array
  • nel: Element count in the array
  • width: sizeof(element)
  • compar: comparaison fuction

typedef int_fast8_t (qsort_compar_t)(const void *, const void *) [link] 

This typedef is declared in stdlib.h source file, line 115.

this typedef defines the function prototype used for comparaison in qsort.

__compiler_sint_t rand(void ) [link] 

This function is declared in stdlib.h source file, line 152.

This function returns a value in the range [0, RAND_MAX].

uint32_t rand_64(void ) [link] 

This function is declared in stdlib.h source file, line 189.

This function returns an unsigned 32 bits pseudo random value. The internal state is 64 bits wide and can not be assigned directly.

See also rand_64_merge and rand_64_r.

void rand_64_merge(const void *data, size_t size) [link] 

This function is declared in stdlib.h source file, line 206.

This function contributes entropy to the internal state which is used by the rand_64 function. Note that this does not just assign a new value to the internal state which still depends on the previous state.

uint32_t rand_64_r(uint64_t *s) [link] 

This function is declared in stdlib.h source file, line 197.

This function returns an unsigned 32 bits pseudo random value and update the user provided seed.

uint32_t rand_64_range(uint32_t min, uint32_t max) [link] 

This function is declared in stdlib.h source file, line 193.

This function returns an unsigned 32 bits pseudo random value uniformly distributed over the specified range [min, max].

See also rand_64.

uint32_t rand_64_range_r(uint64_t *s, uint32_t min, uint32_t max) [link] 

This function is declared in stdlib.h source file, line 200.

See also rand_64_r and rand_64_range.

__compiler_sint_t rand_r(__compiler_uint_t *seedp) [link] 

This function is declared in stdlib.h source file, line 159.

This function returns a value in the range [0, RAND_MAX] and update the user provided seed.

__compiler_slong_t random(void ) [link] 

This function is declared in stdlib.h source file, line 175.

This function is the same as rand.

void * realloc(void *ptr, size_t size) [link] 

This function is declared in stdlib.h source file, line 60.

This is available when CONFIG_MUTEK_MEMALLOC_SMART is defined.

void srand(__compiler_uint_t seed) [link] 

This function is declared in stdlib.h source file, line 169.

This function sets the seed used by the rand and random functions. Because the seed is used system-wide, different software componenents may update the seed, resulting in unexpected behavior.

void srandom(__compiler_uint_t seed) [link] 

This function is declared in stdlib.h source file, line 182.

This function is the same as srand.

int_fast16_t strto_intl16(const char *nptr, char **endptr, int_fast8_t base) [link] 

This function is declared in stdlib.h source file, line 71.

int_fast32_t strto_intl32(const char *nptr, char **endptr, int_fast8_t base) [link] 

This function is declared in stdlib.h source file, line 75.

int_fast64_t strto_intl64(const char *nptr, char **endptr, int_fast8_t base) [link] 

This function is declared in stdlib.h source file, line 79.

uint_fast16_t strto_uintl16(const char *nptr, char **endptr, int_fast8_t base) [link] 

This function is declared in stdlib.h source file, line 70.

uint_fast32_t strto_uintl32(const char *nptr, char **endptr, int_fast8_t base) [link] 

This function is declared in stdlib.h source file, line 74.

uint_fast64_t strto_uintl64(const char *nptr, char **endptr, int_fast8_t base) [link] 

This function is declared in stdlib.h source file, line 78.

double strtod(const char *d, const char **ret) [link] 

This function is declared in stdlib.h source file, line 95.

#define strtol [link] 

This macro is declared in stdlib.h source file, line 84.

#define strtoll [link] 

This macro is declared in stdlib.h source file, line 86.

#define strtoptr [link] 

This macro is declared in stdlib.h source file, line 88.

#define strtoul [link] 

This macro is declared in stdlib.h source file, line 85.

#define strtoull [link] 

This macro is declared in stdlib.h source file, line 87.

error_t system(const char *cmd) [link] 

This function is declared in stdlib.h source file, line 232.

uint32_t __rand_r32(__compiler_uint_t *seedp) [link] 

This function is declared in stdlib.h source file, line 148.

pseudo random generator backend for standard functions, relies on a 32 bits lfsr.

This function is for internal use only.

__compiler_uint_t __rand_seed [link] 

This variable is declared in stdlib.h source file, line 144.

seed for standard rand and random functions

This variable is for internal use only.

Valid XHTML 1.0 StrictGenerated by diaxen on Thu Aug 4 15:44:06 2022 using MkDoc