t_cmd => t_token (parce que c'est plus logique aussi)

This commit is contained in:
2024-03-27 16:23:09 +01:00
parent 7ea57084dd
commit a9fde3bad1
11 changed files with 55 additions and 54 deletions

View File

@ -6,7 +6,7 @@
/* By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/03/22 14:31:13 by tomoron #+# #+# */
/* Updated: 2024/03/26 17:59:37 by tomoron ### ########.fr */
/* Updated: 2024/03/27 16:22:39 by tomoron ### ########.fr */
/* */
/* ************************************************************************** */
@ -53,27 +53,28 @@ void signal_handler_here_doc(int signum)
ft_exit(msh, 1);
}
}
int set_echoctl(int value)
{
struct termios t_p;
if(tcgetattr(1, &t_p))
if (tcgetattr(1, &t_p))
{
ft_printf_fd(2, "minishell: an error occured while setting the local fl\
ags");
return(1);
return (1);
}
if(value)
if (value)
t_p.c_lflag = t_p.c_lflag | ECHOCTL;
else
t_p.c_lflag = t_p.c_lflag & (~ECHOCTL);
if(tcsetattr(1, TCSANOW, &t_p))
if (tcsetattr(1, TCSANOW, &t_p))
{
ft_printf_fd(2, "minishell: an error occured while setting the local fl\
ags");
return(1);
ags");
return (1);
}
return(0);
return (0);
}
void signal_handler_command(int signum)
{