redirections WIP

This commit is contained in:
LuckyLaszlo
2021-11-14 11:05:58 +01:00
parent 1e682f796d
commit 66b48dc99d
10 changed files with 223 additions and 262 deletions

View File

@@ -6,7 +6,7 @@
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/10/08 09:25:35 by lperrey #+# #+# */
/* Updated: 2021/11/13 04:23:54 by lperrey ### ########.fr */
/* Updated: 2021/11/14 08:27:40 by lperrey ### ########.fr */
/* */
/* ************************************************************************** */
@@ -197,3 +197,16 @@ t_list *ft_lstnew_generic(size_t lst_size, size_t content_size)
elem->next = NULL;
return (elem);
}
void ft_perror_io(char *err_str, char *io_file)
{
ft_putstr_fd(err_str, 2);
perror(io_file);
}
int ft_reti_perror_io(int ret, char *err_str, char *io_file)
{
ft_putstr_fd(err_str, 2);
perror(io_file);
return (ret);
}