aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/lib/stdlib/htoi.c
diff options
context:
space:
mode:
authorMarvin Borner2020-06-17 18:31:46 +0200
committerMarvin Borner2020-06-17 18:31:46 +0200
commiteed77bd2970a00d1394ed027ceca5b646e4671ce (patch)
treec44643d98aed2b6818f2b33417c0dea9c5853094 /src/kernel/lib/stdlib/htoi.c
parent49dfa1f4021026bf7c4d77817959c8aa24067016 (diff)
Started rewrite
Diffstat (limited to 'src/kernel/lib/stdlib/htoi.c')
-rw-r--r--src/kernel/lib/stdlib/htoi.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/kernel/lib/stdlib/htoi.c b/src/kernel/lib/stdlib/htoi.c
deleted file mode 100644
index 367d30e..0000000
--- a/src/kernel/lib/stdlib/htoi.c
+++ /dev/null
@@ -1,23 +0,0 @@
-#include <lib/math.h>
-#include <lib/string.h>
-#include <stddef.h>
-
-int htoi(char *str)
-{
- u32 s_str = strlen(str);
-
- u32 i = 0;
- int ret = 0;
- for (; i < s_str; i++) {
- char c = str[i];
- int aux = 0;
- if (c >= '0' && c <= '9')
- aux = c - '0';
- else if (c >= 'A' && c <= 'F')
- aux = (c - 'A') + 10;
-
- ret += aux * pow(16, (int)((s_str - i) - 1));
- }
-
- return ret;
-} \ No newline at end of file