diff --git a/42sh/libft/src/ft_printf/ft_vprintf.c b/42sh/libft/src/ft_printf/ft_vprintf.c index 569efdf1..78ffa130 100644 --- a/42sh/libft/src/ft_printf/ft_vprintf.c +++ b/42sh/libft/src/ft_printf/ft_vprintf.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/03/20 15:52:57 by jhalford #+# #+# */ -/* Updated: 2017/03/21 15:29:36 by jhalford ### ########.fr */ +/* Updated: 2017/03/21 16:08:02 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/libft/src/mem/ft_malloc.c b/42sh/libft/src/mem/ft_malloc.c new file mode 100644 index 00000000..3caec1b4 --- /dev/null +++ b/42sh/libft/src/mem/ft_malloc.c @@ -0,0 +1,26 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* ft_malloc.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: jhalford +#+ +:+ +#+ */ +/* +#+#+#+#+#+ +#+ */ +/* Created: 2017/03/21 15:45:00 by jhalford #+# #+# */ +/* Updated: 2017/03/21 15:45:20 by jhalford ### ########.fr */ +/* */ +/* ************************************************************************** */ + +#include "libft.h" + +void *ft_malloc(size_t size) +{ + void *ptr; + + ptr = malloc(size); + if (!ptr) + { + ft_dprintf(2, "{red}%s{eoc}", strerror(errno)); + exit(errno); + } + return (ptr); +} diff --git a/42sh/src/builtin/bt_read_get.c b/42sh/src/builtin/bt_read_get.c index 77360eaa..60463fd3 100644 --- a/42sh/src/builtin/bt_read_get.c +++ b/42sh/src/builtin/bt_read_get.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2017/01/21 18:00:03 by jhalford #+# #+# */ -/* Updated: 2017/03/20 08:41:18 by jhalford ### ########.fr */ +/* Updated: 2017/03/21 15:52:26 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */ diff --git a/42sh/src/builtin/builtin_exit.c b/42sh/src/builtin/builtin_exit.c index f8ab3a61..fae8ee28 100644 --- a/42sh/src/builtin/builtin_exit.c +++ b/42sh/src/builtin/builtin_exit.c @@ -6,7 +6,7 @@ /* By: jhalford +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2016/11/28 14:28:41 by jhalford #+# #+# */ -/* Updated: 2017/03/21 15:49:14 by jhalford ### ########.fr */ +/* Updated: 2017/03/21 15:51:03 by jhalford ### ########.fr */ /* */ /* ************************************************************************** */