summaryrefslogtreecommitdiffstats
path: root/libft/src/ft_atoi.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-10-27 19:59:20 +0100
committerJozanLeClerc <bousset.rudy@gmail.com>2020-10-27 19:59:20 +0100
commitc5aae008dee36276154882d8fd56c3bdeb473474 (patch)
treea40740914847ebf39a5f8cb3acf6a48c8b9d61ef /libft/src/ft_atoi.c
parentTODO update (diff)
download42-minishell-c5aae008dee36276154882d8fd56c3bdeb473474.tar.gz
42-minishell-c5aae008dee36276154882d8fd56c3bdeb473474.tar.bz2
42-minishell-c5aae008dee36276154882d8fd56c3bdeb473474.tar.xz
42-minishell-c5aae008dee36276154882d8fd56c3bdeb473474.tar.zst
42-minishell-c5aae008dee36276154882d8fd56c3bdeb473474.zip
Now norme
Diffstat (limited to 'libft/src/ft_atoi.c')
-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);