aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/debug_tools.h6
-rw-r--r--include/minishell.h10
-rw-r--r--include/token.h4
3 files changed, 13 insertions, 7 deletions
diff --git a/include/debug_tools.h b/include/debug_tools.h
index a014ff1..a6f44f5 100644
--- a/include/debug_tools.h
+++ b/include/debug_tools.h
@@ -6,7 +6,7 @@
/* By: chuhlig <chuhlig@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/06/24 18:34:37 by dkaiser #+# #+# */
-/* Updated: 2025/01/20 17:56:01 by dkaiser ### ########.fr */
+/* Updated: 2025/01/23 15:22:14 by chuhlig ### ########.fr */
/* */
/* ************************************************************************** */
@@ -14,6 +14,7 @@
# define DEBUG_TOOLS_H
# include "libft.h"
# include <stdarg.h>
+# include "token.h"
# ifndef DEBUG
# define DEBUG 0
@@ -23,6 +24,7 @@
void dbg(char *str);
void panic(char *msg);
-void dbg2(const char *format, ...);
+void print_token_list(t_token *token_list);
+
#endif
diff --git a/include/minishell.h b/include/minishell.h
index 356df7a..6961815 100644
--- a/include/minishell.h
+++ b/include/minishell.h
@@ -6,7 +6,7 @@
/* By: chuhlig <chuhlig@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/06/22 17:14:49 by dkaiser #+# #+# */
-/* Updated: 2025/01/20 19:12:03 by chuhlig ### ########.fr */
+/* Updated: 2025/01/25 15:41:33 by dkaiser ### ########.fr */
/* */
/* ************************************************************************** */
@@ -32,9 +32,10 @@ int init_signal_handling(void);
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);
@@ -46,7 +47,8 @@ void set_return_code(int return_code, t_env **env);
int handle_redirections(t_redirection *redirs);
void *error(int err_code, char *err_text, int exit_code,
int *ret_code);
-void command_not_found_error(char *cmd);
+void *command_not_found_error(char *cmd, int *return_code,
+ char *cmd_path, char **split_path);
char *read_heredoc(char *delimiter);
int handle_input_redirection(t_redirection *redir);
int handle_output_redirection(t_redirection *redir);
diff --git a/include/token.h b/include/token.h
index 2e8da35..226c9ac 100644
--- a/include/token.h
+++ b/include/token.h
@@ -6,7 +6,7 @@
/* By: chuhlig <chuhlig@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/06/27 13:27:18 by dkaiser #+# #+# */
-/* Updated: 2025/01/20 19:10:30 by chuhlig ### ########.fr */
+/* Updated: 2025/01/25 11:42:01 by chuhlig ### ########.fr */
/* */
/* ************************************************************************** */
@@ -49,5 +49,7 @@ void free_token_and_connect(t_token *token);
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