words_expansions() complete

+ TODO : need refactoring and fix to valgrind invalid read size
+ redirections() WIP
+ Generic ft_dup_2d_arr(), ft_split_quotes(), ft_strdup_quotes()
+ shell_loop() continue on error
+ various small fix
This commit is contained in:
LuckyLaszlo
2021-11-14 00:09:42 +01:00
parent 86707f9fc6
commit 106af37b58
15 changed files with 653 additions and 51 deletions

View File

@@ -6,7 +6,7 @@
/* By: lperrey <lperrey@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2021/10/04 05:59:26 by lperrey #+# #+# */
/* Updated: 2021/11/02 22:38:35 by lperrey ### ########.fr */
/* Updated: 2021/11/08 05:16:48 by lperrey ### ########.fr */
/* */
/* ************************************************************************** */
@@ -32,14 +32,18 @@ void shell_loop(t_all *c)
if (line_input && *line_input)
{
add_history(line_input);
//test_signal(c);
// Lexing
c->token_list = input_to_tokens(line_input);
if (!c->token_list)
continue ;
// Parsing
c->cmd_arr = parsing(c->token_list);
ft_lstclear((t_list **)&c->token_list, free);
if (!c->cmd_arr)
continue ;
// Search Path/builtins
// Exec
// Bien penser à mettre les ptr à NULL aprés free en cas d'erreur (pour ne pas double free si appel à free_exit())
// Exec Pipeline
//execute_cmd(c->envp, c->cmd_arr);
}
else if (!line_input)