From eed77bd2970a00d1394ed027ceca5b646e4671ce Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Wed, 17 Jun 2020 18:31:46 +0200 Subject: Started rewrite --- src/kernel/lib/stdlib/htoi.c | 23 ----------------------- 1 file changed, 23 deletions(-) delete mode 100644 src/kernel/lib/stdlib/htoi.c (limited to 'src/kernel/lib/stdlib/htoi.c') 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 -#include -#include - -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 -- cgit v1.2.3