From c9e4fb6e2ad07e13cf41d6ce6afad30b04011765 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Mon, 20 Apr 2020 14:51:45 +0200 Subject: Solid base --- src/ft_error.c | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 src/ft_error.c (limited to 'src/ft_error.c') diff --git a/src/ft_error.c b/src/ft_error.c deleted file mode 100644 index 933a22b..0000000 --- a/src/ft_error.c +++ /dev/null @@ -1,34 +0,0 @@ -/* ************************************************************************** */ -/* LE - / */ -/* / */ -/* ft_error.c .:: .:/ . .:: */ -/* +:+:+ +: +: +:+:+ */ -/* By: rbousset +:+ +: +: +:+ */ -/* #+# #+ #+ #+# */ -/* Created: 2019/10/30 17:21:53 by rbousset #+# ## ## #+# */ -/* Updated: 2019/11/01 18:47:03 by rbousset ### #+. /#+ ###.fr */ -/* / */ -/* / */ -/* ************************************************************************** */ - -#include -#include - -int -ft_error(const char *com, int err) -{ - ft_putstr("joe-sh: "); - ft_putstr(com); - if (err == 1) - ft_putendl(": too many arguments"); - else if (err == 127) - { - if (!ft_strncmp(com, "./", 2)) - ft_putendl(": no such file or directory"); - else - ft_putendl(": command not found"); - } - else if (err == 255) - ft_putendl(": numeric argument required"); - return (err); -} -- cgit v1.2.3