summaryrefslogtreecommitdiff
path: root/libc/include
diff options
context:
space:
mode:
Diffstat (limited to 'libc/include')
-rw-r--r--libc/include/stdlib.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libc/include/stdlib.h b/libc/include/stdlib.h
index 5654950..f9f2a94 100644
--- a/libc/include/stdlib.h
+++ b/libc/include/stdlib.h
@@ -3,6 +3,7 @@
#include <reent.h>
#include <malloc.h>
+#include <stdio.h>
typedef void (*atexit_func_t)(void);
@@ -11,4 +12,8 @@ int atexit(atexit_func_t);
void qsort(void *base, size_t nel, size_t width, int (*compar)(const void *, const void *));
+static inline double atof(const char * str) { double r = 0; sscanf(str, "%lf", &r); return r; }
+static inline int atoi(const char * str) { int i; sscanf(str, "%i", &i); return i; }
+static inline int atol(const char * str) { long l; sscanf(str, "%li", &l); return l; }
+
#endif