fix: "'''"

This commit is contained in:
Camille Chauvet 2023-02-21 23:55:32 +01:00
parent f346c5c2ce
commit 2b66ce5bc3

11
main.c
View File

@ -6,12 +6,14 @@
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */ /* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2023/02/16 15:16:14 by cchauvet #+# #+# */ /* Created: 2023/02/16 15:16:14 by cchauvet #+# #+# */
/* Updated: 2023/02/21 22:05:04 by cchauvet ### ########.fr */ /* Updated: 2023/02/21 23:54:44 by cchauvet ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
#include "libftx/libftx.h" #include "libftx/libftx.h"
#include "minishell.h" #include "minishell.h"
#include "utils/utils.h"
#include <stdlib.h>
static char *ft_get_user_input(t_list **env) static char *ft_get_user_input(t_list **env)
{ {
@ -43,14 +45,11 @@ static int ft_minishell(t_data *data, char *line)
int infile; int infile;
int outfile; int outfile;
if (ft_syntatic_verif(line))
return (1);
line_clean = ft_normalizer(line); line_clean = ft_normalizer(line);
if (line_clean == NULL) if (line_clean == NULL)
return (1); return (1);
if (ft_syntatic_verif(line_clean))
{
free(line_clean);
return (1);
}
outfile = ft_outfile(line_clean); outfile = ft_outfile(line_clean);
if (outfile == -2) if (outfile == -2)
{ {