aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_exit.c
diff options
context:
space:
mode:
authorRudy Bousset <rbousset@z2r4p3.le-101.fr>2020-01-23 18:46:55 +0100
committerRudy Bousset <rbousset@z2r4p3.le-101.fr>2020-01-23 18:46:55 +0100
commitdada4b12f07388262729a1b979e53e28bfb79db3 (patch)
tree4231057b3a7fc3fc2f4e100f9e188949df146023 /src/ft_exit.c
parentPretty fine (diff)
download42-cub3d-dada4b12f07388262729a1b979e53e28bfb79db3.tar.gz
42-cub3d-dada4b12f07388262729a1b979e53e28bfb79db3.tar.bz2
42-cub3d-dada4b12f07388262729a1b979e53e28bfb79db3.tar.xz
42-cub3d-dada4b12f07388262729a1b979e53e28bfb79db3.tar.zst
42-cub3d-dada4b12f07388262729a1b979e53e28bfb79db3.zip
Nice squares
Diffstat (limited to 'src/ft_exit.c')
-rw-r--r--src/ft_exit.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ft_exit.c b/src/ft_exit.c
new file mode 100644
index 0000000..a5b7276
--- /dev/null
+++ b/src/ft_exit.c
@@ -0,0 +1,12 @@
+#include <libft.h>
+#include <stdlib.h>
+#include <inttypes.h>
+
+void
+ft_exit(uint8_t exit_code)
+{
+ ft_printf("Exiting program\n");
+ if (exit_code < 0 || exit_code > 0)
+ ft_printf("Exit code: %hhu\n", exit_code);
+ exit(exit_code);
+}