stdlib.h header reference
[C library module]

The source code of this header can be browsed online.

Members  

Types  

Functions  

  • 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)
  • __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  

Macros  

Members detail  

struct <anonymous>  

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

See also div.

FieldDescription
__compiler_sint_t quot;
__compiler_sint_t rem;

See also div_t.

struct <anonymous>  

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

See also ldiv.

FieldDescription
__compiler_slong_t quot;
__compiler_slong_t rem;

See also ldiv_t.

#define EXIT_FAILURE  

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

standard EXIT_FAILURE macro

#define EXIT_SUCCESS  

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

standard EXIT_SUCCESS macro

#define RAND_MAX 0x7fffffff  

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_  

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

#define _STRTOINT_(a, b)  

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

#define _STRTOINT__(a, b)  

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

#define __ABS(n)  

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

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

See also abs.

#define __MAX(a, b)  

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

Get integer maximum value

#define __MIN(a, b)  

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

Get integer minimum value

void abort(void )  

#define abs(x)  

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

standard abs function

See also __ABS.

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)  

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

#define atoi  

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

#define atol  

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

#define atoll  

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 *) )  

void * calloc(size_t nmemb, size_t size)  

This is available when CONFIG_MUTEK_MEMALLOC is defined.

div_t div(__compiler_sint_t number, __compiler_sint_t denom)  

typedef struct <anonymous> div_t  

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

void exit(uint_fast8_t status)  

void free(void *ptr)  

This is available when CONFIG_MUTEK_MEMALLOC is defined.

uint32_t gcd32(uint32_t a, uint32_t b)  

uint64_t gcd64(uint64_t a, uint64_t b)  

char * getenv(const char *key)  

#define labs(x)  

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

standard labs function

See also __ABS.

ldiv_t ldiv(__compiler_slong_t number, __compiler_slong_t denom)  

typedef struct <anonymous> ldiv_t  

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

#define llabs(x)  

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

standard llabs function

See also __ABS.

void * malloc(size_t size)  

This is available when CONFIG_MUTEK_MEMALLOC is defined.

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

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 *)   

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 )  

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 )  

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)  

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)  

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

__compiler_sint_t rand_r(__compiler_uint_t *seedp)  

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 )  

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)  

This is available when CONFIG_MUTEK_MEMALLOC_SMART is defined.

void srand(__compiler_uint_t seed)  

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)  

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)  

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)  

#define strtol  

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

#define strtoll  

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

#define strtoptr  

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

#define strtoul  

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

#define strtoull  

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

error_t system(const char *cmd)  

uint32_t __rand_r32(__compiler_uint_t *seedp)  

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  

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 Wed Oct 17 21:18:39 2018 using MkDoc