organised functions into multiple files and did some more norming

This commit is contained in:
mdev9
2024-04-24 11:06:03 +02:00
parent ab5190ee8f
commit 20037a4609
10 changed files with 276 additions and 223 deletions

View File

@ -6,7 +6,7 @@
/* By: tomoron <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/04/19 14:09:44 by tomoron #+# #+# */
/* Updated: 2024/04/22 19:42:05 by marde-vr ### ########.fr */
/* Updated: 2024/04/24 11:04:42 by marde-vr ### ########.fr */
/* */
/* ************************************************************************** */
@ -38,7 +38,7 @@ int open_out_file(t_msh *msh, t_cmd **cur_cmd, char *filename)
if (msh->out_type == RED_O)
msh->out_fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0644);
if (msh->out_type == RED_O_APP)
msh->out_fd = open(filename, O_CREAT | O_RDWR | O_APPEND, 0644);
msh->out_fd = open(filename, O_CREAT | O_WRONLY | O_APPEND, 0644);
if (msh->out_fd == -1)
{
ft_putstr_fd("minishell: ", 2);