summaryrefslogtreecommitdiffstats
path: root/src/ft_exit.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ft_exit.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/src/ft_exit.c b/src/ft_exit.c
deleted file mode 100644
index 5285289..0000000
--- a/src/ft_exit.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/* ************************************************************************** */
-/* LE - / */
-/* / */
-/* ft_exit.c .:: .:/ . .:: */
-/* +:+:+ +: +: +:+:+ */
-/* By: rbousset <marvin@le-101.fr> +:+ +: +: +:+ */
-/* #+# #+ #+ #+# */
-/* Created: 2019/10/30 16:05:48 by rbousset #+# ## ## #+# */
-/* Updated: 2019/11/01 18:47:18 by rbousset ### #+. /#+ ###.fr */
-/* / */
-/* / */
-/* ************************************************************************** */
-
-#include <libft.h>
-#include <minishell.h>
-#include <stdlib.h>
-
-uint8_t
-ft_exit(char **com)
-{
- uint8_t i;
-
- i = 0;
- while (com[i])
- i++;
- if (i == 2)
- {
- i = 0;
- while (ft_isdigit(com[1][i]))
- i++;
- if (i != ft_strlen(com[1]))
- exit(ft_error(com[0], 255));
- else
- exit((uint8_t)ft_atoi(com[1]));
- }
- else if (i > 2)
- return (ft_error(com[0], 1));
- exit(0);
-}