# GBDK 2020 Docs: stdlib.h Source File

stdlib.h
Go to the documentation of this file.
#ifndef STDLIB_INCLUDE
#define STDLIB_INCLUDE
#include <types.h>
#if !defined(__SDCC_mcs51) && !defined(__SDCC_ds390) && !defined(__SDCC_ds400) && !defined(__SDCC_hc08) && !defined(__SDCC_s08) && !defined(__SDCC_pic14) && !defined(__SDCC_pic16) && !defined(__SDCC_pdk13) && !defined(__SDCC_pdk14) && !defined(__SDCC_pdk15)
#define __reentrant
#endif
void exit(int status);
#if 0
int getkey(void);
#endif
int abs(int i) OLDCALL;
long labs(long num) OLDCALL;
int atoi(const char *s);
long atol(const char *s);
char *itoa(int n, char *s, unsigned char radix) OLDCALL;
char *uitoa(unsigned int n, char *s, unsigned char radix) OLDCALL;
char *ltoa(long n, char *s, unsigned char radix) OLDCALL;
char *ultoa(unsigned long n, char *s, unsigned char radix) OLDCALL;
void *calloc (size_t nmemb, size_t size);
void *malloc (size_t size);
void *realloc (void *ptr, size_t size);
#if __STDC_VERSION__ >= 201112L
inline void *aligned_alloc(size_t alignment, size_t size)
{
(void)alignment;
return malloc(size);
}
#endif
extern void free (void * ptr);
/* Searching and sorting utilities (ISO C11 7.22.5) */
extern void *bsearch(const void *key, const void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *) __reentrant);
extern void qsort(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *) __reentrant);
#endif
types.h
realloc
void * realloc(void *ptr, size_t size)
labs
long labs(long num) OLDCALL
abs
int abs(int i) OLDCALL
free
void free(void *ptr)
malloc
void * malloc(size_t size)
calloc
void * calloc(size_t nmemb, size_t size)
atoi
int atoi(const char *s)
bsearch
void * bsearch(const void *key, const void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *) __reentrant)
atol
long atol(const char *s)
OLDCALL
#define OLDCALL
Definition: types.h:19
qsort
void qsort(void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *) __reentrant)
exit
void exit(int status)
itoa
char * itoa(int n, char *s, unsigned char radix) OLDCALL
ltoa
char * ltoa(long n, char *s, unsigned char radix) OLDCALL
ultoa
char * ultoa(unsigned long n, char *s, unsigned char radix) OLDCALL
__reentrant
#define __reentrant
Definition: stdlib.h:10
uitoa
char * uitoa(unsigned int n, char *s, unsigned char radix) OLDCALL