#include "minishell.h"

void ms_init(t_shell *sh, char **envp)
{
	memset(sh, 0, sizeof(*sh));
	sh->interactive = isatty(STDIN_FILENO);
	sh->exit_status = 0;
	sh->last_status = 0;
	sh->exit_requested = 0;
	env_init(sh, envp);
	ms_setup_signals(sh);
}

void ms_cleanup(t_shell *sh)
{
	env_clear(sh);
	rl_clear_history();
}
