GBDK 2020 Docs API Documentation for GBDK 2020

stdlib.h
Go to the documentation of this file.
1
4 #ifndef STDLIB_INCLUDE
5 #define STDLIB_INCLUDE
6
7 #include <types.h>
8
9 #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)
10 #define __reentrant
11 #endif
12
17 void exit(int status) NONBANKED;
18
19 #if 0
20
22 int getkey(void);
23 #endif
24
30 int abs(int i);
31
32
37 long labs(long num);
38
39
55 int atoi(const char *s);
56
57
64 long atol(const char *s);
65
72 char *itoa(int n, char *s);
73
80 char *utoa(unsigned int n, char *s);
81
88 char *ltoa(long n, char *s);
89
96 char *ultoa(unsigned long n, char *s);
97
98
101 void *calloc (size_t nmemb, size_t size);
102 void *malloc (size_t size);
103 void *realloc (void *ptr, size_t size);
104 #if __STDC_VERSION__ >= 201112L
105 inline void *aligned_alloc(size_t alignment, size_t size)
106 {
107 (void)alignment;
108 return malloc(size);
109 }
110 #endif
111 extern void free (void * ptr);
112
113 /* Searching and sorting utilities (ISO C11 7.22.5) */
124 extern void *bsearch(const void *key, const void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *) __reentrant);
125
126
133 extern void qsort(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *) __reentrant);
134
135 #endif
types.h
realloc
void * realloc(void *ptr, size_t size)
utoa
char * utoa(unsigned int n, char *s)
free
void free(void *ptr)
malloc
void * malloc(size_t size)
calloc
void * calloc(size_t nmemb, size_t size)
ltoa
char * ltoa(long n, char *s)
atoi
int atoi(const char *s)
labs
long labs(long num)
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)
abs
int abs(int i)
ultoa
char * ultoa(unsigned long n, char *s)
NONBANKED
#define NONBANKED
Definition: types.h:11
qsort
void qsort(void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *) __reentrant)
__reentrant
#define __reentrant
Definition: stdlib.h:10
exit
void exit(int status) NONBANKED
itoa
char * itoa(int n, char *s)