diff --git a/Makefile b/Makefile index ff84e10..a483424 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,8 @@ fclean: clean make -C libftx fclean rm -f ${NAME} -re: fclean all +re: fclean + make all .PHONY: all clean fclean re diff --git a/cmds.c b/cmds.c index 037b60e..df201a1 100644 --- a/cmds.c +++ b/cmds.c @@ -6,7 +6,7 @@ /* By: cchauvet executable = ft_get_executable_path(content->executable, env); if (content->executable != NULL) ft_excutor(content, env); - close(content->fd_in); - close(content->fd_out); + if (content->fd_in != 0) + close(content->fd_in); + if (content->fd_out != 1 && content->fd_out != 2) + close(content->fd_out); current = current->next; } return (0); diff --git a/heredoc.c b/heredoc.c index 8b7f2e2..3b1634c 100644 --- a/heredoc.c +++ b/heredoc.c @@ -1,3 +1,16 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* heredoc.c :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: cchauvet "); } diff --git a/libftx/libft/ft_putchar_fd.c b/libftx/libft/ft_putchar_fd.c index 5e34a25..1b06855 100644 --- a/libftx/libft/ft_putchar_fd.c +++ b/libftx/libft/ft_putchar_fd.c @@ -6,13 +6,13 @@ /* By: cchauvet base_size - 1) { ft_dprintul_base(fd, n / base_size, base); - ft_putchar_fd(fd, base[n % base_size]); + ft_putchar_fd_p(fd, base[n % base_size]); } else - ft_putchar_fd(fd, base[n]); + ft_putchar_fd_p(fd, base[n]); return (str_size - 1); } diff --git a/libftx/printf/ft_printf.h b/libftx/printf/ft_printf.h index 8f011a0..5ab4eb9 100644 --- a/libftx/printf/ft_printf.h +++ b/libftx/printf/ft_printf.h @@ -6,7 +6,7 @@ /* By: cchauvet # include # include - +# define DEBUG 0 t_list **init_env(char **env); int set_value_by_key(char *key, char *value, t_list **env); char *get_value_by_key(char *key, t_list **head); diff --git a/t b/t new file mode 100644 index 0000000..363df41 --- /dev/null +++ b/t @@ -0,0 +1 @@ +bozt