GBDK 2020 Docs 4.4.0 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
13 void exit(int status) OLDCALL;
14
15 #if 0
18 int getkey(void) OLDCALL;
19 #endif
20
26 int abs(int i);
27
28
33 long labs(long num) OLDCALL;
34
35
51 int atoi(const char *s);
52
53
60 long atol(const char *s);
61
73 char *itoa(int n, char *s, unsigned char radix) OLDCALL;
74
86 char *uitoa(unsigned int n, char *s, unsigned char radix) OLDCALL;
87
99 char *ltoa(long n, char *s, unsigned char radix) OLDCALL;
100
112 char *ultoa(unsigned long n, char *s, unsigned char radix) OLDCALL;
113
114
117 void *calloc (size_t nmemb, size_t size);
118 void *malloc (size_t size);
119 void *realloc (void *ptr, size_t size);
120 #if __STDC_VERSION__ >= 201112L
121 inline void *aligned_alloc(size_t alignment, size_t size)
122 {
123 (void)alignment;
124 return malloc(size);
125 }
126 #endif
127 extern void free (void * ptr);
128
129 /* Searching and sorting utilities (ISO C11 7.22.5) */
140 extern void *bsearch(const void *key, const void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *) REENTRANT);
141
142
149 extern void qsort(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *) REENTRANT);
150
151 #endif
OLDCALL
#define OLDCALL
Definition: types.h:21
realloc
void * realloc(void *ptr, size_t size)
exit
void exit(int status) OLDCALL
atoi
int atoi(const char *s)
uitoa
char * uitoa(unsigned int n, char *s, unsigned char radix) OLDCALL
calloc
void * calloc(size_t nmemb, size_t size)
ltoa
char * ltoa(long n, char *s, unsigned char radix) OLDCALL
malloc
void * malloc(size_t size)
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)
labs
long labs(long num) OLDCALL
itoa
char * itoa(int n, char *s, unsigned char radix) OLDCALL
qsort
void qsort(void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *) REENTRANT)
ultoa
char * ultoa(unsigned long n, char *s, unsigned char radix) OLDCALL
abs
int abs(int i)
free
void free(void *ptr)
types.h