save commit

This commit is contained in:
2026-02-09 20:47:43 +01:00
parent e983f7fe64
commit 280fa51f94
39 changed files with 3400 additions and 239 deletions

View File

@@ -3,14 +3,15 @@
/* ::: :::::::: */
/* main.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: padan-pe <padan-pe@student.42.fr> +#+ +:+ +#+ */
/* By: sede-san <sede-san@student.42madrid.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/10/20 16:34:42 by sede-san #+# #+# */
/* Updated: 2025/10/23 17:10:17 by padan-pe ### ########.fr */
/* Updated: 2026/02/09 18:46:21 by sede-san ### ########.fr */
/* */
/* ************************************************************************** */
#include "minishell.h"
#include "core.h"
int main(
int argc,
@@ -18,19 +19,14 @@ int main(
char **envp
){
t_minishell minishell;
u_int8_t exit_status;
if (argc != 1 || argv[1] || !envp)
{
printf("Usage: ./minishell\n");
return (EXIT_FAILURE);
}
if (!minishell_init(&minishell, envp))
{
printf("Error: %s\n", "failed to initialize minishell");
return (EXIT_FAILURE);
}
exit_status = minishell_run(&minishell);
minishell_init(&minishell, envp);
minishell_run(&minishell);
minishell_clear(&minishell);
return (exit_status);
return (minishell.exit_status);
}