Fixed all norme from lexer, parser. minishell and builtins

This commit is contained in:
marcnava-42cursus
2026-02-14 00:02:03 +01:00
parent 7862f3e131
commit 6453abfda3
16 changed files with 667 additions and 571 deletions

36
src/minishell_helpers.c Normal file
View File

@@ -0,0 +1,36 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* minishell_helpers.c :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: sede-san <sede-san@student.42madrid.com +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2026/02/13 21:09:23 by sede-san #+# #+# */
/* Updated: 2026/02/13 21:09:23 by sede-san ### ########.fr */
/* */
/* ************************************************************************** */
#include "minishell.h"
#include "core.h"
void handle_sigint_status(
t_minishell *minishell
)
{
if (!minishell_consume_sigint())
return ;
minishell->exit_status = 130;
}
bool handle_eof(
char *line,
t_minishell *minishell
)
{
if (line != NULL)
return (false);
if (isatty(STDIN_FILENO))
ft_putendl("exit");
minishell->exit = true;
return (true);
}