diff options
author | Rudy Bousset <rbousset@z2r5p6.le-101.fr> | 2019-10-30 16:32:46 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r5p6.le-101.fr> | 2019-10-30 16:32:46 +0100 |
commit | 27ea0240a97d0745dda0f87940bfe5940f9c594c (patch) | |
tree | b64a14ea7c3a8091c8127df3a3f2ed11060f08b4 /src/ft_error.c | |
parent | New libft, feelsgoodman (diff) | |
download | 42-minishell-27ea0240a97d0745dda0f87940bfe5940f9c594c.tar.gz 42-minishell-27ea0240a97d0745dda0f87940bfe5940f9c594c.tar.bz2 42-minishell-27ea0240a97d0745dda0f87940bfe5940f9c594c.tar.xz 42-minishell-27ea0240a97d0745dda0f87940bfe5940f9c594c.tar.zst 42-minishell-27ea0240a97d0745dda0f87940bfe5940f9c594c.zip |
work work
Diffstat (limited to 'src/ft_error.c')
-rw-r--r-- | src/ft_error.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/ft_error.c b/src/ft_error.c new file mode 100644 index 0000000..2cc9cb6 --- /dev/null +++ b/src/ft_error.c @@ -0,0 +1,14 @@ +#include <libft.h> +#include <minishell.h> + +void +ft_error(const char *com, int errno) +{ + ft_putstr("joe-sh: "); + ft_putstr(com); + if (errno == 1) + ft_putendl(": too many arguments"); + else if (errno == 127) + ft_putendl(": command not found"); + return (errno); +} |