diff options
author | Rudy Bousset <rbousset@z2r5p6.le-101.fr> | 2019-10-30 17:05:31 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r5p6.le-101.fr> | 2019-10-30 17:05:31 +0100 |
commit | 3051df7c3e57d5645a78d87fa63ff1144fd8699a (patch) | |
tree | 5676fe8501f965cc9e62b8c25791ce1c9a04b0f4 /src/ft_error.c | |
parent | work work (diff) | |
download | 42-minishell-3051df7c3e57d5645a78d87fa63ff1144fd8699a.tar.gz 42-minishell-3051df7c3e57d5645a78d87fa63ff1144fd8699a.tar.bz2 42-minishell-3051df7c3e57d5645a78d87fa63ff1144fd8699a.tar.xz 42-minishell-3051df7c3e57d5645a78d87fa63ff1144fd8699a.tar.zst 42-minishell-3051df7c3e57d5645a78d87fa63ff1144fd8699a.zip |
exit function works
Diffstat (limited to 'src/ft_error.c')
-rw-r--r-- | src/ft_error.c | 4 |
1 files changed, 3 insertions, 1 deletions
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 <libft.h> #include <minishell.h> -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); } |