uc-sdk
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
stdlib.h
Go to the documentation of this file.
1 #ifndef __STDLIB_H__
2 #define __STDLIB_H__
3 
4 #include <reent.h>
5 #include <malloc.h>
6 #include <stdio.h>
7 
8 typedef void (*atexit_func_t)(void);
9 
10 void exit(int status) __attribute__((noreturn));
12 
13 void qsort(void *base, size_t nel, size_t width, int (*compar)(const void *, const void *));
14 
15 static inline double atof(const char * str) { double r = 0; sscanf(str, "%lf", &r); return r; }
16 static inline int atoi(const char * str) { int i; sscanf(str, "%i", &i); return i; }
17 static inline int atol(const char * str) { long l; sscanf(str, "%li", &l); return l; }
18 
19 #endif