From 3051df7c3e57d5645a78d87fa63ff1144fd8699a Mon Sep 17 00:00:00 2001 From: Rudy Bousset Date: Wed, 30 Oct 2019 17:05:31 +0100 Subject: exit function works --- src/ft_error.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/ft_error.c') diff --git a/src/ft_error.c b/src/ft_error.c index 2cc9cb6..2216eae 100644 --- a/src/ft_error.c +++ b/src/ft_error.c @@ -1,7 +1,7 @@ #include #include -void +int ft_error(const char *com, int errno) { ft_putstr("joe-sh: "); @@ -10,5 +10,7 @@ ft_error(const char *com, int errno) ft_putendl(": too many arguments"); else if (errno == 127) ft_putendl(": command not found"); + else if (errno == 255) + ft_putendl(": numeric argument required"); return (errno); } -- cgit v1.2.3