From: Dominik Kaiser Date: Sat, 25 Jan 2025 14:57:16 +0000 (+0100) Subject: Merge branch 'main' into memleakfix X-Git-Url: https://git.dkaiser.de/?a=commitdiff_plain;h=8fb5e2839cb7eb7bb72f577577afafcdbdc8a714;p=42%2Fminishell.git Merge branch 'main' into memleakfix --- 8fb5e2839cb7eb7bb72f577577afafcdbdc8a714 diff --cc include/debug_tools.h index 9a24875,a014ff1..a6f44f5 --- a/include/debug_tools.h +++ b/include/debug_tools.h @@@ -23,6 -22,7 +23,8 @@@ void dbg(char *str); void panic(char *msg); + -void dbg2(const char *format, ...); +void print_token_list(t_token *token_list); + + #endif diff --cc include/minishell.h index 354d5b9,356df7a..6961815 --- a/include/minishell.h +++ b/include/minishell.h @@@ -30,12 -30,11 +30,12 @@@ int init(void); int init_signal_handling(void); - void repl(const char *prompt, t_env **env); + void repl(const char *prompt, t_env **env, int *promptflag); -t_list *parse(t_token *tokens, t_env **env); +t_node *parse(t_token *tokens, t_env **env); t_node *parse_cmd(t_token *tokens, t_env **env); -t_redirection *collect_redirs(t_token **tokens, t_env *env, t_list **cf); +t_redirection *collect_redirs(t_token **tokens, t_env *env, + t_list **create_files); void print_ast(t_node *ast); diff --cc include/token.h index fb9633d,2e8da35..226c9ac --- a/include/token.h +++ b/include/token.h @@@ -49,8 -49,5 +49,7 @@@ void free_token_and_connect(t_toke void tokenizer(char *s, t_token **token_list, char quote_check); void print_token(t_token *token); - +void free_token2(t_token *token); +void free_token_and_connect2(t_token *token); #endif diff --cc src/repl.c index 3f4435d,16c8e95..a0b7864 --- a/src/repl.c +++ b/src/repl.c @@@ -24,8 -17,9 +24,9 @@@ void repl(const char *prompt, t_env **e { char *input; t_token *token_list; - t_list *lines; + t_node *ast; + (*promptflag)++; while (1) { input = readline(prompt);