aboutsummaryrefslogtreecommitdiff
path: root/src/userspace/mlibc/stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'src/userspace/mlibc/stdlib')
-rw-r--r--src/userspace/mlibc/stdlib/atoi.c2
-rw-r--r--src/userspace/mlibc/stdlib/htoa.c6
-rw-r--r--src/userspace/mlibc/stdlib/htoi.c2
-rw-r--r--src/userspace/mlibc/stdlib/itoa.c5
4 files changed, 7 insertions, 8 deletions
diff --git a/src/userspace/mlibc/stdlib/atoi.c b/src/userspace/mlibc/stdlib/atoi.c
index 0643372..67a603e 100644
--- a/src/userspace/mlibc/stdlib/atoi.c
+++ b/src/userspace/mlibc/stdlib/atoi.c
@@ -1,7 +1,7 @@
#include <mlibc/math.h>
#include <stddef.h>
#include <stdint.h>
-#include <mlibc/string.h>
+#include <mlibc/stdlib.h>
int atoi(char *str)
{
diff --git a/src/userspace/mlibc/stdlib/htoa.c b/src/userspace/mlibc/stdlib/htoa.c
index 098e1c8..579db5d 100644
--- a/src/userspace/mlibc/stdlib/htoa.c
+++ b/src/userspace/mlibc/stdlib/htoa.c
@@ -1,8 +1,8 @@
#include <stdint.h>
-#include <mlibc/string.h>
+#include <mlibc/stdlib.h>
#include <mlibc/stdlib.h>
-static const char __HTOA_TABLE[] = "0123456789ABCDEF";
+static const char HTOA_TABLE[] = "0123456789ABCDEF";
char *htoa(uint32_t n)
{
@@ -11,7 +11,7 @@ char *htoa(uint32_t n)
int i = 0;
while (n) {
- ret[i++] = __HTOA_TABLE[n & 0xF];
+ ret[i++] = HTOA_TABLE[n & 0xF];
n >>= 4;
}
diff --git a/src/userspace/mlibc/stdlib/htoi.c b/src/userspace/mlibc/stdlib/htoi.c
index 489e5c0..93b387a 100644
--- a/src/userspace/mlibc/stdlib/htoi.c
+++ b/src/userspace/mlibc/stdlib/htoi.c
@@ -1,6 +1,6 @@
#include <stddef.h>
#include <mlibc/math.h>
-#include <mlibc/string.h>
+#include <mlibc/stdlib.h>
int htoi(char *str)
{
diff --git a/src/userspace/mlibc/stdlib/itoa.c b/src/userspace/mlibc/stdlib/itoa.c
index 55c1383..567824f 100644
--- a/src/userspace/mlibc/stdlib/itoa.c
+++ b/src/userspace/mlibc/stdlib/itoa.c
@@ -1,9 +1,8 @@
#include <stdint.h>
#include <mlibc/math.h>
-#include <mlibc/string.h>
#include <mlibc/stdlib.h>
-static const char __ITOA_TABLE[] = "0123456789";
+static const char ITOA_TABLE[] = "0123456789";
char *itoa(int n)
{
@@ -28,7 +27,7 @@ char *itoa(int n)
for (int i = 0; i < sz; i++) {
int digit = (n % pow(10, i + 1)) / pow(10, i);
- ret[i] = __ITOA_TABLE[digit];
+ ret[i] = ITOA_TABLE[digit];
}
ret[sz] = 0;