vga text output and libc expansion
[3sys] / sys1 / kern / src / libc / stdlib.h
1 #ifndef KLIBC_STDLIB_H_
2 #define KLIBC_STDLIB_H_
3
4 #include <stddef.h>
5
6 #define abs(x)  __builtin_abs(x)
7
8 int atoi(const char *str);
9 long atol(const char *str);
10 long strtol(const char *str, char **endp, int base);
11
12 void itoa(int val, char *buf, int base);
13 void utoa(unsigned int val, char *buf, int base);
14
15 void qsort(void *arr, size_t count, size_t size, int (*cmp)(const void*, const void*));
16
17 /* defined in malloc.c */
18 void *malloc(size_t sz);
19 void *calloc(size_t num, size_t sz);
20 void *realloc(void *ptr, size_t sz);
21 void free(void *ptr);
22
23 #endif  /* KLIBC_STDLIB_H_ */