GBDK 2020 Docs  4.3.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
#define OLDCALL
Definition: types.h:21
void * realloc(void *ptr, size_t size)
void exit(int status) OLDCALL
int atoi(const char *s)
char * uitoa(unsigned int n, char *s, unsigned char radix) OLDCALL
void * calloc(size_t nmemb, size_t size)
char * ltoa(long n, char *s, unsigned char radix) OLDCALL
void * malloc(size_t size)
void * bsearch(const void *key, const void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *) REENTRANT)
long atol(const char *s)
long labs(long num) OLDCALL
char * itoa(int n, char *s, unsigned char radix) OLDCALL
void qsort(void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *) REENTRANT)
char * ultoa(unsigned long n, char *s, unsigned char radix) OLDCALL
int abs(int i)
void free(void *ptr)