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