summaryrefslogtreecommitdiffstats
path: root/libft/src/ft_atoi.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--libft/src/ft_atoi.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/libft/src/ft_atoi.c b/libft/src/ft_atoi.c
index e0178db..ea6189c 100644
--- a/libft/src/ft_atoi.c
+++ b/libft/src/ft_atoi.c
@@ -11,11 +11,10 @@
/* ************************************************************************** */
#include <libft.h>
-#include <inttypes.h>
-static int8_t ft_setsign(const char c)
+static char ft_setsign(const char c)
{
- int8_t sign;
+ char sign;
sign = 1;
if (c == '-')
@@ -25,9 +24,9 @@ static int8_t ft_setsign(const char c)
return (sign);
}
-static uint8_t ft_seti(const char *str)
+static unsigned char ft_seti(const char *str)
{
- uint8_t i;
+ unsigned char i;
i = 0;
while (ft_isspace(str[i]) == TRUE)
@@ -39,8 +38,8 @@ static uint8_t ft_seti(const char *str)
int ft_atoi(const char *str)
{
- uint8_t i;
- int8_t sign;
+ unsigned char i;
+ char sign;
long nb;
i = ft_seti(str);