diff --git a/src/main.c b/src/main.c index bc42452..2d28e6a 100644 --- a/src/main.c +++ b/src/main.c @@ -11,6 +11,7 @@ /* ************************************************************************** */ #include "minishell.h" +#include "utils.h" int main(int argc, char **argv, char **envp) { @@ -28,7 +29,7 @@ int main(int argc, char **argv, char **envp) minishell->lexer = ft_lexer_new(minishell->line); minishell->tokens = ft_parse_input(minishell->lexer); minishell->commands = parser_get_commands(minishell->tokens); - //ft_lstiter(minishell->tokens, print_list); + simple_builtins(minishell); free_minishell_line(minishell); ft_lstclear(&minishell->commands, free_command_list); } diff --git a/src/utils/print_list.c b/src/utils/print_list.c deleted file mode 100644 index 8204c05..0000000 --- a/src/utils/print_list.c +++ /dev/null @@ -1,24 +0,0 @@ -/* ************************************************************************** */ -/* */ -/* :::::::: */ -/* print_list.c :+: :+: */ -/* +:+ */ -/* By: whaffman +#+ */ -/* +#+ */ -/* Created: 2025/02/05 16:12:14 by whaffman #+# #+# */ -/* Updated: 2025/02/05 16:12:45 by whaffman ######## odam.nl */ -/* */ -/* ************************************************************************** */ - -#include "minishell.h" - -void print_list(void *content) -{ - t_token *token; - - token = (t_token *)content; - if (token->type != T_ERROR) - ft_printf("%s\n", token->value); - else - ft_printf("unexpected token at position %i\n", token->position); -}