From 92ed2bbd3edd9bb600b7d80b4a091b63c168fc04 Mon Sep 17 00:00:00 2001 From: Sergio Date: Wed, 22 Oct 2025 19:35:38 +0200 Subject: [PATCH] structure: moved core functions (init, run, clear) to core.h to prevent circular include --- include/core.h | 52 +++++++++++++++++++++++++++++++++++++++++++++ include/minishell.h | 23 ++------------------ 2 files changed, 54 insertions(+), 21 deletions(-) create mode 100644 include/core.h diff --git a/include/core.h b/include/core.h new file mode 100644 index 0000000..72dad98 --- /dev/null +++ b/include/core.h @@ -0,0 +1,52 @@ +/* ************************************************************************** */ +/* */ +/* ::: :::::::: */ +/* core.h :+: :+: :+: */ +/* +:+ +:+ +:+ */ +/* By: sede-san // readline(3), rl_clear_history(), // rl_on_new_line(), rl_replace_line(), // rl_redisplay() @@ -36,24 +37,4 @@ # include // tgetent(3), tgetflag(3), tgetnum(3), // tgetstr(3), tgoto(3), tputs(3) -/******************************************************************************/ -/* Structures & Data Types */ -/******************************************************************************/ - -typedef struct s_minishell t_minishell; - -typedef struct s_minishell -{ - char **env; - u_int8_t exit_status; -} t_minishell; - -/* core/minishell.c */ - -extern int minishell_init(struct s_minishell *minishell, char **envp); - -extern u_int8_t minishell_run(struct s_minishell *minishell); - -extern void minishell_clear(struct s_minishell *minishell); - #endif /* MINISHELL_H */